/* This is a hack to ensure that the address entry is focussed
with speed dial open. */
if (midori_view_is_blank (view))
- gtk_action_activate (_action_by_name (browser, "Location"));
+ midori_browser_activate_action (browser, "Location");
}
g_object_notify (G_OBJECT (browser), "load-status");
const gchar* action,
MidoriBrowser* browser)
{
- _midori_browser_activate_action (browser, action);
+ midori_browser_activate_action (browser, action);
}
static void
&& event->keyval == GDK_KEY_Tab
&& (event->state & GDK_CONTROL_MASK))
{
- gtk_action_activate (_action_by_name (browser, "TabNext"));
+ midori_browser_activate_action (browser, "TabNext");
return TRUE;
}
else if (event->keyval == GDK_KEY_ISO_Left_Tab
&& (event->state & GDK_CONTROL_MASK)
&& (event->state & GDK_SHIFT_MASK))
{
- gtk_action_activate (_action_by_name (browser, "TabPrevious"));
+ midori_browser_activate_action (browser, "TabPrevious");
return TRUE;
}
/* Interpret Ctrl+= as Zoom In for compatibility */
/* Interpret F5 as reloading for compatibility */
else if (event->keyval == GDK_KEY_F5)
{
- gtk_action_activate (_action_by_name (browser, "Reload"));
+ midori_browser_activate_action (browser, "Reload");
return TRUE;
}
if ((event->keyval == GDK_KEY_BackSpace)
&& (event->state & GDK_SHIFT_MASK))
{
- gtk_action_activate (_action_by_name (browser, "Forward"));
+ midori_browser_activate_action (browser, "Forward");
return TRUE;
}
else if (event->keyval == GDK_KEY_BackSpace)
{
- gtk_action_activate (_action_by_name (browser, "Back"));
+ midori_browser_activate_action (browser, "Back");
return TRUE;
}
MidoriBrowser* browser)
{
if (response == GTK_RESPONSE_HELP)
- gtk_action_activate (_action_by_name (browser, "HelpFAQ"));
+ midori_browser_activate_action (browser, "HelpFAQ");
}
static void
|| !gtk_widget_get_ancestor (focus, GTK_TYPE_PANED))
{
g_signal_stop_emission_by_name (hpaned, "cycle-child-focus");
- gtk_action_activate (_action_by_name (browser, "Location"));
+ midori_browser_activate_action (browser, "Location");
return TRUE;
}
return FALSE;
}
/* Hide the 'Dummy' which only holds otherwise unused actions */
- g_object_set (_action_by_name (browser, "Dummy"), "visible", FALSE, NULL);
+ _action_set_visible (browser, "Dummy", FALSE);
action = g_object_new (KATZE_TYPE_SEPARATOR_ACTION,
"name", "Separator",
gtk_box_pack_start (GTK_BOX (vbox), browser->menubar, FALSE, FALSE, 0);
gtk_widget_hide (browser->menubar);
#if HAVE_HILDON
+ _action_set_visible (browser, "Menubar", FALSE);
#if HILDON_CHECK_VERSION (2, 2, 0)
browser->menubar = hildon_app_menu_new ();
_action_compact_menu_populate_popup (NULL, browser->menubar, browser);
g_signal_connect (forward, "button-press-event",
G_CALLBACK (midori_browser_menu_item_middle_click_event_cb), browser);
- #if HAVE_HILDON
- _action_set_visible (browser, "Menubar", FALSE);
- #endif
_action_set_sensitive (browser, "EncodingCustom", FALSE);
_action_set_visible (browser, "LastSession", FALSE);
#if !HAVE_HILDON && !defined (GDK_WINDOWING_X11)
gtk_notebook_set_current_page (GTK_NOTEBOOK (browser->notebook), n);
if (midori_view_is_blank (MIDORI_VIEW (view)))
- gtk_action_activate (_action_by_name (browser, "Location"));
+ midori_browser_activate_action (browser, "Location");
else
gtk_widget_grab_focus (view);