From e056857c4e18103cf4c425ce29ecd756801c6456 Mon Sep 17 00:00:00 2001 From: "Ira W. Snyder" Date: Sun, 17 Feb 2008 15:09:17 -0800 Subject: [PATCH] [Window] Add always-show-border property This property makes the window borders configurable when there is just a single tab in the GtkNotebook. It was present in Tilda 0.9.5. --- share-tilda.conf | 1 + tilda-window.c | 22 ++++++++++++++++++++++ tilda-window.h | 1 + 3 files changed, 24 insertions(+) diff --git a/share-tilda.conf b/share-tilda.conf index 98a5e73..123519d 100644 --- a/share-tilda.conf +++ b/share-tilda.conf @@ -25,6 +25,7 @@ centered-horizontally = false centered-vertically = false full-width-tabs = true always-show-tabs = false +always-show-border = false accelerator-quit = q accelerator-next-tab = Page_Down accelerator-previous-tab = Page_Up diff --git a/tilda-window.c b/tilda-window.c index 1a293ca..aa93098 100644 --- a/tilda-window.c +++ b/tilda-window.c @@ -694,6 +694,7 @@ enum tilda_window_properties { TILDA_WINDOW_CENTERED_VERTICALLY, TILDA_WINDOW_FULL_WIDTH_TABS, TILDA_WINDOW_ALWAYS_SHOW_TABS, + TILDA_WINDOW_ALWAYS_SHOW_BORDER, TILDA_WINDOW_HAVE_REAL_TRANSPARENCY, }; @@ -995,6 +996,12 @@ tilda_window_set_property (GObject *object, debug_printf ("window always show tabs: %d\n", self->always_show_tabs); break; + case TILDA_WINDOW_ALWAYS_SHOW_BORDER: + self->always_show_border = g_value_get_boolean (value); + gtk_notebook_set_show_border (GTK_NOTEBOOK(self->notebook), self->always_show_border); + debug_printf ("window always show border: %d\n", self->always_show_border); + break; + case TILDA_WINDOW_HAVE_REAL_TRANSPARENCY: self->have_real_transparency = g_value_get_boolean (value); debug_printf ("window have real transp: %d\n", self->have_real_transparency); @@ -1161,6 +1168,10 @@ tilda_window_get_property (GObject *object, g_value_set_boolean (value, self->always_show_tabs); break; + case TILDA_WINDOW_ALWAYS_SHOW_BORDER: + g_value_set_boolean (value, self->always_show_border); + break; + case TILDA_WINDOW_HAVE_REAL_TRANSPARENCY: g_value_set_boolean (value, self->have_real_transparency); break; @@ -1254,6 +1265,7 @@ tilda_window_constructor (GType type, tilda_window_set_property_from_config (self, "centered-vertically"); tilda_window_set_property_from_config (self, "full-width-tabs"); tilda_window_set_property_from_config (self, "always-show-tabs"); + tilda_window_set_property_from_config (self, "always-show-border"); /* Add the initial terminal(s) */ for (i=0; iinitial_terminals; ++i) @@ -1721,6 +1733,16 @@ tilda_window_class_init (gpointer g_class, TILDA_WINDOW_ALWAYS_SHOW_TABS, pspec); + pspec = g_param_spec_boolean ("always-show-border", + _("Always show the window borders, regardless of the number of open tabs"), + NULL, + TRUE, + G_PARAM_READWRITE); + + g_object_class_install_property (gobject_class, + TILDA_WINDOW_ALWAYS_SHOW_BORDER, + pspec); + pspec = g_param_spec_boolean ("have-real-transparency", NULL, NULL, FALSE, G_PARAM_READABLE); diff --git a/tilda-window.h b/tilda-window.h index 9f30bdd..ee0ab06 100644 --- a/tilda-window.h +++ b/tilda-window.h @@ -85,6 +85,7 @@ struct _TildaWindow { gboolean centered_vertically; gboolean full_width_tabs; gboolean always_show_tabs; + gboolean always_show_border; gboolean have_real_transparency; }; -- 2.34.1