From: Ross Burton Date: Thu, 9 Jun 2005 10:43:09 +0000 (+0000) Subject: Use GtkFileChooserButton instead of GnomeFileEntry X-Git-Tag: upstream/3.7.4~7380 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06a811ed4a7e63f9f3ad5cff312db8a12c705be6;p=platform%2Fupstream%2Fevolution-data-server.git Use GtkFileChooserButton instead of GnomeFileEntry --- diff --git a/libedataserverui/ChangeLog b/libedataserverui/ChangeLog index 4ddcbd2..e32c986 100644 --- a/libedataserverui/ChangeLog +++ b/libedataserverui/ChangeLog @@ -1,3 +1,9 @@ +2005-06-09 Ross Burton + + * e-categories-dialog.c: + * e-categories-dialog.glade: + Use GtkFileChooserButton instead of a GnomeFileEntry. + 2005-05-24 Sushma Rai * e-name-selector-dialog.c (contact_column_formatter): Using diff --git a/libedataserverui/e-categories-dialog.c b/libedataserverui/e-categories-dialog.c index fecf5c2..e794d51 100644 --- a/libedataserverui/e-categories-dialog.c +++ b/libedataserverui/e-categories-dialog.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -35,7 +36,6 @@ #include #include #include -#include #include #include #include "e-categories-dialog.h" @@ -85,14 +85,7 @@ load_properties_dialog (ECategoriesDialog *parent) prop_dialog->category_name = glade_xml_get_widget (prop_dialog->gui, "category-name"); prop_dialog->category_color = glade_xml_get_widget (prop_dialog->gui, "category-color"); - - /* create the icon file entry */ - table = glade_xml_get_widget (prop_dialog->gui, "table-category-properties"); - prop_dialog->category_icon = gnome_file_entry_new ("category-icon-history-id", _("Category Icon")); - g_object_set (G_OBJECT (prop_dialog->category_icon), "use_filechooser", TRUE, NULL); - gtk_table_attach (GTK_TABLE (table), prop_dialog->category_icon, 1, 2, 2, 3, GTK_FILL, GTK_FILL, 3, 3); - gtk_widget_show (prop_dialog->category_icon); - gnome_file_entry_set_modal ((GnomeFileEntry *)prop_dialog->category_icon, TRUE); + prop_dialog->category_icon = glade_xml_get_widget (prop_dialog->gui, "category-icon"); return prop_dialog; } @@ -271,8 +264,7 @@ new_button_clicked_cb (GtkButton *button, gpointer user_data) g_free (correct_category_name); } else { /* FIXME: get color */ - category_icon = gtk_entry_get_text ( - GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (prop_dialog->category_icon)))); + category_icon = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (prop_dialog->category_icon)); e_categories_add (correct_category_name, NULL, category_icon ? category_icon : NULL, TRUE); @@ -324,16 +316,14 @@ edit_button_clicked_cb (GtkButton *button, gpointer user_data) gtk_tree_model_get (model, &iter, 1, &category_name, -1); gtk_entry_set_text (GTK_ENTRY (prop_dialog->category_name), category_name); gtk_widget_set_sensitive (prop_dialog->category_name, FALSE); - gtk_entry_set_text ( - GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (prop_dialog->category_icon))), - e_categories_get_icon_file_for (category_name)); + gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (prop_dialog->category_icon), + e_categories_get_icon_file_for (category_name)); if (gtk_dialog_run (GTK_DIALOG (prop_dialog->the_dialog)) == GTK_RESPONSE_OK) { const char *category_icon; /* FIXME: get color */ - category_icon = gtk_entry_get_text ( - GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (prop_dialog->category_icon)))); + category_icon = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (prop_dialog->category_icon)); if (category_icon) e_categories_set_icon_file_for (category_name, category_icon); diff --git a/libedataserverui/e-categories-dialog.glade b/libedataserverui/e-categories-dialog.glade index 9d77c44..fe41376 100644 --- a/libedataserverui/e-categories-dialog.glade +++ b/libedataserverui/e-categories-dialog.glade @@ -474,6 +474,25 @@ + + + + True + Category Icon + GTK_FILE_CHOOSER_ACTION_OPEN + True + False + -1 + + + 1 + 2 + 2 + 3 + fill + fill + + 0