From 8a072ffc7c0ddcde472877a51ace0bb14f86fb0a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 24 Apr 2009 11:45:21 +0200 Subject: GN-bug #572348 - Removed deprecated Gtk+ symbols Some still left, because those gone in kill-bonobo branch. --- plugins/exchange-operations/ChangeLog | 10 + .../e-foreign-folder-dialog.glade | 460 ++++++++++----------- .../exchange-operations/exchange-delegates-user.c | 38 +- .../exchange-operations/exchange-delegates.glade | 208 ++-------- .../exchange-folder-subscription.c | 40 +- 5 files changed, 287 insertions(+), 469 deletions(-) (limited to 'plugins/exchange-operations') diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog index 82e3c33902..91a2e017a2 100644 --- a/plugins/exchange-operations/ChangeLog +++ b/plugins/exchange-operations/ChangeLog @@ -1,3 +1,13 @@ +2009-04-24 Milan Crha + + ** Fix for bug #572348 + + * exchange-delegates.glade: + * e-foreign-folder-dialog.glade: + * exchange-folder-subscription.c: + * exchange-delegates-user.c: + Remove deprecated Gtk+ symbols. + 2009-02-26 Andre Klapper * exchange-permissions-dialog.c: diff --git a/plugins/exchange-operations/e-foreign-folder-dialog.glade b/plugins/exchange-operations/e-foreign-folder-dialog.glade index 2a3ae5a13f..7390e561ce 100644 --- a/plugins/exchange-operations/e-foreign-folder-dialog.glade +++ b/plugins/exchange-operations/e-foreign-folder-dialog.glade @@ -1,252 +1,220 @@ - + - - Open Other User's Folder - GTK_WINDOW_TOPLEVEL - no - no - no - 350 - yes - GTK_WIN_POS_CENTER_ON_PARENT - - - no - 8 - yes + + True + Open Other User's Folder + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + + True + False + 8 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + -6 + + + + + + True + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + -5 + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + 3 + 2 + False + 3 + 3 + + + + True + _Account: + True + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + _Folder Name: + True + False + GTK_JUSTIFY_CENTER + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + False + 0 + + + + + + + 1 + 2 + 1 + 2 + fill + + + + + + + True + True + _User: + True + GTK_RELIEF_NORMAL + True + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + a +b + False + True + True + + + 1 + 2 + 2 + 3 + fill + fill + + + + + + True + a +b + False + True + + + 1 + 2 + 0 + 1 + fill + fill + + + + + 2 + True + True + + + + + - - - GTK_BUTTONBOX_END - 8 - yes - - - - yes - yes - yes - gtk-cancel - yes - yes - -6 - - - - - - yes - yes - yes - yes - gtk-ok - yes - yes - -5 - - - - - - 0 - no - yes - GTK_PACK_END - - - - - - no - 3 - 3 - 3 - 2 - yes - - - - _Account: - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - server-option-menu - yes - yes - - - 0 - 1 - 0 - 1 - 0 - 0 - fill - - - - - - - _Folder Name: - GTK_JUSTIFY_CENTER - no - 0.5 - 0.5 - 0 - 0 - folder-name-entry - yes - yes - - - 0 - 1 - 2 - 3 - 0 - 0 - fill - - - - - - - yes - 0 - yes - - - - yes - - - - - 1 - 2 - 0 - 1 - 0 - 0 - fill - - - - - - - no - no - yes - no - yes - yes - - - - yes - yes - - 0 - yes - yes - - - - - - yes - - - - yes - - - - - 0.0 - yes - - - - - - - - - 1 - 2 - 2 - 3 - 0 - 0 - expand|fill - - - - - - - no - 0 - yes - - - - - - - 1 - 2 - 1 - 2 - 0 - 0 - fill - - - - - - - yes - _User: - GTK_RELIEF_NORMAL - yes - yes - - - 0 - 1 - 1 - 2 - 0 - 0 - fill - - - - - - 2 - yes - yes - - - - - 4 - yes - yes - - - diff --git a/plugins/exchange-operations/exchange-delegates-user.c b/plugins/exchange-operations/exchange-delegates-user.c index 2cd3eb1c5a..66a7e71014 100644 --- a/plugins/exchange-operations/exchange-delegates-user.c +++ b/plugins/exchange-operations/exchange-delegates-user.c @@ -49,10 +49,9 @@ #include -#define EXCHANGE_DELEGATES_USER_SEPARATOR -2 #define EXCHANGE_DELEGATES_USER_CUSTOM -3 /* Can't use E2K_PERMISSIONS_ROLE_CUSTOM, because it's -1, which - * means "end of list" to e_dialog_option_menu_get/set + * means "end of list" to e_dialog_combo_box_get/set */ static const int exchange_perm_map[] = { @@ -61,7 +60,6 @@ static const int exchange_perm_map[] = { E2K_PERMISSIONS_ROLE_AUTHOR, E2K_PERMISSIONS_ROLE_EDITOR, - EXCHANGE_DELEGATES_USER_SEPARATOR, EXCHANGE_DELEGATES_USER_CUSTOM, -1 @@ -79,7 +77,7 @@ static const char *folder_names_for_display[] = { }; static const char *widget_names[] = { - "calendar_perms", "task_perms", "inbox_perms", "contact_perms", + "calendar_perms_combobox", "task_perms_combobox", "inbox_perms_combobox", "contact_perms_combobox", }; @@ -140,26 +138,14 @@ is_delegate_role (E2kPermissionsRole role) } static void -set_perms (GtkWidget *omenu, E2kPermissionsRole role) +set_perms (GtkWidget *combobox, E2kPermissionsRole role) { if (!is_delegate_role (role)) { - GtkWidget *menu, *item; - - menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (omenu)); - - item = gtk_menu_item_new (); - gtk_widget_set_sensitive (item, FALSE); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - - item = gtk_menu_item_new_with_label (_("Custom")); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - - gtk_widget_show_all (menu); - + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Custom")); role = EXCHANGE_DELEGATES_USER_CUSTOM; } - e_dialog_option_menu_set (omenu, role, exchange_perm_map); + e_dialog_combo_box_set (combobox, role, exchange_perm_map); } static void @@ -224,7 +210,7 @@ exchange_delegates_user_edit (ExchangeAccount *account, GtkWidget *parent_window) { GladeXML *xml; - GtkWidget *dialog, *table, *label, *menu, *check, *check_delegate; + GtkWidget *dialog, *table, *label, *combobox, *check, *check_delegate; char *title; int button, i; E2kPermissionsRole role; @@ -257,8 +243,8 @@ exchange_delegates_user_edit (ExchangeAccount *account, /* Set up the permissions */ for (i = 0; i < EXCHANGE_DELEGATES_LAST; i++) { - menu = glade_xml_get_widget (xml, widget_names[i]); - set_perms (menu, user->role[i]); + combobox = glade_xml_get_widget (xml, widget_names[i]); + set_perms (combobox, user->role[i]); } check = glade_xml_get_widget (xml, "see_private_checkbox"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), @@ -285,8 +271,8 @@ exchange_delegates_user_edit (ExchangeAccount *account, /* And update */ modified = FALSE; for (i = 0; i < EXCHANGE_DELEGATES_LAST; i++) { - menu = glade_xml_get_widget (xml, widget_names[i]); - role = e_dialog_option_menu_get (menu, exchange_perm_map); + combobox = glade_xml_get_widget (xml, widget_names[i]); + role = e_dialog_combo_box_get (combobox, exchange_perm_map); if (is_delegate_role (user->role[i]) && user->role[i] != role) { @@ -350,8 +336,8 @@ exchange_delegates_user_edit (ExchangeAccount *account, camel_stream_printf (stream, "

%s

%s

", msg_part1, msg_part2); for (i = 0; i < EXCHANGE_DELEGATES_LAST; i++) { - menu = glade_xml_get_widget (xml, widget_names[i]); - role = e_dialog_option_menu_get (menu, exchange_perm_map); + combobox = glade_xml_get_widget (xml, widget_names[i]); + role = e_dialog_combo_box_get (combobox, exchange_perm_map); role_name = g_strdup (map_to_full_role_name(role)); role_name_final = g_strconcat (role_name_final, "", NULL); diff --git a/plugins/exchange-operations/exchange-delegates.glade b/plugins/exchange-operations/exchange-delegates.glade index 1731672078..1e099e999a 100644 --- a/plugins/exchange-operations/exchange-delegates.glade +++ b/plugins/exchange-operations/exchange-delegates.glade @@ -305,7 +305,6 @@ and access your folders with the permissions you give them.0.500 - calendar_permsPANGO_ELLIPSIZE_NONE-1False @@ -334,7 +333,6 @@ and access your folders with the permissions you give them.0.500 - task_permsPANGO_ELLIPSIZE_NONE-1False @@ -363,7 +361,6 @@ and access your folders with the permissions you give them.0.500 - inbox_permsPANGO_ELLIPSIZE_NONE-1False @@ -392,7 +389,6 @@ and access your folders with the permissions you give them.0.500 - contact_permsPANGO_ELLIPSIZE_NONE-1False @@ -409,214 +405,82 @@ and access your folders with the permissions you give them. - + True - True - 0 - - - - True - - - - True - None - True - - - - - - True - Reviewer (read-only) - True - - - - - - True - Author (read, create) - True - - - - - - True - Editor (read, create, edit) - True - - - - + None +Reviewer (read-only) +Author (read, create) +Editor (read, create, edit) + False + True 1 2 0 1 - + fill + fill - + True - True - 0 - - - - True - - - - True - None - True - - - - - - True - Reviewer (read-only) - True - - - - - - True - Author (read, create) - True - - - - - - True - Editor (read, create, edit) - True - - - - + None +Reviewer (read-only) +Author (read, create) +Editor (read, create, edit) + False + True 1 2 1 2 - + fill + fill - + True - True - 0 - - - - True - - - - True - None - True - - - - - - True - Reviewer (read-only) - True - - - - - - True - Author (read, create) - True - - - - - - True - Editor (read, create, edit) - True - - - - + None +Reviewer (read-only) +Author (read, create) +Editor (read, create, edit) + False + True 1 2 2 3 - + fill + fill - + True - True - 0 - - - - True - - - - True - None - True - - - - - - True - Reviewer (read-only) - True - - - - - - True - Author (read, create) - True - - - - - - True - Editor (read, create, edit) - True - - - - + None +Reviewer (read-only) +Author (read, create) +Editor (read, create, edit) + False + True 1 2 3 4 - + fill + fill diff --git a/plugins/exchange-operations/exchange-folder-subscription.c b/plugins/exchange-operations/exchange-folder-subscription.c index 1ffbd7365c..05229c0838 100644 --- a/plugins/exchange-operations/exchange-folder-subscription.c +++ b/plugins/exchange-operations/exchange-folder-subscription.c @@ -96,8 +96,7 @@ setup_name_selector (GladeXML *glade_xml, ENameSelector **name_selector_ret) static void setup_folder_name_combo (GladeXML *glade_xml, gchar *fname) { - GtkWidget *combo; - GList *string_list; + GtkComboBox *combo; char *strings[] = { "Calendar", "Inbox", @@ -108,16 +107,15 @@ setup_folder_name_combo (GladeXML *glade_xml, gchar *fname) }; int i; - combo = glade_xml_get_widget (glade_xml, "folder-name-combo"); - g_assert (GTK_IS_COMBO (combo)); + combo = GTK_COMBO_BOX (glade_xml_get_widget (glade_xml, "folder-name-combo")); + g_assert (GTK_IS_COMBO_BOX_ENTRY (combo)); + + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (combo))); - string_list = NULL; for (i = 0; strings[i] != NULL; i ++) - string_list = g_list_append (string_list, strings[i]); - gtk_combo_set_popdown_strings (GTK_COMBO (combo), string_list); - g_list_free (string_list); + gtk_combo_box_append_text (combo, strings[i]); - gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), fname); + gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo))), fname); } static void @@ -146,25 +144,17 @@ user_name_entry_changed_callback (GtkEditable *editable, void *data) } static void -setup_server_option_menu (GladeXML *glade_xml, gchar *mail_account) +setup_server_combobox (GladeXML *glade_xml, gchar *mail_account) { GtkWidget *widget; - GtkWidget *menu; - GtkWidget *menu_item; - - widget = glade_xml_get_widget (glade_xml, "server-option-menu"); - g_return_if_fail (GTK_IS_OPTION_MENU (widget)); - - menu = gtk_menu_new (); - gtk_widget_show (menu); - - menu_item = gtk_menu_item_new_with_label (mail_account); - gtk_widget_show (menu_item); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_item); + widget = glade_xml_get_widget (glade_xml, "server-combobox"); + g_return_if_fail (GTK_IS_COMBO_BOX (widget)); + gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (widget)))); - gtk_option_menu_set_menu (GTK_OPTION_MENU (widget), menu); + gtk_combo_box_append_text (GTK_COMBO_BOX (widget), mail_account); + gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0); /* FIXME: Default to the current storage in the shell view. */ } @@ -329,9 +319,9 @@ create_folder_subscription_dialog (ExchangeAccount *account, gchar *fname) g_signal_connect (subscription_info->name_selector_widget, "changed", G_CALLBACK (user_name_entry_changed_callback), dialog); - setup_server_option_menu (glade_xml, account->account_name); + setup_server_combobox (glade_xml, account->account_name); setup_folder_name_combo (glade_xml, fname); - subscription_info->folder_name_entry = glade_xml_get_widget (glade_xml, "folder-name-entry"); + subscription_info->folder_name_entry = gtk_bin_get_child (GTK_BIN (glade_xml_get_widget (glade_xml, "folder-name-combo"))); g_signal_connect (dialog, "response", G_CALLBACK (subscribe_to_folder), subscription_info); gtk_widget_show (dialog); -- cgit v1.2.3
" , folder_names_for_display[i], ":", role_name, "