[Xfce4-commits] [apps/xfdashboard] 03/04: Make new xfconf property "/always-launch-new-instance" configurable in settings application.
noreply at xfce.org
noreply at xfce.org
Wed Sep 16 16:09:41 CEST 2015
This is an automated email from the git hooks/post-receive script.
nomad pushed a commit to branch master
in repository apps/xfdashboard.
commit 87b3b24c00fe1d962068cfa3930f5ced4c3b6717
Author: Stephan Haller <nomad at froevel.de>
Date: Wed Sep 16 16:06:48 2015 +0200
Make new xfconf property "/always-launch-new-instance" configurable in settings application.
---
data/data/preferences.ui | 60 ++++++++++++++++++++++++++++++----------------
settings/settings.c | 14 +++++++++++
2 files changed, 53 insertions(+), 21 deletions(-)
diff --git a/data/data/preferences.ui b/data/data/preferences.ui
index b41d010..5c26230 100644
--- a/data/data/preferences.ui
+++ b/data/data/preferences.ui
@@ -86,9 +86,9 @@ Configure xfdashboard</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">8</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes"><b>General settings:</b></property>
<property name="use_markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -260,18 +260,36 @@ The duration is calculated by the length of the text to show in notification. Th
</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>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_markup" translatable="yes">When enabled and an icon in quicklaunch is clicked it will always start a new instance of the application.
+
+When not enabled it will select the last known active window of the running application instance. If application is not running, a new instance will be started.</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="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">16</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes"><b>Applications view:</b></property>
<property name="use_markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">6</property>
+ <property name="position">7</property>
</packing>
</child>
<child>
@@ -287,7 +305,7 @@ The duration is calculated by the length of the text to show in notification. Th
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">7</property>
+ <property name="position">8</property>
</packing>
</child>
<child>
@@ -295,14 +313,14 @@ The duration is calculated by the length of the text to show in notification. Th
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">16</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes"><b>Windows view:</b></property>
<property name="use_markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">8</property>
+ <property name="position">9</property>
</packing>
</child>
<child>
@@ -319,7 +337,7 @@ The duration is calculated by the length of the text to show in notification. Th
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">9</property>
+ <property name="position">10</property>
</packing>
</child>
<child>
@@ -327,14 +345,14 @@ The duration is calculated by the length of the text to show in notification. Th
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">16</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes"><b>Search view:</b></property>
<property name="use_markup">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">10</property>
+ <property name="position">11</property>
</packing>
</child>
<child>
@@ -371,7 +389,7 @@ The duration is calculated by the length of the text to show in notification. Th
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">11</property>
+ <property name="position">12</property>
</packing>
</child>
</object>
@@ -437,10 +455,10 @@ The duration is calculated by the length of the text to show in notification. Th
<child>
<object class="GtkLabel" id="theme-name-label">
<property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0</property>
<property name="label" translatable="yes"><b>Name:</b></property>
<property name="use_markup">True</property>
+ <property name="xalign">1</property>
+ <property name="yalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -461,10 +479,10 @@ The duration is calculated by the length of the text to show in notification. Th
<child>
<object class="GtkLabel" id="theme-author-label">
<property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0</property>
<property name="label" translatable="yes"><b>Author:</b></property>
<property name="use_markup">True</property>
+ <property name="xalign">1</property>
+ <property name="yalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -476,9 +494,9 @@ The duration is calculated by the length of the text to show in notification. Th
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">4</property>
+ <property name="single_line_mode">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="single_line_mode">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -488,10 +506,10 @@ The duration is calculated by the length of the text to show in notification. Th
<child>
<object class="GtkLabel" id="theme-version-label">
<property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0</property>
<property name="label" translatable="yes"><b>Version:</b></property>
<property name="use_markup">True</property>
+ <property name="xalign">1</property>
+ <property name="yalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -502,9 +520,9 @@ The duration is calculated by the length of the text to show in notification. Th
<object class="GtkLabel" id="theme-version">
<property name="can_focus">False</property>
<property name="margin_left">4</property>
+ <property name="single_line_mode">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="single_line_mode">True</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -514,10 +532,10 @@ The duration is calculated by the length of the text to show in notification. Th
<child>
<object class="GtkLabel" id="theme-description-label">
<property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0</property>
<property name="label" translatable="yes"><b>Description:</b></property>
<property name="use_markup">True</property>
+ <property name="xalign">1</property>
+ <property name="yalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -528,9 +546,9 @@ The duration is calculated by the length of the text to show in notification. Th
<object class="GtkLabel" id="theme-description">
<property name="can_focus">False</property>
<property name="margin_left">4</property>
+ <property name="wrap">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="wrap">True</property>
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/settings/settings.c b/settings/settings.c
index abf36b8..8afd8ad 100644
--- a/settings/settings.c
+++ b/settings/settings.c
@@ -52,6 +52,7 @@ struct _XfdashboardSettingsPrivate
GtkWidget *widgetNotificationTimeout;
GtkWidget *widgetEnableUnmappedWindowWorkaround;
GtkWidget *widgetWindowCreationPriority;
+ GtkWidget *widgetAlwaysLaunchNewInstance;
GtkWidget *widgetShowAllApps;
GtkWidget *widgetScrollEventChangedWorkspace;
GtkWidget *widgetDelaySearchTimeout;
@@ -80,6 +81,7 @@ struct _XfdashboardSettingsPrivate
#define DEFAULT_THEME "xfdashboard"
#define DEFAULT_ENABLE_HOTKEY FALSE
#define DEFAULT_WINDOW_CONTENT_CREATION_PRIORITY "immediate"
+#define DEFAULT_LAUNCH_NEW_INSTANCE TRUE
#define MAX_SCREENSHOT_WIDTH 400
typedef struct _XfdashboardSettingsResumableViews XfdashboardSettingsResumableViews;
@@ -1081,6 +1083,7 @@ static gboolean _xfdashboard_settings_create_builder(XfdashboardSettings *self)
priv->widgetResetSearchOnResume,
"active");
+
priv->widgetSwitchViewOnResume=GTK_WIDGET(gtk_builder_get_object(priv->builder, "switch-to-view-on-resume"));
if(priv->widgetSwitchViewOnResume)
{
@@ -1179,6 +1182,14 @@ static gboolean _xfdashboard_settings_create_builder(XfdashboardSettings *self)
priv->widgetEnableUnmappedWindowWorkaround,
"active");
+ priv->widgetAlwaysLaunchNewInstance=GTK_WIDGET(gtk_builder_get_object(priv->builder, "always-launch-new-instance"));
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->widgetAlwaysLaunchNewInstance), DEFAULT_LAUNCH_NEW_INSTANCE);
+ xfconf_g_property_bind(priv->xfconfChannel,
+ "/always-launch-new-instance",
+ G_TYPE_BOOLEAN,
+ priv->widgetAlwaysLaunchNewInstance,
+ "active");
+
priv->widgetShowAllApps=GTK_WIDGET(gtk_builder_get_object(priv->builder, "show-all-apps"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->widgetShowAllApps), FALSE);
xfconf_g_property_bind(priv->xfconfChannel,
@@ -1378,6 +1389,8 @@ static void _xfdashboard_settings_dispose(GObject *inObject)
priv->widgetSwitchViewOnResume=NULL;
priv->widgetNotificationTimeout=NULL;
priv->widgetEnableUnmappedWindowWorkaround=NULL;
+ priv->widgetWindowCreationPriority=NULL;
+ priv->widgetAlwaysLaunchNewInstance=NULL;
priv->widgetScrollEventChangedWorkspace=NULL;
priv->widgetDelaySearchTimeout=NULL;
priv->widgetThemes=NULL;
@@ -1440,6 +1453,7 @@ static void xfdashboard_settings_init(XfdashboardSettings *self)
priv->widgetNotificationTimeout=NULL;
priv->widgetEnableUnmappedWindowWorkaround=NULL;
priv->widgetWindowCreationPriority=NULL;
+ priv->widgetAlwaysLaunchNewInstance=NULL;
priv->widgetScrollEventChangedWorkspace=NULL;
priv->widgetDelaySearchTimeout=NULL;
priv->widgetThemes=NULL;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list