aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-01 13:00:36 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-06-01 18:33:22 +0800
commitaf2178334938f9f45aa2c39f6880394bb5c12988 (patch)
tree50b1dc38b667f459f902dfa8bc0f125c6dd52aad
parent1047848935ff20342a1ced37553ba89d710378d5 (diff)
downloadgsoc2013-evolution-af2178334938f9f45aa2c39f6880394bb5c12988.tar
gsoc2013-evolution-af2178334938f9f45aa2c39f6880394bb5c12988.tar.gz
gsoc2013-evolution-af2178334938f9f45aa2c39f6880394bb5c12988.tar.bz2
gsoc2013-evolution-af2178334938f9f45aa2c39f6880394bb5c12988.tar.lz
gsoc2013-evolution-af2178334938f9f45aa2c39f6880394bb5c12988.tar.xz
gsoc2013-evolution-af2178334938f9f45aa2c39f6880394bb5c12988.tar.zst
gsoc2013-evolution-af2178334938f9f45aa2c39f6880394bb5c12988.zip
Remove e_shell_view_[un]block_update_actions().
No longer needed.
-rw-r--r--doc/reference/evolution-shell/evolution-shell-sections.txt2
-rw-r--r--shell/e-shell-view.c59
-rw-r--r--shell/e-shell-view.h4
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 5798533fd6..4c80e1e889 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 1cc0efdfc8..f39458fd79 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 068ae392ca..5351e7226c 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);