summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2010-02-26 14:08:27 +0100
committerNick Schermer <nick@xfce.org>2010-02-26 14:11:49 +0100
commite538ca4c74c06555fee49a02687750883358db69 (patch)
treea211f6fae3c4232b64896e1829137720eab4dd49 /common
parent8e75df36a05fc3ed27fa4d946675b53583b3a531 (diff)
downloadxfce4-panel-e538ca4c74c06555fee49a02687750883358db69.tar.gz
Use a timer for a minimum time between auto plugin restart.
The restart counter was a bit flawed, because if the panel would run for weeks and 3 restarts occured, it's not a big deal, still the panel would've bothered the user what to do. We now use a minimum time between restarts, if there was another restart in the last 60 seconds, ask the user what to do.
Diffstat (limited to 'common')
-rw-r--r--common/panel-private.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/common/panel-private.h b/common/panel-private.h
index aee58f05..d694c293 100644
--- a/common/panel-private.h
+++ b/common/panel-private.h
@@ -63,13 +63,9 @@
/* xfconf property base (printf format) */
#define PANEL_PLUGIN_PROPERTY_BASE "/plugins/plugin-%d"
-/* Number of automatic plugin restarts before the panel
- * asks the users what to do */
-#ifndef NDEBUG
-#define PANEL_PLUGIN_AUTOMATIC_RESTARTS (0)
-#else
-#define PANEL_PLUGIN_AUTOMATIC_RESTARTS (2)
-#endif
+/* minimum time in seconds between automatic restarts of panel plugins
+ * without asking the user what to do */
+#define PANEL_PLUGIN_AUTO_RESTART (60)
/* quick GList and GSList counting without traversing */
#define LIST_HAS_ONE_ENTRY(l) ((l) != NULL && (l)->next == NULL)