aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
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/table
parentc2119e513bc7482fc0150287af8502a5ff67191a (diff)
parent23df769955ea54f756a579c19964df87ae6fd5c8 (diff)
downloadgsoc2013-evolution-86fdd3a1cba7c156cfa127322e258f5636b45a99.tar
gsoc2013-evolution-86fdd3a1cba7c156cfa127322e258f5636b45a99.tar.gz
gsoc2013-evolution-86fdd3a1cba7c156cfa127322e258f5636b45a99.tar.bz2
gsoc2013-evolution-86fdd3a1cba7c156cfa127322e258f5636b45a99.tar.lz
gsoc2013-evolution-86fdd3a1cba7c156cfa127322e258f5636b45a99.tar.xz
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/table')
-rw-r--r--widgets/table/ChangeLog48
-rw-r--r--widgets/table/e-cell-combo.c173
-rw-r--r--widgets/table/e-cell-combo.h2
-rw-r--r--widgets/table/e-cell-date.c3
-rw-r--r--widgets/table/e-cell-text.c7
-rw-r--r--widgets/table/e-table-example-1.c1
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c2
-rw-r--r--widgets/table/e-table-group-container.c21
-rw-r--r--widgets/table/e-table-group-leaf.c11
-rw-r--r--widgets/table/e-table-group.c8
-rw-r--r--widgets/table/e-table-group.h6
-rw-r--r--widgets/table/e-table-header-item.c4
-rw-r--r--widgets/table/e-table.c12
-rw-r--r--widgets/table/e-table.h2
14 files changed, 170 insertions, 130 deletions
diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog
index d2de4354a2..7d556367a8 100644
--- a/widgets/table/ChangeLog
+++ b/widgets/table/ChangeLog
@@ -1,3 +1,51 @@
+2009-04-24 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #572348
+
+ * e-table-header-item.c:
+ * e-cell-combo.h:
+ * e-cell-combo.c:
+ Remove deprecated Gtk+ symbols.
+
+2009-03-26 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #576694
+
+ * e-cell-text.c (build_layout):
+ Handle absolute font sizes correctly.
+
+2009-02-26 Chenthill Palanisamy <pchenthill@novell.com>
+
+ ** Part of fix for bug #573198
+
+ * e-cell-date.c (ecd_get_text): Initialize the timezone settings
+ before making any timezone conversion calls.
+
+2009-02-19 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #572348
+
+ * e-table-example-1.c (main):
+ gtk_widget_push_visual() is a no-op. Remove it.
+
+2009-02-19 Andre Klapper <a9016009@gmx.de>
+
+ * e-table-field-chooser-dialog.c:
+ Migrate from deprecated gtk_window_set_policy to gtk_window_set_resizable
+
+2009-02-16 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #550114
+
+ * e-table-group.h:
+ * e-table-group.c:
+ * e-table-group-container.c:
+ * e-table-group-leaf.c:
+ Replaced 'compute_mouse_over' with 'get_mouse_over', now works
+ with cached values 'motion_row', 'motion_col'.
+ * e-table.c: (e_table_get_mouse_over_cell):
+ Mouse position not required anymore, remove it too then.
+
2008-12-15 Milan Crha <mcrha@redhat.com>
** Fix for bug #557176
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index 34de0fb29e..84d58200d2 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -74,10 +74,6 @@
/* The height to make the popup list if there aren't any items in it. */
#define E_CELL_COMBO_LIST_EMPTY_HEIGHT 15
-/* The object data key used to store the UTF-8 text of the popup list items. */
-#define E_CELL_COMBO_UTF8_KEY "UTF-8-TEXT"
-
-
static void e_cell_combo_class_init (ECellComboClass *klass);
static void e_cell_combo_init (ECellCombo *ecc);
static void e_cell_combo_dispose (GObject *object);
@@ -98,9 +94,7 @@ static void e_cell_combo_get_popup_pos (ECellCombo *ecc,
gint *height,
gint *width);
-static void e_cell_combo_selection_changed (GtkWidget *popup_list, ECellCombo *ecc);
-
-static gint e_cell_combo_list_button_press (GtkWidget *popup_list, GdkEvent *event, ECellCombo *ecc);
+static void e_cell_combo_selection_changed (GtkTreeSelection *selection, ECellCombo *ecc);
static gint e_cell_combo_button_press (GtkWidget *popup_window,
GdkEvent *event,
@@ -134,6 +128,8 @@ e_cell_combo_init (ECellCombo *ecc)
{
GtkWidget *frame;
AtkObject *a11y;
+ GtkListStore *store;
+ GtkTreeSelection *selection;
/* We create one popup window for the ECell, since there will only
ever be one popup in use at a time. */
@@ -156,27 +152,32 @@ e_cell_combo_init (ECellCombo *ecc)
gtk_container_add (GTK_CONTAINER (frame), ecc->popup_scrolled_window);
gtk_widget_show (ecc->popup_scrolled_window);
- ecc->popup_list = gtk_list_new ();
- gtk_list_set_selection_mode (GTK_LIST (ecc->popup_list),
- GTK_SELECTION_BROWSE);
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (ecc->popup_scrolled_window), ecc->popup_list);
- gtk_container_set_focus_vadjustment (GTK_CONTAINER (ecc->popup_list),
+ store = gtk_list_store_new (1, G_TYPE_STRING);
+ ecc->popup_tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
+ g_object_unref (store);
+
+ gtk_tree_view_append_column (
+ GTK_TREE_VIEW (ecc->popup_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 (ecc->popup_tree_view), FALSE);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ecc->popup_tree_view));
+ gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (ecc->popup_scrolled_window), ecc->popup_tree_view);
+ gtk_container_set_focus_vadjustment (GTK_CONTAINER (ecc->popup_tree_view),
gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (ecc->popup_scrolled_window)));
- gtk_container_set_focus_hadjustment (GTK_CONTAINER (ecc->popup_list),
+ gtk_container_set_focus_hadjustment (GTK_CONTAINER (ecc->popup_tree_view),
gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (ecc->popup_scrolled_window)));
- gtk_widget_show (ecc->popup_list);
+ gtk_widget_show (ecc->popup_tree_view);
- a11y = gtk_widget_get_accessible (ecc->popup_list);
+ a11y = gtk_widget_get_accessible (ecc->popup_tree_view);
atk_object_set_name (a11y, _("popup list"));
- g_signal_connect (ecc->popup_list,
- "selection_changed",
+ g_signal_connect (selection,
+ "changed",
G_CALLBACK (e_cell_combo_selection_changed),
ecc);
- g_signal_connect (ecc->popup_list,
- "button_press_event",
- G_CALLBACK (e_cell_combo_list_button_press),
- ecc);
g_signal_connect (ecc->popup_window,
"button_press_event",
G_CALLBACK (e_cell_combo_button_press),
@@ -231,26 +232,20 @@ e_cell_combo_set_popdown_strings (ECellCombo *ecc,
GList *strings)
{
GList *elem;
- GtkWidget *listitem;
+ GtkListStore *store;
g_return_if_fail (E_IS_CELL_COMBO (ecc));
g_return_if_fail (strings != NULL);
- gtk_list_clear_items (GTK_LIST (ecc->popup_list), 0, -1);
- elem = strings;
- while (elem) {
- char *utf8_text = elem->data;
-
- listitem = gtk_list_item_new_with_label (utf8_text);
+ store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (ecc->popup_tree_view)));
+ gtk_list_store_clear (store);
- gtk_widget_show (listitem);
- gtk_container_add (GTK_CONTAINER (ecc->popup_list), listitem);
-
- g_object_set_data_full (G_OBJECT (listitem),
- E_CELL_COMBO_UTF8_KEY,
- g_strdup (utf8_text), g_free);
+ for (elem = strings; elem; elem = elem->next) {
+ GtkTreeIter iter;
+ char *utf8_text = elem->data;
- elem = elem->next;
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter, 0, utf8_text, -1);
}
}
@@ -264,20 +259,22 @@ e_cell_combo_do_popup (ECellPopup *ecp,
ECellCombo *ecc = E_CELL_COMBO (ecp);
guint32 time;
gint error_code;
+ GtkTreeSelection *selection;
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ecc->popup_tree_view));
- g_signal_handlers_block_by_func(ecc->popup_list, e_cell_combo_selection_changed, ecc);
+ g_signal_handlers_block_by_func (selection, e_cell_combo_selection_changed, ecc);
e_cell_combo_show_popup (ecc, row, view_col);
e_cell_combo_select_matching_item (ecc);
- g_signal_handlers_unblock_by_func(ecc->popup_list, e_cell_combo_selection_changed, ecc);
+ g_signal_handlers_unblock_by_func (selection, e_cell_combo_selection_changed, ecc);
if (event->type == GDK_BUTTON_PRESS) {
- GTK_LIST (ecc->popup_list)->drag_selection = TRUE;
time = event->button.time;
} else {
time = event->key.time;
}
- error_code = gdk_pointer_grab (ecc->popup_list->window, TRUE,
+ error_code = gdk_pointer_grab (gtk_widget_get_window (ecc->popup_tree_view), TRUE,
GDK_ENTER_NOTIFY_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
@@ -287,7 +284,7 @@ e_cell_combo_do_popup (ECellPopup *ecp,
if (error_code != 0)
g_warning ("Failed to get pointer grab (%i)", error_code);
gtk_grab_add (ecc->popup_window);
- gdk_keyboard_grab (ecc->popup_list->window, TRUE, time);
+ gdk_keyboard_grab (gtk_widget_get_window (ecc->popup_tree_view), TRUE, time);
return TRUE;
}
@@ -301,45 +298,45 @@ e_cell_combo_select_matching_item (ECellCombo *ecc)
ECellText *ecell_text = E_CELL_TEXT (ecp->child);
ETableItem *eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view);
ETableCol *ecol;
- GtkList *list;
- GtkWidget *listitem;
- GList *elem;
gboolean found = FALSE;
- char *cell_text, *list_item_text;
+ char *cell_text;
+ gboolean valid;
+ GtkTreeSelection *selection;
+ GtkTreeIter iter;
+ GtkTreeModel *model;
ecol = e_table_header_get_column (eti->header, ecp->popup_view_col);
cell_text = e_cell_text_get_text (ecell_text, ecv->e_table_model,
ecol->col_idx, ecp->popup_row);
- list = GTK_LIST (ecc->popup_list);
- elem = list->children;
- while (elem) {
- listitem = GTK_WIDGET (elem->data);
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (ecc->popup_tree_view));
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ecc->popup_tree_view));
+
+ for (valid = gtk_tree_model_get_iter_first (model, &iter);
+ valid && !found;
+ valid = gtk_tree_model_iter_next (model, &iter)) {
+ char *str = NULL;
- /* We need to compare against the UTF-8 text. */
- list_item_text = g_object_get_data (G_OBJECT (listitem),
- E_CELL_COMBO_UTF8_KEY);
+ gtk_tree_model_get (model, &iter, 0, &str, -1);
+
+ if (str && g_str_equal (str, cell_text)) {
+ GtkTreePath *path = gtk_tree_model_get_path (model, &iter);
+
+ gtk_tree_view_set_cursor (GTK_TREE_VIEW (ecc->popup_tree_view), path, NULL, FALSE);
+ gtk_tree_path_free (path);
- if (list_item_text && !strcmp (list_item_text, cell_text)) {
found = TRUE;
- gtk_list_select_child (list, listitem);
- gtk_widget_grab_focus (listitem);
- break;
}
- elem = elem->next;
+ g_free (str);
}
- if (!found) {
- gtk_list_unselect_all (list);
- if (list->children)
- gtk_widget_grab_focus (GTK_WIDGET (list->children->data));
- }
+ if (!found)
+ gtk_tree_selection_unselect_all (selection);
e_cell_text_free_text (ecell_text, cell_text);
}
-
static void
e_cell_combo_show_popup (ECellCombo *ecc, int row, int view_col)
{
@@ -357,7 +354,7 @@ e_cell_combo_show_popup (ECellCombo *ecc, int row, int view_col)
gtk_widget_hide (GTK_SCROLLED_WINDOW (ecc->popup_scrolled_window)->vscrollbar);
}
- gtk_widget_set_uposition (ecc->popup_window, x, y);
+ gtk_window_move (GTK_WINDOW (ecc->popup_window), x, y);
gtk_widget_set_size_request (ecc->popup_window, width, height);
gtk_widget_realize (ecc->popup_window);
gdk_window_resize (ecc->popup_window->window, width, height);
@@ -429,10 +426,10 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
screen_width = gdk_screen_width ();
avail_width = screen_width - scrollbar_width;
- gtk_widget_size_request (ecc->popup_list, &list_requisition);
+ gtk_widget_size_request (ecc->popup_tree_view, &list_requisition);
min_height = MIN (list_requisition.height,
popup->vscrollbar->requisition.height);
- if (!GTK_LIST (ecc->popup_list)->children)
+ if (!gtk_tree_model_iter_n_children (gtk_tree_view_get_model (GTK_TREE_VIEW (ecc->popup_tree_view)), NULL))
list_requisition.height += E_CELL_COMBO_LIST_EMPTY_HEIGHT;
/* Calculate the desired width. */
@@ -503,32 +500,16 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
}
static void
-e_cell_combo_selection_changed(GtkWidget *popup_list, ECellCombo *ecc)
+e_cell_combo_selection_changed (GtkTreeSelection *selection, ECellCombo *ecc)
{
- if (!GTK_LIST(popup_list)->selection || !GTK_WIDGET_REALIZED(ecc->popup_window))
- return;
+ GtkTreeIter iter;
+ GtkTreeModel *model;
- e_cell_combo_restart_edit (ecc);
-}
-
-static gint
-e_cell_combo_list_button_press(GtkWidget *popup_list, GdkEvent *event, ECellCombo *ecc)
-{
- g_return_val_if_fail (GTK_IS_LIST(popup_list), FALSE);
+ if (!GTK_WIDGET_REALIZED (ecc->popup_window) || !gtk_tree_selection_get_selected (selection, &model, &iter))
+ return;
e_cell_combo_update_cell (ecc);
- gtk_grab_remove (ecc->popup_window);
- gdk_pointer_ungrab (event->button.time);
- gdk_keyboard_ungrab (event->button.time);
- gtk_widget_hide (ecc->popup_window);
-
- e_cell_popup_set_shown (E_CELL_POPUP (ecc), FALSE);
- d(g_print("%s: popup_shown = FALSE\n", __FUNCTION__));
-
e_cell_combo_restart_edit (ecc);
-
- return TRUE;
-
}
/* This handles button press events in the popup window.
@@ -553,7 +534,7 @@ e_cell_combo_button_press (GtkWidget *popup_window,
which is why we hide the popup in this case. */
while (event_widget) {
event_widget = event_widget->parent;
- if (event_widget == ecc->popup_list)
+ if (event_widget == ecc->popup_tree_view)
return FALSE;
}
@@ -590,11 +571,11 @@ e_cell_combo_button_release (GtkWidget *popup_window,
event_widget = gtk_get_event_widget ((GdkEvent*) event);
/* See if the button was released in the list (or its children). */
- while (event_widget && event_widget != ecc->popup_list)
+ while (event_widget && event_widget != ecc->popup_tree_view)
event_widget = event_widget->parent;
/* If it wasn't, then we just ignore the event. */
- if (event_widget != ecc->popup_list)
+ if (event_widget != ecc->popup_tree_view)
return FALSE;
/* The button was released inside the list, so we hide the popup and
@@ -657,18 +638,17 @@ e_cell_combo_update_cell (ECellCombo *ecc)
ECellText *ecell_text = E_CELL_TEXT (ecp->child);
ETableItem *eti = E_TABLE_ITEM (ecv->e_table_item_view);
ETableCol *ecol;
- GtkList *list = GTK_LIST (ecc->popup_list);
- GtkListItem *listitem;
- gchar *text, *old_text;
+ GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ecc->popup_tree_view));
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ gchar *text = NULL, *old_text;
/* Return if no item is selected. */
- if (list->selection == NULL)
+ if (!gtk_tree_selection_get_selected (selection, &model, &iter))
return;
/* Get the text of the selected item. */
- listitem = list->selection->data;
- text = g_object_get_data (G_OBJECT (listitem),
- E_CELL_COMBO_UTF8_KEY);
+ gtk_tree_model_get (model, &iter, 0, &text, -1);
g_return_if_fail (text != NULL);
/* Compare it with the existing cell contents. */
@@ -684,6 +664,7 @@ e_cell_combo_update_cell (ECellCombo *ecc)
}
e_cell_text_free_text (ecell_text, old_text);
+ g_free (text);
}
diff --git a/widgets/table/e-cell-combo.h b/widgets/table/e-cell-combo.h
index b7cc928e25..2e801f3711 100644
--- a/widgets/table/e-cell-combo.h
+++ b/widgets/table/e-cell-combo.h
@@ -45,7 +45,7 @@ typedef struct {
GtkWidget *popup_window;
GtkWidget *popup_scrolled_window;
- GtkWidget *popup_list;
+ GtkWidget *popup_tree_view;
} ECellCombo;
typedef struct {
diff --git a/widgets/table/e-cell-date.c b/widgets/table/e-cell-date.c
index 1ec554515e..ac0274f183 100644
--- a/widgets/table/e-cell-date.c
+++ b/widgets/table/e-cell-date.c
@@ -54,7 +54,8 @@ ecd_get_text(ECellText *cell, ETableModel *model, int col, int row)
if (date == 0) {
return g_strdup (_("?"));
}
-
+
+ tzset ();
localtime_r (&date, &then);
localtime_r (&nowdate, &now);
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index ee1934ae59..e50d3d7ae7 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -594,16 +594,21 @@ build_layout (ECellTextView *text_view, int row, const char *text, gint width)
PangoFontDescription *desc = NULL, *fixed_desc = NULL;
char *fixed_family = NULL;
gint fixed_size = 0;
+ gboolean fixed_points = TRUE;
fixed_desc = pango_font_description_from_string (ect->font_name);
if (fixed_desc) {
fixed_family = (char *)pango_font_description_get_family (fixed_desc);
fixed_size = pango_font_description_get_size (fixed_desc);
+ fixed_points = !pango_font_description_get_size_is_absolute (fixed_desc);
}
desc = pango_font_description_copy (gtk_widget_get_style (GTK_WIDGET (((GnomeCanvasItem *)ecell_view->e_table_item_view)->canvas))->font_desc);
pango_font_description_set_family (desc, fixed_family);
- pango_font_description_set_size (desc, fixed_size);
+ if (fixed_points)
+ pango_font_description_set_size (desc, fixed_size);
+ else
+ pango_font_description_set_absolute_size (desc, fixed_size);
/* pango_font_description_set_style (desc, PANGO_STYLE_OBLIQUE); */
pango_layout_set_font_description (layout, desc);
pango_font_description_free (desc);
diff --git a/widgets/table/e-table-example-1.c b/widgets/table/e-table-example-1.c
index e68dda908e..cacef107b7 100644
--- a/widgets/table/e-table-example-1.c
+++ b/widgets/table/e-table-example-1.c
@@ -293,7 +293,6 @@ main (int argc, char *argv [])
gnome_init ("TableExample", "TableExample", argc, argv);
e_cursors_init ();
- gtk_widget_push_visual (gdk_rgb_get_visual ());
gtk_widget_push_colormap (gdk_rgb_get_colormap ());
create_table ();
diff --git a/widgets/table/e-table-field-chooser-dialog.c b/widgets/table/e-table-field-chooser-dialog.c
index f277795d23..b958fc27bf 100644
--- a/widgets/table/e-table-field-chooser-dialog.c
+++ b/widgets/table/e-table-field-chooser-dialog.c
@@ -97,7 +97,7 @@ e_table_field_chooser_dialog_init (ETableFieldChooserDialog *e_table_field_choos
gtk_dialog_add_button(GTK_DIALOG(e_table_field_chooser_dialog),
GTK_STOCK_CLOSE, GTK_RESPONSE_OK);
- gtk_window_set_policy(GTK_WINDOW(e_table_field_chooser_dialog), FALSE, TRUE, FALSE);
+ gtk_window_set_resizable(GTK_WINDOW(e_table_field_chooser_dialog), TRUE);
widget = e_table_field_chooser_new();
e_table_field_chooser_dialog->etfc = E_TABLE_FIELD_CHOOSER(widget);
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 0066b8b482..592cd1eee5 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -688,7 +688,7 @@ etgc_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col)
}
static void
-etgc_compute_mouse_over (ETableGroup *etg, int x, int y, int *row, int *col)
+etgc_get_mouse_over (ETableGroup *etg, int *row, int *col)
{
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg);
@@ -697,18 +697,23 @@ etgc_compute_mouse_over (ETableGroup *etg, int x, int y, int *row, int *col)
if (col)
*col = -1;
- x -= GROUP_INDENT;
- y -= TITLE_HEIGHT;
-
- if (x >= 0 && y >= 0 && etgc->children) {
+ if (etgc->children) {
+ int row_plus = 0;
GList *list;
+
for (list = etgc->children; list; list = list->next) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data;
ETableGroup *child = child_node->child;
- e_table_group_compute_mouse_over (child, x, y, row, col);
- if ((*row != -1) && (*col != -1))
+ e_table_group_get_mouse_over (child, row, col);
+
+ if ((!row || *row != -1) && (!col || *col != -1)) {
+ if (row)
+ *row += row_plus;
return;
+ }
+
+ row_plus += e_table_group_row_count (child);
}
}
}
@@ -914,7 +919,7 @@ etgc_class_init (ETableGroupContainerClass *klass)
e_group_class->get_focus_column = etgc_get_focus_column;
e_group_class->get_printable = etgc_get_printable;
e_group_class->compute_location = etgc_compute_location;
- e_group_class->compute_mouse_over = etgc_compute_mouse_over;
+ e_group_class->get_mouse_over = etgc_get_mouse_over;
e_group_class->get_cell_geometry = etgc_get_cell_geometry;
g_object_class_install_property (object_class, PROP_TABLE_ALTERNATING_ROW_COLORS,
diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c
index 95dc312b0a..dc4c8ba11e 100644
--- a/widgets/table/e-table-group-leaf.c
+++ b/widgets/table/e-table-group-leaf.c
@@ -408,11 +408,16 @@ etgl_compute_location (ETableGroup *etg, int *x, int *y, int *row, int *col)
}
static void
-etgl_compute_mouse_over (ETableGroup *etg, int x, int y, int *row, int *col)
+etgl_get_mouse_over (ETableGroup *etg, int *row, int *col)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
- e_table_item_compute_mouse_over (etgl->item, x, y, row, col);
+ if (etgl->item && etgl->item->motion_row > -1 && etgl->item->motion_col > -1) {
+ if (row)
+ *row = etgl->item->motion_row;
+ if (col)
+ *col = etgl->item->motion_col;
+ }
}
static void
@@ -573,7 +578,7 @@ etgl_class_init (ETableGroupLeafClass *klass)
e_group_class->get_focus_column = etgl_get_focus_column;
e_group_class->get_printable = etgl_get_printable;
e_group_class->compute_location = etgl_compute_location;
- e_group_class->compute_mouse_over = etgl_compute_mouse_over;
+ e_group_class->get_mouse_over = etgl_get_mouse_over;
e_group_class->get_cell_geometry = etgl_get_cell_geometry;
g_object_class_install_property (object_class, PROP_TABLE_ALTERNATING_ROW_COLORS,
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index cebef080d8..257d23fb66 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -382,13 +382,13 @@ e_table_group_compute_location (ETableGroup *etg, int *x, int *y, int *row, int
}
void
-e_table_group_compute_mouse_over (ETableGroup *etg, int x, int y, int *row, int *col)
+e_table_group_get_mouse_over (ETableGroup *etg, int *row, int *col)
{
g_return_if_fail (etg != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (etg));
- g_return_if_fail (ETG_CLASS (etg)->compute_mouse_over != NULL);
- ETG_CLASS (etg)->compute_mouse_over (etg, x, y, row, col);
+ g_return_if_fail (ETG_CLASS (etg)->get_mouse_over != NULL);
+ ETG_CLASS (etg)->get_mouse_over (etg, row, col);
}
/**
@@ -648,7 +648,7 @@ etg_class_init (ETableGroupClass *klass)
klass->get_focus = etg_get_focus;
klass->get_printable = NULL;
klass->compute_location = NULL;
- klass->compute_mouse_over = NULL;
+ klass->get_mouse_over = NULL;
klass->get_cell_geometry = NULL;
etg_signals [CURSOR_CHANGE] =
diff --git a/widgets/table/e-table-group.h b/widgets/table/e-table-group.h
index 10591e4113..ee225c2471 100644
--- a/widgets/table/e-table-group.h
+++ b/widgets/table/e-table-group.h
@@ -90,7 +90,7 @@ typedef struct {
gint (*get_focus_column) (ETableGroup *etg);
EPrintable *(*get_printable) (ETableGroup *etg);
void (*compute_location) (ETableGroup *etg, int *x, int *y, int *row, int *col);
- void (*compute_mouse_over) (ETableGroup *etg, int x, int y, int *row, int *col);
+ void (*get_mouse_over) (ETableGroup *etg, int *row, int *col);
void (*get_cell_geometry) (ETableGroup *etg, int *row, int *col, int *x, int *y, int *width, int *height);
} ETableGroupClass;
@@ -123,9 +123,7 @@ void e_table_group_compute_location (ETableGroup *etg,
int *y,
int *row,
int *col);
-void e_table_group_compute_mouse_over(ETableGroup *etg,
- int x,
- int y,
+void e_table_group_get_mouse_over(ETableGroup *etg,
int *row,
int *col);
void e_table_group_get_cell_geometry (ETableGroup *etg,
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index a7da9e2fe1..6cbab3405e 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -509,10 +509,10 @@ ethi_add_drop_marker (ETableHeaderItem *ethi, int col, gboolean recreate)
rx -= gtk_layout_get_hadjustment (GTK_LAYOUT (GNOME_CANVAS_ITEM (ethi)->canvas))->value;
ry -= gtk_layout_get_vadjustment (GTK_LAYOUT (GNOME_CANVAS_ITEM (ethi)->canvas))->value;
- gtk_widget_set_uposition (arrow_down, rx + x - ARROW_PTR, ry - ARROW_DOWN_HEIGHT);
+ gtk_window_move (GTK_WINDOW (arrow_down), rx + x - ARROW_PTR, ry - ARROW_DOWN_HEIGHT);
gtk_widget_show_all (arrow_down);
- gtk_widget_set_uposition (arrow_up, rx + x - ARROW_PTR, ry + ethi->height);
+ gtk_window_move (GTK_WINDOW (arrow_up), rx + x - ARROW_PTR, ry + ethi->height);
gtk_widget_show_all (arrow_up);
}
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 9e392f4384..69a300d950 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -2416,20 +2416,18 @@ e_table_get_cell_geometry (ETable *table,
/**
* e_table_get_mouse_over_cell:
- * Similar to e_table_get_cell_at, only here we recalculate x,y relatively to each item.
+ * Similar to e_table_get_cell_at, only here we check based on the mouse motion information in the group.
**/
void
-e_table_get_mouse_over_cell (ETable *table, int x, int y, int *row, int *col)
+e_table_get_mouse_over_cell (ETable *table, int *row, int *col)
{
g_return_if_fail (table != NULL);
g_return_if_fail (E_IS_TABLE (table));
- x += GTK_LAYOUT (table->table_canvas)->hadjustment->value;
- y += GTK_LAYOUT (table->table_canvas)->vadjustment->value;
-
- y -= E_TABLE_HEADER_ITEM (table->header_item)->height;
+ if (!table->group)
+ return;
- e_table_group_compute_mouse_over (table->group, x, y, row, col);
+ e_table_group_get_mouse_over (table->group, row, col);
}
/**
diff --git a/widgets/table/e-table.h b/widgets/table/e-table.h
index 1a681e9eca..6b2a698d5c 100644
--- a/widgets/table/e-table.h
+++ b/widgets/table/e-table.h
@@ -282,7 +282,7 @@ void e_table_get_cell_at (ETable *table,
int y,
int *row_return,
int *col_return);
-void e_table_get_mouse_over_cell (ETable *table, int x, int y, int *row, int *col);
+void e_table_get_mouse_over_cell (ETable *table, int *row, int *col);
void e_table_get_cell_geometry (ETable *table,
int row,
int col,