guint button,
MidoriBrowser* browser)
{
- if (button == 1)
- {
- midori_browser_open_bookmark (browser, item);
- }
- else if (button == 2)
+ if (MIDORI_EVENT_NEW_TAB (gtk_get_current_event ()))
{
gint n = midori_browser_add_uri (browser, katze_item_get_uri (item));
midori_browser_set_current_page_smartly (browser, n);
}
+ else if (button == 1)
+ {
+ midori_browser_open_bookmark (browser, item);
+ }
return TRUE;
}
guint button,
MidoriBrowser* browser)
{
- if (button == 1)
+ if (MIDORI_EVENT_NEW_TAB (gtk_get_current_event ()))
{
- guint n = midori_browser_add_item (browser, item);
- midori_browser_set_current_page (browser, n);
+ gint n = midori_browser_add_item (browser, item);
+ midori_browser_set_current_page_smartly (browser, n);
katze_array_remove_item (browser->trash, item);
_midori_browser_update_actions (browser);
}
- else if (button == 2)
+ else if (button == 1)
{
- gint n = midori_browser_add_item (browser, item);
- midori_browser_set_current_page_smartly (browser, n);
+ guint n = midori_browser_add_item (browser, item);
+ midori_browser_set_current_page (browser, n);
katze_array_remove_item (browser->trash, item);
_midori_browser_update_actions (browser);
}
GdkEventButton* event,
MidoriBrowser* browser)
{
- if (event->button == 2)
+ if (MIDORI_EVENT_NEW_TAB (event))
{
GtkAction* action;
/* Open a new tab on double click or middle mouse click */
if (/*(event->type == GDK_2BUTTON_PRESS && event->button == 1)
- || */(event->type == GDK_BUTTON_PRESS && event->button == 2))
+ || */(event->type == GDK_BUTTON_PRESS && MIDORI_EVENT_NEW_TAB (event)))
{
gint n = midori_browser_add_uri (browser, "");
midori_browser_set_current_page (browser, n);
GdkEventButton* event,
MidoriBrowser* browser)
{
- if (event->button == 2)
+ if (MIDORI_EVENT_NEW_TAB (event))
{
GtkWidget* parent = gtk_widget_get_parent (toolitem);
GtkAction* action = gtk_activatable_get_related_action (
gint n;
item = (KatzeItem*)g_object_get_data (G_OBJECT (toolitem), "KatzeItem");
- if (event->button == 2)
+ if (MIDORI_EVENT_NEW_TAB (event))
{
if (KATZE_ITEM_IS_BOOKMARK (item))
{