? clock.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/clock/ChangeLog,v
retrieving revision 1.462
diff -u -r1.462 ChangeLog
--- ChangeLog	24 Jun 2003 22:14:51 -0000	1.462
+++ ChangeLog	28 Jun 2003 17:48:28 -0000
@@ -1,3 +1,8 @@
+2003-06-28  Carlos Garnacho Parro  <garnacho@tuxerver.net>
+
+	* applets/clock/clock.c: Made the GtkCalendar show the first weekday
+	depending on the locales configuration. Fixes bug #114198
+
 2003-06-24  Mariano Suárez-Alvarez <msuarezalvarez@arnet.com.ar>
 
 	* GNOME_ClockApplet.xml: HIGify the applet menu.
Index: clock.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/clock/clock.c,v
retrieving revision 1.105
diff -u -r1.105 clock.c
--- clock.c	21 May 2003 08:11:52 -0000	1.105
+++ clock.c	28 Jun 2003 17:48:37 -0000
@@ -37,6 +37,7 @@
 #include <dirent.h>
 #include <string.h>
 #include <time.h>
+#include <locale.h>
 #include <langinfo.h>
 
 #include <panel-applet.h>
@@ -55,6 +56,8 @@
 
 #define N_GCONF_PREFS 7
 
+#define FIRST_WEEKDAY_IS_MONDAY 1
+
 static const char* KEY_HOUR_FORMAT   = "hour_format";
 static const char* KEY_SHOW_SECONDS  = "show_seconds";
 static const char* KEY_SHOW_DATE     = "show_date";
@@ -434,6 +437,10 @@
 {
 	GtkWindow *window;
 	GtkWidget *calendar;
+        gint first_day;
+
+        setlocale (LC_ALL, "");
+        first_day = (int) *(nl_langinfo (_NL_TIME_FIRST_WEEKDAY));
 
 	window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
 
@@ -452,6 +459,11 @@
 			  G_CALLBACK (close_on_escape), cd);
 			
 	calendar = gtk_calendar_new ();
+
+        if (first_day == FIRST_WEEKDAY_IS_MONDAY) {
+                gtk_calendar_display_options (GTK_CALENDAR (calendar),
+                                              GTK_CALENDAR_WEEK_START_MONDAY | GTK_CALENDAR_SHOW_HEADING | GTK_CALENDAR_SHOW_DAY_NAMES);
+        }
 
 	gtk_container_add (GTK_CONTAINER (window), calendar);
 
