Merge pull request #42 from JosephMcc/fullscreen-tabs
ui: Don't hide the main notebook tabs in fullscreen
This commit is contained in:
commit
cfd631779e
|
@ -3945,7 +3945,7 @@ hide_notebook_tabs_on_fullscreen (GtkNotebook *notebook,
|
||||||
void
|
void
|
||||||
_xed_window_fullscreen (XedWindow *window)
|
_xed_window_fullscreen (XedWindow *window)
|
||||||
{
|
{
|
||||||
g_return_if_fail(XED_IS_WINDOW (window));
|
g_return_if_fail (XED_IS_WINDOW (window));
|
||||||
|
|
||||||
if (_xed_window_is_fullscreen (window))
|
if (_xed_window_is_fullscreen (window))
|
||||||
{
|
{
|
||||||
|
@ -3954,16 +3954,13 @@ _xed_window_fullscreen (XedWindow *window)
|
||||||
|
|
||||||
/* Go to fullscreen mode and hide bars */
|
/* Go to fullscreen mode and hide bars */
|
||||||
gtk_window_fullscreen (&window->window);
|
gtk_window_fullscreen (&window->window);
|
||||||
gtk_notebook_set_show_tabs (GTK_NOTEBOOK(window->priv->notebook), FALSE);
|
|
||||||
g_signal_connect(window->priv->notebook, "notify::show-tabs",
|
|
||||||
G_CALLBACK (hide_notebook_tabs_on_fullscreen), window);
|
|
||||||
|
|
||||||
gtk_widget_hide (window->priv->menubar);
|
gtk_widget_hide (window->priv->menubar);
|
||||||
|
|
||||||
g_signal_handlers_block_by_func(window->priv->toolbar, toolbar_visibility_changed, window);
|
g_signal_handlers_block_by_func (window->priv->toolbar, toolbar_visibility_changed, window);
|
||||||
gtk_widget_hide (window->priv->toolbar);
|
gtk_widget_hide (window->priv->toolbar);
|
||||||
|
|
||||||
g_signal_handlers_block_by_func(window->priv->statusbar, statusbar_visibility_changed, window);
|
g_signal_handlers_block_by_func (window->priv->statusbar, statusbar_visibility_changed, window);
|
||||||
gtk_widget_hide (window->priv->statusbar);
|
gtk_widget_hide (window->priv->statusbar);
|
||||||
|
|
||||||
fullscreen_controls_build (window);
|
fullscreen_controls_build (window);
|
||||||
|
@ -3976,7 +3973,7 @@ _xed_window_unfullscreen (XedWindow *window)
|
||||||
gboolean visible;
|
gboolean visible;
|
||||||
GtkAction *action;
|
GtkAction *action;
|
||||||
|
|
||||||
g_return_if_fail(XED_IS_WINDOW (window));
|
g_return_if_fail (XED_IS_WINDOW (window));
|
||||||
|
|
||||||
if (!_xed_window_is_fullscreen (window))
|
if (!_xed_window_is_fullscreen (window))
|
||||||
{
|
{
|
||||||
|
@ -3985,25 +3982,24 @@ _xed_window_unfullscreen (XedWindow *window)
|
||||||
|
|
||||||
/* Unfullscreen and show bars */
|
/* Unfullscreen and show bars */
|
||||||
gtk_window_unfullscreen (&window->window);
|
gtk_window_unfullscreen (&window->window);
|
||||||
g_signal_handlers_disconnect_by_func(window->priv->notebook, hide_notebook_tabs_on_fullscreen, window);
|
g_signal_handlers_disconnect_by_func (window->priv->notebook, hide_notebook_tabs_on_fullscreen, window);
|
||||||
gtk_notebook_set_show_tabs (GTK_NOTEBOOK(window->priv->notebook), TRUE);
|
|
||||||
gtk_widget_show (window->priv->menubar);
|
gtk_widget_show (window->priv->menubar);
|
||||||
|
|
||||||
action = gtk_action_group_get_action (window->priv->always_sensitive_action_group, "ViewToolbar");
|
action = gtk_action_group_get_action (window->priv->always_sensitive_action_group, "ViewToolbar");
|
||||||
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(action));
|
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||||
if (visible)
|
if (visible)
|
||||||
{
|
{
|
||||||
gtk_widget_show (window->priv->toolbar);
|
gtk_widget_show (window->priv->toolbar);
|
||||||
}
|
}
|
||||||
g_signal_handlers_unblock_by_func(window->priv->toolbar, toolbar_visibility_changed, window);
|
g_signal_handlers_unblock_by_func (window->priv->toolbar, toolbar_visibility_changed, window);
|
||||||
|
|
||||||
action = gtk_action_group_get_action (window->priv->always_sensitive_action_group, "ViewStatusbar");
|
action = gtk_action_group_get_action (window->priv->always_sensitive_action_group, "ViewStatusbar");
|
||||||
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION(action));
|
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||||
if (visible)
|
if (visible)
|
||||||
{
|
{
|
||||||
gtk_widget_show (window->priv->statusbar);
|
gtk_widget_show (window->priv->statusbar);
|
||||||
}
|
}
|
||||||
g_signal_handlers_unblock_by_func(window->priv->statusbar, statusbar_visibility_changed, window);
|
g_signal_handlers_unblock_by_func (window->priv->statusbar, statusbar_visibility_changed, window);
|
||||||
|
|
||||||
gtk_widget_hide (window->priv->fullscreen_controls);
|
gtk_widget_hide (window->priv->fullscreen_controls);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue