From 68f00fb31c8125190969dd20137a72eb15f6f0d4 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 28 Feb 2009 04:15:16 +0100 Subject: [PATCH] Add function to obtain the action group of the browser --- midori/midori-browser.c | 20 ++++++++++++++++++++ midori/midori-browser.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index be6b919c..8758de1f 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -4507,6 +4507,26 @@ midori_browser_activate_action (MidoriBrowser* browser, g_signal_emit (browser, signals[ACTIVATE_ACTION], 0, name); } +/** + * midori_browser_get_action_group: + * @browser: a #MidoriBrowser + * + * Retrieves the action group holding all actions used + * by the browser. It allows obtaining individual + * actions and adding new actions. + * + * Return value: the action group of the browser + * + * Since: 0.1.4 + **/ +GtkActionGroup* +midori_browser_get_action_group (MidoriBrowser* browser) +{ + g_return_val_if_fail (MIDORI_IS_BROWSER (browser), NULL); + + return browser->action_group; +} + /** * midori_browser_set_current_uri: * @browser: a #MidoriBrowser diff --git a/midori/midori-browser.h b/midori/midori-browser.h index cc2781b1..92a61779 100644 --- a/midori/midori-browser.h +++ b/midori/midori-browser.h @@ -100,6 +100,9 @@ void midori_browser_activate_action (MidoriBrowser* browser, const gchar* name); +GtkActionGroup* +midori_browser_get_action_group (MidoriBrowser* browser); + void midori_browser_set_current_uri (MidoriBrowser* browser, const gchar* uri);