summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgue5t <gue5t@midori.launchpad>2015-03-22 12:21:53 -0500
committergue5t <gue5t@midori.launchpad>2015-03-22 12:21:53 -0500
commit6a08acb2905d43ed4f9f9a325c7ce2d6a94e718c (patch)
tree12be7da216a87d955f9eea21344b69f1c9aebc83
parentd86f8a528dd781ea589651dbcd2508f3405d255f (diff)
downloadmidori-6a08acb2905d43ed4f9f9a325c7ce2d6a94e718c.tar.gz
Rename activate-item signal to activate-item-event to carry event and avoid compatibility worries
-rw-r--r--katze/katze-arrayaction.c22
-rw-r--r--midori/marshal.list2
-rw-r--r--midori/midori-browser.c40
3 files changed, 32 insertions, 32 deletions
diff --git a/katze/katze-arrayaction.c b/katze/katze-arrayaction.c
index 4be5e9c5..7fba9f18 100644
--- a/katze/katze-arrayaction.c
+++ b/katze/katze-arrayaction.c
@@ -51,7 +51,7 @@ enum
{
POPULATE_POPUP,
POPULATE_FOLDER,
- ACTIVATE_ITEM,
+ ACTIVATE_ITEM_EVENT,
ACTIVATE_ITEM_ALT,
LAST_SIGNAL
};
@@ -139,23 +139,23 @@ katze_array_action_class_init (KatzeArrayActionClass* class)
GTK_TYPE_MENU_SHELL, KATZE_TYPE_ITEM);
/**
- * KatzeArrayAction::activate-item:
+ * KatzeArrayAction::activate-item-event:
* @array: the object on which the signal is emitted
* @item: the item being activated
- * @new_tab: whether the activation should open a new tab
+ * @event: (allow-none): the event that caused the activation
*
* An item was activated.
**/
- signals[ACTIVATE_ITEM] = g_signal_new ("activate-item",
+ signals[ACTIVATE_ITEM_EVENT] = g_signal_new ("activate-item-event",
G_TYPE_FROM_CLASS (class),
(GSignalFlags) (G_SIGNAL_RUN_LAST),
0,
0,
NULL,
- midori_cclosure_marshal_VOID__OBJECT_BOOLEAN,
+ midori_cclosure_marshal_VOID__OBJECT_POINTER,
G_TYPE_NONE, 2,
KATZE_TYPE_ITEM,
- G_TYPE_BOOLEAN);
+ G_TYPE_POINTER);
/**
* KatzeArrayAction::activate-item-alt:
@@ -285,11 +285,11 @@ katze_array_action_activate (GtkAction* action)
}
static void
-katze_array_action_activate_item (KatzeArrayAction* action,
- KatzeItem* item,
- gboolean new_tab)
+katze_array_action_activate_item_event (KatzeArrayAction* action,
+ KatzeItem* item,
+ GdkEvent* event)
{
- g_signal_emit (action, signals[ACTIVATE_ITEM], 0, item, new_tab);
+ g_signal_emit (action, signals[ACTIVATE_ITEM_EVENT], 0, item, event);
}
static gboolean
@@ -321,7 +321,7 @@ katze_array_action_menu_activate_cb (GtkWidget* proxy,
GdkEvent* event = gtk_get_current_event();
- katze_array_action_activate_item (array_action, item, event && MIDORI_EVENT_NEW_TAB (event));
+ katze_array_action_activate_item_event (array_action, item, event);
}
static gboolean
diff --git a/midori/marshal.list b/midori/marshal.list
index c214bbbf..3bde3714 100644
--- a/midori/marshal.list
+++ b/midori/marshal.list
@@ -6,7 +6,7 @@ BOOLEAN:VOID
BOOLEAN:STRING
OBJECT:OBJECT
VOID:BOOLEAN,STRING
-VOID:OBJECT,BOOLEAN
+VOID:OBJECT,POINTER
VOID:OBJECT,ENUM,BOOLEAN
VOID:OBJECT,INT,INT
VOID:OBJECT,OBJECT
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 718fac0c..b4cffa54 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -3140,12 +3140,12 @@ midori_browser_bookmark_popup (GtkWidget* proxy,
MidoriBrowser* browser);
static gboolean
-midori_bookmarkbar_activate_item (GtkAction* action,
- KatzeItem* item,
- gboolean new_tab,
- MidoriBrowser* browser)
+midori_bookmarkbar_activate_item_event (GtkAction* action,
+ KatzeItem* item,
+ GdkEvent* event,
+ MidoriBrowser* browser)
{
- if (new_tab)
+ if (event && MIDORI_EVENT_NEW_TAB (event))
{
GtkWidget* view = midori_browser_add_item (browser, item);
midori_browser_set_current_tab_smartly (browser, view);
@@ -3205,12 +3205,12 @@ midori_browser_restore_tab (MidoriBrowser* browser,
}
static gboolean
-_action_trash_activate_item (GtkAction* action,
- KatzeItem* item,
- gboolean new_tab,
- MidoriBrowser* browser)
+_action_trash_activate_item_event (GtkAction* action,
+ KatzeItem* item,
+ GdkEvent* event,
+ MidoriBrowser* browser)
{
- if (new_tab)
+ if (event && MIDORI_EVENT_NEW_TAB (event))
{
midori_browser_set_current_tab_smartly (browser,
midori_browser_restore_tab (browser, item));
@@ -3337,10 +3337,10 @@ _action_window_populate_popup (GtkAction* action,
}
static void
-_action_window_activate_item (GtkAction* action,
- KatzeItem* item,
- gboolean new_tab,
- MidoriBrowser* browser)
+_action_window_activate_item_event (GtkAction* action,
+ KatzeItem* item,
+ GdkEvent* event,
+ MidoriBrowser* browser)
{
midori_browser_set_current_item (browser, item);
}
@@ -6035,8 +6035,8 @@ midori_browser_init (MidoriBrowser* browser)
g_object_connect (action,
"signal::populate-popup",
_action_trash_populate_popup, browser,
- "signal::activate-item",
- _action_trash_activate_item, browser,
+ "signal::activate-item-event",
+ _action_trash_activate_item_event, browser,
NULL);
gtk_action_group_add_action_with_accel (browser->action_group, action, "");
g_object_unref (action);
@@ -6055,8 +6055,8 @@ midori_browser_init (MidoriBrowser* browser)
_action_bookmarks_populate_folder, browser,
"signal::activate-item-alt",
midori_bookmarkbar_activate_item_alt, browser,
- "signal::activate-item",
- midori_bookmarkbar_activate_item, browser,
+ "signal::activate-item-event",
+ midori_bookmarkbar_activate_item_event, browser,
NULL);
gtk_action_group_add_action_with_accel (browser->action_group, action, "");
g_object_unref (action);
@@ -6088,8 +6088,8 @@ midori_browser_init (MidoriBrowser* browser)
g_object_connect (action,
"signal::populate-popup",
_action_window_populate_popup, browser,
- "signal::activate-item",
- _action_window_activate_item, browser,
+ "signal::activate-item-event",
+ _action_window_activate_item_event, browser,
NULL);
gtk_action_group_add_action_with_accel (browser->action_group, action, "");
g_object_unref (action);