[evolution] Remove e_shell_view_[un]block_update_actions().



commit af2178334938f9f45aa2c39f6880394bb5c12988
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Jun 1 01:00:36 2013 -0400

    Remove e_shell_view_[un]block_update_actions().
    
    No longer needed.

 .../evolution-shell/evolution-shell-sections.txt   |    2 -
 shell/e-shell-view.c                               |   59 +-------------------
 shell/e-shell-view.h                               |    4 -
 3 files changed, 1 insertions(+), 64 deletions(-)
---
diff --git a/doc/reference/evolution-shell/evolution-shell-sections.txt 
b/doc/reference/evolution-shell/evolution-shell-sections.txt
index 5798533..4c80e1e 100644
--- a/doc/reference/evolution-shell/evolution-shell-sections.txt
+++ b/doc/reference/evolution-shell/evolution-shell-sections.txt
@@ -251,8 +251,6 @@ e_shell_view_block_execute_search
 e_shell_view_unblock_execute_search
 e_shell_view_is_execute_search_blocked
 e_shell_view_update_actions
-e_shell_view_block_update_actions
-e_shell_view_unblock_update_actions
 e_shell_view_show_popup_menu
 e_shell_view_new_view_instance
 e_shell_view_write_source
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 1cc0efd..f39458f 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -68,9 +68,6 @@ struct _EShellViewPrivate {
        EFilterRule *search_rule;
        guint execute_search_blocked;
 
-       guint update_actions_blocked;
-       gboolean update_actions_called;
-
        GtkWidget *preferences_window;
        gulong preferences_hide_id;
 };
@@ -719,7 +716,6 @@ shell_view_update_actions (EShellView *shell_view)
        EShellWindow *shell_window;
        EFocusTracker *focus_tracker;
 
-       g_return_if_fail (!shell_view->priv->update_actions_blocked);
        g_return_if_fail (e_shell_view_is_active (shell_view));
 
        shell_window = e_shell_view_get_shell_window (shell_view);
@@ -1685,67 +1681,14 @@ e_shell_view_is_execute_search_blocked (EShellView *shell_view)
  * #EShellView::update-actions signal is typically emitted just before
  * showing a popup menu or just after the user selects an item in the
  * shell view.
- *
- * Emission can be blocked by e_shell_view_block_update_actions().
  **/
 void
 e_shell_view_update_actions (EShellView *shell_view)
 {
        g_return_if_fail (E_IS_SHELL_VIEW (shell_view));
 
-       if (!e_shell_view_is_active (shell_view))
-               return;
-
-       if (shell_view->priv->update_actions_blocked > 0) {
-               shell_view->priv->update_actions_called = TRUE;
-       } else {
-               shell_view->priv->update_actions_called = FALSE;
+       if (e_shell_view_is_active (shell_view))
                g_signal_emit (shell_view, signals[UPDATE_ACTIONS], 0);
-       }
-}
-
-/**
- * e_shell_view_block_update_actions:
- * @shell_view: an #EShellView
- *
- * Block emission of #EShellView::update-actions signal through
- * e_shell_view_update_actions(). The emission si blocked until
- * e_shell_view_unblock_update_actions() is called same times as
- * this function.
- **/
-void
-e_shell_view_block_update_actions (EShellView *shell_view)
-{
-       g_return_if_fail (E_IS_SHELL_VIEW (shell_view));
-       g_return_if_fail (shell_view->priv->update_actions_blocked + 1 != 0);
-
-       shell_view->priv->update_actions_blocked++;
-       if (shell_view->priv->update_actions_blocked == 1)
-               shell_view->priv->update_actions_called = FALSE;
-}
-
-/**
- * e_shell_view_unblock_update_actions:
- * @shell_view: an #EShellView
- *
- * Unblock emission of #EShellView::update-actions signal through
- * e_shell_view_update_actions(), previously blocked by function
- * e_shell_view_block_update_actions().
- **/
-void
-e_shell_view_unblock_update_actions (EShellView *shell_view)
-{
-       g_return_if_fail (E_IS_SHELL_VIEW (shell_view));
-       g_return_if_fail (shell_view->priv->update_actions_blocked > 0);
-
-       shell_view->priv->update_actions_blocked--;
-
-       if (!shell_view->priv->update_actions_blocked &&
-               shell_view->priv->update_actions_called) {
-
-               shell_view->priv->update_actions_called = FALSE;
-               e_shell_view_update_actions (shell_view);
-       }
 }
 
 /**
diff --git a/shell/e-shell-view.h b/shell/e-shell-view.h
index 068ae39..5351e72 100644
--- a/shell/e-shell-view.h
+++ b/shell/e-shell-view.h
@@ -227,10 +227,6 @@ void               e_shell_view_unblock_execute_search
 gboolean       e_shell_view_is_execute_search_blocked
                                                (EShellView *shell_view);
 void           e_shell_view_update_actions     (EShellView *shell_view);
-void           e_shell_view_block_update_actions
-                                               (EShellView *shell_view);
-void           e_shell_view_unblock_update_actions
-                                               (EShellView *shell_view);
 GtkWidget *    e_shell_view_show_popup_menu    (EShellView *shell_view,
                                                 const gchar *widget_path,
                                                 GdkEvent *button_event);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]