]> git.pld-linux.org Git - packages/gnome-panel.git/blame - gnome-panel-clock.patch
- updated for gnome-panel-2.6.2
[packages/gnome-panel.git] / gnome-panel-clock.patch
CommitLineData
e7618558 1diff -urN aaa/gnome-panel-2.3.6.1/applets/clock/clock.c gnome-panel-2.3.6.1/applets/clock/clock.c
2--- aaa/gnome-panel-2.3.6.1/applets/clock/clock.c 2003-08-07 14:30:15.000000000 +0200
3+++ gnome-panel-2.3.6.1/applets/clock/clock.c 2003-08-09 21:53:07.000000000 +0200
4@@ -37,6 +37,7 @@
5 #include <dirent.h>
6 #include <string.h>
7 #include <time.h>
8+#include <locale.h>
9 #include <langinfo.h>
10
11 #include <panel-applet.h>
12@@ -57,6 +58,8 @@
13
14 #define NEVER_SENSITIVE "never_sensitive"
15
16+#define FIRST_WEEKDAY_IS_MONDAY 1
17+
18 static const char* KEY_HOUR_FORMAT = "hour_format";
19 static const char* KEY_SHOW_SECONDS = "show_seconds";
20 static const char* KEY_SHOW_DATE = "show_date";
21@@ -447,6 +450,10 @@
22 {
23 GtkWindow *window;
24 GtkWidget *calendar;
25+ gint first_day;
26+
27+ setlocale (LC_ALL, "");
28+ first_day = (int) *(nl_langinfo (_NL_TIME_FIRST_WEEKDAY));
29
30 window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
31
32@@ -464,6 +471,11 @@
33
34 calendar = gtk_calendar_new ();
35
36+ if (first_day == FIRST_WEEKDAY_IS_MONDAY) {
37+ gtk_calendar_display_options (GTK_CALENDAR (calendar),
38+ GTK_CALENDAR_WEEK_START_MONDAY | GTK_CALENDAR_SHOW_HEADING | GTK_CALENDAR_SHOW_DAY_NAMES);
39+ }
40+
41 gtk_container_add (GTK_CONTAINER (window), calendar);
42
43 gtk_widget_show (calendar);
This page took 0.040796 seconds and 4 git commands to generate.