aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-04-25 22:07:44 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-04-25 22:07:44 +0800
commit86fdd3a1cba7c156cfa127322e258f5636b45a99 (patch)
treee49802fd9008a59587fca1cafb1801b8b3bf0db6 /widgets/misc
parentc2119e513bc7482fc0150287af8502a5ff67191a (diff)
parent23df769955ea54f756a579c19964df87ae6fd5c8 (diff)
downloadgsoc2013-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 'widgets/misc')
-rw-r--r--widgets/misc/ChangeLog41
-rw-r--r--widgets/misc/e-calendar-item.c37
-rw-r--r--widgets/misc/e-canvas.c2
-rw-r--r--widgets/misc/e-cell-date-edit.c116
-rw-r--r--widgets/misc/e-cell-date-edit.h2
-rw-r--r--widgets/misc/e-dateedit.c8
-rw-r--r--widgets/misc/e-filter-bar.c4
7 files changed, 151 insertions, 59 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index d81e52d0a1..276f80062a 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,44 @@
+2009-04-24 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #572348
+
+ * e-dateedit.c:
+ * e-combo-button.c:
+ * e-dropdown-button.c:
+ * e-canvas.c:
+ * e-cell-date-edit.h:
+ * e-cell-date-edit.c:
+ Remove deprecated Gtk+ symbols.
+
+2009-04-13 Johnny Jacob <jjohnny@novell.com>
+
+ ** Fixes #578685 – evolution crashed with SIGSEGV.
+
+ ** Patch by Takao Fujiwara <Takao.Fujiwara@Sun.COM>
+
+ * e-attachment-bar.c (update): Copy string. Avoids SIGSEGV.
+
+2009-03-09 Chenthill Palanisamy <pchenthill@novell.com>
+
+ * widgets/misc/e-calendar-item.c: Removed the string
+ marked for translation as it not required and also breaks
+ the string freeze.
+
+2009-03-08 Chenthill Palanisamy <pchenthill@novell.com>
+
+ Fixes #342446
+ * widgets/misc/e-calendar-item.c: Check whether its
+ appropriate to use %Id format for digits. Incorporated
+ the fix from Wang Xin <jedy.wang@sun.com> to build in
+ solaris.
+
+2009-02-25 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #559027
+
+ * e-dateedit.c: (on_date_entry_focus_out):
+ Do not set date for 'None' value.
+
2009-02-12 Milan Crha <mcrha@redhat.com>
** Part of fix for bug #404232
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index da4c063175..32e74dd535 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -1364,6 +1364,33 @@ e_calendar_item_draw_month (ECalendarItem *calitem,
cairo_destroy (cr);
}
+static const char *
+get_digit_fomat ()
+{
+
+#ifdef HAVE_GNU_GET_LIBC_VERSION
+#include <gnu/libc-version.h>
+
+ const char *libc_version = gnu_get_libc_version ();
+ char **split = g_strsplit (libc_version, ".", -1);
+ int major = 0;
+ int minor = 0;
+ int revision = 0;
+
+ major = atoi (split [0]);
+ minor = atoi (split [1]);
+
+ if (g_strv_length (split) > 2)
+ revision = atoi (split [2]);
+ g_strfreev (split);
+
+ if (major > 2 || minor > 2 || (minor == 2 && revision > 2)) {
+ return "%Id";
+ }
+#endif
+
+ return "%d";
+}
static void
e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
@@ -1505,12 +1532,12 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
if (week_num >= 10) {
digit = week_num / 10;
text_x -= calitem->week_number_digit_widths[digit];
- num_chars += sprintf (&buffer[num_chars], "%Id", digit);
+ num_chars += sprintf (&buffer[num_chars], get_digit_fomat (), digit);
}
digit = week_num % 10;
text_x -= calitem->week_number_digit_widths[digit] + 6;
- num_chars += sprintf (&buffer[num_chars], "%Id", digit);
+ num_chars += sprintf (&buffer[num_chars], get_digit_fomat (), digit);
cairo_save (cr);
gdk_cairo_set_source_color (cr, &style->text[GTK_STATE_ACTIVE]);
@@ -1618,12 +1645,12 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
if (day_num >= 10) {
digit = day_num / 10;
day_x -= calitem->digit_widths[digit];
- num_chars += sprintf (&buffer[num_chars], "%Id", digit);
+ num_chars += sprintf (&buffer[num_chars], get_digit_fomat (), digit);
}
digit = day_num % 10;
day_x -= calitem->digit_widths[digit];
- num_chars += sprintf (&buffer[num_chars], "%Id", digit);
+ num_chars += sprintf (&buffer[num_chars], get_digit_fomat (), digit);
cairo_save (cr);
if (fg_color) {
@@ -1958,7 +1985,7 @@ e_calendar_item_recalc_sizes (ECalendarItem *calitem)
gchar locale_digit[5];
int locale_digit_len;
- locale_digit_len = sprintf (locale_digit, "%Id", digit);
+ locale_digit_len = sprintf (locale_digit, get_digit_fomat (), digit);
pango_layout_set_text (layout, locale_digit, locale_digit_len);
pango_layout_get_pixel_size (layout, &width, NULL);
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index a395197df7..3cb85c5839 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -994,7 +994,7 @@ void e_canvas_popup_tooltip (ECanvas *canvas, GtkWidget *widget, int x, int y)
G_CALLBACK (e_canvas_visibility), canvas);
}
}
- gtk_widget_set_uposition (widget, x, y);
+ gtk_window_move (GTK_WINDOW (widget), x, y);
gtk_widget_show (widget);
}
diff --git a/widgets/misc/e-cell-date-edit.c b/widgets/misc/e-cell-date-edit.c
index 68cbbb97d4..97947980d9 100644
--- a/widgets/misc/e-cell-date-edit.c
+++ b/widgets/misc/e-cell-date-edit.c
@@ -96,8 +96,7 @@ static void e_cell_date_edit_on_today_clicked (GtkWidget *button,
ECellDateEdit *ecde);
static void e_cell_date_edit_update_cell (ECellDateEdit *ecde,
char *text);
-static void e_cell_date_edit_on_time_selected (GtkList *list,
- ECellDateEdit *ecde);
+static void e_cell_date_edit_on_time_selected (GtkTreeSelection *selection, ECellDateEdit *ecde);
static void e_cell_date_edit_hide_popup (ECellDateEdit *ecde);
@@ -213,8 +212,9 @@ static void
e_cell_date_edit_init (ECellDateEdit *ecde)
{
GtkWidget *frame, *vbox, *hbox, *vbox2;
- GtkWidget *scrolled_window, *list, *bbox;
+ GtkWidget *scrolled_window, *bbox, *tree_view;
GtkWidget *now_button, *today_button, *none_button, *ok_button;
+ GtkListStore *store;
ecde->lower_hour = 0;
ecde->upper_hour = 24;
@@ -270,13 +270,24 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
GTK_POLICY_ALWAYS);
gtk_widget_show (scrolled_window);
- list = gtk_list_new ();
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window), list);
- gtk_container_set_focus_vadjustment (GTK_CONTAINER (list),
+ store = gtk_list_store_new (1, G_TYPE_STRING);
+ tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
+ g_object_unref (store);
+
+ gtk_tree_view_append_column (
+ GTK_TREE_VIEW (tree_view),
+ gtk_tree_view_column_new_with_attributes ("Text", gtk_cell_renderer_text_new (), "text", 0, NULL));
+
+ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (tree_view), FALSE);
+
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window), tree_view);
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (tree_view),
gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled_window)));
- gtk_widget_show (list);
- ecde->time_list = list;
- g_signal_connect((list), "selection-changed",
+ gtk_container_set_focus_hadjustment (GTK_CONTAINER (tree_view),
+ gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (scrolled_window)));
+ gtk_widget_show (tree_view);
+ ecde->time_tree_view = tree_view;
+ g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)), "changed",
G_CALLBACK (e_cell_date_edit_on_time_selected),
ecde);
@@ -414,10 +425,10 @@ e_cell_date_edit_set_property (GObject *object,
case PROP_SHOW_TIME:
if (g_value_get_boolean (value)) {
gtk_widget_show (ecde->time_entry);
- gtk_widget_show (ecde->time_list);
+ gtk_widget_show (ecde->time_tree_view);
} else {
gtk_widget_hide (ecde->time_entry);
- gtk_widget_hide (ecde->time_list);
+ gtk_widget_hide (ecde->time_tree_view);
}
return;
case PROP_SHOW_NOW_BUTTON:
@@ -526,7 +537,7 @@ e_cell_date_edit_set_popup_values (ECellDateEdit *ecde)
if (status == E_TIME_PARSE_NONE || status == E_TIME_PARSE_INVALID) {
gtk_entry_set_text (GTK_ENTRY (ecde->time_entry), "");
e_calendar_item_set_selection (calitem, NULL, NULL);
- gtk_list_unselect_all (GTK_LIST (ecde->time_list));
+ gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (GTK_TREE_VIEW (ecde->time_tree_view)));
} else {
if (is_date) {
buffer[0] = '\0';
@@ -542,7 +553,7 @@ e_cell_date_edit_set_popup_values (ECellDateEdit *ecde)
e_calendar_item_set_selection (calitem, &date, &date);
if (is_date) {
- gtk_list_unselect_all (GTK_LIST (ecde->time_list));
+ gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (GTK_TREE_VIEW (ecde->time_tree_view)));
} else {
e_cell_date_edit_select_matching_time (ecde, buffer);
}
@@ -556,30 +567,39 @@ static void
e_cell_date_edit_select_matching_time (ECellDateEdit *ecde,
char *time)
{
- GtkList *list;
- GtkWidget *listitem, *label;
- GList *elem;
gboolean found = FALSE;
- const gchar *list_item_text;
+ gboolean valid;
+ GtkTreeSelection *selection;
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (ecde->time_tree_view));
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ecde->time_tree_view));
- list = GTK_LIST (ecde->time_list);
- elem = list->children;
- while (elem) {
- listitem = GTK_WIDGET (elem->data);
- label = GTK_BIN (listitem)->child;
- list_item_text = gtk_label_get_text (GTK_LABEL (label));
+ for (valid = gtk_tree_model_get_iter_first (model, &iter);
+ valid && !found;
+ valid = gtk_tree_model_iter_next (model, &iter)) {
+ char *str = NULL;
+
+ gtk_tree_model_get (model, &iter, 0, &str, -1);
+
+ if (g_str_equal (str, time)) {
+ GtkTreePath *path = gtk_tree_model_get_path (model, &iter);
+
+ gtk_tree_view_set_cursor (GTK_TREE_VIEW (ecde->time_tree_view), path, NULL, FALSE);
+ gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (ecde->time_tree_view), path, NULL, FALSE, 0.0, 0.0);
+ gtk_tree_path_free (path);
- if (!strcmp (list_item_text, time)) {
found = TRUE;
- gtk_list_select_child (list, listitem);
- break;
}
- elem = elem->next;
+ g_free (str);
}
- if (!found)
- gtk_list_unselect_all (list);
+ if (!found) {
+ gtk_tree_selection_unselect_all (selection);
+ gtk_tree_view_scroll_to_point (GTK_TREE_VIEW (ecde->time_tree_view), 0, 0);
+ }
}
@@ -597,7 +617,7 @@ e_cell_date_edit_show_popup (ECellDateEdit *ecde,
e_cell_date_edit_get_popup_pos (ecde, row, view_col, &x, &y, &height, &width);
- gtk_widget_set_uposition (ecde->popup_window, x, y);
+ gtk_window_move (GTK_WINDOW (ecde->popup_window), x, y);
gtk_widget_set_size_request (ecde->popup_window, width, height);
gtk_widget_realize (ecde->popup_window);
gdk_window_resize (ecde->popup_window->window, width, height);
@@ -732,15 +752,13 @@ e_cell_date_edit_button_press (GtkWidget *popup_window,
static void
e_cell_date_edit_rebuild_time_list (ECellDateEdit *ecde)
{
- GtkList *list;
- GtkWidget *listitem;
+ GtkListStore *store;
char buffer[40];
struct tm tmp_tm;
gint hour, min;
- list = GTK_LIST (ecde->time_list);
-
- gtk_list_clear_items (list, 0, -1);
+ store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (ecde->time_tree_view)));
+ gtk_list_store_clear (store);
/* Fill the struct tm with some sane values. */
tmp_tm.tm_year = 2000;
@@ -750,7 +768,6 @@ e_cell_date_edit_rebuild_time_list (ECellDateEdit *ecde)
tmp_tm.tm_isdst = 0;
for (hour = ecde->lower_hour; hour <= ecde->upper_hour; hour++) {
-
/* We don't want to display midnight at the end, since that is
really in the next day. */
if (hour == 24)
@@ -760,13 +777,15 @@ e_cell_date_edit_rebuild_time_list (ECellDateEdit *ecde)
for (min = 0;
min == 0 || (min < 60 && hour != ecde->upper_hour);
min += 30) {
+ GtkTreeIter iter;
+
tmp_tm.tm_hour = hour;
tmp_tm.tm_min = min;
e_time_format_time (&tmp_tm, ecde->use_24_hour_format,
FALSE, buffer, sizeof (buffer));
- listitem = gtk_list_item_new_with_label (buffer);
- gtk_widget_show (listitem);
- gtk_container_add (GTK_CONTAINER (list), listitem);
+
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter, 0, buffer, -1);
}
}
@@ -940,19 +959,22 @@ e_cell_date_edit_update_cell (ECellDateEdit *ecde,
static void
-e_cell_date_edit_on_time_selected (GtkList *list,
- ECellDateEdit *ecde)
+e_cell_date_edit_on_time_selected (GtkTreeSelection *selection, ECellDateEdit *ecde)
{
- GtkWidget *listitem, *label;
- const gchar *list_item_text;
+ gchar *list_item_text = NULL;
+ GtkTreeIter iter;
+ GtkTreeModel *model;
- if (!list->selection)
+ if (!gtk_tree_selection_get_selected (selection, &model, &iter))
return;
- listitem = list->selection->data;
- label = GTK_BIN (listitem)->child;
- list_item_text = gtk_label_get_text (GTK_LABEL (label));
+ gtk_tree_model_get (model, &iter, 0, &list_item_text, -1);
+
+ g_return_if_fail (list_item_text != NULL);
+
gtk_entry_set_text (GTK_ENTRY (ecde->time_entry), list_item_text);
+
+ g_free (list_item_text);
}
diff --git a/widgets/misc/e-cell-date-edit.h b/widgets/misc/e-cell-date-edit.h
index 938d356e8d..30dee535e8 100644
--- a/widgets/misc/e-cell-date-edit.h
+++ b/widgets/misc/e-cell-date-edit.h
@@ -53,7 +53,7 @@ struct _ECellDateEdit {
GtkWidget *popup_window;
GtkWidget *calendar;
GtkWidget *time_entry;
- GtkWidget *time_list;
+ GtkWidget *time_tree_view;
GtkWidget *now_button;
GtkWidget *today_button;
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 272223025e..2120483abf 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -1253,7 +1253,7 @@ position_date_popup (EDateEdit *dedit)
x = CLAMP (x, 0, MAX (0, screen_width - cal_req.width));
y = CLAMP (y, 0, MAX (0, screen_height - cal_req.height));
- gtk_widget_set_uposition (dedit->priv->cal_popup, x, y);
+ gtk_window_move (GTK_WINDOW (dedit->priv->cal_popup), x, y);
}
@@ -1638,9 +1638,11 @@ on_date_entry_focus_out (GtkEntry *entry,
e_date_edit_set_date (dedit,tmp_tm.tm_year,tmp_tm.tm_mon,tmp_tm.tm_mday);
gtk_widget_grab_focus (GTK_WIDGET (entry));
return FALSE;
- } else {
- e_date_edit_get_date (dedit,&tmp_tm.tm_year,&tmp_tm.tm_mon,&tmp_tm.tm_mday);
+ } else if (e_date_edit_get_date (dedit,&tmp_tm.tm_year,&tmp_tm.tm_mon,&tmp_tm.tm_mday)) {
e_date_edit_set_date (dedit,tmp_tm.tm_year,tmp_tm.tm_mon,tmp_tm.tm_mday);
+ } else {
+ dedit->priv->date_set_to_none = TRUE;
+ e_date_edit_update_date_entry (dedit);
}
return FALSE;
}
diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c
index dc69b6c269..2125bdf30d 100644
--- a/widgets/misc/e-filter-bar.c
+++ b/widgets/misc/e-filter-bar.c
@@ -82,6 +82,8 @@ rule_advanced_response (GtkWidget *dialog, int response, void *data)
g_signal_emit_by_name (efb, "search_activated");
+ g_signal_emit_by_name (efb, "search_activated");
+
if (response == GTK_RESPONSE_APPLY) {
if (!rule_context_find_rule (filter_bar->context, rule->name, rule->source))
rule_context_add_rule (filter_bar->context, rule);
@@ -269,8 +271,6 @@ build_items (ESearchBar *search_bar, ESearchBarItem *items, int type, int *start
GSList *gtksux = NULL;
int num;
- /* So gtk calls a signal again if you connect to it WHILE inside a changed event.
- So this snot is to work around that shit fucked up situation */
for (i=0;i<rules->len;i++)
gtksux = g_slist_prepend(gtksux, rules->pdata[i]);