aboutsummaryrefslogtreecommitdiffstats
path: root/lib/egg
diff options
context:
space:
mode:
Diffstat (limited to 'lib/egg')
-rwxr-xr-xlib/egg/egg-editable-toolbar.c52
-rwxr-xr-xlib/egg/egg-editable-toolbar.h2
2 files changed, 54 insertions, 0 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c
index 8e875842e..73528b96d 100755
--- a/lib/egg/egg-editable-toolbar.c
+++ b/lib/egg/egg-editable-toolbar.c
@@ -1169,6 +1169,58 @@ set_action_sensitive (EggToolbarsItem *item,
}
}
+static void
+hide_toolbar (EggToolbarsToolbar *t,
+ EggEditableToolbar *etoolbar)
+{
+ GtkWidget *tb;
+
+ g_return_if_fail (IS_EGG_EDITABLE_TOOLBAR (etoolbar));
+ g_return_if_fail (t != NULL);
+
+ tb = get_item_widget (etoolbar, t);
+
+ g_return_if_fail (tb != NULL);
+
+ gtk_widget_hide (tb);
+}
+
+static void
+show_toolbar (EggToolbarsToolbar *t,
+ EggEditableToolbar *etoolbar)
+{
+ GtkWidget *tb;
+
+ g_return_if_fail (IS_EGG_EDITABLE_TOOLBAR (etoolbar));
+ g_return_if_fail (t != NULL);
+
+ tb = get_item_widget (etoolbar, t);
+
+ g_return_if_fail (tb != NULL);
+
+ gtk_widget_show (tb);
+}
+
+void
+egg_editable_toolbar_show (EggEditableToolbar *etoolbar)
+{
+ g_return_if_fail (IS_EGG_EDITABLE_TOOLBAR (etoolbar));
+
+ egg_toolbars_group_foreach_toolbar (etoolbar->priv->group,
+ (EggToolbarsGroupForeachToolbarFunc)
+ show_toolbar, etoolbar);
+}
+
+void
+egg_editable_toolbar_hide (EggEditableToolbar *etoolbar)
+{
+ g_return_if_fail (IS_EGG_EDITABLE_TOOLBAR (etoolbar));
+
+ egg_toolbars_group_foreach_toolbar (etoolbar->priv->group,
+ (EggToolbarsGroupForeachToolbarFunc)
+ hide_toolbar, etoolbar);
+}
+
void
egg_editable_toolbar_edit (EggEditableToolbar *etoolbar,
GtkWidget *window)
diff --git a/lib/egg/egg-editable-toolbar.h b/lib/egg/egg-editable-toolbar.h
index 29ccf8200..f4f8aff64 100755
--- a/lib/egg/egg-editable-toolbar.h
+++ b/lib/egg/egg-editable-toolbar.h
@@ -62,6 +62,8 @@ EggEditableToolbar *egg_editable_toolbar_new (EggMenuMerge *merge,
EggToolbarsGroup *group);
void egg_editable_toolbar_edit (EggEditableToolbar *etoolbar,
GtkWidget *window);
+void egg_editable_toolbar_show (EggEditableToolbar *etoolbar);
+void egg_editable_toolbar_hide (EggEditableToolbar *etoolbar);
char *egg_editable_toolbar_get_action_name (EggEditableToolbar *etoolbar,
const char *drag_type,
const char *data);