diff options
author | Milan Crha <mcrha@redhat.com> | 2009-04-24 17:45:21 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-04-24 17:45:21 +0800 |
commit | 8a072ffc7c0ddcde472877a51ace0bb14f86fb0a (patch) | |
tree | 5c49c7807f24cd118e32e11ad52482b0ce65d0e6 /plugins | |
parent | f6792a6f1e60b04ee1c137c9232802df437580f6 (diff) | |
download | gsoc2013-evolution-8a072ffc7c0ddcde472877a51ace0bb14f86fb0a.tar gsoc2013-evolution-8a072ffc7c0ddcde472877a51ace0bb14f86fb0a.tar.gz gsoc2013-evolution-8a072ffc7c0ddcde472877a51ace0bb14f86fb0a.tar.bz2 gsoc2013-evolution-8a072ffc7c0ddcde472877a51ace0bb14f86fb0a.tar.lz gsoc2013-evolution-8a072ffc7c0ddcde472877a51ace0bb14f86fb0a.tar.xz gsoc2013-evolution-8a072ffc7c0ddcde472877a51ace0bb14f86fb0a.tar.zst gsoc2013-evolution-8a072ffc7c0ddcde472877a51ace0bb14f86fb0a.zip |
GN-bug #572348 - Removed deprecated Gtk+ symbols
Some still left, because those gone in kill-bonobo branch.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/caldav/ChangeLog | 6 | ||||
-rw-r--r-- | plugins/caldav/caldav-source.c | 56 | ||||
-rw-r--r-- | plugins/calendar-http/ChangeLog | 6 | ||||
-rw-r--r-- | plugins/calendar-http/calendar-http.c | 56 | ||||
-rw-r--r-- | plugins/calendar-weather/ChangeLog | 6 | ||||
-rw-r--r-- | plugins/calendar-weather/calendar-weather.c | 102 | ||||
-rw-r--r-- | plugins/exchange-operations/ChangeLog | 10 | ||||
-rw-r--r-- | plugins/exchange-operations/e-foreign-folder-dialog.glade | 460 | ||||
-rw-r--r-- | plugins/exchange-operations/exchange-delegates-user.c | 38 | ||||
-rw-r--r-- | plugins/exchange-operations/exchange-delegates.glade | 208 | ||||
-rw-r--r-- | plugins/exchange-operations/exchange-folder-subscription.c | 40 | ||||
-rw-r--r-- | plugins/google-account-setup/ChangeLog | 6 | ||||
-rw-r--r-- | plugins/google-account-setup/google-source.c | 61 |
13 files changed, 428 insertions, 627 deletions
diff --git a/plugins/caldav/ChangeLog b/plugins/caldav/ChangeLog index 256dc030fc..2fe681cb55 100644 --- a/plugins/caldav/ChangeLog +++ b/plugins/caldav/ChangeLog @@ -1,3 +1,9 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * caldav-source.c: Remove deprecated Gtk+ symbols. + 2009-02-26 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #572950 diff --git a/plugins/caldav/caldav-source.c b/plugins/caldav/caldav-source.c index 6fb7ea3841..00ca5acac5 100644 --- a/plugins/caldav/caldav-source.c +++ b/plugins/caldav/caldav-source.c @@ -206,7 +206,7 @@ user_changed (GtkEntry *editable, ESource *source) } static void -set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) +set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) { int time; int item_num = 0; @@ -226,15 +226,15 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) item_num = 1; time /= 60; } - gtk_option_menu_set_history (GTK_OPTION_MENU (option), item_num); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), item_num); gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), time); } static char * -get_refresh_minutes (GtkWidget *spin, GtkWidget *option) +get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) { int setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); - switch (gtk_option_menu_get_history (GTK_OPTION_MENU (option))) { + switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combobox))) { case 0: /* minutes */ break; @@ -262,24 +262,24 @@ static void spin_changed (GtkSpinButton *spin, ESource *source) { char *refresh_str; - GtkWidget *option; + GtkWidget *combobox; - option = g_object_get_data (G_OBJECT (spin), "option"); + combobox = g_object_get_data (G_OBJECT (spin), "combobox"); - refresh_str = get_refresh_minutes ((GtkWidget *) spin, option); + refresh_str = get_refresh_minutes ((GtkWidget *) spin, combobox); e_source_set_property (source, "refresh", refresh_str); g_free (refresh_str); } static void -option_changed (GtkOptionMenu *option, ESource *source) +combobox_changed (GtkComboBox *combobox, ESource *source) { char *refresh_str; GtkWidget *spin; - spin = g_object_get_data (G_OBJECT (option), "spin"); + spin = g_object_get_data (G_OBJECT (combobox), "spin"); - refresh_str = get_refresh_minutes (spin, (GtkWidget *) option); + refresh_str = get_refresh_minutes (spin, (GtkWidget *) combobox); e_source_set_property (source, "refresh", refresh_str); g_free (refresh_str); } @@ -299,13 +299,12 @@ oge_caldav (EPlugin *epl, GtkWidget *widget; GtkWidget *luser; GtkWidget *user; - GtkWidget *label, *hbox, *spin, *option, *menu; - GtkWidget *times[4]; + GtkWidget *label, *hbox, *spin, *combobox; char *uri; char *username; const char *ssl_prop; gboolean ssl_enabled; - int row, i; + int row; source = t->source; group = e_source_peek_group (source); @@ -425,25 +424,18 @@ oge_caldav (EPlugin *epl, gtk_widget_show (spin); gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, TRUE, 0); - option = gtk_option_menu_new (); - gtk_widget_show (option); - times[0] = gtk_menu_item_new_with_label (_("minutes")); - times[1] = gtk_menu_item_new_with_label (_("hours")); - times[2] = gtk_menu_item_new_with_label (_("days")); - times[3] = gtk_menu_item_new_with_label (_("weeks")); - menu = gtk_menu_new (); - gtk_widget_show (menu); - for (i = 0; i < 4; i++) { - gtk_widget_show (times[i]); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), times[i]); - } - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - set_refresh_time (source, spin, option); - gtk_box_pack_start (GTK_BOX (hbox), option, FALSE, TRUE, 0); - - g_object_set_data (G_OBJECT (option), "spin", spin); - g_signal_connect (G_OBJECT (option), "changed", G_CALLBACK (option_changed), source); - g_object_set_data (G_OBJECT (spin), "option", option); + combobox = gtk_combo_box_new_text (); + gtk_widget_show (combobox); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("minutes")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("hours")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("days")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("weeks")); + set_refresh_time (source, spin, combobox); + gtk_box_pack_start (GTK_BOX (hbox), combobox, FALSE, TRUE, 0); + + g_object_set_data (G_OBJECT (combobox), "spin", spin); + g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK (combobox_changed), source); + g_object_set_data (G_OBJECT (spin), "combobox", combobox); g_signal_connect (G_OBJECT (spin), "value-changed", G_CALLBACK (spin_changed), source); gtk_table_attach (GTK_TABLE (parent), hbox, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0); diff --git a/plugins/calendar-http/ChangeLog b/plugins/calendar-http/ChangeLog index 8cadbba783..7ceb72ae76 100644 --- a/plugins/calendar-http/ChangeLog +++ b/plugins/calendar-http/ChangeLog @@ -1,3 +1,9 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * calendar-http.c: Remove deprecated Gtk+ symbols. + 2008-07-31 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #545568 diff --git a/plugins/calendar-http/calendar-http.c b/plugins/calendar-http/calendar-http.c index 273a8264e3..7814ef5ea0 100644 --- a/plugins/calendar-http/calendar-http.c +++ b/plugins/calendar-http/calendar-http.c @@ -140,7 +140,7 @@ e_calendar_http_url (EPlugin *epl, EConfigHookItemFactoryData *data) } static void -set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) +set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) { int time; int item_num = 0; @@ -160,15 +160,15 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) item_num = 1; time /= 60; } - gtk_option_menu_set_history (GTK_OPTION_MENU (option), item_num); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), item_num); gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), time); } static char * -get_refresh_minutes (GtkWidget *spin, GtkWidget *option) +get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) { int setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); - switch (gtk_option_menu_get_history (GTK_OPTION_MENU (option))) { + switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combobox))) { case 0: /* minutes */ break; @@ -196,24 +196,24 @@ static void spin_changed (GtkSpinButton *spin, ECalConfigTargetSource *t) { char *refresh_str; - GtkWidget *option; + GtkWidget *combobox; - option = g_object_get_data (G_OBJECT (spin), "option"); + combobox = g_object_get_data (G_OBJECT (spin), "combobox"); - refresh_str = get_refresh_minutes ((GtkWidget *) spin, option); + refresh_str = get_refresh_minutes ((GtkWidget *) spin, combobox); e_source_set_property (t->source, "refresh", refresh_str); g_free (refresh_str); } static void -option_changed (GtkOptionMenu *option, ECalConfigTargetSource *t) +combobox_changed (GtkComboBox *combobox, ECalConfigTargetSource *t) { char *refresh_str; GtkWidget *spin; - spin = g_object_get_data (G_OBJECT (option), "spin"); + spin = g_object_get_data (G_OBJECT (combobox), "spin"); - refresh_str = get_refresh_minutes (spin, (GtkWidget *) option); + refresh_str = get_refresh_minutes (spin, (GtkWidget *) combobox); e_source_set_property (t->source, "refresh", refresh_str); g_free (refresh_str); } @@ -231,9 +231,8 @@ GtkWidget * e_calendar_http_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) { static GtkWidget *label; - GtkWidget *option, *spin, *menu, *hbox, *parent; - GtkWidget *times[4]; - int row, i; + GtkWidget *combobox, *spin, *hbox, *parent; + int row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; ESource *source = t->source; EUri *uri; @@ -274,25 +273,18 @@ e_calendar_http_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) gtk_widget_show (spin); gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, TRUE, 0); - option = gtk_option_menu_new (); - gtk_widget_show (option); - times[0] = gtk_menu_item_new_with_label (_("minutes")); - times[1] = gtk_menu_item_new_with_label (_("hours")); - times[2] = gtk_menu_item_new_with_label (_("days")); - times[3] = gtk_menu_item_new_with_label (_("weeks")); - menu = gtk_menu_new (); - gtk_widget_show (menu); - for (i = 0; i < 4; i++) { - gtk_widget_show (times[i]); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), times[i]); - } - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - set_refresh_time (source, spin, option); - gtk_box_pack_start (GTK_BOX (hbox), option, FALSE, TRUE, 0); - - g_object_set_data (G_OBJECT (option), "spin", spin); - g_signal_connect (G_OBJECT (option), "changed", G_CALLBACK (option_changed), t); - g_object_set_data (G_OBJECT (spin), "option", option); + combobox = gtk_combo_box_new_text (); + gtk_widget_show (combobox); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("minutes")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("hours")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("days")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("weeks")); + set_refresh_time (source, spin, combobox); + gtk_box_pack_start (GTK_BOX (hbox), combobox, FALSE, TRUE, 0); + + g_object_set_data (G_OBJECT (combobox), "spin", spin); + g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK (combobox_changed), t); + g_object_set_data (G_OBJECT (spin), "combobox", combobox); g_signal_connect (G_OBJECT (spin), "value-changed", G_CALLBACK (spin_changed), t); gtk_table_attach (GTK_TABLE (parent), hbox, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0); diff --git a/plugins/calendar-weather/ChangeLog b/plugins/calendar-weather/ChangeLog index a34f5df01b..8aa7f8990c 100644 --- a/plugins/calendar-weather/ChangeLog +++ b/plugins/calendar-weather/ChangeLog @@ -1,3 +1,9 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * calendar-weather.c: Remove deprecated Gtk+ symbols. + 2008-12-10 Suman Manjunath <msuman@novell.com> * Makefile.am: Don't try to specify LIBGWEATHER_(CFLAGS|LIBS), they diff --git a/plugins/calendar-weather/calendar-weather.c b/plugins/calendar-weather/calendar-weather.c index a6dce31326..f61d90c4d0 100644 --- a/plugins/calendar-weather/calendar-weather.c +++ b/plugins/calendar-weather/calendar-weather.c @@ -397,7 +397,7 @@ e_calendar_weather_location (EPlugin *epl, EConfigHookItemFactoryData *data) } static void -set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) +set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) { int time; int item_num = 0; @@ -417,15 +417,15 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) item_num = 1; time /= 60; } - gtk_option_menu_set_history (GTK_OPTION_MENU (option), item_num); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), item_num); gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), time); } static char * -get_refresh_minutes (GtkWidget *spin, GtkWidget *option) +get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) { int setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); - switch (gtk_option_menu_get_history (GTK_OPTION_MENU (option))) { + switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combobox))) { case 0: /* minutes */ break; @@ -452,24 +452,24 @@ static void spin_changed (GtkSpinButton *spin, ECalConfigTargetSource *t) { char *refresh_str; - GtkWidget *option; + GtkWidget *combobox; - option = g_object_get_data (G_OBJECT (spin), "option"); + combobox = g_object_get_data (G_OBJECT (spin), "combobox"); - refresh_str = get_refresh_minutes ((GtkWidget *) spin, option); + refresh_str = get_refresh_minutes ((GtkWidget *) spin, combobox); e_source_set_property (t->source, "refresh", refresh_str); g_free (refresh_str); } static void -option_changed (GtkOptionMenu *option, ECalConfigTargetSource *t) +combobox_changed (GtkComboBox *combobox, ECalConfigTargetSource *t) { char *refresh_str; GtkWidget *spin; - spin = g_object_get_data (G_OBJECT (option), "spin"); + spin = g_object_get_data (G_OBJECT (combobox), "spin"); - refresh_str = get_refresh_minutes (spin, (GtkWidget *) option); + refresh_str = get_refresh_minutes (spin, (GtkWidget *) combobox); e_source_set_property (t->source, "refresh", refresh_str); g_free (refresh_str); } @@ -478,9 +478,8 @@ GtkWidget * e_calendar_weather_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) { static GtkWidget *label; - GtkWidget *option, *spin, *menu, *hbox, *parent; - GtkWidget *times[4]; - int row, i; + GtkWidget *spin, *combobox, *hbox, *parent; + int row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; ESource *source = t->source; EUri *uri; @@ -519,25 +518,18 @@ e_calendar_weather_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) gtk_widget_show (spin); gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, TRUE, 0); - option = gtk_option_menu_new (); - gtk_widget_show (option); - times[0] = gtk_menu_item_new_with_label (_("minutes")); - times[1] = gtk_menu_item_new_with_label (_("hours")); - times[2] = gtk_menu_item_new_with_label (_("days")); - times[3] = gtk_menu_item_new_with_label (_("weeks")); - menu = gtk_menu_new (); - gtk_widget_show (menu); - for (i = 0; i < 4; i++) { - gtk_widget_show (times[i]); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), times[i]); - } - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - set_refresh_time (source, spin, option); - gtk_box_pack_start (GTK_BOX (hbox), option, FALSE, TRUE, 0); - - g_object_set_data (G_OBJECT (option), "spin", spin); - g_signal_connect (G_OBJECT (option), "changed", G_CALLBACK (option_changed), t); - g_object_set_data (G_OBJECT (spin), "option", option); + combobox = gtk_combo_box_new_text (); + gtk_widget_show (combobox); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("minutes")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("hours")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("days")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("weeks")); + set_refresh_time (source, spin, combobox); + gtk_box_pack_start (GTK_BOX (hbox), combobox, FALSE, TRUE, 0); + + g_object_set_data (G_OBJECT (combobox), "spin", spin); + g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK (combobox_changed), t); + g_object_set_data (G_OBJECT (spin), "combobox", combobox); g_signal_connect (G_OBJECT (spin), "value-changed", G_CALLBACK (spin_changed), t); gtk_table_attach (GTK_TABLE (parent), hbox, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0); @@ -546,34 +538,34 @@ e_calendar_weather_refresh (EPlugin *epl, EConfigHookItemFactoryData *data) } static void -set_units (ESource *source, GtkWidget *option) +set_units (ESource *source, GtkWidget *combobox) { const char *format = e_source_get_property (source, "units"); if (format == NULL) { format = e_source_get_property (source, "temperature"); if (format == NULL) { e_source_set_property (source, "units", "metric"); - gtk_option_menu_set_history (GTK_OPTION_MENU (option), 0); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); } else if (strcmp ((const char *)format, "fahrenheit") == 0) { /* old format, convert */ e_source_set_property (source, "units", "imperial"); - gtk_option_menu_set_history (GTK_OPTION_MENU (option), 1); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 1); } else { e_source_set_property (source, "units", "metric"); - gtk_option_menu_set_history (GTK_OPTION_MENU (option), 0); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); } } else { if (strcmp ((const char *)format, "metric") == 0) - gtk_option_menu_set_history (GTK_OPTION_MENU (option), 0); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0); else - gtk_option_menu_set_history (GTK_OPTION_MENU (option), 1); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 1); } } static void -units_changed (GtkOptionMenu *option, ECalConfigTargetSource *t) +units_changed (GtkComboBox *combobox, ECalConfigTargetSource *t) { - int choice = gtk_option_menu_get_history (GTK_OPTION_MENU (option)); + int choice = gtk_combo_box_get_active (GTK_COMBO_BOX (combobox)); if (choice == 0) e_source_set_property (t->source, "units", "metric"); else @@ -584,9 +576,8 @@ GtkWidget * e_calendar_weather_units (EPlugin *epl, EConfigHookItemFactoryData *data) { static GtkWidget *label; - GtkWidget *option, *menu, *parent; - GtkWidget *formats[2]; - int row, i; + GtkWidget *combobox, *parent; + int row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target; ESource *source = t->source; EUri *uri; @@ -617,23 +608,16 @@ e_calendar_weather_units (EPlugin *epl, EConfigHookItemFactoryData *data) gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (parent), label, 0, 1, row, row+1, GTK_FILL, 0, 0, 0); - option = gtk_option_menu_new (); - gtk_widget_show (option); - formats[0] = gtk_menu_item_new_with_label (_("Metric (Celsius, cm, etc)")); - formats[1] = gtk_menu_item_new_with_label (_("Imperial (Fahrenheit, inches, etc)")); - menu = gtk_menu_new (); - gtk_widget_show (menu); - for (i = 0; i < 2; i++) { - gtk_widget_show (formats[i]); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), formats[i]); - } - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - set_units (source, option); - gtk_label_set_mnemonic_widget (GTK_LABEL (label), option); - g_signal_connect (G_OBJECT (option), "changed", G_CALLBACK (units_changed), t); - gtk_table_attach (GTK_TABLE (parent), option, 1, 2, row, row+1, GTK_FILL, 0, 0, 0); + combobox = gtk_combo_box_new_text (); + gtk_widget_show (combobox); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Metric (Celsius, cm, etc)")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Imperial (Fahrenheit, inches, etc)")); + set_units (source, combobox); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), combobox); + g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK (units_changed), t); + gtk_table_attach (GTK_TABLE (parent), combobox, 1, 2, row, row+1, GTK_FILL, 0, 0, 0); - return option; + return combobox; } gboolean 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 <mcrha@redhat.com> + + ** 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 <a9016009@gmx.de> * 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 @@ <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" > +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> <glade-interface> - <widget class="GtkDialog" id="dialog"> - <property name="title" translatable="yes">Open Other User's Folder</property> - <property name="type">GTK_WINDOW_TOPLEVEL</property> - <property name="modal">no</property> - <property name="allow_shrink">no</property> - <property name="allow_grow">no</property> - <property name="width-request">350</property> - <property name="visible">yes</property> - <property name="window-position">GTK_WIN_POS_CENTER_ON_PARENT</property> - <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox1"> - <property name="homogeneous">no</property> - <property name="spacing">8</property> - <property name="visible">yes</property> +<widget class="GtkDialog" id="dialog"> + <property name="visible">True</property> + <property name="title" translatable="yes">Open Other User's Folder</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <property name="has_separator">True</property> + + <child internal-child="vbox"> + <widget class="GtkVBox" id="dialog-vbox1"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">8</property> + + <child internal-child="action_area"> + <widget class="GtkHButtonBox" id="dialog-action_area1"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + + <child> + <widget class="GtkButton" id="button3"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-cancel</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-6</property> + </widget> + </child> + + <child> + <widget class="GtkButton" id="button1"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-ok</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="response_id">-5</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">GTK_PACK_END</property> + </packing> + </child> + + <child> + <widget class="GtkTable" id="table1"> + <property name="visible">True</property> + <property name="n_rows">3</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">3</property> + <property name="column_spacing">3</property> + + <child> + <widget class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Account:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_CENTER</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Folder Name:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_CENTER</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="user-picker-placeholder"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button-user"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_User:</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkComboBoxEntry" id="folder-name-combo"> + <property name="visible">True</property> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="has_frame">True</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="server-combobox"> + <property name="visible">True</property> + <property name="items" translatable="yes">a +b</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">2</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> - <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action_area1"> - <property name="layout_style">GTK_BUTTONBOX_END</property> - <property name="spacing">8</property> - <property name="visible">yes</property> - - <child> - <widget class="GtkButton" id="button3"> - <property name="can_default">yes</property> - <property name="can_focus">yes</property> - <property name="visible">yes</property> - <property name="label">gtk-cancel</property> - <property name="use_stock">yes</property> - <property name="use_underline">yes</property> - <property name="response_id">-6</property> - </widget> - </child> - - <child> - <widget class="GtkButton" id="button1"> - <property name="can_default">yes</property> - <property name="has_default">yes</property> - <property name="can_focus">yes</property> - <property name="visible">yes</property> - <property name="label">gtk-ok</property> - <property name="use_stock">yes</property> - <property name="use_underline">yes</property> - <property name="response_id">-5</property> - </widget> - </child> - - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">no</property> - <property name="fill">yes</property> - <property name="pack_type">GTK_PACK_END</property> - </packing> - </child> - - <child> - <widget class="GtkTable" id="table1"> - <property name="homogeneous">no</property> - <property name="row_spacing">3</property> - <property name="column_spacing">3</property> - <property name="n-rows">3</property> - <property name="n-columns">2</property> - <property name="visible">yes</property> - - <child> - <widget class="GtkLabel" id="label1"> - <property name="label" translatable="yes">_Account:</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">no</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">server-option-menu</property> - <property name="visible">yes</property> - <property name="use_underline">yes</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_padding">0</property> - <property name="y_padding">0</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label3"> - <property name="label" translatable="yes">_Folder Name:</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">no</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">folder-name-entry</property> - <property name="visible">yes</property> - <property name="use_underline">yes</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_padding">0</property> - <property name="y_padding">0</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkOptionMenu" id="server-option-menu"> - <property name="can_focus">yes</property> - <property name="history">0</property> - <property name="visible">yes</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget1"> - <property name="visible">yes</property> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_padding">0</property> - <property name="y_padding">0</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkCombo" id="folder-name-combo"> - <property name="value_in_list">no</property> - <property name="case_sensitive">no</property> - <property name="enable_arrow_keys">yes</property> - <property name="enable_arrows_always">no</property> - <property name="allow_empty">yes</property> - <property name="visible">yes</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="folder-name-entry"> - <property name="can_focus">yes</property> - <property name="editable">yes</property> - <property name="text" translatable="yes"></property> - <property name="max-length">0</property> - <property name="visibility">yes</property> - <property name="visible">yes</property> - </widget> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="convertwidget2"> - <property name="visible">yes</property> - - <child> - <widget class="GtkListItem" id="convertwidget3"> - <property name="visible">yes</property> - - <child> - <widget class="GtkLabel" id="convertwidget4"> - <property name="label" translatable="yes"></property> - <property name="xalign">0.0</property> - <property name="visible">yes</property> - </widget> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_padding">0</property> - <property name="y_padding">0</property> - <property name="x_options">expand|fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="user-picker-placeholder"> - <property name="homogeneous">no</property> - <property name="spacing">0</property> - <property name="visible">yes</property> - - <child> - <placeholder /> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_padding">0</property> - <property name="y_padding">0</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="button-user"> - <property name="can_focus">yes</property> - <property name="label" translatable="yes">_User:</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="visible">yes</property> - <property name="use_underline">yes</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_padding">0</property> - <property name="y_padding">0</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - </widget> - <packing> - <property name="padding">2</property> - <property name="expand">yes</property> - <property name="fill">yes</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">4</property> - <property name="expand">yes</property> - <property name="fill">yes</property> - </packing> - </child> - </widget> </glade-interface> 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 <string.h> -#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, "<html><body><p>%s<br><br>%s</p><table border = 0 width=\"40%%\">", 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, "<tr><td>" , folder_names_for_display[i], ":</td><td>", role_name, "</td> </tr>", 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.</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">calendar_perms</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -334,7 +333,6 @@ and access your folders with the permissions you give them.</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">task_perms</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -363,7 +361,6 @@ and access your folders with the permissions you give them.</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">inbox_perms</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -392,7 +389,6 @@ and access your folders with the permissions you give them.</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">contact_perms</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -409,214 +405,82 @@ and access your folders with the permissions you give them.</property> </child> <child> - <widget class="GtkOptionMenu" id="calendar_perms"> + <widget class="GtkComboBox" id="calendar_perms_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget1"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget2"> - <property name="visible">True</property> - <property name="label" translatable="yes">None</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget3"> - <property name="visible">True</property> - <property name="label" translatable="yes">Reviewer (read-only)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget4"> - <property name="visible">True</property> - <property name="label" translatable="yes">Author (read, create)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget5"> - <property name="visible">True</property> - <property name="label" translatable="yes">Editor (read, create, edit)</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">None +Reviewer (read-only) +Author (read, create) +Editor (read, create, edit)</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">0</property> <property name="bottom_attach">1</property> - <property name="y_options"></property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="task_perms"> + <widget class="GtkComboBox" id="task_perms_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget6"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget7"> - <property name="visible">True</property> - <property name="label" translatable="yes">None</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget8"> - <property name="visible">True</property> - <property name="label" translatable="yes">Reviewer (read-only)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget9"> - <property name="visible">True</property> - <property name="label" translatable="yes">Author (read, create)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget10"> - <property name="visible">True</property> - <property name="label" translatable="yes">Editor (read, create, edit)</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">None +Reviewer (read-only) +Author (read, create) +Editor (read, create, edit)</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="y_options"></property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="inbox_perms"> + <widget class="GtkComboBox" id="inbox_perms_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget11"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget12"> - <property name="visible">True</property> - <property name="label" translatable="yes">None</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget13"> - <property name="visible">True</property> - <property name="label" translatable="yes">Reviewer (read-only)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget14"> - <property name="visible">True</property> - <property name="label" translatable="yes">Author (read, create)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget15"> - <property name="visible">True</property> - <property name="label" translatable="yes">Editor (read, create, edit)</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">None +Reviewer (read-only) +Author (read, create) +Editor (read, create, edit)</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">2</property> <property name="bottom_attach">3</property> - <property name="y_options"></property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> <child> - <widget class="GtkOptionMenu" id="contact_perms"> + <widget class="GtkComboBox" id="contact_perms_combobox"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> - - <child internal-child="menu"> - <widget class="GtkMenu" id="convertwidget16"> - <property name="visible">True</property> - - <child> - <widget class="GtkMenuItem" id="convertwidget17"> - <property name="visible">True</property> - <property name="label" translatable="yes">None</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget18"> - <property name="visible">True</property> - <property name="label" translatable="yes">Reviewer (read-only)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget19"> - <property name="visible">True</property> - <property name="label" translatable="yes">Author (read, create)</property> - <property name="use_underline">True</property> - </widget> - </child> - - <child> - <widget class="GtkMenuItem" id="convertwidget20"> - <property name="visible">True</property> - <property name="label" translatable="yes">Editor (read, create, edit)</property> - <property name="use_underline">True</property> - </widget> - </child> - </widget> - </child> + <property name="items" translatable="yes">None +Reviewer (read-only) +Author (read, create) +Editor (read, create, edit)</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> </widget> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">3</property> <property name="bottom_attach">4</property> - <property name="y_options"></property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> </packing> </child> </widget> 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); diff --git a/plugins/google-account-setup/ChangeLog b/plugins/google-account-setup/ChangeLog index 4d8e8b1ecb..03cf6b4e3e 100644 --- a/plugins/google-account-setup/ChangeLog +++ b/plugins/google-account-setup/ChangeLog @@ -1,3 +1,9 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572348 + + * google-source.c: Remove deprecated Gtk+ symbols. + 2009-04-09 Milan Crha <mcrha@redhat.com> ** Fix for bug #574248 diff --git a/plugins/google-account-setup/google-source.c b/plugins/google-account-setup/google-source.c index 181984c538..a5b846076f 100644 --- a/plugins/google-account-setup/google-source.c +++ b/plugins/google-account-setup/google-source.c @@ -233,10 +233,10 @@ user_changed (GtkEntry *editable, ESource *source) } static char * -get_refresh_minutes (GtkWidget *spin, GtkWidget *option) +get_refresh_minutes (GtkWidget *spin, GtkWidget *combobox) { int setting = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)); - switch (gtk_option_menu_get_history (GTK_OPTION_MENU (option))) { + switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combobox))) { case 0: /* minutes */ break; @@ -264,30 +264,30 @@ static void spin_changed (GtkSpinButton *spin, ECalConfigTargetSource *t) { gchar *refresh_str; - GtkWidget *option; + GtkWidget *combobox; - option = g_object_get_data (G_OBJECT(spin), "option"); + combobox = g_object_get_data (G_OBJECT(spin), "combobox"); - refresh_str = get_refresh_minutes ((GtkWidget *)spin, option); + refresh_str = get_refresh_minutes ((GtkWidget *)spin, combobox); e_source_set_property (t->source, "refresh", refresh_str); g_free (refresh_str); } static void -option_changed (GtkSpinButton *option, ECalConfigTargetSource *t) +combobox_changed (GtkComboBox *combobox, ECalConfigTargetSource *t) { gchar *refresh_str; GtkWidget *spin; - spin = g_object_get_data (G_OBJECT(option), "spin"); + spin = g_object_get_data (G_OBJECT(combobox), "spin"); - refresh_str = get_refresh_minutes (spin, (GtkWidget *)option); + refresh_str = get_refresh_minutes (spin, (GtkWidget *)combobox); e_source_set_property (t->source, "refresh", refresh_str); g_free (refresh_str); } static void -set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) +set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *combobox) { int time; int item_num = 0; @@ -307,7 +307,7 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option) item_num = 1; time /= 60; } - gtk_option_menu_set_history (GTK_OPTION_MENU (option), item_num); + gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), item_num); gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), time); } @@ -567,9 +567,7 @@ plugin_google (EPlugin *epl, GtkCellRenderer *renderer; GtkListStore *store; - GtkWidget *option, *spin, *menu, *hbox; - GtkWidget *times [4]; - int i; + GtkWidget *combobox, *spin, *hbox; source = t->source; group = e_source_peek_group (source); @@ -647,28 +645,21 @@ plugin_google (EPlugin *epl, gtk_widget_show (spin); gtk_box_pack_start (GTK_BOX(hbox), spin, FALSE, TRUE, 0); - option = gtk_option_menu_new (); - gtk_widget_show (option); - times[0] = gtk_menu_item_new_with_label (_("minutes")); - times[1] = gtk_menu_item_new_with_label (_("hours")); - times[2] = gtk_menu_item_new_with_label (_("days")); - times[3] = gtk_menu_item_new_with_label (_("weeks")); - - menu = gtk_menu_new (); - gtk_widget_show (menu); - for (i = 0; i < 4; i++) { - gtk_widget_show (times[i]); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), times[i]); - } - gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu); - set_refresh_time (source, spin, option); - gtk_box_pack_start (GTK_BOX (hbox), option, FALSE, TRUE, 0); - - e_source_set_property (source, "refresh", "30"); - - g_object_set_data (G_OBJECT (option), "spin", spin); - g_signal_connect (G_OBJECT (option), "changed", G_CALLBACK (option_changed), t); - g_object_set_data (G_OBJECT (spin), "option", option); + if (!e_source_get_property (source, "refresh")) + e_source_set_property (source, "refresh", "30"); + + combobox = gtk_combo_box_new_text (); + gtk_widget_show (combobox); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("minutes")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("hours")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("days")); + gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("weeks")); + set_refresh_time (source, spin, combobox); + gtk_box_pack_start (GTK_BOX (hbox), combobox, FALSE, TRUE, 0); + + g_object_set_data (G_OBJECT (combobox), "spin", spin); + g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK (combobox_changed), t); + g_object_set_data (G_OBJECT (spin), "combobox", combobox); g_signal_connect (G_OBJECT (spin), "value-changed", G_CALLBACK (spin_changed), t); gtk_table_attach (GTK_TABLE (parent), hbox, 1, 2, row + 2, row + 3, GTK_EXPAND | GTK_FILL, 0, 0, 0); |