[claws-mail-cvs-commit] notification_prefs.c
Holger Berndt <[email protected]> Sat, 22 Aug 2009 01:51:10 +0000
| Newsgroups | gmane.mail.sylpheed.claws.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /srv/cvs/claws-mail/plugins/notification/src
In directory ran:/tmp/cvs-serv3500/src
Modified Files:
Tag: gtk2
notification_prefs.c
Log Message:
2009-08-22 [holger] 0.22cvs4
* m4/.cvsignore
More files to ignore
* src/notification_prefs.c
Increase maximum popup time to an hour,
and allow popups that never time out when
using libnotify
Index: notification_prefs.c
===================================================================
RCS file: /srv/cvs/claws-mail/plugins/notification/src/Attic/notification_prefs.c,v
retrieving revision 1.1.2.31
retrieving revision 1.1.2.32
diff -u -d -r1.1.2.31 -r1.1.2.32
--- notification_prefs.c 7 Apr 2009 22:47:40 -0000 1.1.2.31
+++ notification_prefs.c 22 Aug 2009 01:51:07 -0000 1.1.2.32
@@ -39,6 +39,17 @@
#include "notification_foldercheck.h"
+#ifdef HAVE_LIBNOTIFY
+/* allow infinite timeout with libnotify */
+# define TIMEOUT_SPINNER_MIN 0.0
+#else
+/* don't allow infinite timeout with self-handled popups */
+# define TIMEOUT_SPINNER_MIN 0.2
+#endif
+
+#define TIMEOUT_SPINNER_MAX 3600.0
+#define TIMEOUT_SPINNER_STEP 0.5
+
typedef struct
{
PrefsPage page;
@@ -911,7 +922,7 @@
label = gtk_label_new(_("Popup timeout:"));
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
gtk_widget_show(label);
- spinner = gtk_spin_button_new_with_range(0.2, 60., 0.5);
+ spinner = gtk_spin_button_new_with_range(TIMEOUT_SPINNER_MIN, TIMEOUT_SPINNER_MAX, TIMEOUT_SPINNER_STEP);
gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spinner), 1);
timeout = notify_config.popup_timeout/1000.;
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinner), timeout);
@@ -1489,7 +1500,7 @@
label = gtk_label_new(_("Popup timeout:"));
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
gtk_widget_show(label);
- spinner = gtk_spin_button_new_with_range(0.2, 60., 0.5);
+ spinner = gtk_spin_button_new_with_range(TIMEOUT_SPINNER_MIN, TIMEOUT_SPINNER_MAX, TIMEOUT_SPINNER_STEP);
gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spinner), 1);
timeout = notify_config.trayicon_popup_timeout/1000.;
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinner), timeout);