mirror of
https://github.com/libretro/pcsx2.git
synced 2024-12-14 05:38:51 +00:00
gtk2: port gtk_combo_box to gtk_combo_box_text
The former was deprecated on gtk2.24 (and removed from gtk3)
This commit is contained in:
parent
cdd09a2616
commit
ba9e998ff5
@ -29,7 +29,7 @@ GtkWidget* CreateRenderComboBox()
|
||||
GtkWidget *render_combo_box;
|
||||
int renderer_box_position = 0;
|
||||
|
||||
render_combo_box = gtk_combo_box_new_text ();
|
||||
render_combo_box = gtk_combo_box_text_new ();
|
||||
|
||||
for(auto s = theApp.m_gs_renderers.begin(); s != theApp.m_gs_renderers.end(); s++)
|
||||
{
|
||||
@ -56,7 +56,7 @@ GtkWidget* CreateRenderComboBox()
|
||||
continue;
|
||||
}
|
||||
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(render_combo_box), label.c_str());
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(render_combo_box), label.c_str());
|
||||
}
|
||||
|
||||
switch (theApp.GetConfig("renderer", 0)) {
|
||||
@ -78,7 +78,7 @@ GtkWidget* CreateRenderComboBox()
|
||||
GtkWidget* CreateInterlaceComboBox()
|
||||
{
|
||||
GtkWidget *combo_box;
|
||||
combo_box = gtk_combo_box_new_text ();
|
||||
combo_box = gtk_combo_box_text_new ();
|
||||
|
||||
for(size_t i = 0; i < theApp.m_gs_interlace.size(); i++)
|
||||
{
|
||||
@ -88,7 +88,7 @@ GtkWidget* CreateInterlaceComboBox()
|
||||
|
||||
if(!s.note.empty()) label += format(" (%s)", s.note.c_str());
|
||||
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), label.c_str());
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), label.c_str());
|
||||
}
|
||||
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), theApp.GetConfig("interlace", 0));
|
||||
@ -98,15 +98,15 @@ GtkWidget* CreateInterlaceComboBox()
|
||||
GtkWidget* CreateMsaaComboBox()
|
||||
{
|
||||
GtkWidget *combo_box;
|
||||
combo_box = gtk_combo_box_new_text ();
|
||||
combo_box = gtk_combo_box_text_new ();
|
||||
|
||||
// For now, let's just put in the same vaues that show up in the windows combo box.
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), "Custom");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), "2x");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), "3x");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), "4x");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), "5x");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), "6x");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), "Custom");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), "2x");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), "3x");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), "4x");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), "5x");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), "6x");
|
||||
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), theApp.GetConfig("upscale_multiplier", 2)-1);
|
||||
return combo_box;
|
||||
@ -115,11 +115,11 @@ GtkWidget* CreateMsaaComboBox()
|
||||
GtkWidget* CreateFilterComboBox()
|
||||
{
|
||||
GtkWidget *combo_box;
|
||||
combo_box = gtk_combo_box_new_text ();
|
||||
combo_box = gtk_combo_box_text_new ();
|
||||
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), "Off");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), "Normal");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), "Forced");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), "Off");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), "Normal");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), "Forced");
|
||||
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), theApp.GetConfig("filter", 0));
|
||||
return combo_box;
|
||||
@ -143,11 +143,11 @@ int get_hex_entry(GtkWidget *text_box) {
|
||||
GtkWidget* CreateGlComboBox(const char* option)
|
||||
{
|
||||
GtkWidget* combo;
|
||||
combo = gtk_combo_box_new_text();
|
||||
combo = gtk_combo_box_text_new();
|
||||
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "Auto");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "Force-Disabled");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "Force-Enabled");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "Auto");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "Force-Disabled");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo), "Force-Enabled");
|
||||
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), theApp.GetConfig(option, -1) + 1);
|
||||
return combo;
|
||||
|
@ -29,7 +29,7 @@ void on_conf_key(GtkButton *button, gpointer user_data);
|
||||
void on_toggle_option(GtkToggleButton *togglebutton, gpointer user_data);
|
||||
|
||||
static int current_pad = 0;
|
||||
static GtkComboBox *joy_choose_cbox;
|
||||
static GtkComboBoxText *joy_choose_cbox;
|
||||
|
||||
const char* s_pGuiKeyMap[] =
|
||||
{
|
||||
@ -240,12 +240,12 @@ class keys_tree
|
||||
};
|
||||
keys_tree *key_tree_manager;
|
||||
|
||||
void populate_new_joysticks(GtkComboBox *box)
|
||||
void populate_new_joysticks(GtkComboBoxText *box)
|
||||
{
|
||||
char str[255];
|
||||
JoystickInfo::EnumerateJoysticks(s_vjoysticks);
|
||||
|
||||
gtk_combo_box_append_text(box, "Keyboard/mouse only");
|
||||
gtk_combo_box_text_append_text(box, "Keyboard/mouse only");
|
||||
|
||||
vector<JoystickInfo*>::iterator it = s_vjoysticks.begin();
|
||||
|
||||
@ -254,7 +254,7 @@ void populate_new_joysticks(GtkComboBox *box)
|
||||
{
|
||||
sprintf(str, "Keyboard/mouse and %s - but: %d, axes: %d, hats: %d", (*it)->GetName().c_str(),
|
||||
(*it)->GetNumButtons(), (*it)->GetNumAxes(), (*it)->GetNumHats());
|
||||
gtk_combo_box_append_text(box, str);
|
||||
gtk_combo_box_text_append_text(box, str);
|
||||
it++;
|
||||
}
|
||||
}
|
||||
@ -264,9 +264,9 @@ void set_current_joy()
|
||||
u32 joyid = conf->get_joyid(current_pad);
|
||||
if (JoystickIdWithinBounds(joyid))
|
||||
// 0 is special case for no gamepad. So you must increase of 1.
|
||||
gtk_combo_box_set_active(joy_choose_cbox, joyid+1);
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(joy_choose_cbox), joyid+1);
|
||||
else
|
||||
gtk_combo_box_set_active(joy_choose_cbox, 0);
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(joy_choose_cbox), 0);
|
||||
}
|
||||
|
||||
typedef struct
|
||||
@ -398,9 +398,9 @@ void on_toggle_option(GtkToggleButton *togglebutton, gpointer user_data)
|
||||
conf->options &= ~checkbox->mask;
|
||||
}
|
||||
|
||||
void joy_changed(GtkComboBox *box, gpointer user_data)
|
||||
void joy_changed(GtkComboBoxText *box, gpointer user_data)
|
||||
{
|
||||
int joyid = gtk_combo_box_get_active(box);
|
||||
int joyid = gtk_combo_box_get_active(GTK_COMBO_BOX(box));
|
||||
// Note position 0 of the combo box is no gamepad
|
||||
joyid--;
|
||||
|
||||
@ -515,7 +515,7 @@ GtkWidget *create_notebook_page_dialog(int page, dialog_buttons btn[MAX_KEYS], d
|
||||
GtkWidget *keys_static_frame, *keys_static_box;
|
||||
GtkWidget *keys_static_area;
|
||||
|
||||
joy_choose_cbox = GTK_COMBO_BOX(gtk_combo_box_new_text());
|
||||
joy_choose_cbox = GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new());
|
||||
populate_new_joysticks(joy_choose_cbox);
|
||||
set_current_joy();
|
||||
g_signal_connect(GTK_OBJECT (joy_choose_cbox), "changed", G_CALLBACK(joy_changed), NULL);
|
||||
|
@ -214,12 +214,12 @@ void DisplayDialog()
|
||||
NULL);
|
||||
|
||||
int_label = gtk_label_new ("Interpolation:");
|
||||
int_box = gtk_combo_box_new_text ();
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "0 - Nearest (fastest/bad quality)");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "1 - Linear (simple/okay sound)");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "2 - Cubic (artificial highs)");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "3 - Hermite (better highs)");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "4 - Catmull-Rom (PS2-like/slow)");
|
||||
int_box = gtk_combo_box_text_new ();
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(int_box), "0 - Nearest (fastest/bad quality)");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(int_box), "1 - Linear (simple/okay sound)");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(int_box), "2 - Cubic (artificial highs)");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(int_box), "3 - Hermite (better highs)");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(int_box), "4 - Catmull-Rom (PS2-like/slow)");
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(int_box), Interpolation);
|
||||
|
||||
effects_check = gtk_check_button_new_with_label("Disable Effects Processing");
|
||||
@ -229,19 +229,19 @@ void DisplayDialog()
|
||||
debug_button = gtk_button_new_with_label("Debug...");
|
||||
|
||||
mod_label = gtk_label_new ("Module:");
|
||||
mod_box = gtk_combo_box_new_text ();
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(mod_box), "0 - No Sound (emulate SPU2 only)");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(mod_box), "1 - PortAudio (cross-platform)");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(mod_box), "2 - SDL Audio (recommended for PulseAudio)");
|
||||
//gtk_combo_box_append_text(GTK_COMBO_BOX(mod_box), "3 - Alsa (probably doesn't work)");
|
||||
mod_box = gtk_combo_box_text_new ();
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(mod_box), "0 - No Sound (emulate SPU2 only)");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(mod_box), "1 - PortAudio (cross-platform)");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(mod_box), "2 - SDL Audio (recommended for PulseAudio)");
|
||||
//gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(mod_box), "3 - Alsa (probably doesn't work)");
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(mod_box), OutputModule);
|
||||
|
||||
api_label = gtk_label_new ("PortAudio API:");
|
||||
api_box = gtk_combo_box_new_text ();
|
||||
api_box = gtk_combo_box_text_new ();
|
||||
// In order to keep it the menu light, I only put linux major api
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(api_box), "0 - ALSA (recommended)");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(api_box), "1 - OSS (legacy)");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(api_box), "2 - JACK");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(api_box), "0 - ALSA (recommended)");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(api_box), "1 - OSS (legacy)");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(api_box), "2 - JACK");
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(api_box), OutputAPI);
|
||||
|
||||
latency_label = gtk_label_new ("Latency:");
|
||||
@ -249,10 +249,10 @@ void DisplayDialog()
|
||||
gtk_range_set_value(GTK_RANGE(latency_slide), SndOutLatencyMS);
|
||||
|
||||
sync_label = gtk_label_new ("Synchronization Mode:");
|
||||
sync_box = gtk_combo_box_new_text ();
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(sync_box), "TimeStretch (Recommended)");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(sync_box), "Async Mix (Breaks some games!)");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(sync_box), "None (Audio can skip.)");
|
||||
sync_box = gtk_combo_box_text_new ();
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(sync_box), "TimeStretch (Recommended)");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(sync_box), "Async Mix (Breaks some games!)");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(sync_box), "None (Audio can skip.)");
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(sync_box), SynchMode);
|
||||
|
||||
advanced_button = gtk_button_new_with_label("Advanced...");
|
||||
|
@ -288,11 +288,11 @@ void DisplayDialog()
|
||||
gtk_widget_set_tooltip_text(log_check, "Used for Debugging.");
|
||||
|
||||
int_label = gtk_label_new("Interlacing:");
|
||||
int_box = gtk_combo_box_new_text();
|
||||
int_box = gtk_combo_box_text_new();
|
||||
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "No Interlacing");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "Interlace 0");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "Interlace 1");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(int_box), "No Interlacing");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(int_box), "Interlace 0");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(int_box), "Interlace 1");
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(int_box), conf.interlace);
|
||||
gtk_widget_set_tooltip_text(int_box, "Toggled by pressing F5 when running.");
|
||||
int_holder = gtk_hbox_new(false, 5);
|
||||
@ -300,11 +300,11 @@ void DisplayDialog()
|
||||
gtk_box_pack_start(GTK_BOX(int_holder), int_box, false, false, 2);
|
||||
|
||||
bilinear_label = gtk_label_new("Bilinear Filtering:");
|
||||
bilinear_box = gtk_combo_box_new_text();
|
||||
bilinear_box = gtk_combo_box_text_new();
|
||||
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(bilinear_box), "Off");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(bilinear_box), "Normal");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(bilinear_box), "Forced");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(bilinear_box), "Off");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(bilinear_box), "Normal");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(bilinear_box), "Forced");
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(bilinear_box), conf.bilinear);
|
||||
gtk_widget_set_tooltip_text(bilinear_box, "Best quality is off. Turn on for speed. Toggled by pressing Shift + F5 when running.");
|
||||
bilinear_holder = gtk_hbox_new(false, 5);
|
||||
@ -312,13 +312,13 @@ void DisplayDialog()
|
||||
gtk_box_pack_start(GTK_BOX(bilinear_holder), bilinear_box, false, false, 2);
|
||||
|
||||
aa_label = gtk_label_new("Anti-Aliasing:");
|
||||
aa_box = gtk_combo_box_new_text();
|
||||
aa_box = gtk_combo_box_text_new();
|
||||
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "1X (None)");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "2X");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "4X");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "8X");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "16X");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(aa_box), "1X (None)");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(aa_box), "2X");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(aa_box), "4X");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(aa_box), "8X");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(aa_box), "16X");
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(aa_box), conf.aa);
|
||||
gtk_widget_set_tooltip_text(aa_box, "Toggled by pressing F6 when running.");
|
||||
aa_holder = gtk_hbox_new(false, 5);
|
||||
@ -326,9 +326,9 @@ void DisplayDialog()
|
||||
gtk_box_pack_start(GTK_BOX(aa_holder), aa_box, false, false, 2);
|
||||
|
||||
snap_label = gtk_label_new("Snapshot format:");
|
||||
snap_box = gtk_combo_box_new_text();
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(snap_box), "JPEG");
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(snap_box), "TIFF");
|
||||
snap_box = gtk_combo_box_text_new();
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(snap_box), "JPEG");
|
||||
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(snap_box), "TIFF");
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(snap_box), conf.zz_options.tga_snap);
|
||||
snap_holder = gtk_hbox_new(false, 5);
|
||||
gtk_box_pack_start(GTK_BOX(snap_holder), snap_label, false, false, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user