diff options
-rw-r--r-- | gtk/src/callbacks.c | 16 | ||||
-rw-r--r-- | gtk/src/ghb.ui | 14 |
2 files changed, 11 insertions, 19 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 8971e48a4..eb98553e3 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -833,12 +833,16 @@ dvd_device_changed_cb(GtkComboBoxText *combo, signal_user_data_t *ud) gchar *name; dialog = GHB_WIDGET(ud->builder, "source_dialog"); - device = gtk_combo_box_text_get_active_text (combo); - name = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(dialog)); - if (name == NULL || strcmp(name, device) != 0) - gtk_file_chooser_select_filename (GTK_FILE_CHOOSER(dialog), device); - if (name != NULL) - g_free(name); + device = gtk_combo_box_text_get_active_text(combo); + // Protext against unexpected NULL return value + if (device != NULL) + { + name = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(dialog)); + if (name == NULL || strcmp(name, device) != 0) + gtk_file_chooser_select_filename (GTK_FILE_CHOOSER(dialog), device); + if (name != NULL) + g_free(name); + } } } diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index 5228d4ce2..53e65b4cd 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -542,12 +542,6 @@ </popup> </ui> </object> - <object class="GtkListStore" id="device_list"> - <columns> - <!-- column-name device --> - <column type="gchararray"/> - </columns> - </object> <object class="GtkMenu" id="presets_menu"> <child> @@ -8436,14 +8430,8 @@ libx264 authors: <child> <object class="GtkComboBoxText" id="source_device"> <property name="visible">True</property> - <property name="model">device_list</property> + <property name="entry-text-column">0</property> <signal handler="dvd_device_changed_cb" name="changed"/> - <child> - <object class="GtkCellRendererText" id="cellrenderertext1"/> - <attributes> - <attribute name="text">0</attribute> - </attributes> - </child> </object> </child> </object> |