File: 17_fix_alarm_delay_for_calendar.patch

package info (click to toggle)
evolution 2.6.3-6etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 79,516 kB
  • ctags: 32,159
  • sloc: ansic: 295,007; xml: 10,755; sh: 9,373; makefile: 3,756; perl: 1,591
file content (53 lines) | stat: -rw-r--r-- 2,039 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
diff -ru evolution-2.6.2.orig/calendar/gui/dialogs/event-page.c evolution-2.6.2/calendar/gui/dialogs/event-page.c
--- evolution-2.6.2.orig/calendar/gui/dialogs/event-page.c	2006-05-04 11:18:44.000000000 +0200
+++ evolution-2.6.2/calendar/gui/dialogs/event-page.c	2006-05-30 20:33:27.000000000 +0200
@@ -2918,40 +2918,33 @@
 	priv->alarm_units = calendar_config_get_default_reminder_units ();
 	priv->alarm_interval = calendar_config_get_default_reminder_interval ();
 	
+	menu_label = "";
 	switch (priv->alarm_units) {
 	case CAL_DAYS:
-		if (priv->alarm_interval != -1) {
+		if (priv->alarm_interval != 1) {
 			menu_label = g_strdup_printf (ngettext("%d day before appointment", "%d days before appointment", priv->alarm_interval), priv->alarm_interval);
-		} else {
-			priv->alarm_interval = -1;
 		}
 		break;
 		
 	case CAL_HOURS:
-		if (priv->alarm_interval != -1) {
+		if (priv->alarm_interval != 1) {
 			menu_label = g_strdup_printf (ngettext("%d hour before appointment", "%d hours before appointment", priv->alarm_interval), priv->alarm_interval);
-		} else {
-			priv->alarm_interval = -1;
 		}
 		break;
 		
 	case CAL_MINUTES:
-		if (priv->alarm_interval != -1) {
+		if (priv->alarm_interval != 15) {
 			menu_label = g_strdup_printf (ngettext("%d minute before appointement", "%d minutes before appointment", priv->alarm_interval), priv->alarm_interval);
-		} else {
-			priv->alarm_interval = -1;
 		}
 		break;
 	}
 	
-	if (menu_label) {
-		GtkWidget *item, *menu;
-
-		item = gtk_menu_item_new_with_label (menu_label);
-		gtk_widget_show (item);
-		menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->alarm_time));
-		gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+	cus_item = gtk_menu_item_new_with_label (menu_label);
+	if(menu_label[0] != '\0') {
+		gtk_widget_show (cus_item);
 	}
+	menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->alarm_time));
+	gtk_menu_shell_append (GTK_MENU_SHELL (menu), cus_item);
 
 	cus_item = gtk_menu_item_new_with_label (_("Customize"));
 	gtk_widget_show (cus_item);