Switch from ComboBox to ComboBoxText

This commit is contained in:
Paul Dicker
2025-03-29 15:28:22 +01:00
committed by Stéphane Lesimple
parent 9bbd268aa4
commit 8c567549c1
3 changed files with 9 additions and 9 deletions

View File

@@ -368,22 +368,22 @@ void GuiCreateMediumInfoWindow()
lab = gtk_label_new(" ");
gtk_box_pack_start(GTK_BOX(hbox), lab, FALSE, FALSE, 0);
combo_box = gtk_combo_box_new_text();
combo_box = gtk_combo_box_text_new();
gtk_box_pack_start(GTK_BOX(hbox), combo_box, FALSE, FALSE, 0);
g_signal_connect(G_OBJECT(combo_box), "changed", G_CALLBACK(drive_select_cb), NULL);
for(i=0; i<Closure->deviceNames->len; i++)
{
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box),
g_ptr_array_index(Closure->deviceNames,i));
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box),
g_ptr_array_index(Closure->deviceNames,i));
if(!strcmp(Closure->device, g_ptr_array_index(Closure->deviceNodes,i)))
dev_idx = i;
}
if(!Closure->deviceNodes->len)
{ gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _utf("No drives found"));
{ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _utf("No drives found"));
}
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), dev_idx);

View File

@@ -479,13 +479,13 @@ GtkWidget *GuiCreateToolBar(GtkWidget *parent)
icon = gtk_image_new_from_stock("dvdisaster-cd", GTK_ICON_SIZE_LARGE_TOOLBAR);
gtk_container_add(GTK_CONTAINER(ebox), icon);
Closure->driveCombo = combo_box = gtk_combo_box_new_text();
Closure->driveCombo = combo_box = gtk_combo_box_text_new();
g_signal_connect(G_OBJECT(combo_box), "changed", G_CALLBACK(drive_select_cb), NULL);
for(i=0; i<Closure->deviceNames->len; i++)
{
gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box),
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box),
g_ptr_array_index(Closure->deviceNames,i));
if(!strcmp(Closure->device, g_ptr_array_index(Closure->deviceNodes,i)))
@@ -493,7 +493,7 @@ GtkWidget *GuiCreateToolBar(GtkWidget *parent)
}
if(!Closure->deviceNodes->len)
{ gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _utf("No drives found"));
{ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _utf("No drives found"));
}
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), dev_idx);

View File

@@ -2496,7 +2496,7 @@ void GuiCreatePreferencesWindow(void)
gtk_box_pack_start(GTK_BOX(hbox), i ? lwoh->normalLabel : lwoh->linkBox, FALSE, FALSE, 0);
if(!i) gtk_box_pack_start(GTK_BOX(hbox), lwoh->tooltip, FALSE, FALSE, 0);
chooser = gtk_combo_box_new_text();
chooser = gtk_combo_box_text_new();
g_signal_connect(G_OBJECT(chooser), "changed", G_CALLBACK(method_select_cb), pc);
@@ -2505,7 +2505,7 @@ void GuiCreatePreferencesWindow(void)
char *utf;
utf = g_locale_to_utf8(method->menuEntry, -1, NULL, NULL, NULL);
gtk_combo_box_append_text(GTK_COMBO_BOX(chooser), utf);
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(chooser), utf);
g_free(utf);
if(!strncmp(Closure->methodName, method->name, 4))