[Xfce4-commits] [apps/xfce4-terminal] 01/01: Add a separate show window borders setting for drop-down mode
noreply at xfce.org
noreply at xfce.org
Fri Jan 13 17:08:41 CET 2017
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.
commit f9697e94686d8a194642218955b0b8d9f720febd
Author: Igor <f2404 at yandex.ru>
Date: Fri Jan 13 19:07:48 2017 +0300
Add a separate show window borders setting for drop-down mode
See https://bugzilla.xfce.org/show_bug.cgi?id=10297
---
terminal/terminal-preferences-dialog.c | 3 ++-
terminal/terminal-preferences.c | 11 +++++++++++
terminal/terminal-preferences.glade | 16 ++++++++++++++++
terminal/terminal-window-dropdown.c | 15 ++++++++++++---
4 files changed, 41 insertions(+), 4 deletions(-)
diff --git a/terminal/terminal-preferences-dialog.c b/terminal/terminal-preferences-dialog.c
index 56d9be1..b6f5140 100644
--- a/terminal/terminal-preferences-dialog.c
+++ b/terminal/terminal-preferences-dialog.c
@@ -151,7 +151,8 @@ terminal_preferences_dialog_init (TerminalPreferencesDialog *dialog)
"background-image-style", "color-background-vary",
"dropdown-keep-open-default", "dropdown-keep-above",
"dropdown-toggle-focus", "dropdown-status-icon",
- "dropdown-move-to-active", "dropdown-always-show-tabs"
+ "dropdown-move-to-active", "dropdown-always-show-tabs",
+ "dropdown-show-borders"
};
const gchar *props_color[] = { "color-foreground", "color-cursor",
"color-background", "tab-activity-color",
diff --git a/terminal/terminal-preferences.c b/terminal/terminal-preferences.c
index 851301a..17091bf 100644
--- a/terminal/terminal-preferences.c
+++ b/terminal/terminal-preferences.c
@@ -75,6 +75,7 @@ enum
PROP_DROPDOWN_POSITION,
PROP_DROPDOWN_MOVE_TO_ACTIVE,
PROP_DROPDOWN_ALWAYS_SHOW_TABS,
+ PROP_DROPDOWN_SHOW_BORDERS,
PROP_ENCODING,
PROP_FONT_ALLOW_BOLD,
PROP_FONT_NAME,
@@ -664,6 +665,16 @@ terminal_preferences_class_init (TerminalPreferencesClass *klass)
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
/**
+ * TerminalPreferences:dropdown-show-borders:
+ **/
+ preferences_props[PROP_DROPDOWN_SHOW_BORDERS] =
+ g_param_spec_boolean ("dropdown-show-borders",
+ NULL,
+ "DropdownShowBorders",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
+ /**
* TerminalPreferences:encoding:
**/
preferences_props[PROP_ENCODING] =
diff --git a/terminal/terminal-preferences.glade b/terminal/terminal-preferences.glade
index 0eda011..e32cf69 100644
--- a/terminal/terminal-preferences.glade
+++ b/terminal/terminal-preferences.glade
@@ -1108,6 +1108,22 @@ Opacity setting is not available.</property>
<property name="width">3</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="dropdown-show-borders">
+ <property name="label" translatable="yes">Show window _borders</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="halign">start</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">6</property>
+ <property name="width">3</property>
+ </packing>
+ </child>
</object>
</child>
</object>
diff --git a/terminal/terminal-window-dropdown.c b/terminal/terminal-window-dropdown.c
index bad2edc..7861138 100644
--- a/terminal/terminal-window-dropdown.c
+++ b/terminal/terminal-window-dropdown.c
@@ -56,6 +56,7 @@ enum
PROP_DROPDOWN_KEEP_ABOVE,
PROP_DROPDOWN_ANIMATION_TIME,
PROP_DROPDOWN_ALWAYS_SHOW_TABS,
+ PROP_DROPDOWN_SHOW_BORDERS,
N_PROPERTIES
};
@@ -201,6 +202,12 @@ terminal_window_dropdown_class_init (TerminalWindowDropdownClass *klass)
TRUE,
G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
+ dropdown_props[PROP_DROPDOWN_SHOW_BORDERS] =
+ g_param_spec_boolean ("dropdown-show-borders",
+ NULL, NULL,
+ FALSE,
+ G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
+
/* install all properties */
g_object_class_install_properties (gobject_class, N_PROPERTIES, dropdown_props);
}
@@ -218,7 +225,6 @@ terminal_window_dropdown_init (TerminalWindowDropdown *dropdown)
guint n;
const gchar *name;
gboolean keep_open;
- gboolean show_borders;
dropdown->rel_width = 0.80;
dropdown->rel_height = 0.50;
@@ -241,8 +247,6 @@ terminal_window_dropdown_init (TerminalWindowDropdown *dropdown)
/* adjust notebook for drop-down usage */
gtk_notebook_set_tab_pos (GTK_NOTEBOOK (terminal_window_get_notebook (window)), GTK_POS_BOTTOM);
- g_object_get (terminal_window_get_preferences (window), "misc-borders-default", &show_borders, NULL);
- gtk_notebook_set_show_border (GTK_NOTEBOOK (terminal_window_get_notebook (window)), show_borders);
terminal_window_notebook_show_tabs (window);
/* actions we don't want */
@@ -375,6 +379,11 @@ terminal_window_dropdown_set_property (GObject *object,
terminal_window_notebook_show_tabs (TERMINAL_WINDOW (dropdown));
return;
+ case PROP_DROPDOWN_SHOW_BORDERS:
+ gtk_notebook_set_show_border (GTK_NOTEBOOK (terminal_window_get_notebook (window)),
+ g_value_get_boolean (value));
+ return;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
return;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list