[Xfce4-commits] [apps/xfdashboard] 02/02: Add settings option to allow user to enable or disable animations at all
noreply at xfce.org
noreply at xfce.org
Tue Nov 5 12:55:44 CET 2019
This is an automated email from the git hooks/post-receive script.
n o m a d p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfdashboard.
commit eab8eecc8a54c66938f15e9932adf260acd0a36c
Author: Stephan Haller <nomad at froevel.de>
Date: Tue Nov 5 12:02:01 2019 +0100
Add settings option to allow user to enable or disable animations at all
---
data/data/preferences.ui | 36 +++++++++++++++++++++++++++++-------
settings/general.c | 12 ++++++++++++
2 files changed, 41 insertions(+), 7 deletions(-)
diff --git a/data/data/preferences.ui b/data/data/preferences.ui
index 5d6caca..b0958cc 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.20.0 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="xfdashboard">
<requires lib="gtk+" version="3.2"/>
<object class="GtkAdjustment" id="delay-search-timeout-adjustment">
@@ -16,6 +16,9 @@
<object class="GtkDialog" id="plugin-preferences-dialog">
<property name="can_focus">False</property>
<property name="type_hint">dialog</property>
+ <child>
+ <placeholder/>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
@@ -138,6 +141,9 @@
<property name="can_focus">False</property>
<property name="icon_name">xfdashboard</property>
<child>
+ <placeholder/>
+ </child>
+ <child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -415,6 +421,22 @@ When not enabled it will select the last known active window of the running appl
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="enable-animations">
+ <property name="label" translatable="yes">Enable animations</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_markup" translatable="yes">If enabled theme-defined animations will be shown.</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">8</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -426,7 +448,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>
@@ -442,7 +464,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>
@@ -457,7 +479,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>
@@ -474,7 +496,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>
@@ -489,7 +511,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>
<child>
@@ -526,7 +548,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">13</property>
+ <property name="position">14</property>
</packing>
</child>
</object>
diff --git a/settings/general.c b/settings/general.c
index ea96f17..1976521 100644
--- a/settings/general.c
+++ b/settings/general.c
@@ -51,6 +51,7 @@ struct _XfdashboardSettingsGeneralPrivate
GtkWidget *widgetScrollEventChangesWorkspace;
GtkWidget *widgetDelaySearchTimeout;
GtkWidget *widgetAllowSubwindows;
+ GtkWidget *widgetEnableAnimations;
};
G_DEFINE_TYPE_WITH_PRIVATE(XfdashboardSettingsGeneral,
@@ -103,6 +104,9 @@ static GParamSpec* XfdashboardSettingsGeneralProperties[PROP_LAST]={ 0, };
#define ALLOW_SUBWINDOWS_XFCONF_PROP "/allow-subwindows"
#define DEFAULT_ALLOW_SUBWINDOWS TRUE
+#define ENABLE_ANIMATIONS_XFCONF_PROP "/enable-animations"
+#define DEFAULT_ENABLE_ANIMATIONS TRUE
+
typedef struct _XfdashboardSettingsGeneralNameValuePair XfdashboardSettingsGeneralNameValuePair;
struct _XfdashboardSettingsGeneralNameValuePair
@@ -626,6 +630,14 @@ static void _xfdashboard_settings_general_set_builder(XfdashboardSettingsGeneral
G_TYPE_BOOLEAN,
priv->widgetAllowSubwindows,
"active");
+
+ priv->widgetEnableAnimations=GTK_WIDGET(gtk_builder_get_object(priv->builder, "enable-animations"));
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->widgetEnableAnimations), DEFAULT_ENABLE_ANIMATIONS);
+ xfconf_g_property_bind(priv->xfconfChannel,
+ ENABLE_ANIMATIONS_XFCONF_PROP,
+ G_TYPE_BOOLEAN,
+ priv->widgetEnableAnimations,
+ "active");
}
/* IMPLEMENTATION: GObject */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list