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
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"))
_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
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);
}