Hide all bars in fullscreen and a menu to Unfullscreen
Fixes: https://bugs.launchpad.net/midori/+bug/783675
This commit is contained in:
parent
5a353d0ecd
commit
9572ff99cc
2 changed files with 44 additions and 2 deletions
|
@ -3470,10 +3470,35 @@ _action_fullscreen_activate (GtkAction* action,
|
|||
|
||||
state = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (browser)));
|
||||
if (state & GDK_WINDOW_STATE_FULLSCREEN)
|
||||
{
|
||||
if (katze_object_get_boolean (G_OBJECT (browser->settings), "show-panel"))
|
||||
gtk_widget_show (browser->panel);
|
||||
|
||||
if (katze_object_get_boolean (G_OBJECT (browser->settings), "show-bookmarkbar"))
|
||||
gtk_widget_show (browser->bookmarkbar);
|
||||
|
||||
if (browser->show_navigationbar)
|
||||
gtk_widget_show (browser->navigationbar);
|
||||
|
||||
if (browser->show_statusbar)
|
||||
gtk_widget_show (browser->statusbar);
|
||||
|
||||
if (browser->show_tabs)
|
||||
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (browser->notebook), TRUE);
|
||||
|
||||
gtk_window_unfullscreen (GTK_WINDOW (browser));
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_hide (browser->panel);
|
||||
gtk_widget_hide (browser->bookmarkbar);
|
||||
gtk_widget_hide (browser->navigationbar);
|
||||
gtk_widget_hide (browser->statusbar);
|
||||
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (browser->notebook), FALSE);
|
||||
|
||||
gtk_window_fullscreen (GTK_WINDOW (browser));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_action_scroll_somewhere_activate (GtkAction* action,
|
||||
|
@ -3657,8 +3682,9 @@ _action_location_focus_out (GtkAction* action,
|
|||
MidoriBrowser* browser)
|
||||
{
|
||||
GtkWidget* view = midori_browser_get_current_tab (browser);
|
||||
GdkWindowState state = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (browser)));
|
||||
|
||||
if (!browser->show_navigationbar)
|
||||
if (!browser->show_navigationbar || state & GDK_WINDOW_STATE_FULLSCREEN)
|
||||
gtk_widget_hide (browser->navigationbar);
|
||||
|
||||
if (g_object_get_data (G_OBJECT (view), "news-feeds"))
|
||||
|
@ -3945,9 +3971,14 @@ static void
|
|||
_action_search_focus_out (GtkAction* action,
|
||||
MidoriBrowser* browser)
|
||||
{
|
||||
if (gtk_widget_get_visible (browser->statusbar) && !browser->show_navigationbar)
|
||||
GdkWindowState state = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (browser)));
|
||||
if ((gtk_widget_get_visible (browser->statusbar)
|
||||
&& !browser->show_navigationbar)
|
||||
|| (state & GDK_WINDOW_STATE_FULLSCREEN))
|
||||
{
|
||||
gtk_widget_hide (browser->navigationbar);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
midori_browser_bookmark_popup_item (GtkWidget* menu,
|
||||
|
|
|
@ -2625,6 +2625,17 @@ midori_view_populate_popup (MidoriView* view,
|
|||
g_object_set_data (G_OBJECT (menuitem), "y", GINT_TO_POINTER (y));
|
||||
}
|
||||
|
||||
GdkWindowState state = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (browser)));
|
||||
if (state & GDK_WINDOW_STATE_FULLSCREEN)
|
||||
{
|
||||
menuitem = sokoke_action_create_popup_menu_item (
|
||||
gtk_action_group_get_action (actions, "Fullscreen"));
|
||||
|
||||
gtk_image_menu_item_set_use_stock (GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
|
||||
gtk_menu_item_set_label (GTK_MENU_ITEM (menuitem), GTK_STOCK_LEAVE_FULLSCREEN);
|
||||
gtk_menu_shell_append (menu_shell, menuitem);
|
||||
}
|
||||
|
||||
gtk_widget_show_all (menu);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue