After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 98711 - Display week numbers in GtkCalendar
Display week numbers in GtkCalendar
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: clock
2.1.x
Other Linux
: Normal enhancement
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 135331 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-11-16 17:33 UTC by Hakon
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Hakon 2002-11-16 17:33:01 UTC
It would be nice if the calendar could show week numbers to the left of
each row. Possibly by preference setting? By using a somehow different text
style, you could make it separated from the day numbers, so that it doesn't
get confusing. Like an italic fixed font or something.
I never know what is the current week number, but sometimes I need to know.
Then it would be very handy to be able to look it up from the clock applet
calendar.
Comment 1 Vincent Untz 2002-11-18 16:33:05 UTC
Hakon: what version of gnome-panel are you talking about ? There's no
calendar in the clock applet of GNOME 2 (or GNOME 2.1)...
Comment 2 Hakon 2002-11-18 21:21:04 UTC
It is gnome-panel-2.0.6 that is included in Red Hat Linux 8.0.
I reach the calendar by clicking on the clock display. And that
spawned window is also referred to as "Calendar" in the ALT+TAB window
list.
Perhaps Red Hat has made their own enhancement of the clock applet then?
Comment 3 Vincent Untz 2002-11-18 21:29:00 UTC
Havoc: is this calendar thing Red Hat specific (something to do with
your patch in bug #85723) ?
Comment 4 Havoc Pennington 2002-11-18 22:20:32 UTC
Yes, it's referring to my patch.

This bug would go to gtk+ against GtkCalendar though, as the 
popup menu just shows a GtkCalendar widget.
Comment 5 Hakon 2002-11-19 11:16:46 UTC
Hmm, I can't find the component in Bugzilla. gtk+ doesn't contain any
product like GtkCalendar.
Comment 6 Vincent Untz 2002-11-19 20:13:42 UTC
Moving to gtk.
Comment 7 Matthias Clasen 2003-05-06 08:05:36 UTC
Well, GtkCalendar can display week numbers just fine


(cf GTK_CALENDAR_SHOW_WEEK_NUMBERS), so I guess this bug should go 
back to gnome-panel.
Comment 8 Vincent Untz 2003-09-22 13:01:49 UTC
I have a patch for this, but it needs GTK+ 2.5.x because we need
gtk_calendar_get_display_options and gtk_calendar_set_display_options
(else we'll override the GtkCalendarDisplayOptions of the calendar).
I'm not sure what to do: will HEAD depends on GTK+ 2.5.x or not ?

Patch is :

@@ -462,6 +467,7 @@
 {
        GtkWindow *window;
        GtkWidget *calendar;
+       GtkCalendarDisplayOptions options;
  
        window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
  
@@ -478,6 +484,11 @@
                          G_CALLBACK (close_on_escape), cd);
  
        calendar = gtk_calendar_new ();
+
+       options = gtk_calendar_get_display_options (GTK_CALENDAR
(calendar));
+       options |= GTK_CALENDAR_SHOW_WEEK_NUMBERS;
+       gtk_calendar_set_display_options (GTK_CALENDAR (calendar),
+                                         options);
  
        gtk_container_add (GTK_CONTAINER (window), calendar);
Comment 9 Mark McLoughlin 2003-09-22 19:08:10 UTC
The patch looks good. As soon as we start depending on gtk+ HEAD
please go ahead and commit. Thanks :)
Comment 10 Vincent Untz 2003-10-28 21:46:19 UTC
Fixed in HEAD:
2003-10-28  Vincent Untz  <vincent@vuntz.net>

	* clock.c: (create_calendar) show the week numbers in the calendar.
	Fix bug #98711.
Comment 11 Vincent Untz 2004-02-24 23:01:52 UTC
*** Bug 135331 has been marked as a duplicate of this bug. ***