aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2009-03-08 23:57:20 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2009-03-08 23:57:20 +0800
commit60f4e2fdef88702a49505ddee43c968f6d319369 (patch)
tree98fa66e77d104ec7ffa4a3952bed6bd6eb99219e /widgets
parentbbbfa78a1051fda16871ccdcecc40c67c2c1b91d (diff)
downloadgsoc2013-evolution-60f4e2fdef88702a49505ddee43c968f6d319369.tar.gz
gsoc2013-evolution-60f4e2fdef88702a49505ddee43c968f6d319369.tar.zst
gsoc2013-evolution-60f4e2fdef88702a49505ddee43c968f6d319369.zip
Fixes #342446
svn path=/trunk/; revision=37383
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/ChangeLog8
-rw-r--r--widgets/misc/e-calendar-item.c37
2 files changed, 40 insertions, 5 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 0cd6767fd5..ab84dfd7ba 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,11 @@
+2009-03-08 Chenthill Palanisamy <pchenthill@novell.com>
+
+ Fixes #342446
+ * widgets/misc/e-calendar-item.c: Check whether its
+ appropriate to use %Id format for digits. Incorporated
+ the fix from Wang Xin <jedy.wang@sun.com> to build in
+ solaris.
+
2009-02-25 Milan Crha <mcrha@redhat.com>
** Fix for bug #559027
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index da4c063175..07f0bb3980 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -1364,6 +1364,33 @@ e_calendar_item_draw_month (ECalendarItem *calitem,
cairo_destroy (cr);
}
+static const char *
+get_digit_fomat ()
+{
+
+#ifdef HAVE_GNU_GET_LIBC_VERSION
+#include <gnu/libc-version.h>
+
+ const char *libc_version = gnu_get_libc_version ();
+ char **split = g_strsplit (libc_version, ".", -1);
+ int major = 0;
+ int minor = 0;
+ int revision = 0;
+
+ major = atoi (split [0]);
+ minor = atoi (split [1]);
+
+ if (g_strv_length (split) > 2)
+ revision = atoi (split [2]);
+ g_strfreev (split);
+
+ if (major > 2 || minor > 2 || (minor == 2 && revision > 2)) {
+ return _("%Id");
+ }
+#endif
+
+ return "%d";
+}
static void
e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
@@ -1505,12 +1532,12 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
if (week_num >= 10) {
digit = week_num / 10;
text_x -= calitem->week_number_digit_widths[digit];
- num_chars += sprintf (&buffer[num_chars], "%Id", digit);
+ num_chars += sprintf (&buffer[num_chars], get_digit_fomat (), digit);
}
digit = week_num % 10;
text_x -= calitem->week_number_digit_widths[digit] + 6;
- num_chars += sprintf (&buffer[num_chars], "%Id", digit);
+ num_chars += sprintf (&buffer[num_chars], get_digit_fomat (), digit);
cairo_save (cr);
gdk_cairo_set_source_color (cr, &style->text[GTK_STATE_ACTIVE]);
@@ -1618,12 +1645,12 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
if (day_num >= 10) {
digit = day_num / 10;
day_x -= calitem->digit_widths[digit];
- num_chars += sprintf (&buffer[num_chars], "%Id", digit);
+ num_chars += sprintf (&buffer[num_chars], get_digit_fomat (), digit);
}
digit = day_num % 10;
day_x -= calitem->digit_widths[digit];
- num_chars += sprintf (&buffer[num_chars], "%Id", digit);
+ num_chars += sprintf (&buffer[num_chars], get_digit_fomat (), digit);
cairo_save (cr);
if (fg_color) {
@@ -1958,7 +1985,7 @@ e_calendar_item_recalc_sizes (ECalendarItem *calitem)
gchar locale_digit[5];
int locale_digit_len;
- locale_digit_len = sprintf (locale_digit, "%Id", digit);
+ locale_digit_len = sprintf (locale_digit, get_digit_fomat (), digit);
pango_layout_set_text (layout, locale_digit, locale_digit_len);
pango_layout_get_pixel_size (layout, &width, NULL);
pan title='2009-07-05 17:36:28 +0800'>2009-07-056-0/+78 * Update to 1.5skv2009-07-052-4/+4 * - Upgrade to 3.0.1miwi2009-07-052-4/+4 * - Update to 3.0.1miwi2009-07-052-7/+7 * Commit a patch from Ubuntu to fix a bug which can occur when trying tomarcus2009-07-052-0/+14 * - Fix build with HEADmiwi2009-07-051-7/+9 * - Install proper documentation file.wxs2009-07-042-2/+3 * Updated to 0.8b4skreuzer2009-07-045-64/+6 * - Update to 0.28pgollucci2009-07-042-4/+4 * - Update to 20090703wxs2009-07-032-6/+6 * Update to 2.26.2.kwm2009-07-033-4/+7 * - Update to 2.0.10, which has the chroot vulnerability patched.wxs2009-07-0312-108/+16 * Update to 2.26.3.avl2009-07-024-11/+21 * - Fix core dump on AMD64miwi2009-07-013-2/+41 * - Fix a small Bug in samefile/samearchivedhn2009-07-012-0/+11 * - Update linkpav2009-06-301-1/+1 * Restore correct checksum from distinfo version 1.258.olgeni2009-06-281-3/+3 * Upgrade modules ldap-useradmin-1.480-1 and mysql-1.480-1.olgeni2009-06-282-4/+12 * mhddfs - Multi HDD [FUSE] File Systemavl2009-06-265-0/+62 * unbreak the port temporarily commenting out traceroute.luigi2009-06-261-1/+1 * add missing fileluigi2009-06-261-0/+865 * - Update to 0.5.3beat2009-06-2612-116/+80 * update the port to rev.1.13.4luigi2009-06-264-107/+218 * - Fix build with new rubypav2009-06-241-3/+9 * - Update to 2.30clsung2009-06-246-28/+192 * - Update to 2.14clsung2009-06-242-6/+7 * - Update to 1.5.6.rafan2009-06-233-5/+8 * - Fix typo and WWW in pkg-descr.wxs2009-06-231-4/+5 * A Power manager for the Xfce Desktop.miwi2009-06-225-0/+129 * - Update to 0.10pgollucci2009-06-222-4/+4 * - Add required dependencyamdmi32009-06-221-2/+3 * - Add gstreamer supportdhn2009-06-211-2/+2 * moreutils is a growing collection of the unix tools that nobody thought todhn2009-06-215-0/+133 * Update maintainer's email address. Had already been done for hislinimon2009-06-203-3/+3 * Correct OS version and the reason which this port become broken.sumikawa2009-06-191-2/+2 * rdup is a utility inspired by rsync and the Plan9 way of doing backups.miwi2009-06-196-0/+129 * - Update to 0.5.4 which adds support for FreeBSD 7.2beat2009-06-182-4/+4 * Update 1.0.3 --> 1.0.4cy2009-06-182-4/+4 * Transfer maintainership over to Nikos Ntarmos, the maintaineradamw2009-06-181-1/+1 * - Hide irrelevant options from awesome slave, and fix his installpav2009-06-182-3/+74 * Fix distinfo.olgeni2009-06-171-3/+3 * claimpgollucci2009-06-171-3/+2 * - Assign all unmaintained ruby ports to ruby@,stas2009-06-162-2/+2 * - Mark as broken on 8.x. There are two PRs about this. The first (ports/135285)wxs2009-06-161-0/+4 * - Don't use DATADIR in plist as that would be bacula2 by default. Use thewxs2009-06-161-27/+27 * - Revert change to pkg-plist.client and fix it in Makefile (scriptdir).wxs2009-06-162-2/+2 * - Fix plist for client install.wxs2009-06-161-1/+1 * - Use MASTER_SITES_KERNEL_ORGwxs2009-06-164-6/+8 * - Reintroduce bacula2.x as sysutils/bacula2-server and sysutils/bacula2-clientwxs2009-06-1624-0/+1095 * - Update to 0.6.0pav2009-06-154-107/+7 * - Update to 1.7.1.1miwi2009-06-145-61/+39 * scrappy's bit has been taken for safekeeping, so return these ports tolinimon2009-06-141-1/+1 * - Broken on 8.xpav2009-06-141-1/+7 * Upgrade to version 1.410.olgeni2009-06-132-4/+4 * Upgrade to version 1.480.olgeni2009-06-132-17/+5 * Fix distinfo for i386jpaetzel2009-06-131-0/+3 * Update to 1.2.0jpaetzel2009-06-133-32/+12 * - Fix ksystemlog failures while looking for Linux-specific logfileskmoore2009-06-123-0/+23 * Update to 9.5.2jpaetzel2009-06-122-8/+5 * Update to 2.01.01a60. For the changes since 2.01.01a59 see:marius2009-06-112-4/+4 * Upgrade module software-1.470-2.olgeni2009-06-112-2/+6 * Improve output buffer flushing so the aux info (timestamp etc) do notbland2009-06-102-6/+14 * Convert most of remaining ports that depend on xorg-libraries toamdmi32009-06-099-9/+18 * - Unmark BROKENjadawin2009-06-092-11/+9 * - Drop maintainershipamdmi32009-06-091-1/+1 * - Update lang/python26 and make Python 2.6.2 to the default Python versionmiwi2009-06-093-2/+8 * - Update to 0.8.5amdmi32009-06-093-9/+17 * - Fix on current.stas2009-06-072-3/+28 * - Add patch to shuffle around the command line realloc loop tobeat2009-06-062-1/+21 * - Update to 2.041pgollucci2009-06-062-4/+4 * - Update to 3.062pgollucci2009-06-063-11/+18 * - Update to 0.8.2miwi2009-06-068-145/+11 * - Pass maintainership to submitter. He was formally maintainer at one point.wxs2009-06-051-1/+1 * - update to 1.0.1danger2009-06-042-5/+4 * - Fix questionable correctness of autodetect procedure and switch to usingwxs2009-06-044-4/+6 * - Restore PORTREVISIONmiwi2009-06-031-0/+1 * Mark BROKEN on 8.x: does not build.erwin2009-06-031-1/+7 * The KDE FreeBSD team is pleased to announce KDE 4.2.4, the last bugfixmiwi2009-06-039-17/+13 * - Fix removing kernel module on deinstallamdmi32009-06-032-2/+3 * - Update to 0.3.2miwi2009-06-033-7/+6 * - Correct typos in PROVIDE lines of bacula-fd.in and bacula-sd.inwxs2009-06-032-2/+2 * Connect krename-kde4 to buildmakc2009-06-031-0/+1 * Update to 3.9.3 for KDE4 after repocopymakc2009-06-037-34/+56 * - Switch to MASTER_SITE_KERNEL_ORG.wxs2009-06-022-2/+3 * - Update to 0.8.8.tdb2009-06-023-55/+7 * - Fix RC scripts (so pidfile is properly defined)wxs2009-06-024-9/+7 * - Disable extended attributes to fix build on -currentwxs2009-06-021-5/+2 * - Resolve LATEST_LINK conflictpav2009-06-013-0/+3 * Actually, we're not trying to reinvent the wheel here,miwi2009-05-315-0/+78 * Fix the build on recent -CURRENT with the removal of oldusb.marcus2009-05-304-39/+145 * - Fix typo in smart periodic script.miwi2009-05-294-14/+28 * Mark as not for sparc64: uses i386 assembly.linimon2009-05-291-0/+2 * - Update to 5.0.3amdmi32009-05-292-12/+5 * Change MAINTAINER on my ports to my FreeBSD email addressavl2009-05-294-4/+4 * - Update distinfodhn2009-05-291-3/+3 * - Update to 1.2dhn2009-05-283-11/+10 * Mark BROKEN on 8.x: does not build.erwin2009-05-281-1/+7 * Fix build on -CURRENT after the removal of the thread argument from the FSDjkim2009-05-282-5/+112 * Mark BROKEN on 8.x: does not build.erwin2009-05-271-0/+3 * Update to version 1.2, with inet6 support contributed by Peter J. Philipp.cracauer2009-05-272-5/+5 * - Update to 1.1dhn2009-05-263-18/+39 * Since cpuctl(4) was MFC'ed, sysutils/cpupowerd doesn't need to dependume2009-05-263-5/+57 * - Update to 0.8.3amdmi32009-05-252-5/+6 * - Over to marck, a new maintainerpav2009-05-252-2/+2 * Remove qt4 build tools from run dependencies.makc2009-05-241-2/+2 * Optimize the check for an existing GEOM object and correct a nearby memorymarcus2009-05-242-16/+27 * * Correct a potential infinite recursion loop triggered by the new GEOMmarcus2009-05-245-27/+33 * Update to 2.26.2.marcus2009-05-232-4/+4 * - Update to 0.5.18miwi2009-05-2312-12/+63 * - Update to 1.09pgollucci2009-05-223-5/+8 * - Support SATA disks attached to a SAS controllerpav2009-05-214-2/+24 * update audacious to 2.0.1oliver2009-05-211-1/+2 * Add man pageskreuzer2009-05-211-0/+9 * A Command Line Interface for the MegaRAID SAS family of RAID controllers,pgollucci2009-05-204-0/+37 * Update to 2.26.2.kwm2009-05-203-4/+9 * - Update pkg-descrdhn2009-05-192-7/+13 * - Submitter take maintainership.jadawin2009-05-191-1/+1 * The mkdir needs root privileges here.brian2009-05-191-1/+1 * - update to 0.7.13pgollucci2009-05-192-4/+4 * - Mark broken for AMD64miwi2009-05-171-0/+3 * luckyBackup is a QT4 application that backs-up and synchronizes directoriesmiwi2009-05-175-0/+129 * * misc/e2fsprogs-libuuid:miwi2009-05-171-0/+109 * - New slave port for sysutils/rsyslog4.miwi2009-05-177-0/+151 * - Mark most of my ports MAKE_JOBS_SAFE=yespgollucci2009-05-162-0/+4 * Add optional dependency on print/system-config-printer-kdemakc2009-05-161-1/+10 * Add optional dependency on print/kdeutils4-printer-appletmakc2009-05-163-3/+27 * - Really disable testspav2009-05-151-4/+4 * - I had to reroll the distfile because the tool itself didn't say it'sdanger2009-05-152-3/+4 * - update to 1.0danger2009-05-153-7/+9 * - Fix segfault.tdb2009-05-152-3/+50 * - Update to 0.3.2.araujo2009-05-142-5/+4 * Chase libgmp and bump PORTREVISION.ale2009-05-133-3/+6 * Release these ports into the wild due to maintainer-timeouts and nolinimon2009-05-133-3/+3 * - Mark MAKE_JOBS_UNSAFEpav2009-05-132-0/+2 * Fix install/package with -DNOPORTDOCS.itetcu2009-05-121-2/+1 * - Reset inactive maintainerpav2009-05-121-1/+1 * - Fix tree viewpav2009-05-122-0/+15 * - "I missed an important configuration option in the original port submission."pav2009-05-121-0/+3 * - update to 0.8.7danger2009-05-122-6/+16 * - Update to 0.5.17miwi2009-05-116-12/+12 * - add yet another optional dependencydanger2009-05-111-1/+6 * b43-fwcutter is a tool which can extract firmware from various BCM43xx drivers.garga2009-05-10