diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-01-29 06:36:03 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-01-30 22:02:11 +0800 |
commit | 8d85229f8fc9ff0e27b1f7790f61605c04337d7b (patch) | |
tree | 20d2dd06cc12df2fda95b3af7920a9e2e50cb997 /modules/calendar/e-memo-shell-view-private.c | |
parent | 7c02582ae70e45d58bf0966d60e23b50f854a06a (diff) | |
download | gsoc2013-evolution-8d85229f8fc9ff0e27b1f7790f61605c04337d7b.tar.gz gsoc2013-evolution-8d85229f8fc9ff0e27b1f7790f61605c04337d7b.tar.zst gsoc2013-evolution-8d85229f8fc9ff0e27b1f7790f61605c04337d7b.zip |
Sidebar cleanups for Memos and Tasks.
Kill the EMemoTable::user-created signal and connect directly to
ECalModel::row-appended in e_memo_shell_view_private.c.
Same goes for tasks.
Diffstat (limited to 'modules/calendar/e-memo-shell-view-private.c')
-rw-r--r-- | modules/calendar/e-memo-shell-view-private.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/modules/calendar/e-memo-shell-view-private.c b/modules/calendar/e-memo-shell-view-private.c index 9e2be0fe7d..2caa6ec2ed 100644 --- a/modules/calendar/e-memo-shell-view-private.c +++ b/modules/calendar/e-memo-shell-view-private.c @@ -24,27 +24,15 @@ #include "widgets/menus/gal-view-factory-etable.h" static void -memo_shell_view_table_popup_event_cb (EShellView *shell_view, - GdkEventButton *event) -{ - const gchar *widget_path; - - widget_path = "/memo-popup"; - e_shell_view_show_popup_menu (shell_view, widget_path, event); -} - -static void -memo_shell_view_table_user_created_cb (EMemoShellView *memo_shell_view, - EMemoTable *memo_table) +memo_shell_view_model_row_appended_cb (EMemoShellView *memo_shell_view, + ECalModel *model) { EMemoShellSidebar *memo_shell_sidebar; - ECalModel *model; ECal *client; ESource *source; /* This is the "Click to Add" handler. */ - model = e_memo_table_get_model (memo_table); client = e_cal_model_get_default_client (model); source = e_cal_get_source (client); @@ -55,6 +43,16 @@ memo_shell_view_table_user_created_cb (EMemoShellView *memo_shell_view, } static void +memo_shell_view_table_popup_event_cb (EShellView *shell_view, + GdkEventButton *event) +{ + const gchar *widget_path; + + widget_path = "/memo-popup"; + e_shell_view_show_popup_menu (shell_view, widget_path, event); +} + +static void memo_shell_view_selector_client_added_cb (EMemoShellView *memo_shell_view, ECal *client) { @@ -202,6 +200,11 @@ e_memo_shell_view_private_constructed (EMemoShellView *memo_shell_view) memo_shell_view); g_signal_connect_swapped ( + model, "row-appended", + G_CALLBACK (memo_shell_view_model_row_appended_cb), + memo_shell_view); + + g_signal_connect_swapped ( memo_table, "open-component", G_CALLBACK (e_memo_shell_view_open_memo), memo_shell_view); @@ -227,11 +230,6 @@ e_memo_shell_view_private_constructed (EMemoShellView *memo_shell_view) memo_shell_view); g_signal_connect_swapped ( - memo_table, "user-created", - G_CALLBACK (memo_shell_view_table_user_created_cb), - memo_shell_view); - - g_signal_connect_swapped ( model, "model-changed", G_CALLBACK (e_memo_shell_view_update_sidebar), memo_shell_view); |