diff --git a/capplets/file-types/ChangeLog b/capplets/file-types/ChangeLog index 236f20324..f1880afa0 100644 --- a/capplets/file-types/ChangeLog +++ b/capplets/file-types/ChangeLog @@ -1,3 +1,9 @@ +2002-04-30 Jody Goldberg + + http://bugzilla.gnome.org/show_bug.cgi?id=80327 + * service-edit-dialog.c (program_changed_cb) : Doh! If the current + tree selection is not a service then the app can be null. + 2002-04-26 Jody Goldberg * service-edit-dialog.c (populate_app_list) : always populate the diff --git a/capplets/file-types/service-edit-dialog.c b/capplets/file-types/service-edit-dialog.c index 52ca3b464..baa7761ee 100644 --- a/capplets/file-types/service-edit-dialog.c +++ b/capplets/file-types/service-edit-dialog.c @@ -553,6 +553,7 @@ program_changed_cb (ServiceEditDialog *dialog, GtkOptionMenu *option_menu) GtkMenuShell *menu; GnomeVFSMimeApplication *app; GList *child; + gboolean requires_terminal = FALSE; menu = GTK_MENU_SHELL (gtk_option_menu_get_menu (option_menu)); id = gtk_option_menu_get_history (option_menu); @@ -571,12 +572,17 @@ program_changed_cb (ServiceEditDialog *dialog, GtkOptionMenu *option_menu) app = g_object_get_data (G_OBJECT (child->data), "app"); if (app == NULL) app = dialog->p->info->app; - if (app->command != NULL) - gnome_file_entry_set_filename (GNOME_FILE_ENTRY (WID ("custom_program_entry")), - app->command); + + if (app != NULL) { + requires_terminal = app->requires_terminal; + if (app->command != NULL) + gnome_file_entry_set_filename ( + GNOME_FILE_ENTRY (WID ("custom_program_entry")), + app->command); + } gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("needs_terminal_toggle")), - app->requires_terminal); + requires_terminal); } static void