diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-04-25 22:07:44 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-04-25 22:07:44 +0800 |
commit | 86fdd3a1cba7c156cfa127322e258f5636b45a99 (patch) | |
tree | e49802fd9008a59587fca1cafb1801b8b3bf0db6 /plugins | |
parent | c2119e513bc7482fc0150287af8502a5ff67191a (diff) | |
parent | 23df769955ea54f756a579c19964df87ae6fd5c8 (diff) | |
download | gsoc2013-evolution-86fdd3a1cba7c156cfa127322e258f5636b45a99.tar.gz gsoc2013-evolution-86fdd3a1cba7c156cfa127322e258f5636b45a99.tar.zst gsoc2013-evolution-86fdd3a1cba7c156cfa127322e258f5636b45a99.zip |
Merge branch 'master' into kill-bonobo
This was a particularly messy merge. Watch out for regressions!
Conflicts:
ChangeLog
NEWS
a11y/ChangeLog
a11y/widgets/ea-combo-button.c
a11y/widgets/ea-combo-button.h
a11y/widgets/ea-widgets.c
addressbook/ChangeLog
addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
addressbook/gui/component/addressbook-component.c
addressbook/gui/component/addressbook-component.h
addressbook/gui/component/addressbook-config.c
addressbook/gui/component/addressbook-migrate.h
addressbook/gui/component/addressbook-view.c
addressbook/gui/component/addressbook-view.h
addressbook/gui/component/addressbook.h
addressbook/gui/component/autocompletion-config.c
addressbook/gui/component/autocompletion-config.h
addressbook/gui/component/component-factory.c
addressbook/gui/component/e-book-shell-module-migrate.c
addressbook/gui/component/ldap-config.glade
addressbook/gui/contact-editor/Makefile.am
addressbook/gui/contact-editor/contact-editor.glade
addressbook/gui/contact-editor/e-contact-editor-address.c
addressbook/gui/contact-editor/e-contact-editor-address.h
addressbook/gui/contact-editor/e-contact-editor-im.c
addressbook/gui/contact-editor/e-contact-editor-im.h
addressbook/gui/contact-editor/e-contact-editor.c
addressbook/gui/contact-editor/e-contact-editor.h
addressbook/gui/contact-editor/eab-editor.c
addressbook/gui/contact-editor/eab-editor.h
addressbook/gui/contact-editor/test-editor.c
addressbook/gui/contact-list-editor/Makefile.am
addressbook/gui/widgets/Makefile.am
addressbook/gui/widgets/e-addressbook-model.c
addressbook/gui/widgets/e-addressbook-model.h
addressbook/gui/widgets/e-addressbook-reflow-adapter.c
addressbook/gui/widgets/e-addressbook-view.c
addressbook/gui/widgets/e-addressbook-view.h
addressbook/gui/widgets/e-minicard-view.c
addressbook/gui/widgets/eab-contact-display.c
addressbook/gui/widgets/eab-gui-util.c
addressbook/gui/widgets/eab-menu.c
addressbook/gui/widgets/eab-menu.h
addressbook/gui/widgets/eab-popup-control.c
addressbook/gui/widgets/eab-popup-control.h
addressbook/gui/widgets/eab-popup.c
addressbook/gui/widgets/eab-popup.h
addressbook/gui/widgets/eab-vcard-control.c
addressbook/gui/widgets/eab-vcard-control.h
addressbook/gui/widgets/gal-view-minicard.c
addressbook/gui/widgets/gal-view-minicard.h
addressbook/printing/e-contact-print-style-editor.c
addressbook/printing/e-contact-print-style-editor.h
addressbook/printing/e-contact-print.glade
addressbook/printing/test-contact-print-style-editor.c
addressbook/tools/evolution-addressbook-export.c
addressbook/util/Makefile.am
calendar/ChangeLog
calendar/gui/Makefile.am
calendar/gui/apps_evolution_calendar.schemas.in
calendar/gui/calendar-component.c
calendar/gui/calendar-component.h
calendar/gui/calendar-config.c
calendar/gui/comp-editor-factory.c
calendar/gui/comp-editor-factory.h
calendar/gui/comp-util.c
calendar/gui/comp-util.h
calendar/gui/control-factory.c
calendar/gui/control-factory.h
calendar/gui/dialogs/alarm-dialog.c
calendar/gui/dialogs/cal-prefs-dialog.c
calendar/gui/dialogs/cal-prefs-dialog.glade
calendar/gui/dialogs/cal-prefs-dialog.h
calendar/gui/dialogs/comp-editor.c
calendar/gui/dialogs/comp-editor.h
calendar/gui/dialogs/event-editor.c
calendar/gui/dialogs/event-page.c
calendar/gui/dialogs/memo-editor.c
calendar/gui/dialogs/memo-page.c
calendar/gui/dialogs/recurrence-page.c
calendar/gui/dialogs/task-details-page.c
calendar/gui/dialogs/task-details-page.glade
calendar/gui/dialogs/task-editor.c
calendar/gui/dialogs/task-page.c
calendar/gui/e-cal-component-memo-preview.c
calendar/gui/e-cal-component-memo-preview.h
calendar/gui/e-cal-component-preview.c
calendar/gui/e-cal-component-preview.h
calendar/gui/e-cal-event.h
calendar/gui/e-cal-model.c
calendar/gui/e-cal-popup.c
calendar/gui/e-calendar-table.c
calendar/gui/e-calendar-view.c
calendar/gui/e-day-view.c
calendar/gui/e-itip-control.c
calendar/gui/e-memo-table.c
calendar/gui/e-memos.c
calendar/gui/e-memos.h
calendar/gui/e-tasks.c
calendar/gui/e-tasks.h
calendar/gui/e-week-view.c
calendar/gui/gnome-cal.c
calendar/gui/goto.c
calendar/gui/itip-bonobo-control.c
calendar/gui/itip-bonobo-control.h
calendar/gui/itip-utils.c
calendar/gui/itip-utils.h
calendar/gui/main.c
calendar/gui/memos-component.c
calendar/gui/memos-control.c
calendar/gui/memos-control.h
calendar/gui/migration.c
calendar/gui/migration.h
calendar/gui/tasks-component.c
calendar/gui/tasks-control.c
calendar/importers/main.c
composer/ChangeLog
composer/e-composer-actions.c
composer/e-composer-private.c
composer/e-msg-composer.c
composer/e-msg-composer.h
composer/evolution-composer.ui
configure.in
doc/reference/shell/eshell-overrides.txt
e-util/ChangeLog
e-util/Makefile.am
e-util/e-corba-utils.c
e-util/e-corba-utils.h
e-util/e-gui-utils.c
e-util/e-gui-utils.h
e-util/e-logger.c
e-util/e-non-intrusive-error-dialog.c
e-util/e-non-intrusive-error-dialog.h
e-util/e-plugin-ui.c
e-util/e-util-labels.c
e-util/e-util-labels.h
e-util/e-util.c
e-util/e-util.h
filter/ChangeLog
filter/filter-option.c
help/C/evolution.xml
help/ChangeLog
help/Makefile.am
help/cs/cs.po
help/de/de.po
help/es/es.po
help/eu/figures/Screenshot-Free-Busy.png
help/eu/figures/evo_blink.png
help/eu/figures/evo_dialog-info.png
help/eu/figures/evo_dialog-warning.png
help/eu/figures/evo_email_a.png
help/eu/figures/evo_flag_follow_up_a.png
help/eu/figures/evo_proxyadd_a.png
help/eu/figures/evo_shd_memo_a.png
help/eu/figures/exchange-delegation.png
help/eu/figures/exchange-identity.png
help/eu/figures/exchange-receive-options.png
help/eu/figures/exchange-receive.png
help/eu/figures/exchg-identity.png
help/eu/figures/exchng-identity.png
help/eu/figures/exchng-rec-mail.png
help/eu/figures/exchng-rec-option.png
help/eu/figures/exchng-rec-options.png
help/eu/figures/free_busy.png
help/eu/figures/full-1.png
help/eu/figures/full-2.png
help/eu/figures/full-3.png
help/eu/figures/full-4.png
help/eu/figures/full-5.png
help/eu/figures/full-6.png
help/eu/figures/full-7.png
help/eu/figures/mail-druid-pic.png
help/eu/figures/mail-inbox.png
help/eu/figures/mail-threaded.png
help/eu/figures/mainwindow-pic.png
help/eu/figures/minus.png
help/eu/figures/plus.png
help/eu/figures/proxy-cal.png
help/eu/figures/proxy-login.png
help/eu/figures/schedule.png
help/eu/figures/stock_search.png
help/eu/figures/sub-others-folder.png
help/eu/figures/sub-pub-fold.png
help/eu/figures/vfolder-createrule-fig.png
help/quickref/Makefile.am
mail/ChangeLog
mail/Makefile.am
mail/default/Makefile.am
mail/e-mail-shell-module-migrate.c
mail/e-searching-tokenizer.c
mail/em-account-editor.c
mail/em-account-prefs.h
mail/em-composer-prefs.c
mail/em-composer-prefs.h
mail/em-composer-utils.c
mail/em-filter-folder-element.c
mail/em-folder-browser.c
mail/em-folder-selection-button.h
mail/em-folder-selector.c
mail/em-folder-tree-model.c
mail/em-folder-tree-model.h
mail/em-folder-tree.c
mail/em-folder-tree.h
mail/em-folder-utils.c
mail/em-folder-utils.h
mail/em-folder-view.c
mail/em-format-html-display.c
mail/em-format-html-print.c
mail/em-format-html-print.h
mail/em-format-html.c
mail/em-format-quote.h
mail/em-format.c
mail/em-format.h
mail/em-html-stream.h
mail/em-mailer-prefs.c
mail/em-mailer-prefs.h
mail/em-message-browser.c
mail/em-message-browser.h
mail/em-migrate.h
mail/em-network-prefs.h
mail/em-popup.c
mail/em-search-context.h
mail/em-subscribe-editor.c
mail/em-utils.c
mail/em-utils.h
mail/filtertypes.xml
mail/mail-component-factory.c
mail/mail-component.c
mail/mail-config-factory.c
mail/mail-config-factory.h
mail/mail-config.c
mail/mail-config.glade
mail/mail-crypto.c
mail/mail-crypto.h
mail/mail-dialogs.glade
mail/mail-folder-cache.c
mail/mail-mt.c
mail/mail-send-recv.c
mail/mail-send-recv.h
mail/mail-session.c
mail/mail-session.h
mail/mail-types.h
mail/mail-vfolder.c
mail/message-list.c
mail/message-tag-followup.c
mail/searchtypes.xml
mail/vfoldertypes.xml
plugins/attachment-reminder/Makefile.am
plugins/audio-inline/org-gnome-audio-inline.eplug.xml
plugins/caldav/ChangeLog
plugins/caldav/caldav-source.c
plugins/calendar-http/ChangeLog
plugins/calendar-weather/ChangeLog
plugins/calendar-weather/calendar-weather.c
plugins/email-custom-header/ChangeLog
plugins/email-custom-header/email-custom-header.c
plugins/exchange-operations/ChangeLog
plugins/google-account-setup/ChangeLog
plugins/google-account-setup/Makefile.am
plugins/google-account-setup/google-contacts-source.c
plugins/google-account-setup/google-source.c
plugins/import-ics-attachments/ChangeLog
plugins/import-ics-attachments/Makefile.am
plugins/import-ics-attachments/icsimporter.c
plugins/itip-formatter/ChangeLog
plugins/itip-formatter/itip-view.c
plugins/mail-account-disable/ChangeLog
plugins/mail-account-disable/mail-account-disable.c
plugins/mail-notification/ChangeLog
plugins/mail-notification/mail-notification.c
plugins/mail-to-meeting/ChangeLog
plugins/mail-to-task/ChangeLog
plugins/mark-all-read/mark-all-read.c
plugins/publish-calendar/ChangeLog
plugins/publish-calendar/publish-format-fb.c
plugins/publish-calendar/publish-format-ical.c
plugins/save-attachments/ChangeLog
plugins/save-attachments/Makefile.am
plugins/save-attachments/save-attachments.c
plugins/select-one-source/ChangeLog
plugins/select-one-source/Makefile.am
plugins/select-one-source/select-one-source.c
plugins/startup-wizard/ChangeLog
plugins/startup-wizard/startup-wizard.c
plugins/webdav-account-setup/ChangeLog
plugins/webdav-account-setup/Makefile.am
plugins/webdav-account-setup/webdav-contacts-source.c
po/ChangeLog
po/POTFILES.in
po/ar.po
po/bg.po
po/bn_IN.po
po/ca.po
po/cs.po
po/da.po
po/de.po
po/el.po
po/en_GB.po
po/es.po
po/et.po
po/fr.po
po/gl.po
po/gu.po
po/hi.po
po/hu.po
po/it.po
po/ja.po
po/kn.po
po/ko.po
po/lt.po
po/ml.po
po/mr.po
po/nb.po
po/nl.po
po/pa.po
po/pl.po
po/pt.po
po/ru.po
po/sl.po
po/sr.po
po/sr@latin.po
po/sv.po
po/ta.po
po/te.po
po/th.po
po/tr.po
po/zh_HK.po
po/zh_TW.po
shell/ChangeLog
shell/Evolution-Component.idl
shell/Makefile.am
shell/apps_evolution_shell.schemas.in
shell/e-component-registry.c
shell/e-component-registry.h
shell/e-component-view.c
shell/e-component-view.h
shell/e-corba-config-page.c
shell/e-corba-config-page.h
shell/e-shell-constants.h
shell/e-shell-importer.c
shell/e-shell-importer.h
shell/e-shell-nm.c
shell/e-shell-settings-dialog.c
shell/e-shell-settings-dialog.h
shell/e-shell-view.c
shell/e-shell-view.h
shell/e-shell-window-commands.c
shell/e-shell-window-commands.h
shell/e-shell-window.c
shell/e-shell-window.h
shell/e-shell.c
shell/e-shell.h
shell/e-sidebar.c
shell/e-sidebar.h
shell/e-user-creatable-items-handler.c
shell/e-user-creatable-items-handler.h
shell/es-menu.c
shell/es-menu.h
shell/evolution-component.c
shell/evolution-component.h
shell/evolution-config-control.c
shell/evolution-config-control.h
shell/evolution-listener.c
shell/evolution-listener.h
shell/evolution-shell-component-utils.c
shell/evolution-shell-component-utils.h
shell/importer/evolution-importer-client.c
shell/importer/evolution-importer-client.h
shell/importer/evolution-importer-listener.c
shell/importer/evolution-importer-listener.h
shell/importer/evolution-importer.c
shell/importer/evolution-importer.h
shell/importer/evolution-intelligent-importer.c
shell/importer/evolution-intelligent-importer.h
shell/importer/import.glade
shell/importer/intelligent.c
shell/importer/intelligent.h
shell/main.c
shell/shell.error.xml
shell/test/evolution-test-component.c
shell/test/evolution-test-component.h
smime/ChangeLog
smime/lib/Makefile.am
ui/Makefile.am
ui/evolution-addressbook.xml
ui/evolution-calendar.xml
widgets/ChangeLog
widgets/menus/gal-view-menus.c
widgets/menus/gal-view-menus.h
widgets/misc/ChangeLog
widgets/misc/Makefile.am
widgets/misc/e-activity-handler.c
widgets/misc/e-activity-handler.h
widgets/misc/e-attachment-bar.c
widgets/misc/e-attachment-bar.h
widgets/misc/e-attachment.c
widgets/misc/e-attachment.h
widgets/misc/e-calendar-item.c
widgets/misc/e-charset-picker.c
widgets/misc/e-combo-button.c
widgets/misc/e-combo-button.h
widgets/misc/e-config-page.c
widgets/misc/e-config-page.h
widgets/misc/e-dropdown-button.c
widgets/misc/e-dropdown-button.h
widgets/misc/e-filter-bar.h
widgets/misc/e-info-label.c
widgets/misc/e-info-label.h
widgets/misc/e-multi-config-dialog.c
widgets/misc/e-multi-config-dialog.h
widgets/misc/e-online-button.c
widgets/misc/e-search-bar.c
widgets/misc/e-search-bar.h
widgets/misc/e-signature-combo-box.c
widgets/misc/e-signature-combo-box.h
widgets/misc/e-signature-editor.c
widgets/misc/e-signature-editor.h
widgets/misc/e-task-bar.c
widgets/misc/e-task-bar.h
widgets/misc/e-task-widget.c
widgets/misc/e-task-widget.h
widgets/misc/test-dropdown-button.c
widgets/misc/test-info-label.c
widgets/misc/test-multi-config-dialog.c
widgets/table/ChangeLog
widgets/table/e-cell-date.c
widgets/table/e-table-group-container.c
widgets/table/e-table-group-leaf.c
widgets/table/e-table-group.c
widgets/table/e-table-group.h
widgets/table/e-table.c
widgets/table/e-table.h
Diffstat (limited to 'plugins')
40 files changed, 765 insertions, 791 deletions
diff --git a/plugins/attachment-reminder/Makefile.am b/plugins/attachment-reminder/Makefile.am index eb7d42fc73..c13d6bca92 100644 --- a/plugins/attachment-reminder/Makefile.am +++ b/plugins/attachment-reminder/Makefile.am @@ -24,7 +24,7 @@ liborg_gnome_evolution_attachment_reminder_la_LDFLAGS = -module -avoid-version $ liborg_gnome_evolution_attachment_reminder_la_LIBADD = \ $(top_builddir)/e-util/libeutil.la \ $(top_builddir)/widgets/misc/libemiscwidgets.la \ - $(top_builddir)/mail/libevolution-module-mail.la \ + $(top_builddir)/mail/libevolution-mail.la \ $(EVOLUTION_MAIL_LIBS) schemadir = $(GCONF_SCHEMA_FILE_DIR) diff --git a/plugins/caldav/ChangeLog b/plugins/caldav/ChangeLog index 8236b8f2e2..2fe681cb55 100644 --- a/plugins/caldav/ChangeLog +++ b/plugins/caldav/ChangeLog @@ -1,3 +1,16 @@ +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 + + * Makefile.am: + Fix ordering of -I compiler directives. Patch by Daniel Macks. + 2008-12-08 Milan Crha <mcrha@redhat.com> ** Fix for bug #562990 diff --git a/plugins/caldav/Makefile.am b/plugins/caldav/Makefile.am index b43ceebcd4..d812af7540 100644 --- a/plugins/caldav/Makefile.am +++ b/plugins/caldav/Makefile.am @@ -1,8 +1,8 @@ INCLUDES = \ - $(EVOLUTION_CALENDAR_CFLAGS) \ -I . \ -I$(top_srcdir) \ - -DCALDAV_GLADEDIR=\""$(gladedir)"\" + -DCALDAV_GLADEDIR=\""$(gladedir)"\" \ + $(EVOLUTION_CALENDAR_CFLAGS) @EVO_PLUGIN_RULE@ diff --git a/plugins/caldav/caldav-source.c b/plugins/caldav/caldav-source.c index 6fb7ea3841..afc13be3e8 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,8 +299,7 @@ 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; @@ -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 c16883ae23..77eda067aa 100644 --- a/plugins/calendar-weather/calendar-weather.c +++ b/plugins/calendar-weather/calendar-weather.c @@ -394,7 +394,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; @@ -414,15 +414,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; @@ -449,24 +449,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); } @@ -475,9 +475,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; @@ -516,25 +515,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); @@ -543,34 +535,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 @@ -581,9 +573,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; @@ -614,23 +605,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/email-custom-header/ChangeLog b/plugins/email-custom-header/ChangeLog index b10181369b..f826eddd86 100644 --- a/plugins/email-custom-header/ChangeLog +++ b/plugins/email-custom-header/ChangeLog @@ -1,3 +1,10 @@ +2009-02-25 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #572399 + + * email-custom-header.c: (header_foreach_check_isempty): + Do not read from invalid iterator after call of row changed. + 2009-02-13 Milan Crha <mcrha@redhat.com> ** Fixes part of bug #564229 diff --git a/plugins/email-custom-header/email-custom-header.c b/plugins/email-custom-header/email-custom-header.c index 233804cd13..994af730b6 100644 --- a/plugins/email-custom-header/email-custom-header.c +++ b/plugins/email-custom-header/email-custom-header.c @@ -684,12 +684,13 @@ header_foreach_check_isempty (GtkTreeModel *model, GtkTreePath *path, GtkTreeIte signal (if we delete the row, then the iter gets corrupted) */ if ((keyword) && !(g_utf8_strlen (g_strstrip (keyword), -1) > 0)) gtk_tree_model_row_changed (model, path, iter); - - gtk_tree_model_get (model, iter, HEADER_VALUE_COLUMN, &value, -1); - /* Check if the keyword is not empty and then emit the row-changed - signal (if we delete the row, then the iter gets corrupted) */ - if ((value) && !(g_utf8_strlen (g_strstrip (value), -1) > 0)) - gtk_tree_model_row_changed (model, path, iter); + else { + gtk_tree_model_get (model, iter, HEADER_VALUE_COLUMN, &value, -1); + /* Check if the keyword is not empty and then emit the row-changed + signal (if we delete the row, then the iter gets corrupted) */ + if ((value) && !(g_utf8_strlen (g_strstrip (value), -1) > 0)) + gtk_tree_model_row_changed (model, path, iter); + } g_free (keyword); g_free (value); diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog index 34dc1f3aa0..91a2e017a2 100644 --- a/plugins/exchange-operations/ChangeLog +++ b/plugins/exchange-operations/ChangeLog @@ -1,3 +1,18 @@ +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: + remove deprecated and commented code. + 2008-12-08 Bharath Acharya <abharath@novell.com> ** Fix for bug #558498 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/exchange-operations/exchange-permissions-dialog.c b/plugins/exchange-operations/exchange-permissions-dialog.c index d5c171382b..ddcec2d592 100644 --- a/plugins/exchange-operations/exchange-permissions-dialog.c +++ b/plugins/exchange-operations/exchange-permissions-dialog.c @@ -505,9 +505,6 @@ setup_user_list (ExchangePermissionsDialog *dialog) E2kSid *default_entry; GList *sids; - /* FIXME */ - /* gtk_clist_freeze (dialog->priv->clist); */ - /* Always put "Default" first. */ default_entry = e2k_security_descriptor_get_default (sd); add_user_to_list (dialog, default_entry, TRUE); @@ -519,8 +516,6 @@ setup_user_list (ExchangePermissionsDialog *dialog) sids = sids->next; } g_list_free (sids); - - /* gtk_clist_thaw (dialog->priv->clist); */ } diff --git a/plugins/google-account-setup/ChangeLog b/plugins/google-account-setup/ChangeLog index 628455a523..03cf6b4e3e 100644 --- a/plugins/google-account-setup/ChangeLog +++ b/plugins/google-account-setup/ChangeLog @@ -1,3 +1,39 @@ +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 + + * google-contacts-source.c: (plugin_google_contacts): + * google-source.c: (plugin_google): + Compare base URI case insensitively. + +2009-04-07 Tobias Mueller <tobiasmue@gnome.org> + + ** Fixes bug #578034 + + * google-source.c (claim_error): + Call gtk_message_dialog_new with a proper format string. + +2009-02-26 Matthew Barnes <mbarnes@redhat.com> + + ** Fixes part of bug #572950 + + * Makefile.am: + Fix ordering of -I compiler directives. Patch by Daniel Macks. + +2009-02-25 Milan Crha <mcrha@redhat.com> + + ** Part of fix for bug #559719 + + * google-contacts-source.c: (struct ui_data), (destroy_ui_data), + (plugin_google_contacts): Use it's own/unique name for the property + on the 'epl' and free the widget only if it wasn't freed yet. + 2009-01-29 Milan Crha <mcrha@redhat.com> ** Fix for bug #539467 diff --git a/plugins/google-account-setup/Makefile.am b/plugins/google-account-setup/Makefile.am index d1c385b172..0d39004593 100644 --- a/plugins/google-account-setup/Makefile.am +++ b/plugins/google-account-setup/Makefile.am @@ -1,9 +1,9 @@ INCLUDES = \ - $(EVOLUTION_CALENDAR_CFLAGS) \ - $(EVOLUTION_ADDRESSBOOK_CFLAGS) \ -I . \ -I$(top_srcdir) \ - -DCALDAV_GLADEDIR=\""$(gladedir)"\" + -DCALDAV_GLADEDIR=\""$(gladedir)"\" \ + $(EVOLUTION_CALENDAR_CFLAGS) \ + $(EVOLUTION_ADDRESSBOOK_CFLAGS) @EVO_PLUGIN_RULE@ diff --git a/plugins/google-account-setup/google-contacts-source.c b/plugins/google-account-setup/google-contacts-source.c index f76b7e56ee..6d9697194b 100644 --- a/plugins/google-account-setup/google-contacts-source.c +++ b/plugins/google-account-setup/google-contacts-source.c @@ -246,10 +246,19 @@ on_interval_combo_changed (GtkComboBox *combo, gpointer user_data) g_free (value_string); } +struct ui_data { + GtkWidget *widget; +}; + static void destroy_ui_data(gpointer data) { - gtk_widget_destroy((GtkWidget *)data); + struct ui_data *ui = data; + + if (ui && ui->widget) + gtk_widget_destroy (ui->widget); + + g_free (ui); } GtkWidget * @@ -282,16 +291,16 @@ plugin_google_contacts (EPlugin *epl, int time; GtkWidget *ssl_cb; + struct ui_data *ui; source = t->source; group = e_source_peek_group (source); base_uri = e_source_group_peek_base_uri (group); - g_object_set_data_full (G_OBJECT (epl), "widget", NULL, - (GDestroyNotify)gtk_widget_destroy); + g_object_set_data (G_OBJECT (epl), "gwidget", NULL); - if (strcmp (base_uri, "google://")) { + if (g_ascii_strncasecmp ("google://", base_uri, 9) != 0) { return NULL; } @@ -375,8 +384,11 @@ plugin_google_contacts (EPlugin *epl, g_object_set_data (G_OBJECT (interval_sb), "interval-combo", interval_combo); g_object_set_data (G_OBJECT (interval_combo), "interval-sb", interval_sb); - g_object_set_data_full(G_OBJECT(epl), "widget", vbox2, - destroy_ui_data); + ui = g_malloc0 (sizeof (struct ui_data)); + ui->widget = vbox2; + g_object_set_data_full(G_OBJECT(epl), "gwidget", ui, destroy_ui_data); + g_signal_connect (ui->widget, "destroy", G_CALLBACK (gtk_widget_destroyed), &ui->widget); + g_signal_connect (G_OBJECT (username_entry), "changed", G_CALLBACK (on_username_entry_changed), source); diff --git a/plugins/google-account-setup/google-source.c b/plugins/google-account-setup/google-source.c index 02f08da5e5..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); } @@ -391,6 +391,7 @@ claim_error (GtkWindow *parent, const char *error) GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, + "%s", error); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); @@ -566,16 +567,13 @@ 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); widget = NULL; - if (!g_str_has_prefix (e_source_group_peek_base_uri (group), - "Google")) { + if (g_ascii_strncasecmp ("google://", e_source_group_peek_base_uri (group), 9) != 0) { return NULL; } @@ -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); diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog index 97a2d6fbe1..2d07d56a14 100644 --- a/plugins/itip-formatter/ChangeLog +++ b/plugins/itip-formatter/ChangeLog @@ -1,3 +1,9 @@ +2009-02-16 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #571721 + + * itip-view.c: (itip_view_init): Added translators comment. + 2009-02-02 Srinivasa Ragavan <sragavan@novell.com> ** Fix for bug #548787 diff --git a/plugins/itip-formatter/itip-view.c b/plugins/itip-formatter/itip-view.c index 8ca120603d..3e7ebc6e38 100644 --- a/plugins/itip-formatter/itip-view.c +++ b/plugins/itip-formatter/itip-view.c @@ -1154,6 +1154,7 @@ itip_view_init (ItipView *view) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (view->priv->keep_alarm_check), TRUE); gtk_box_pack_start (GTK_BOX (priv->options_box), priv->keep_alarm_check, FALSE, FALSE, 0); + /* To Translators: This is a check box to inherit a reminder. */ priv->inherit_alarm_check = gtk_check_button_new_with_mnemonic (_("_Inherit reminder")); gtk_box_pack_start (GTK_BOX (priv->options_box), priv->inherit_alarm_check, FALSE, FALSE, 0); diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog index ecbc34391d..f14ef84080 100644 --- a/plugins/mail-notification/ChangeLog +++ b/plugins/mail-notification/ChangeLog @@ -1,3 +1,11 @@ +2009-02-19 Matthew Barnes <mbarnes@redhat.com> + + ** Fixes part of bug #572348 + + * mail-notification.c (new_notify_status): + Call gtk_status_icon_set_tooltip_text() instead of + gtk_status_icon_set_tooltip() (decprecated). + 2009-01-28 Tor Lillqvist <tml@novell.com> * Makefile.am: Use -no-undefined and link with more libraries on diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index a501d99bb1..89f9daaccb 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -54,6 +54,10 @@ #define GCONF_KEY_ENABLED_STATUS GCONF_KEY_ROOT "status-enabled" #define GCONF_KEY_ENABLED_SOUND GCONF_KEY_ROOT "sound-enabled" +#if !GTK_CHECK_VERSION(2,16,0) +#define gtk_status_icon_set_tooltip_text gtk_status_icon_set_tooltip +#endif + static gboolean enabled = FALSE; static GtkWidget *get_cfg_widget (void); static GStaticMutex mlock = G_STATIC_MUTEX_INIT; @@ -485,7 +489,7 @@ new_notify_status (EMEventTargetFolder *t) "You have received %d new messages.", status_count), status_count); } - gtk_status_icon_set_tooltip (status_icon, msg); + gtk_status_icon_set_tooltip_text (status_icon, msg); if (new_icon && is_part_enabled (GCONF_KEY_STATUS_BLINK)) { gtk_status_icon_set_blinking (status_icon, TRUE); diff --git a/plugins/mail-to-meeting/ChangeLog b/plugins/mail-to-meeting/ChangeLog index 31fbc638a8..b30a1eac71 100644 --- a/plugins/mail-to-meeting/ChangeLog +++ b/plugins/mail-to-meeting/ChangeLog @@ -1,3 +1,9 @@ +2009-03-26 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #576696 + + * mail-to-meeting.c: (add_attendee_cb): Set mandatory properties. + 2009-01-21 Milan Crha <mcrha@redhat.com> * Makefile.am: Use also EVOLUTION_CALENDAR_CFLAGS. diff --git a/plugins/mail-to-meeting/mail-to-meeting.c b/plugins/mail-to-meeting/mail-to-meeting.c index b5702cdb6c..a23d4d7d4a 100644 --- a/plugins/mail-to-meeting/mail-to-meeting.c +++ b/plugins/mail-to-meeting/mail-to-meeting.c @@ -49,7 +49,9 @@ add_attendee_cb (gpointer key, gpointer value, gpointer user_data) ca = g_new0 (ECalComponentAttendee, 1); ca->value = str; ca->cn = name; - /* FIXME: missing many fields */ + ca->cutype = ICAL_CUTYPE_INDIVIDUAL; + ca->status = ICAL_PARTSTAT_NEEDSACTION; + ca->role = ICAL_ROLE_REQPARTICIPANT; /* FIXME: user prepend and reverse list order (GList) */ *attendees = g_slist_append (*attendees, ca); diff --git a/plugins/mail-to-task/ChangeLog b/plugins/mail-to-task/ChangeLog index f3cfe042c6..978fe50814 100644 --- a/plugins/mail-to-task/ChangeLog +++ b/plugins/mail-to-task/ChangeLog @@ -1,3 +1,9 @@ +2009-03-26 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #576696 + + * mail-to-task.c: (set_attendees): Set mandatory properties. + 2009-01-28 Tor Lillqvist <tml@novell.com> * Makefile.am: Remove a trailing space after the line continuation diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c index 2717bb29be..8a16b92dda 100644 --- a/plugins/mail-to-task/mail-to-task.c +++ b/plugins/mail-to-task/mail-to-task.c @@ -108,7 +108,15 @@ set_attendees (ECalComponent *comp, CamelMimeMessage *message) to_free = g_slist_prepend (to_free, temp); ca->cn = name; - /* FIXME: missing many fields */ + ca->cutype = ICAL_CUTYPE_INDIVIDUAL; + ca->status = ICAL_PARTSTAT_NEEDSACTION; + if (j == 2) { + /* BCC */ + ca->role = ICAL_ROLE_OPTPARTICIPANT; + } else { + /* all other */ + ca->role = ICAL_ROLE_REQPARTICIPANT; + } attendees = g_slist_append (attendees, ca); } diff --git a/plugins/publish-calendar/ChangeLog b/plugins/publish-calendar/ChangeLog index afafa7790c..15ae0b036d 100644 --- a/plugins/publish-calendar/ChangeLog +++ b/plugins/publish-calendar/ChangeLog @@ -1,3 +1,18 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #340783 + + * publish-format-fb.h: (publish_calendar_as_fb): + * publish-format-fb.c: (write_calendar), (publish_calendar_as_fb): + * publish-format-ical.h: (publish_calendar_as_ical): + * publish-format-ical.c: (write_calendar), (publish_calendar_as_ical): + * publish-calendar.c: (publish), (publish_no_succ_info), + (publish_uri_async), (publish_online), (mount_ready_cb), + (mount_first), (add_timeout), (add_offset_timeout), + (online_state_changed), (publish_urls), (action_publish), + (error_queue_show_idle), (error_queue_add): + Show error or success to user in a UI. + 2009-01-21 Suman Manjunath <msuman@novell.com> ** Fix for bug #541209 diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c index 98371345b5..4adbe0d726 100644 --- a/plugins/publish-calendar/publish-calendar.c +++ b/plugins/publish-calendar/publish-calendar.c @@ -33,6 +33,7 @@ #include <calendar/gui/e-cal-menu.h> #include <shell/es-event.h> #include <e-util/e-util-private.h> +#include <e-util/e-dialog-utils.h> #include "url-editor-dialog.h" #include "publish-format-fb.h" #include "publish-format-ical.h" @@ -43,13 +44,24 @@ static GSList *publish_uris = NULL; static GSList *queued_publishes = NULL; static gint online = 0; +static GSList *error_queue = NULL; +static GStaticMutex error_queue_lock = G_STATIC_MUTEX_INIT; +static guint error_queue_show_idle_id = 0; +static void error_queue_add (char *descriptions, GError *error); + int e_plugin_lib_enable (EPlugin *ep, int enable); void action_publish (EPlugin *ep, ECalMenuTargetSelect *t); void online_state_changed (EPlugin *ep, ESEventTargetState *target); void publish_calendar_context_activate (EPlugin *ep, ECalPopupTargetSource *target); GtkWidget *publish_calendar_locations (EPlugin *epl, EConfigHookItemFactoryData *data); static void update_timestamp (EPublishUri *uri); -static void publish (EPublishUri *uri); +static void publish (EPublishUri *uri, gboolean can_report_success); + +static void +publish_no_succ_info (EPublishUri *uri) +{ + publish (uri, FALSE); +} static void publish_uri_async (EPublishUri *uri) @@ -57,7 +69,7 @@ publish_uri_async (EPublishUri *uri) GThread *thread = NULL; GError *error = NULL; - thread = g_thread_create ((GThreadFunc) publish, uri, FALSE, &error); + thread = g_thread_create ((GThreadFunc) publish_no_succ_info, uri, FALSE, &error); if (!thread) { g_warning (G_STRLOC ": %s", error->message); g_error_free (error); @@ -65,7 +77,7 @@ publish_uri_async (EPublishUri *uri) } static void -publish_online (EPublishUri *uri, GFile *file, GError **perror) +publish_online (EPublishUri *uri, GFile *file, GError **perror, gboolean can_report_success) { GOutputStream *stream; GError *error = NULL; @@ -79,20 +91,20 @@ publish_online (EPublishUri *uri, GFile *file, GError **perror) if (perror) { *perror = error; } else if (error) { - g_warning ("Couldn't open %s: %s", uri->location, error->message); - g_error_free (error); + + error_queue_add (g_strdup_printf (_("Could not open %s:"), uri->location), error); } else { - g_warning ("Couldn't open %s: Unknown error", uri->location); + error_queue_add (g_strdup_printf (_("Could not open %s: Unknown error"), uri->location), NULL); } return; } switch (uri->publish_format) { case URI_PUBLISH_AS_ICAL: - publish_calendar_as_ical (stream, uri); + publish_calendar_as_ical (stream, uri, &error); break; case URI_PUBLISH_AS_FB: - publish_calendar_as_fb (stream, uri); + publish_calendar_as_fb (stream, uri, &error); break; /* case URI_PUBLISH_AS_HTML: @@ -101,6 +113,11 @@ publish_online (EPublishUri *uri, GFile *file, GError **perror) */ } + if (error) + error_queue_add (g_strdup_printf (_("There was an error while publishing to %s:"), uri->location), error); + else if (can_report_success) + error_queue_add (g_strdup_printf (_("Publishing to %s finished successfully"), uri->location), NULL); + update_timestamp (uri); g_output_stream_close (stream, NULL, NULL); @@ -126,6 +143,7 @@ struct mnt_struct { EPublishUri *uri; GFile *file; GMountOperation *mount_op; + gboolean can_report_success; }; static void @@ -138,10 +156,9 @@ mount_ready_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) g_file_mount_enclosing_volume_finish (G_FILE (source_object), res, &error); if (error) { - if (error->code != G_IO_ERROR_CANCELLED) - g_warning ("Mount of %s failed: %s", ms->uri->location, error->message); + + error_queue_add (g_strdup_printf (_("Mount of %s failed:"), ms->uri->location), error); - g_error_free (error); if (ms) g_object_unref (ms->mount_op); g_free (ms); @@ -153,7 +170,7 @@ mount_ready_cb (GObject *source_object, GAsyncResult *res, gpointer user_data) g_return_if_fail (ms != NULL); - publish_online (ms->uri, ms->file, NULL); + publish_online (ms->uri, ms->file, NULL, ms->can_report_success); g_object_unref (ms->mount_op); g_free (ms); @@ -267,13 +284,14 @@ ask_question (GMountOperation *op, const char *message, const char *choices[]) } static void -mount_first (EPublishUri *uri, GFile *file) +mount_first (EPublishUri *uri, GFile *file, gboolean can_report_success) { struct mnt_struct *ms = g_malloc (sizeof (struct mnt_struct)); ms->uri = uri; ms->file = g_object_ref (file); ms->mount_op = g_mount_operation_new (); + ms->can_report_success = can_report_success; g_signal_connect (ms->mount_op, "ask-password", G_CALLBACK (ask_password), ms); g_signal_connect (ms->mount_op, "ask-question", G_CALLBACK (ask_question), ms); @@ -282,7 +300,7 @@ mount_first (EPublishUri *uri, GFile *file) } static void -publish (EPublishUri *uri) +publish (EPublishUri *uri, gboolean can_report_success) { if (online) { GError *error = NULL; @@ -298,19 +316,17 @@ publish (EPublishUri *uri) g_return_if_fail (file != NULL); - publish_online (uri, file, &error); + publish_online (uri, file, &error, can_report_success); if (error && error->domain == G_IO_ERROR && error->code == G_IO_ERROR_NOT_MOUNTED) { g_error_free (error); error = NULL; - mount_first (uri, file); + mount_first (uri, file, can_report_success); } - if (error) { - g_warning ("Couldn't open %s: %s", uri->location, error->message); - g_error_free (error); - } + if (error) + error_queue_add (g_strdup_printf (_("Could not open %s:"), uri->location), error); g_object_unref (file); } else { @@ -336,11 +352,11 @@ add_timeout (EPublishUri *uri) /* Set the timeout for now+frequency */ switch (uri->publish_frequency) { case URI_PUBLISH_DAILY: - id = g_timeout_add (24 * 60 * 60 * 1000, (GSourceFunc) publish, uri); + id = g_timeout_add (24 * 60 * 60 * 1000, (GSourceFunc) publish_no_succ_info, uri); g_hash_table_insert (uri_timeouts, uri, GUINT_TO_POINTER (id)); break; case URI_PUBLISH_WEEKLY: - id = g_timeout_add (7 * 24 * 60 * 60 * 1000, (GSourceFunc) publish, uri); + id = g_timeout_add (7 * 24 * 60 * 60 * 1000, (GSourceFunc) publish_no_succ_info, uri); g_hash_table_insert (uri_timeouts, uri, GUINT_TO_POINTER (id)); break; } @@ -400,20 +416,20 @@ add_offset_timeout (EPublishUri *uri) switch (uri->publish_frequency) { case URI_PUBLISH_DAILY: if (elapsed > 24 * 60 * 60) { - publish (uri); + publish (uri, FALSE); add_timeout (uri); } else { - id = g_timeout_add (((24 * 60 * 60) - elapsed) * 1000, (GSourceFunc) publish, uri); + id = g_timeout_add (((24 * 60 * 60) - elapsed) * 1000, (GSourceFunc) publish_no_succ_info, uri); g_hash_table_insert (uri_timeouts, uri, GUINT_TO_POINTER (id)); break; } break; case URI_PUBLISH_WEEKLY: if (elapsed > 7 * 24 * 60 * 60) { - publish (uri); + publish (uri, FALSE); add_timeout (uri); } else { - id = g_timeout_add (((7 * 24 * 60 * 60) - elapsed) * 1000, (GSourceFunc) publish, uri); + id = g_timeout_add (((7 * 24 * 60 * 60) - elapsed) * 1000, (GSourceFunc) publish_no_succ_info, uri); g_hash_table_insert (uri_timeouts, uri, GUINT_TO_POINTER (id)); break; } @@ -655,7 +671,7 @@ online_state_changed (EPlugin *ep, ESEventTargetState *target) online = target->state; if (online) while (queued_publishes) - publish (queued_publishes->data); + publish (queued_publishes->data, FALSE); } GtkWidget * @@ -743,7 +759,7 @@ publish_urls (gpointer data) for (l = publish_uris; l; l = g_slist_next (l)) { EPublishUri *uri = l->data; - publish (uri); + publish (uri, TRUE); } return GINT_TO_POINTER (0); @@ -756,11 +772,8 @@ action_publish (EPlugin *ep, ECalMenuTargetSelect *t) GError *error = NULL; thread = g_thread_create ((GThreadFunc) publish_urls, NULL, FALSE, &error); - if (!thread) { - g_warning (G_STRLOC ": %s", error->message); - g_error_free (error); - } - + if (!thread) + error_queue_add (g_strdup (_("Could not create publish thread.")), error); } static void @@ -816,3 +829,90 @@ e_plugin_lib_enable (EPlugin *ep, int enable) return 0; } + +struct eq_data { + char *description; + GError *error; +}; + +static gboolean +error_queue_show_idle (gpointer user_data) +{ + GString *info = NULL; + GSList *l; + gboolean has_error = FALSE, has_info = FALSE; + + g_static_mutex_lock (&error_queue_lock); + + for (l = error_queue; l; l = l->next) { + struct eq_data *data = l->data; + + if (data) { + if (data->description) { + if (!info) { + info = g_string_new (data->description); + } else { + g_string_append (info, "\n\n"); + g_string_append (info, data->description); + } + + g_free (data->description); + } + + if (data->error) { + has_error = TRUE; + if (!info) { + info = g_string_new (data->error->message); + } else if (data->description) { + g_string_append (info, " "); + g_string_append (info, data->error->message); + } else { + g_string_append (info, "\n\n"); + g_string_append (info, data->error->message); + } + + g_error_free (data->error); + } else if (data->description) { + has_info = TRUE; + } + + g_free (data); + } + } + + g_slist_free (error_queue); + + error_queue = NULL; + error_queue_show_idle_id = 0; + + g_static_mutex_unlock (&error_queue_lock); + + if (info) { + e_notice (NULL, + has_error && has_info ? GTK_MESSAGE_WARNING : has_error ? GTK_MESSAGE_ERROR : GTK_MESSAGE_INFO, + "%s", info->str, NULL); + + g_string_free (info, TRUE); + } + + return FALSE; +} + +void +error_queue_add (char *description, GError *error) +{ + struct eq_data *data; + + if (!error && !description) + return; + + data = g_new0 (struct eq_data, 1); + data->description = description; + data->error = error; + + g_static_mutex_lock (&error_queue_lock); + error_queue = g_slist_append (error_queue, data); + if (error_queue_show_idle_id == 0) + error_queue_show_idle_id = g_idle_add (error_queue_show_idle, NULL); + g_static_mutex_unlock (&error_queue_lock); +} diff --git a/plugins/publish-calendar/publish-format-fb.c b/plugins/publish-calendar/publish-format-fb.c index 40d0258f8a..5956b0ff8d 100644 --- a/plugins/publish-calendar/publish-format-fb.c +++ b/plugins/publish-calendar/publish-format-fb.c @@ -22,6 +22,7 @@ #include <string.h> #include <time.h> +#include <glib/gi18n.h> #include <gconf/gconf-client.h> #include <libedataserver/e-source.h> #include <libedataserver/e-source-list.h> @@ -32,11 +33,10 @@ #include "publish-format-fb.h" static gboolean -write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream) +write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream, GError **error) { ESource *source; ECal *client = NULL; - GError *error = NULL; GList *objects; icaltimezone *utc; time_t start = time(NULL), end; @@ -53,28 +53,24 @@ write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream) if (source) client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_EVENT); if (!client) { - g_warning (G_STRLOC ": Could not publish calendar: Calendar backend no longer exists"); + if (error) + *error = g_error_new (e_calendar_error_quark (), E_CALENDAR_STATUS_NO_SUCH_CALENDAR, _("Could not publish calendar: Calendar backend no longer exists")); return FALSE; } - if (!e_cal_open (client, TRUE, &error)) { - if (error) { - g_warning ("%s", error->message); - g_error_free (error); - } + if (!e_cal_open (client, TRUE, error)) { g_object_unref (client); return FALSE; } - if (e_cal_get_cal_address (client, &email, &error)) { + if (e_cal_get_cal_address (client, &email, NULL)) { if (email && *email) users = g_list_append (users, email); } top_level = e_cal_util_new_top_level (); - error = NULL; - if (e_cal_get_free_busy (client, users, start, end, &objects, &error)) { + if (e_cal_get_free_busy (client, users, start, end, &objects, error)) { char *ical_string; while (objects) { @@ -85,7 +81,7 @@ write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream) } ical_string = icalcomponent_as_ical_string_r (top_level); - res = g_output_stream_write_all (stream, ical_string, strlen (ical_string), NULL, NULL, &error); + res = g_output_stream_write_all (stream, ical_string, strlen (ical_string), NULL, NULL, error); g_free (ical_string); } @@ -96,16 +92,11 @@ write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream) g_free (email); g_object_unref (client); - if (error) { - g_warning ("%s", error->message); - g_error_free (error); - } - return res; } void -publish_calendar_as_fb (GOutputStream *stream, EPublishUri *uri) +publish_calendar_as_fb (GOutputStream *stream, EPublishUri *uri, GError **error) { GSList *l; ESourceList *source_list; @@ -118,7 +109,7 @@ publish_calendar_as_fb (GOutputStream *stream, EPublishUri *uri) l = uri->events; while (l) { gchar *uid = l->data; - if (!write_calendar (uid, source_list, stream)) + if (!write_calendar (uid, source_list, stream, error)) break; l = g_slist_next (l); } diff --git a/plugins/publish-calendar/publish-format-fb.h b/plugins/publish-calendar/publish-format-fb.h index bd0ff7c31a..4975aa107d 100644 --- a/plugins/publish-calendar/publish-format-fb.h +++ b/plugins/publish-calendar/publish-format-fb.h @@ -27,6 +27,6 @@ #ifndef PUBLISH_FORMAT_FB_H #define PUBLISH_FORMAT_FB_H -void publish_calendar_as_fb (GOutputStream *stream, EPublishUri *uri); +void publish_calendar_as_fb (GOutputStream *stream, EPublishUri *uri, GError **error); #endif diff --git a/plugins/publish-calendar/publish-format-ical.c b/plugins/publish-calendar/publish-format-ical.c index f6dcc461c9..13962fc849 100644 --- a/plugins/publish-calendar/publish-format-ical.c +++ b/plugins/publish-calendar/publish-format-ical.c @@ -21,6 +21,7 @@ */ #include <string.h> +#include <glib/gi18n.h> #include <gconf/gconf-client.h> #include <libedataserver/e-source.h> #include <libedataserver/e-source-list.h> @@ -65,11 +66,10 @@ append_tz_to_comp (gpointer key, gpointer value, icalcomponent *toplevel) } static gboolean -write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream) +write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream, GError **error) { ESource *source; ECal *client = NULL; - GError *error = NULL; GList *objects; icalcomponent *top_level; gboolean res = FALSE; @@ -78,23 +78,19 @@ write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream) if (source) client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_EVENT); if (!client) { - g_warning (G_STRLOC ": Could not publish calendar: Calendar backend no longer exists"); + if (error) + *error = g_error_new (e_calendar_error_quark (), E_CALENDAR_STATUS_NO_SUCH_CALENDAR, _("Could not publish calendar: Calendar backend no longer exists")); return FALSE; } - if (!e_cal_open (client, TRUE, &error)) { - if (error) { - g_warning ("%s", error->message); - g_error_free (error); - } + if (!e_cal_open (client, TRUE, error)) { g_object_unref (client); return FALSE; } top_level = e_cal_util_new_top_level (); - error = NULL; - if (e_cal_get_object_list (client, "#t", &objects, &error)) { + if (e_cal_get_object_list (client, "#t", &objects, error)) { char *ical_string; CompTzData tdata; @@ -114,22 +110,17 @@ write_calendar (gchar *uid, ESourceList *source_list, GOutputStream *stream) tdata.zones = NULL; ical_string = icalcomponent_as_ical_string_r (top_level); - res = g_output_stream_write_all (stream, ical_string, strlen (ical_string), NULL, NULL, &error); + res = g_output_stream_write_all (stream, ical_string, strlen (ical_string), NULL, NULL, error); g_free (ical_string); } g_object_unref (client); - if (error) { - g_warning ("%s", error->message); - g_error_free (error); - } - return res; } void -publish_calendar_as_ical (GOutputStream *stream, EPublishUri *uri) +publish_calendar_as_ical (GOutputStream *stream, EPublishUri *uri, GError **error) { GSList *l; ESourceList *source_list; @@ -142,7 +133,7 @@ publish_calendar_as_ical (GOutputStream *stream, EPublishUri *uri) l = uri->events; while (l) { gchar *uid = l->data; - if (!write_calendar (uid, source_list, stream)) + if (!write_calendar (uid, source_list, stream, error)) break; l = g_slist_next (l); } diff --git a/plugins/publish-calendar/publish-format-ical.h b/plugins/publish-calendar/publish-format-ical.h index 6cfff1011a..4c32310b99 100644 --- a/plugins/publish-calendar/publish-format-ical.h +++ b/plugins/publish-calendar/publish-format-ical.h @@ -27,6 +27,6 @@ #ifndef PUBLISH_FORMAT_ICAL_H #define PUBLISH_FORMAT_ICAL_H -void publish_calendar_as_ical (GOutputStream *stream, EPublishUri *uri); +void publish_calendar_as_ical (GOutputStream *stream, EPublishUri *uri, GError **error); #endif diff --git a/plugins/startup-wizard/ChangeLog b/plugins/startup-wizard/ChangeLog index 2147b10a0a..4ac3bcfce9 100644 --- a/plugins/startup-wizard/ChangeLog +++ b/plugins/startup-wizard/ChangeLog @@ -1,3 +1,12 @@ +2009-04-24 Milan Crha <mcrha@redhat.com> + + ** Part of fix for bug #381132 + + * org-gnome-evolution-startup-wizard.eplug.xml: + * startup-wizard.c: (startup_wizard_timezone_page), + (startup_wizard_commit), (startup_wizard_abort): + Do not setup timezone, set a system timezone instead. + 2009-01-21 Milan Crha <mcrha@redhat.com> * Makefile.am: Use also EVOLUTION_CALENDAR_CFLAGS. diff --git a/plugins/startup-wizard/org-gnome-evolution-startup-wizard.eplug.xml b/plugins/startup-wizard/org-gnome-evolution-startup-wizard.eplug.xml index 1197633a23..e52cd6a71e 100644 --- a/plugins/startup-wizard/org-gnome-evolution-startup-wizard.eplug.xml +++ b/plugins/startup-wizard/org-gnome-evolution-startup-wizard.eplug.xml @@ -17,7 +17,6 @@ <hook class="org.gnome.evolution.mail.config:1.0"> <group target="account" id="org.gnome.evolution.mail.config.accountWizard" commit="startup_wizard_commit" abort="startup_wizard_abort"> - <item type="page" path="50.timezone" factory="startup_wizard_timezone_page"/> <item type="page" path="60.importers" factory="startup_wizard_importer_page"/> </group> </hook> diff --git a/plugins/startup-wizard/startup-wizard.c b/plugins/startup-wizard/startup-wizard.c index f9594364d9..6289a63489 100644 --- a/plugins/startup-wizard/startup-wizard.c +++ b/plugins/startup-wizard/startup-wizard.c @@ -24,7 +24,6 @@ #include <glib/gi18n.h> #include <gtk/gtk.h> #include <libgnomeui/libgnomeui.h> -#include "widgets/e-timezone-dialog/e-timezone-dialog.h" #include "e-util/e-error.h" #include "e-util/e-import.h" #include "shell/es-event.h" @@ -32,10 +31,7 @@ #include "mail/em-account-editor.h" #include "calendar/gui/calendar-config.h" -#define IMPORT_TIMEZONE_DIALOG "StartupWizard::TimezoneDialog" - void startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target); -GtkWidget *startup_wizard_timezone_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data); GtkWidget *startup_wizard_importer_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data); gboolean startup_wizard_check (EPlugin *ep, EConfigHookPageCheckData *check_data); void startup_wizard_commit (EPlugin *ep, EMConfigTargetAccount *target); @@ -98,25 +94,6 @@ startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target) } GtkWidget * -startup_wizard_timezone_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data) -{ - ETimezoneDialog *etd; - GtkWidget *page; - - etd = e_timezone_dialog_new (); - g_object_set_data (G_OBJECT (hook_data->config), IMPORT_TIMEZONE_DIALOG, etd); - - page = gnome_druid_page_standard_new_with_vals (_("Timezone"), NULL, NULL); - e_timezone_dialog_reparent (etd, GNOME_DRUID_PAGE_STANDARD (page)->vbox); - - e_timezone_dialog_set_timezone (etd, NULL); - - gnome_druid_append_page (GNOME_DRUID (hook_data->parent), GNOME_DRUID_PAGE (page)); - - return GTK_WIDGET (page); -} - -GtkWidget * startup_wizard_importer_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data) { GtkWidget *page, *label, *sep, *table; @@ -208,22 +185,13 @@ import_done(EImport *ei, void *d) void startup_wizard_commit (EPlugin *ep, EMConfigTargetAccount *target) { - EConfig *ec = ((EConfigTarget *)target)->config; - ETimezoneDialog *etd; - icaltimezone *zone; - - /* Set Timezone */ - etd = g_object_get_data (G_OBJECT (ec), IMPORT_TIMEZONE_DIALOG); - if (etd) { - zone = e_timezone_dialog_get_timezone (E_TIMEZONE_DIALOG (etd)); - if (zone) - calendar_config_set_timezone (icaltimezone_get_display_name (zone)); - - /* Need to do this otherwise the timezone widget gets destroyed but the - timezone object isn't, and we can get a crash like #22047. */ - g_object_unref (etd); - g_object_set_data (G_OBJECT (ec), IMPORT_TIMEZONE_DIALOG, NULL); - } + char *location; + + /* Use System Timezone by default */ + calendar_config_set_use_system_timezone (TRUE); + location = e_cal_util_get_system_timezone_location (); + calendar_config_set_timezone (location); + g_free (location); if (import_importers) { import_iterator = import_importers; @@ -246,20 +214,6 @@ startup_wizard_commit (EPlugin *ep, EMConfigTargetAccount *target) void startup_wizard_abort (EPlugin *ep, EMConfigTargetAccount *target) { - EConfig *ec = ((EConfigTarget *)target)->config; - ETimezoneDialog *etd; - - /* We're doing an _exit(), so i dont see why we're bothering to do - any cleanup whatsoever here ... */ - - etd = g_object_get_data (G_OBJECT (ec), IMPORT_TIMEZONE_DIALOG); - if (etd) { - /* Need to do this otherwise the timezone widget gets destroyed but the - timezone object isn't, and we can get a crash like #22047. */ - g_object_unref (etd); - g_object_set_data (G_OBJECT (ec), IMPORT_TIMEZONE_DIALOG, NULL); - } - gtk_main_quit (); _exit (0); } diff --git a/plugins/webdav-account-setup/ChangeLog b/plugins/webdav-account-setup/ChangeLog index 29e3e82796..354371cc6a 100644 --- a/plugins/webdav-account-setup/ChangeLog +++ b/plugins/webdav-account-setup/ChangeLog @@ -1,3 +1,18 @@ +2009-02-26 Matthew Barnes <mbarnes@redhat.com> + + ** Fixes part of bug #572950 + + * Makefile.am: + Fix ordering of -I compiler directives. Patch by Daniel Macks. + +2009-02-25 Milan Crha <mcrha@redhat.com> + + ** Part of fix for bug #559719 + + * webdav-contacts-source.c: (destroy_ui_data), + (plugin_webdav_contacts): Use it's own/unique name for the property + on the 'epl' and free the widget only if it wasn't freed yet. + 2009-01-29 Milan Crha <mcrha@redhat.com> ** Fix for bug #539467 diff --git a/plugins/webdav-account-setup/Makefile.am b/plugins/webdav-account-setup/Makefile.am index 5637f76e66..a979ed08e5 100644 --- a/plugins/webdav-account-setup/Makefile.am +++ b/plugins/webdav-account-setup/Makefile.am @@ -1,7 +1,7 @@ INCLUDES = \ - $(EVOLUTION_ADDRESSBOOK_CFLAGS) \ - -I . \ - -I$(top_srcdir) + -I . \ + -I$(top_srcdir) \ + $(EVOLUTION_ADDRESSBOOK_CFLAGS) @EVO_PLUGIN_RULE@ diff --git a/plugins/webdav-account-setup/webdav-contacts-source.c b/plugins/webdav-account-setup/webdav-contacts-source.c index 2242b9050d..8edfa59372 100644 --- a/plugins/webdav-account-setup/webdav-contacts-source.c +++ b/plugins/webdav-account-setup/webdav-contacts-source.c @@ -272,12 +272,14 @@ on_toggle_changed(GtkToggleButton *tb, gpointer user_data) } static void -destroy_ui_data(gpointer data) +destroy_ui_data (gpointer data) { - ui_data *ui_data = data; + ui_data *ui = data; - gtk_widget_destroy(ui_data->box); - g_free(ui_data); + if (ui && ui->box) + gtk_widget_destroy (ui->box); + + g_free (ui); } GtkWidget * @@ -304,8 +306,7 @@ plugin_webdav_contacts(EPlugin *epl, EConfigHookItemFactoryData *data) base_uri = e_source_group_peek_base_uri (group); - g_object_set_data_full (G_OBJECT (epl), "widget", NULL, - (GDestroyNotify)gtk_widget_destroy); + g_object_set_data (G_OBJECT (epl), "wwidget", NULL); if (strcmp(base_uri, BASE_URI) != 0) { return NULL; @@ -369,8 +370,8 @@ plugin_webdav_contacts(EPlugin *epl, EConfigHookItemFactoryData *data) gtk_widget_show_all(vbox2); uidata->box = vbox2; - g_object_set_data_full(G_OBJECT(epl), "widget", uidata, - destroy_ui_data); + g_object_set_data_full(G_OBJECT(epl), "wwidget", uidata, destroy_ui_data); + g_signal_connect (uidata->box, "destroy", G_CALLBACK (gtk_widget_destroyed), &uidata->box); g_signal_connect(G_OBJECT(uidata->username_entry), "changed", G_CALLBACK(on_entry_changed), uidata); |