From 3e3c13b439668945241b32cf8c1fd3d6e625f9f5 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 19 Sep 2008 16:52:08 +0000 Subject: Replace EActivityHandler with a new activity-tracking system that uses EActivity objects instead of numeric handler IDs. Create an EActivity, configure it, and (optionally) connect to its "cancelled" and "completed" signals. Then hand it to the shell view via e_shell_view_add_activity(). When finished with the activity, call e_activity_finish() and unref it. svn path=/branches/kill-bonobo/; revision=36391 --- .../gui/component/e-book-shell-view-private.c | 42 ---------------------- 1 file changed, 42 deletions(-) (limited to 'addressbook/gui/component/e-book-shell-view-private.c') diff --git a/addressbook/gui/component/e-book-shell-view-private.c b/addressbook/gui/component/e-book-shell-view-private.c index 94bc96588a..70ba2b2815 100644 --- a/addressbook/gui/component/e-book-shell-view-private.c +++ b/addressbook/gui/component/e-book-shell-view-private.c @@ -41,36 +41,6 @@ popup_event (EBookShellView *book_shell_view, e_shell_window_show_popup_menu (shell_window, widget_path, event); } -static void -set_status_message (EAddressbookView *view, - const gchar *message, - EBookShellView *book_shell_view) -{ - /* XXX Give EAddressbookView an EShellView pointer - * and have it handle this directly. */ - - EActivityHandler *activity_handler; - guint activity_id; - - activity_handler = book_shell_view->priv->activity_handler; - activity_id = book_shell_view->priv->activity_id; - - if (message == NULL || *message == '\0') { - if (activity_id > 0) { - e_activity_handler_operation_finished ( - activity_handler, activity_id); - activity_id = 0; - } - } else if (activity_id == 0) - activity_id = e_activity_handler_operation_started ( - activity_handler, message, TRUE); - else - e_activity_handler_operation_progressing ( - activity_handler, activity_id, message, -1.0); - - book_shell_view->priv->activity_id = activity_id; -} - static void book_shell_view_selection_change_foreach (gint row, EBookShellView *book_shell_view) @@ -240,10 +210,6 @@ book_shell_view_activate_selected_source (EBookShellView *book_shell_view, widget, "popup-event", G_CALLBACK (popup_event), book_shell_view); - g_signal_connect ( - widget, "status-message", - G_CALLBACK (set_status_message), book_shell_view); - g_signal_connect_swapped ( widget, "command-state-change", G_CALLBACK (e_book_shell_view_actions_update), @@ -418,7 +384,6 @@ e_book_shell_view_private_init (EBookShellView *book_shell_view, priv->source_list = g_object_ref (source_list); priv->contact_actions = gtk_action_group_new ("contacts"); - priv->activity_handler = e_activity_handler_new (); priv->uid_to_view = uid_to_view; priv->uid_to_editor = uid_to_editor; @@ -436,7 +401,6 @@ e_book_shell_view_private_constructed (EBookShellView *book_shell_view) EBookShellViewPrivate *priv = book_shell_view->priv; EShellContent *shell_content; EShellSidebar *shell_sidebar; - EShellTaskbar *shell_taskbar; EShellView *shell_view; EShellWindow *shell_window; ESourceSelector *selector; @@ -487,10 +451,6 @@ e_book_shell_view_private_constructed (EBookShellView *book_shell_view) priv->preview = g_object_ref (widget); gtk_widget_show (widget); - shell_taskbar = e_shell_view_get_shell_taskbar (shell_view); - e_activity_handler_attach_task_bar ( - priv->activity_handler, shell_taskbar); - shell_sidebar = e_shell_view_get_shell_sidebar (shell_view); selector = e_book_shell_sidebar_get_selector ( E_BOOK_SHELL_SIDEBAR (shell_sidebar)); @@ -545,8 +505,6 @@ e_book_shell_view_private_dispose (EBookShellView *book_shell_view) DISPOSE (priv->notebook); DISPOSE (priv->preview); - DISPOSE (priv->activity_handler); - g_hash_table_remove_all (priv->uid_to_view); g_hash_table_remove_all (priv->uid_to_editor); -- cgit v1.2.3