xed-commands-view: Clean up code style

This commit is contained in:
JosephMcc 2017-03-17 00:22:04 -07:00
parent c16232ee20
commit 932cc3758e
1 changed files with 73 additions and 67 deletions

View File

@ -54,9 +54,13 @@ _xed_cmd_view_show_toolbar (GtkAction *action,
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (visible)
{
gtk_widget_show (window->priv->toolbar);
}
else
{
gtk_widget_hide (window->priv->toolbar);
}
}
void
@ -70,9 +74,13 @@ _xed_cmd_view_show_statusbar (GtkAction *action,
visible = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (visible)
{
gtk_widget_show (window->priv->statusbar);
}
else
{
gtk_widget_hide (window->priv->statusbar);
}
}
void
@ -143,9 +151,13 @@ _xed_cmd_view_toggle_fullscreen_mode (GtkAction *action,
xed_debug (DEBUG_COMMANDS);
if (_xed_window_is_fullscreen (window))
{
_xed_window_unfullscreen (window);
}
else
{
_xed_window_fullscreen (window);
}
}
void
@ -176,15 +188,9 @@ _xed_cmd_view_leave_fullscreen_mode (GtkAction *action,
{
GtkAction *view_action;
view_action = gtk_action_group_get_action (window->priv->always_sensitive_action_group,
"ViewFullscreen");
g_signal_handlers_block_by_func
(view_action, G_CALLBACK (_xed_cmd_view_toggle_fullscreen_mode),
window);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (view_action),
FALSE);
view_action = gtk_action_group_get_action (window->priv->always_sensitive_action_group, "ViewFullscreen");
g_signal_handlers_block_by_func (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);
g_signal_handlers_unblock_by_func
(view_action, G_CALLBACK (_xed_cmd_view_toggle_fullscreen_mode),
window);
g_signal_handlers_unblock_by_func (view_action, G_CALLBACK (_xed_cmd_view_toggle_fullscreen_mode), window);
}