This is an automated email from the git hooks/post-receive script.

nomad pushed a commit to branch master
in repository apps/xfdashboard.

commit f7f48246dc25a6b27dd889bd8f76f8b869c0bbfa
Author: Stephan Haller <no...@froevel.de>
Date:   Fri Feb 10 10:35:38 2017 +0100

    Add options in settings to allow or disallow sub-windows in 
XfdashboardLiveWindow. This is interesting at slower machines as it should 
increase the performace if lesser window live previews are tracked, displayed 
and updated.
    
    This commit closes issue GH #132 finally.
---
 data/data/preferences.ui     | 32 ++++++++++++++++++++++++--------
 libxfdashboard/live-window.c |  7 ++++---
 settings/general.c           | 12 ++++++++++++
 3 files changed, 40 insertions(+), 11 deletions(-)

diff --git a/data/data/preferences.ui b/data/data/preferences.ui
index 2efdfc9..5d6caca 100644
--- a/data/data/preferences.ui
+++ b/data/data/preferences.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.0 -->
 <interface domain="xfdashboard">
   <requires lib="gtk+" version="3.2"/>
   <object class="GtkAdjustment" id="delay-search-timeout-adjustment">
@@ -381,6 +381,22 @@ The duration is calculated by the length of the text to 
show in notification. Th
                   </packing>
                 </child>
                 <child>
+                  <object class="GtkCheckButton" id="allow-subwindows">
+                    <property name="label" translatable="yes">Show child 
windows in main windows</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="tooltip_markup" translatable="yes">When 
enabled all live window previews will also show their child windows. Disabling 
this option will increase performance on slower machines.</property>
+                    <property name="xalign">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">6</property>
+                  </packing>
+                </child>
+                <child>
                   <object class="GtkCheckButton" 
id="always-launch-new-instance">
                     <property name="label" translatable="yes">Always start a 
new instance for application</property>
                     <property name="visible">True</property>
@@ -395,7 +411,7 @@ When not enabled it will select the last known active 
window of the running appl
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">6</property>
+                    <property name="position">7</property>
                   </packing>
                 </child>
                 <child>
@@ -410,7 +426,7 @@ When not enabled it will select the last known active 
window of the running appl
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">7</property>
+                    <property name="position">8</property>
                   </packing>
                 </child>
                 <child>
@@ -426,7 +442,7 @@ When not enabled it will select the last known active 
window of the running appl
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">8</property>
+                    <property name="position">9</property>
                   </packing>
                 </child>
                 <child>
@@ -441,7 +457,7 @@ When not enabled it will select the last known active 
window of the running appl
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">9</property>
+                    <property name="position">10</property>
                   </packing>
                 </child>
                 <child>
@@ -458,7 +474,7 @@ When not enabled it will select the last known active 
window of the running appl
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">10</property>
+                    <property name="position">11</property>
                   </packing>
                 </child>
                 <child>
@@ -473,7 +489,7 @@ When not enabled it will select the last known active 
window of the running appl
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">11</property>
+                    <property name="position">12</property>
                   </packing>
                 </child>
                 <child>
@@ -510,7 +526,7 @@ When not enabled it will select the last known active 
window of the running appl
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">12</property>
+                    <property name="position">13</property>
                   </packing>
                 </child>
               </object>
diff --git a/libxfdashboard/live-window.c b/libxfdashboard/live-window.c
index 3f9d252..414b149 100644
--- a/libxfdashboard/live-window.c
+++ b/libxfdashboard/live-window.c
@@ -108,7 +108,8 @@ enum
 static guint XfdashboardLiveWindowSignals[SIGNAL_LAST]={ 0, };
 
 /* IMPLEMENTATION: Private variables and methods */
-#define ALLOW_SUBWINDOWS_XFCONF_PROP                                   
"/allow-subwindows"
+#define ALLOW_SUBWINDOWS_XFCONF_PROP                                           
"/allow-subwindows"
+#define DEFAULT_ALLOW_SUBWINDOWS                                               
        TRUE
 
 /* Check if the requested window is a sub-window of this window */
 static gboolean _xfdashboard_live_window_is_subwindow(XfdashboardLiveWindow 
*self,
@@ -1098,7 +1099,7 @@ static void 
xfdashboard_live_window_class_init(XfdashboardLiveWindowClass *klass
                g_param_spec_boolean("allow-subwindows",
                                                                _("Allow 
sub-windows"),
                                                                _("Whether to 
show sub-windows if requested by theme"),
-                                                               TRUE,
+                                                               
DEFAULT_ALLOW_SUBWINDOWS,
                                                                
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
 
        g_object_class_install_properties(gobjectClass, PROP_LAST, 
XfdashboardLiveWindowProperties);
@@ -1152,7 +1153,7 @@ static void 
xfdashboard_live_window_init(XfdashboardLiveWindow *self)
        priv->paddingClose=0.0f;
        priv->showSubwindows=TRUE;
        priv->xfconfChannel=xfdashboard_application_get_xfconf_channel(NULL);
-       priv->allowSubwindows=TRUE;
+       priv->allowSubwindows=DEFAULT_ALLOW_SUBWINDOWS;
 
        /* Set up container for sub-windows and add it before the container for 
controls
         * to keep the controls on top.
diff --git a/settings/general.c b/settings/general.c
index cdd8566..b366289 100644
--- a/settings/general.c
+++ b/settings/general.c
@@ -58,6 +58,7 @@ struct _XfdashboardSettingsGeneralPrivate
        GtkWidget               *widgetShowAllApps;
        GtkWidget               *widgetScrollEventChangesWorkspace;
        GtkWidget               *widgetDelaySearchTimeout;
+       GtkWidget               *widgetAllowSubwindows;
 };
 
 /* Properties */
@@ -103,6 +104,9 @@ static GParamSpec* 
XfdashboardSettingsGeneralProperties[PROP_LAST]={ 0, };
 #define WINDOW_CONTENT_CREATION_PRIORITY_XFCONF_PROP           
"/window-content-creation-priority"
 #define DEFAULT_WINDOW_CONTENT_CREATION_PRIORITY                       
"immediate"
 
+#define ALLOW_SUBWINDOWS_XFCONF_PROP                                           
"/allow-subwindows"
+#define DEFAULT_ALLOW_SUBWINDOWS                                               
        TRUE
+
 
 typedef struct _XfdashboardSettingsGeneralNameValuePair                
XfdashboardSettingsGeneralNameValuePair;
 struct _XfdashboardSettingsGeneralNameValuePair
@@ -610,6 +614,14 @@ static void 
_xfdashboard_settings_general_set_builder(XfdashboardSettingsGeneral
                /* Release allocated resources */
                if(defaultValue) g_free(defaultValue);
        }
+
+       
priv->widgetAllowSubwindows=GTK_WIDGET(gtk_builder_get_object(priv->builder, 
"allow-subwindows"));
+       
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->widgetAllowSubwindows), 
DEFAULT_ALLOW_SUBWINDOWS);
+       xfconf_g_property_bind(priv->xfconfChannel,
+                                                       
ALLOW_SUBWINDOWS_XFCONF_PROP,
+                                                       G_TYPE_BOOLEAN,
+                                                       
priv->widgetAllowSubwindows,
+                                                       "active");
 }
 
 /* IMPLEMENTATION: GObject */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to