xed-commands-view: Clean up code style
This commit is contained in:
parent
c16232ee20
commit
932cc3758e
|
@ -54,10 +54,14 @@ _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
|
||||
_xed_cmd_view_show_statusbar (GtkAction *action,
|
||||
|
@ -70,10 +74,14 @@ _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
|
||||
_xed_cmd_view_show_side_pane (GtkAction *action,
|
||||
|
@ -143,10 +151,14 @@ _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
|
||||
_xed_cmd_view_toggle_word_wrap (GtkAction *action,
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue