xed-commands-view: Clean up code style
This commit is contained in:
parent
c16232ee20
commit
932cc3758e
|
@ -54,9 +54,13 @@ _xed_cmd_view_show_toolbar (GtkAction *action,
|
||||||
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);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
gtk_widget_hide (window->priv->toolbar);
|
gtk_widget_hide (window->priv->toolbar);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -70,9 +74,13 @@ _xed_cmd_view_show_statusbar (GtkAction *action,
|
||||||
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);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
gtk_widget_hide (window->priv->statusbar);
|
gtk_widget_hide (window->priv->statusbar);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -143,9 +151,13 @@ _xed_cmd_view_toggle_fullscreen_mode (GtkAction *action,
|
||||||
xed_debug (DEBUG_COMMANDS);
|
xed_debug (DEBUG_COMMANDS);
|
||||||
|
|
||||||
if (_xed_window_is_fullscreen (window))
|
if (_xed_window_is_fullscreen (window))
|
||||||
|
{
|
||||||
_xed_window_unfullscreen (window);
|
_xed_window_unfullscreen (window);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
_xed_window_fullscreen (window);
|
_xed_window_fullscreen (window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -176,15 +188,9 @@ _xed_cmd_view_leave_fullscreen_mode (GtkAction *action,
|
||||||
{
|
{
|
||||||
GtkAction *view_action;
|
GtkAction *view_action;
|
||||||
|
|
||||||
view_action = gtk_action_group_get_action (window->priv->always_sensitive_action_group,
|
view_action = gtk_action_group_get_action (window->priv->always_sensitive_action_group, "ViewFullscreen");
|
||||||
"ViewFullscreen");
|
g_signal_handlers_block_by_func (view_action, G_CALLBACK (_xed_cmd_view_toggle_fullscreen_mode), window);
|
||||||
g_signal_handlers_block_by_func
|
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (view_action), FALSE);
|
||||||
(view_action, G_CALLBACK (_xed_cmd_view_toggle_fullscreen_mode),
|
|
||||||
window);
|
|
||||||
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (view_action),
|
|
||||||
FALSE);
|
|
||||||
_xed_window_unfullscreen (window);
|
_xed_window_unfullscreen (window);
|
||||||
g_signal_handlers_unblock_by_func
|
g_signal_handlers_unblock_by_func (view_action, G_CALLBACK (_xed_cmd_view_toggle_fullscreen_mode), window);
|
||||||
(view_action, G_CALLBACK (_xed_cmd_view_toggle_fullscreen_mode),
|
|
||||||
window);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue