diff --git a/capplets/file-types/ChangeLog b/capplets/file-types/ChangeLog index 6ab968865..55eeb2702 100644 --- a/capplets/file-types/ChangeLog +++ b/capplets/file-types/ChangeLog @@ -1,5 +1,8 @@ 2002-01-11 Bradford Hovinen + * mime-edit-dialog.c (add_ext_cb): Don't create a separate dialog; + just read from new_ext_entry + * service-info.c (get_apps_for_service_type): Implement * service-edit-dialog.c (program_changed_cb): Implement diff --git a/capplets/file-types/TODO_NOTES b/capplets/file-types/TODO_NOTES index c6e36516f..ab833cb32 100644 --- a/capplets/file-types/TODO_NOTES +++ b/capplets/file-types/TODO_NOTES @@ -7,7 +7,6 @@ - Implement tree cascading - Fix gnome_url_show - Don't have a separate add extension dialog, just put it in the same dialog as everything else - - Fill in list for Internet service apps - Make add work CVS Surgery diff --git a/capplets/file-types/file-types-properties.glade b/capplets/file-types/file-types-properties.glade index cdccacfea..e1bc6e8f4 100644 --- a/capplets/file-types/file-types-properties.glade +++ b/capplets/file-types/file-types-properties.glade @@ -366,92 +366,106 @@ yes - + 4 no - 4 + 4 + 4 + 2 + 2 yes - - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN + + yes + yes + Add + GTK_RELIEF_NORMAL yes - - - - yes - no - yes - - - - CList:title - label8 - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - yes - - - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - - - - GTK_UPDATE_CONTINUOUS - yes - - - 0 - yes - yes + 1 + 2 + 0 + 1 + 0 + 0 + fill + - - GTK_BUTTONBOX_START - 10 + + yes + GTK_SHADOW_IN + no yes - - yes - yes - Add... - GTK_RELIEF_NORMAL - yes - - - - - - yes - yes - Remove - GTK_RELIEF_NORMAL + + CList:title + label8 + GTK_JUSTIFY_CENTER + no + 0.5 + 0.5 + 0 + 0 yes - 0 - no - yes + 0 + 1 + 1 + 2 + 0 + 0 + expand|fill + expand|fill + + + + + + yes + yes + + 0 + yes + yes + + + 0 + 1 + 0 + 1 + 0 + 0 + expand|fill + + + + + + + yes + yes + Remove + GTK_RELIEF_NORMAL + yes + + + 1 + 2 + 1 + 2 + 0 + 0 + fill + @@ -509,7 +523,7 @@ yes - + yes @@ -559,7 +573,7 @@ yes - + yes @@ -656,121 +670,6 @@ - - GTK_WINDOW_TOPLEVEL - no - no - no - no - GTK_WIN_POS_NONE - - - - no - 8 - yes - - - - GTK_BUTTONBOX_END - 8 - yes - - - - yes - yes - yes - gtk-ok - yes - yes - - - - - - yes - yes - yes - gtk-apply - yes - yes - - - - - - yes - yes - yes - gtk-cancel - yes - yes - - - - - 0 - no - yes - GTK_PACK_END - - - - - - no - 4 - yes - - - - New filename extension - GTK_JUSTIFY_CENTER - no - 0 - 0.5 - 0 - 0 - yes - - - 0 - no - no - - - - - - yes - yes - - 0 - yes - yes - - - 0 - no - no - - - - - 0 - yes - yes - - - - - 4 - yes - yes - - - GTK_WINDOW_TOPLEVEL no @@ -985,7 +884,7 @@ yes - + yes diff --git a/capplets/file-types/file-types-properties.glade1 b/capplets/file-types/file-types-properties.glade1 index 5b1934aee..ee28a3d2e 100644 --- a/capplets/file-types/file-types-properties.glade1 +++ b/capplets/file-types/file-types-properties.glade1 @@ -370,82 +370,121 @@ - GtkHBox - hbox5 + GtkTable + table1 4 + 2 + 2 False - 4 + 4 + 4 - GtkScrolledWindow - scrolledwindow2 - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS + GtkButton + add_ext_button + True + True + + GTK_RELIEF_NORMAL - 0 - True - True + 1 + 2 + 0 + 1 + 0 + 0 + False + False + False + False + True + False + + + + + GtkCList + ext_list + True + 1 + 80 + GTK_SELECTION_SINGLE + False + GTK_SHADOW_IN + + 0 + 1 + 1 + 2 + 0 + 0 + True + True + False + False + True + True - GtkCList - ext_list - True - 1 - 80 - GTK_SELECTION_SINGLE - False - GTK_SHADOW_IN - - - GtkLabel - CList:title - label8 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - + GtkLabel + CList:title + label8 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 - GtkVButtonBox - vbuttonbox3 - GTK_BUTTONBOX_START - 10 - 85 - 27 - 7 - 0 + GtkEntry + new_ext_entry + True + True + True + 0 + - 0 - False - True + 0 + 1 + 0 + 1 + 0 + 0 + True + False + False + False + True + False + - - GtkButton - add_ext_button - True - True - - GTK_RELIEF_NORMAL - - - - GtkButton - remove_ext_button - True - True - - GTK_RELIEF_NORMAL - + + GtkButton + remove_ext_button + True + True + + GTK_RELIEF_NORMAL + + 1 + 2 + 1 + 2 + 0 + 0 + False + False + False + False + True + False + @@ -611,118 +650,6 @@ - - GnomeDialog - add_ext_dialog - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - False - False - False - - - GtkVBox - GnomeDialog:vbox - dialog-vbox3 - False - 8 - - 4 - True - True - - - - GtkHButtonBox - GnomeDialog:action_area - dialog-action_area3 - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button7 - True - True - GNOME_STOCK_BUTTON_OK - - - - GtkButton - button8 - True - True - GNOME_STOCK_BUTTON_APPLY - - - - GtkButton - button9 - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - - GtkVBox - add_ext_widget - False - 4 - - 0 - True - True - - - - GtkLabel - label14 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkEntry - add_ext_entry - True - True - True - 0 - - - 0 - False - False - - - - - - GnomeDialog internet_service_dialog diff --git a/capplets/file-types/mime-edit-dialog.c b/capplets/file-types/mime-edit-dialog.c index 803bf9716..f036df76d 100644 --- a/capplets/file-types/mime-edit-dialog.c +++ b/capplets/file-types/mime-edit-dialog.c @@ -490,37 +490,15 @@ store_data (MimeEditDialog *dialog) static void add_ext_cb (MimeEditDialog *dialog) { - GladeXML *add_dialog_xml; - GtkWidget *add_dialog; - GtkWidget *add_widget; - GtkWidget *ext_entry; - gint response_id; GtkTreeIter iter; + const gchar *ext_name; - add_dialog_xml = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/file-types-properties.glade", "add_ext_widget", NULL); + ext_name = gtk_entry_get_text (GTK_ENTRY (WID ("new_ext_entry"))); - add_dialog = gtk_dialog_new_with_buttons - (_("Add filename extension"), NULL, -1, - GTK_STOCK_OK, GTK_RESPONSE_OK, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - NULL); - - add_widget = glade_xml_get_widget (add_dialog_xml, "add_ext_widget"); - ext_entry = glade_xml_get_widget (add_dialog_xml, "add_ext_entry"); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (add_dialog)->vbox), add_widget, TRUE, TRUE, 0); - - gtk_widget_show_all (add_dialog); - - response_id = gtk_dialog_run (GTK_DIALOG (add_dialog)); - - if (response_id == GTK_RESPONSE_OK) { + if (ext_name != NULL && *ext_name != '\0') { gtk_tree_store_append (dialog->p->ext_store, &iter, NULL); - gtk_tree_store_set (dialog->p->ext_store, &iter, 0, - gtk_entry_get_text (GTK_ENTRY (ext_entry)), -1); + gtk_tree_store_set (dialog->p->ext_store, &iter, 0, ext_name, -1); } - - gtk_widget_destroy (GTK_WIDGET (add_dialog)); - g_object_unref (G_OBJECT (add_dialog_xml)); } static void