Commit 76571150 authored by Paolo Borelli's avatar Paolo Borelli Committed by Ignacio Casal Quinteiro

Move setting to show the status bar to the prefs dialog

parent 610742c3
......@@ -474,11 +474,6 @@ gedit_app_startup (GApplication *application)
G_N_ELEMENTS (app_entries),
app);
action = g_settings_create_action (app->priv->ui_settings,
"statusbar-visible");
g_action_map_add_action (G_ACTION_MAP (app), action);
g_object_unref (action);
action = g_settings_create_action (app->priv->ui_settings,
"side-panel-visible");
g_action_map_add_action (G_ACTION_MAP (app), action);
......
......@@ -9,10 +9,6 @@
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Statusbar</attribute>
<attribute name="action">app.statusbar-visible</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Side _Panel</attribute>
<attribute name="action">app.side-panel-visible</attribute>
......
......@@ -73,6 +73,7 @@ enum
struct _GeditPreferencesDialogPrivate
{
GSettings *editor;
GSettings *uisettings; /* unfortunately our settings are split for historical reasons */
GtkWidget *notebook;
......@@ -110,6 +111,7 @@ struct _GeditPreferencesDialogPrivate
GtkWidget *auto_save_spinbutton;
GtkWidget *display_line_numbers_checkbutton;
GtkWidget *display_statusbar_checkbutton;
/* Right margin */
GtkWidget *right_margin_checkbutton;
......@@ -132,6 +134,7 @@ gedit_preferences_dialog_dispose (GObject *object)
GeditPreferencesDialog *dlg = GEDIT_PREFERENCES_DIALOG (object);
g_clear_object (&dlg->priv->editor);
g_clear_object (&dlg->priv->uisettings);
G_OBJECT_CLASS (gedit_preferences_dialog_parent_class)->dispose (object);
}
......@@ -172,6 +175,7 @@ gedit_preferences_dialog_class_init (GeditPreferencesDialogClass *klass)
"/org/gnome/gedit/ui/gedit-preferences-dialog.ui");
gtk_widget_class_bind_template_child_private (widget_class, GeditPreferencesDialog, notebook);
gtk_widget_class_bind_template_child_private (widget_class, GeditPreferencesDialog, display_line_numbers_checkbutton);
gtk_widget_class_bind_template_child_private (widget_class, GeditPreferencesDialog, display_statusbar_checkbutton);
gtk_widget_class_bind_template_child_private (widget_class, GeditPreferencesDialog, right_margin_checkbutton);
gtk_widget_class_bind_template_child_private (widget_class, GeditPreferencesDialog, right_margin_position_grid);
gtk_widget_class_bind_template_child_private (widget_class, GeditPreferencesDialog, right_margin_position_spinbutton);
......@@ -332,7 +336,6 @@ setup_view_page (GeditPreferencesDialog *dlg)
GTK_TOGGLE_BUTTON (dlg->priv->split_checkbutton), split_button_state);
gtk_toggle_button_set_inconsistent (
GTK_TOGGLE_BUTTON (dlg->priv->split_checkbutton), TRUE);
}
gtk_toggle_button_set_active (
......@@ -353,6 +356,11 @@ setup_view_page (GeditPreferencesDialog *dlg)
dlg->priv->highlight_current_line_checkbutton,
"active",
G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
g_settings_bind (dlg->priv->uisettings,
GEDIT_SETTINGS_STATUSBAR_VISIBLE,
dlg->priv->display_statusbar_checkbutton,
"active",
G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET);
g_settings_bind (dlg->priv->editor,
GEDIT_SETTINGS_DISPLAY_RIGHT_MARGIN,
dlg->priv->right_margin_checkbutton,
......@@ -1098,6 +1106,7 @@ gedit_preferences_dialog_init (GeditPreferencesDialog *dlg)
dlg->priv = gedit_preferences_dialog_get_instance_private (dlg);
dlg->priv->editor = g_settings_new ("org.gnome.gedit.preferences.editor");
dlg->priv->uisettings = g_settings_new ("org.gnome.gedit.preferences.ui");
gtk_widget_init_template (GTK_WIDGET (dlg));
......
......@@ -154,6 +154,23 @@
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="display_statusbar_checkbutton">
<property name="label" translatable="yes">Display _Statusbar</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment