summaryrefslogtreecommitdiffstats
path: root/x11/gnomepanel/files/patch-applets_clock_clock.c
blob: 4c9d37b61f50c3b66e642de132228b3437a94fb9 (plain) (blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
--- applets/clock/clock.c.orig  Mon Oct 24 02:25:11 2005
+++ applets/clock/clock.c   Tue Nov 22 02:47:05 2005
@@ -47,7 +47,9 @@
 #include <dirent.h>
 #include <string.h>
 #include <time.h>
+#ifdef HAVE_LANGINFO_H
 #include <langinfo.h>
+#endif
 
 #include <panel-applet.h>
 #include <panel-applet-gconf.h>
@@ -545,7 +547,11 @@ clock_locale_format (void)
 {
         const char *am;
 
+#ifdef HAVE_LANGINFO_H
         am = nl_langinfo (AM_STR);
+#else
+   am = "AM";
+#endif
         return (am[0] == '\0') ? CLOCK_FORMAT_24 : CLOCK_FORMAT_12;
 }
 
@@ -1319,7 +1325,7 @@ add_appointments_and_tasks (ClockData *c
         update_frame_visibility (cd->appointment_list, GTK_TREE_MODEL (cd->appointments_model));
 
         switch (cd->orient) {
-        case PANEL_APPLET_ORIENT_DOWN:
+   case PANEL_APPLET_ORIENT_UP:
                 gtk_box_pack_start (GTK_BOX (vbox), cd->appointment_list, TRUE, TRUE, 0);
                 gtk_box_pack_start (GTK_BOX (vbox), cd->task_list, TRUE, TRUE, 0);
                 break;
@@ -1409,7 +1415,7 @@ create_calendar (ClockData *cd,
         gtk_calendar_select_day (GTK_CALENDAR (cd->calendar), tm->tm_mday);
 
    switch (cd->orient) {
-        case PANEL_APPLET_ORIENT_DOWN:
+   case PANEL_APPLET_ORIENT_UP:
                 add_appointments_and_tasks (cd, vbox);
                 gtk_box_pack_start (GTK_BOX (vbox), cd->calendar, TRUE, FALSE, 0);
                 break;
@@ -1498,7 +1504,7 @@ position_calendar_popup (ClockData *cd,
            gravity = GDK_GRAVITY_NORTH_EAST;
 
        break;
-   case PANEL_APPLET_ORIENT_UP:
+   case PANEL_APPLET_ORIENT_DOWN:
        y += button_h;
        if ((x + w) > monitor.x + monitor.width)
            x -= (x + w) - (monitor.x + monitor.width);
@@ -1506,7 +1512,7 @@ position_calendar_popup (ClockData *cd,
        gravity = GDK_GRAVITY_NORTH_WEST;
 
        break;
-   case PANEL_APPLET_ORIENT_DOWN:
+   case PANEL_APPLET_ORIENT_UP:
        y -= h;
        if ((x + w) > monitor.x + monitor.width)
            x -= (x + w) - (monitor.x + monitor.width);
@@ -1657,9 +1663,9 @@ create_clock_widget (ClockData *cd)
    cd->orient = panel_applet_get_orient (PANEL_APPLET (cd->applet));
 
    /* Initialize label orientation */
-   if (cd->orient == PANEL_APPLET_ORIENT_LEFT)
+   if (cd->orient == PANEL_APPLET_ORIENT_RIGHT)
        gtk_label_set_angle (GTK_LABEL (cd->clockw), 90);
-   else if (cd->orient == PANEL_APPLET_ORIENT_RIGHT)
+   else if (cd->orient == PANEL_APPLET_ORIENT_LEFT)
        gtk_label_set_angle (GTK_LABEL (cd->clockw), 270);
    else
        gtk_label_set_angle (GTK_LABEL (cd->clockw), 0);
@@ -1686,9 +1692,9 @@ applet_change_orient (PanelApplet       
 {
         cd->orient = orient;
         
-        if (cd->orient == PANEL_APPLET_ORIENT_LEFT)
+   if (cd->orient == PANEL_APPLET_ORIENT_RIGHT)
                 gtk_label_set_angle (GTK_LABEL (cd->clockw), 90);
-        else if (cd->orient == PANEL_APPLET_ORIENT_RIGHT)
+   else if (cd->orient == PANEL_APPLET_ORIENT_LEFT)
                 gtk_label_set_angle (GTK_LABEL (cd->clockw), 270);
         else
                 gtk_label_set_angle (GTK_LABEL (cd->clockw), 0);