From 6e4188e92ee151ac44f2cccf239c8f5ae43d4b69 Mon Sep 17 00:00:00 2001 From: mbkma Date: Sun, 27 Sep 2020 23:28:14 +0200 Subject: Redesign Pluma Preferences Dialog - Group options into Display and Highlighting categories - Fix sensitivity of auto-save spinbutton - Display right margin with spinbutton in one line - Apply sensitivity on spinbutton directly instead of according ui objects "autosave_hbox" and "right_margin_position_hbox" - Adjust order of "Spaces, Tabs, Newlines" checkboxes to match the headings order - Remove empty labels and use widget margins instead - Indent "Do not split words.." box in "Text Wrapping" (Because its a subitem) - Do not indent box with colour schemes - Capitalize headings (Grid pattern -> Grid Pattern and Show spaces, tabs, newlines -> Show Spaces, Tabs, Newlines) --- pluma/dialogs/pluma-preferences-dialog.c | 34 +- pluma/dialogs/pluma-preferences-dialog.ui | 1129 +++++++---------------------- pluma/dialogs/ui-a11y.suppr | 46 +- 3 files changed, 309 insertions(+), 900 deletions(-) diff --git a/pluma/dialogs/pluma-preferences-dialog.c b/pluma/dialogs/pluma-preferences-dialog.c index 178c54bc..b0b35482 100644 --- a/pluma/dialogs/pluma-preferences-dialog.c +++ b/pluma/dialogs/pluma-preferences-dialog.c @@ -119,7 +119,6 @@ struct _PlumaPreferencesDialogPrivate GtkWidget *backup_copy_checkbutton; GtkWidget *auto_save_checkbutton; GtkWidget *auto_save_spinbutton; - GtkWidget *autosave_hbox; /* Line numbers */ GtkWidget *display_line_numbers_checkbutton; @@ -139,7 +138,6 @@ struct _PlumaPreferencesDialogPrivate /* Right margin */ GtkWidget *right_margin_checkbutton; GtkWidget *right_margin_position_spinbutton; - GtkWidget *right_margin_position_hbox; /* Plugins manager */ GtkWidget *plugin_manager_place_holder; @@ -344,26 +342,27 @@ setup_editor_page (PlumaPreferencesDialog *dlg) dlg->priv->bracket_matching_checkbutton, "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); - g_settings_bind (dlg->priv->editor_settings, - PLUMA_SETTINGS_AUTO_SAVE_INTERVAL, - dlg->priv->auto_save_spinbutton, - "value", - G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); - g_signal_connect (dlg->priv->editor_settings, - "changed::auto-save", - G_CALLBACK (on_auto_save_changed), - dlg); g_settings_bind (dlg->priv->editor_settings, PLUMA_SETTINGS_AUTO_SAVE, dlg->priv->auto_save_checkbutton, "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); + g_settings_bind (dlg->priv->editor_settings, + PLUMA_SETTINGS_AUTO_SAVE_INTERVAL, + dlg->priv->auto_save_spinbutton, + "value", + G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET | G_SETTINGS_BIND_NO_SENSITIVITY); g_settings_bind (dlg->priv->editor_settings, PLUMA_SETTINGS_DRAWER_NEWLINE, dlg->priv->draw_newlines_checkbutton, "active", G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); + g_signal_connect (dlg->priv->editor_settings, + "changed::auto-save", + G_CALLBACK (on_auto_save_changed), + dlg); + gint draw_spaces = g_settings_get_enum (dlg->priv->editor_settings, PLUMA_SETTINGS_DRAWER_SPACE); gint draw_tabs = g_settings_get_enum (dlg->priv->editor_settings, PLUMA_SETTINGS_DRAWER_TAB); @@ -462,7 +461,7 @@ right_margin_checkbutton_toggled (GtkToggleButton *button, active); - gtk_widget_set_sensitive (dlg->priv->right_margin_position_hbox, + gtk_widget_set_sensitive (dlg->priv->right_margin_position_spinbutton, active); } @@ -534,7 +533,7 @@ setup_view_page (PlumaPreferencesDialog *dlg) /* Set widgets sensitivity */ gtk_widget_set_sensitive (dlg->priv->split_checkbutton, (wrap_mode != GTK_WRAP_NONE)); - gtk_widget_set_sensitive (dlg->priv->right_margin_position_hbox, display_right_margin); + gtk_widget_set_sensitive (dlg->priv->right_margin_position_spinbutton, display_right_margin); g_settings_bind (dlg->priv->editor_settings, PLUMA_SETTINGS_DISPLAY_LINE_NUMBERS, @@ -550,12 +549,7 @@ setup_view_page (PlumaPreferencesDialog *dlg) PLUMA_SETTINGS_RIGHT_MARGIN_POSITION, dlg->priv->right_margin_position_spinbutton, "value", - G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); - g_settings_bind (dlg->priv->editor_settings, - PLUMA_SETTINGS_AUTO_SAVE_INTERVAL, - dlg->priv->auto_save_spinbutton, - "value", - G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); + G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET | G_SETTINGS_BIND_NO_SENSITIVITY); g_settings_bind (dlg->priv->editor_settings, PLUMA_SETTINGS_DISPLAY_OVERVIEW_MAP, dlg->priv->display_overview_map_checkbutton, @@ -1266,7 +1260,6 @@ pluma_preferences_dialog_init (PlumaPreferencesDialog *dlg) "right_margin_checkbutton", &dlg->priv->right_margin_checkbutton, "right_margin_position_spinbutton", &dlg->priv->right_margin_position_spinbutton, - "right_margin_position_hbox", &dlg->priv->right_margin_position_hbox, "tabs_width_spinbutton", &dlg->priv->tabs_width_spinbutton, "tabs_width_hbox", &dlg->priv->tabs_width_hbox, @@ -1280,7 +1273,6 @@ pluma_preferences_dialog_init (PlumaPreferencesDialog *dlg) "draw_trailing_tabs_checkbutton", &dlg->priv->draw_trailing_tabs_checkbutton, "draw_newlines_checkbutton", &dlg->priv->draw_newlines_checkbutton, - "autosave_hbox", &dlg->priv->autosave_hbox, "backup_copy_checkbutton", &dlg->priv->backup_copy_checkbutton, "auto_save_checkbutton", &dlg->priv->auto_save_checkbutton, "auto_save_spinbutton", &dlg->priv->auto_save_spinbutton, diff --git a/pluma/dialogs/pluma-preferences-dialog.ui b/pluma/dialogs/pluma-preferences-dialog.ui index fd03f283..c411f0c5 100644 --- a/pluma/dialogs/pluma-preferences-dialog.ui +++ b/pluma/dialogs/pluma-preferences-dialog.ui @@ -1,5 +1,5 @@ - + @@ -43,9 +43,6 @@ False True dialog - - - True @@ -102,20 +99,20 @@ True 6 - + True False 12 vertical 18 - + True False vertical 6 - + True False start @@ -131,14 +128,20 @@ - + True False + 10 + vertical + 6 - + + Enable text _wrapping True - False - + True + False + True + True False @@ -147,45 +150,18 @@ - + + Do not _split words over two lines True - False - vertical - 6 - - - Enable text _wrapping - True - True - False - True - True - - - False - False - 0 - - - - - Do not _split words over two lines - True - True - False - True - True - - - False - False - 1 - - + True + False + 12 + True + True False - True + False 1 @@ -204,17 +180,17 @@ - + True False vertical 6 - + True False start - Line Numbers + Highlighting @@ -226,127 +202,40 @@ - + True False + 10 + vertical + 6 - + + Highlight current _line True - False - + True + False + True + True False False - 0 - - - - - True - False - vertical - 6 - - - _Display line numbers - True - True - False - True - True - - - False - False - 0 - - - - - False - True 1 - - - False - True - 1 - - - - - False - False - 1 - - - - - True - False - vertical - 6 - - - True - False - start - Current Line - - - - - - False - False - 0 - - - - - True - False - + + Highlight matching _bracket True - False - + True + False + True + True False False - 0 - - - - - True - False - vertical - 6 - - - Highlight current _line - True - True - False - True - True - - - False - False - 0 - - - - - False - True - 1 + 2 @@ -360,21 +249,21 @@ False True - 2 + 1 - + True False vertical 6 - + True False start - Right Margin + Display @@ -386,14 +275,20 @@ - + True False + 10 + vertical + 6 - + + _Display line numbers True - False - + True + False + True + True False @@ -402,19 +297,21 @@ - + True False - vertical 6 - Display right _margin + Display right _margin at column True True False True True + + + False @@ -423,292 +320,58 @@ - - True - False - 6 - - - True - False - start - _Right margin at column: - True - right_margin_position_spinbutton - - - False - False - 0 - - - - - True - True - adjustment1 - 1 - True - True - - - False - False - 1 - - - - - False - False - 1 - - - - - False - True - 1 - - - - - False - True - 1 - - - - - False - False - 3 - - - - - True - False - vertical - 6 - - - True - False - start - Bracket Matching - - - - - - False - False - 0 - - - - - True - False - - - True - False - - - - False - False - 0 - - - - - True - False - vertical - 6 - - - Highlight matching _bracket + True True - False - True - True + adjustment1 + 1 + True + True + + + False False - 0 + 1 False True - 1 + 2 - - - False - True - 1 - - - - - False - True - 4 - - - - - True - False - vertical - 6 - - - True - False - start - Overview Map - - - - - - False - False - 0 - - - - - True - False - + + Display _grid pattern True - False - + True + False + True + True False False - 0 - - - - - True - False - vertical - 6 - - - Display _overview map - True - True - False - True - True - - - False - False - 0 - - - - - False - True - 1 + 3 - - - False - True - 1 - - - - - False - True - 5 - - - - - True - False - vertical - 6 - - - True - False - start - Grid pattern - - - - - - False - False - 0 - - - - - True - False - + + Display _overview map True - False - + True + False + True + True False False - 0 - - - - - True - False - vertical - 6 - - - Display _grid pattern - True - True - False - True - True - - - False - False - 0 - - - - - False - True - 1 + 3 @@ -722,13 +385,13 @@ False True - 6 + 2 - + True False View @@ -738,20 +401,20 @@ - + True False 12 vertical 18 - + True False vertical 6 - + True False start @@ -767,76 +430,41 @@ - + True False + 10 + vertical + 6 - - True - False - - - - False - False - 0 - - - - + True False - vertical 6 - + True False - 6 - - - True - False - _Tab width: - True - center - tabs_width_spinbutton - - - False - False - 0 - - - - - True - True - adjustment2 - 1 - True - - - False - False - 1 - - + _Tab width: + True + center + tabs_width_spinbutton False - True + False 0 - - Insert _spaces instead of tabs + True True - False - True - True + 8 + adjustment2 + 1 + True + 8 False @@ -845,6 +473,21 @@ + + False + True + 0 + + + + + Insert _spaces instead of tabs + True + True + False + True + True + False False @@ -866,13 +509,13 @@ - + True False vertical 6 - + True False start @@ -888,21 +531,12 @@ - + True False - - - True - False - - - - False - False - 0 - - + 10 + vertical + 6 _Enable automatic indentation @@ -933,13 +567,13 @@ - + True False vertical 6 - + True False start @@ -955,14 +589,20 @@ - + True False + 10 + vertical + 6 - + + Create a _backup copy of files before saving True - False - + True + False + True + True False @@ -971,14 +611,13 @@ - + True False - vertical 6 - - Create a _backup copy of files before saving + + _Autosave files every True True False @@ -992,72 +631,47 @@ - + True - False - 6 - - - _Autosave files every - True - True - False - True - True - - - False - False - 0 - - - - - True - True - adjustment3 - 1 - True - - - False - False - 1 - - - - - True - False - _minutes - True - center - auto_save_spinbutton - - - False - False - 2 - - + True + 8 + adjustment3 + 1 + True + 8 False - True + False 1 + + + True + False + _minutes + True + center + auto_save_spinbutton + + + False + False + 2 + + False - False + True 1 False - True + False 1 @@ -1069,17 +683,17 @@ - + True False vertical 6 - + True False start - Show spaces, tabs, newlines + Show Spaces, Tabs, Newlines @@ -1091,41 +705,21 @@ - + + vbox True False + 10 vertical + 6 - + + Show _spaces True - False - - - True - False - - - - False - False - 0 - - - - - Show _tabs - True - True - False - True - True - - - False - False - 1 - - + True + False + True + True False @@ -1134,48 +728,14 @@ - + + Show _trailing spaces only True - False - - - True - False - - - - False - False - 0 - - - - - True - False - - - - False - False - 1 - - - - - Show _trailing tabs only - True - True - False - True - True - - - False - False - 2 - - + True + False + 12 + True + True False @@ -1184,36 +744,13 @@ - + + Show _tabs True - False - - - True - False - - - - False - False - 0 - - - - - Show _newlines - True - True - False - True - True - - - False - False - 1 - - + True + False + True + True False @@ -1222,94 +759,34 @@ - - - - + + Show _trailing tabs only True - False - - - True - False - - - - False - False - 0 - - - - - Show _spaces - True - True - False - True - True - - - False - False - 1 - - + True + False + 12 + True + True False False - 4 + 3 - + + Show _newlines True - False - - - True - False - - - - False - False - 0 - - - - - True - False - - - - False - False - 1 - - - - - Show _trailing spaces only - True - True - False - True - True - - - False - False - 2 - - + True + False + True + True False False - 5 + 4 @@ -1332,7 +809,7 @@ - + True False Editor @@ -1343,20 +820,20 @@ - + True False 12 vertical 18 - + True False vertical 6 - + True False start @@ -1372,14 +849,20 @@ - + True False + 10 + vertical + 6 - + + _Use the system fixed width font (%s) True - False - + True + False + True + True False @@ -1388,19 +871,19 @@ - + True False - vertical - 6 + 12 - - _Use the system fixed width font (%s) + True - True - False + False + start + Editor _font: True - True + center + font_button False @@ -1409,52 +892,24 @@ - + True - False - 12 - - - True - False - start - Editor _font: - True - center - font_button - - - False - False - 0 - - - - - True - True - False - Sans 12 - Pick the editor font - True - - - False - True - 1 - - + True + False + Sans 12 + Pick the editor font + True False - False + True 1 False - True + False 1 @@ -1462,7 +917,7 @@ False True - 1 + 3 @@ -1473,13 +928,13 @@ - + True False vertical 6 - + True False start @@ -1495,92 +950,69 @@ - + True False + vertical + 6 - + True - False - + True + True + True + etched-in + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + True + + + + + False - False + True 0 - + True False - vertical 6 + end - + + _Add... True True - True - True - etched-in - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - True - - - - - + False + install_scheme_image + True False - True + False 0 - + + _Remove True - False - 6 - end - - - _Add... - True - True - False - install_scheme_image - True - - - False - False - 0 - - - - - _Remove - True - True - False - True - - - False - False - 1 - - + True + False + True False - True + False 1 @@ -1611,7 +1043,7 @@ - + True False Font & Colors @@ -1636,7 +1068,7 @@ - + True False Plugins @@ -1659,5 +1091,8 @@ helpbutton1 closebutton1 + + + diff --git a/pluma/dialogs/ui-a11y.suppr b/pluma/dialogs/ui-a11y.suppr index 1bef4a9c..b486742c 100644 --- a/pluma/dialogs/ui-a11y.suppr +++ b/pluma/dialogs/ui-a11y.suppr @@ -1,35 +1,17 @@ -pluma-preferences-dialog.ui://GtkLabel[@id='label848'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label849'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label854'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label843'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label876'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label877'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label855'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label856'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label881'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label882'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label846'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label847'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label851'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label852'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label859'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label860'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label1'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label3'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label2_2'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label2_4'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label4'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label2'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label2_3'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label2_1'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label819'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label800'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label798'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label797'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label5'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label6'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label7'] orphan-label -pluma-preferences-dialog.ui://GtkLabel[@id='label8'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='view_label'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='text_wrapping_label'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='highlighting_label'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='display_label'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='tab_stops_label'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='editor_label'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='tab_stops_label'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='automatic_indentation_label'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='file_saving_label'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='show_spaces_tabs_newlines_label'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='font_colours_label'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='font_label'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='color_scheme_label'] orphan-label +pluma-preferences-dialog.ui://GtkLabel[@id='plugins_label'] orphan-label pluma-preferences-dialog.ui://GtkTreeView[@id='schemes_treeview'] no-labelled-by pluma-search-dialog.ui://GtkLabel[@id='search_label'] orphan-label pluma-search-dialog.ui://GtkLabel[@id='replace_with_label'] orphan-label -- cgit v1.2.1