[Xfce4-commits] r25876 - in libxfcegui4/branches/xfce_4_4: . libxfcegui4
Nick Schermer
nick at xfce.org
Mon Jul 2 10:37:06 CEST 2007
Author: nick
Date: 2007-07-02 08:37:06 +0000 (Mon, 02 Jul 2007)
New Revision: 25876
Modified:
libxfcegui4/branches/xfce_4_4/ChangeLog
libxfcegui4/branches/xfce_4_4/NEWS
libxfcegui4/branches/xfce_4_4/configure.in.in
libxfcegui4/branches/xfce_4_4/libxfcegui4/xfce_clock.c
Log:
2007-07-02 10:34 nick
* NEWS, configure.in.in, libxfcegui4/xfce_clock.c: Use localtime_r
when available. Not really sure, but this might be related to
Bug #2957.
Modified: libxfcegui4/branches/xfce_4_4/ChangeLog
===================================================================
--- libxfcegui4/branches/xfce_4_4/ChangeLog 2007-07-01 15:04:05 UTC (rev 25875)
+++ libxfcegui4/branches/xfce_4_4/ChangeLog 2007-07-02 08:37:06 UTC (rev 25876)
@@ -1,3 +1,9 @@
+2007-07-02 10:34 nick
+
+ * NEWS, configure.in.in, libxfcegui4/xfce_clock.c: Use localtime_r
+ when available. Not really sure, but this might be related to
+ Bug #2957.
+
2007-04-09 10:05 maximilian
* libexo/trunk/po-doc/fr.po, libexo/trunk/po/fr.po,
@@ -219,7 +225,7 @@
xfwm4/branches/xfce_4_4/po/ChangeLog,
xfwm4/branches/xfce_4_4/po/en_GB.po: Fixed minor issues in some
German, Dutch and French translations.
-
+
* en_GB: Added new and updated British English translations
by Jeff Bailes <thepizzaking at gmail.com>
@@ -463,7 +469,7 @@
* libxfcegui4/trunk/po/ChangeLog, libxfcegui4/trunk/po/be.po:
2007-01-19 Alexander Nyakhaychyk <nyakhaychyk at gmail.com>
-
+
* be.po: Updated Belarusian Translation
2007-01-18 23:10 eulex
@@ -493,14 +499,14 @@
* xfdesktop
* xfprint
* xfwm4
-
+
Also thus updated appropriate ChangeLog files.
2007-01-18 09:10 nab
* libxfcegui4/trunk/po/ChangeLog, libxfcegui4/trunk/po/be.po:
2007-01-18 Alexander Nyakhaychyk <nyakhaychyk at gmail.com>
-
+
* be.po: Updated Belarusian Translation
2007-01-14 20:30 maximilian
@@ -809,7 +815,7 @@
xfprint/trunk/po/dz.po, xfwm4/trunk/po/ChangeLog,
xfwm4/trunk/po/LINGUAS, xfwm4/trunk/po/dz.po: added whole
Dzongkha translation
-
+
congratulations to the dz team.
2006-10-24 21:46 olivier
@@ -886,7 +892,7 @@
* libxfcegui4/trunk/po/ChangeLog, libxfcegui4/trunk/po/cs.po:
2006-09-02 Benedikt Meurer <benny at xfce.org>
-
+
* cs.po: Updated czech translations by Michal Várady
<miko.vaji at gmail.com>.
@@ -2020,7 +2026,7 @@
* libxfcegui4/trunk/po/uk.po: 2006-04-19 Maxim Dziumanenko
<mvd at mylinux.ua>
-
+
* Updated Ukrainian translation.
2006-04-18 19:44 benny
@@ -5330,9 +5336,9 @@
libxfcegui4/trunk/libxfcegui4/xfce-widget-helpers.c,
libxfcegui4/trunk/libxfcegui4/xfce-widget-helpers.h: err? why do
it directly when you can do it convolutedly... :)
-
+
add convenience helper function:
-
+
GtkWidget *xfce_create_framebox_immediate(const gchar* title,
GtkWidget* contents);
@@ -6853,7 +6859,7 @@
libxfcegui4/trunk/po/sv.po, libxfcegui4/trunk/po/ta.po,
libxfcegui4/trunk/po/uk.po, libxfcegui4/trunk/po/zh_CN.po,
libxfcegui4/trunk/po/zh_TW.po: Updated and bumped the version up.
-
+
XXX: What's this strange `c-format' mark? I'll have to check my
gettext...
@@ -6886,7 +6892,7 @@
xffm/trunk/xffm-gui/po/ca.po, xfprint/trunk/po/ca.po,
xfwm4/trunk/po/ca.po: begin process to 4.4 work
autotranslation of most of the actual po
-
+
-- paurullan at bulma.net , ca translator
2005-10-27 20:20 gnu_sylvain
@@ -6916,7 +6922,7 @@
xfce4-panel/branches/xfce_4_2/po/it.po,
xfce4-session/branches/xfce_4_2/po/it.po: * Modified initial
header strings using template by `msginit'.
-
+
* Modified initial comment strings using template by `msginit'.
2005-10-19 21:27 olivier
@@ -7406,7 +7412,7 @@
xfce4-trigger-launcher/trunk/po/ja.po, xfdesktop/trunk/po/ja.po,
xfprint/trunk/po/ja.po, xfwm4/trunk/po/ja.po: * Added initial
"$Id$".
-
+
* Updated some translations.
2005-09-22 12:14 daichi
@@ -7432,11 +7438,11 @@
libxfcegui4/trunk/po/uk.po, libxfcegui4/trunk/po/zh_CN.po,
libxfcegui4/trunk/po/zh_TW.po: * Bumped version at the
'Project-Id-Version:'.
-
+
* Added fall back address at the 'Language-Team:', according to
the
http://www.iro.umontreal.ca/translation/registry.cgi?team=index
-
+
* Modified initial comment strings with template by 'msginit'.
2005-09-20 19:52 alex
@@ -7672,13 +7678,13 @@
libxfcegui4/trunk/po/lt.po, libxfcegui4/trunk/po/nl.po,
libxfcegui4/trunk/po/pt_BR.po, libxfcegui4/trunk/po/zh_CN.po:
Fixed errors emitted by 'msgfmt -c'.
-
+
Converted local charset to UTF-8 at the 'Content-type:'.
-
+
Added fall back address at the 'Language-Team: ', according to
the
http://www.iro.umontreal.ca/translation/registry.cgi?team=index
-
+
Modified initial comment strings with template by 'msginit'.
2005-08-16 13:09 benny
@@ -8055,18 +8061,18 @@
initialisation do do_update_now instead of queue_update (the
first time per screen), so that applications without main loop
can use netk_screen_get_windows too.
-
+
example:
-
+
g_warning ("%p", netk_screen_get_windows (netk_screen_get_default
()));
-
+
before:
0
-
+
after:
someaddressofglist
-
+
I tested all of window manager, task list, panel and they seem to
be fine, still.
@@ -10012,7 +10018,7 @@
* add xfce_scaled_image widget
* make xfce_iconbutton and xfce_menubutton use the new widget
* sorry, no docs
-
+
Please test.
2004-06-14 17:54 benny
@@ -10833,7 +10839,7 @@
to hook
this up). i've tested it somewhat, but i wouldn't consider it
rock-solid stable or finished.
-
+
quick description:
XfceAppMenuItem is a subclass of GtkImageMenuItem. its purpose is
to
@@ -10843,7 +10849,7 @@
manually
from app name, command, icon name, etc., or automatically from an
XfceDesktopEntry.
-
+
also, i bumped libxfcegui4's version number to 4.1.5 so i can
start
requiring it for xfdesktop soon.
@@ -11106,11 +11112,11 @@
CVS history here, but for completeness sake I'm including the
ChangeLog
entries here:
-
+
+++
-
+
2003-10-11 00:08 edscott
-
+
* xffm/src/: add_folder.c, add_node_contents.c, callbacks.c,
keybindings.c, main.c, treeview.c: do second letter search if
first
@@ -11121,9 +11127,9 @@
--DONE g_strchug() crash on openwith by menu... --FIXED on go_up
do
not place in history, nor back nor forward --DONE
-
+
2003-10-11 00:05 edscott
-
+
* xffm/: libs/apps.c, libs/bookmarks.c, libs/constants.h,
libs/cpy.c, libs/dnd.c, libs/dummies.c, libs/duplicate.c,
libs/entry.c, libs/goto.c, libs/goto.h, libs/icons.c,
@@ -11141,14 +11147,14 @@
openwith
by menu... --FIXED on go_up do not place in history, nor back nor
forward --DONE
-
+
2003-10-10 23:19 xfce
-
+
* xfce-utils/scripts/xinitrc: Don't use cpp in xrdb so that DPI
settings load even on workstations w/out cpp
-
+
2003-10-10 22:17 xfce
-
+
* libxfcegui4/libxfcegui4/netk-pager.c, xfwm4/configure,
xfwm4/configure.ac, xfwm4/themes/Makefile.am,
xfwm4/themes/Makefile.in, xfwm4/themes/default/bottom-active.xpm,
@@ -11205,23 +11211,23 @@
xfwm4/themes/default/top-right-inactive.xpm: Revert xfwm4 default
theme to the one found in pre-release as it looked better Fix a
very small thing in netk-pager
-
+
2003-10-10 19:21 huysmans
-
+
* xfce4/plugins/pager/pager.c: Fix resizing bug
-
+
2003-10-09 23:41 huysmans
-
+
* xfwm4/: mcs-plugin/workspaces.c, src/settings.c: Move workspace
names settings into settings plugin. Rename count to
Xfwm/WorkspaceCount for consistency.
-
+
2003-10-09 23:03 xfce
-
+
* libxfcegui4/: configure, configure.ac: Increase version number
-
+
2003-10-09 22:13 xfce
-
+
* xfwm4/themes/default/: close-active.xpm, close-inactive.xpm,
close-pressed.xpm, hide-active.xpm, hide-inactive.xpm,
hide-pressed.xpm, maximize-active.xpm, maximize-inactive.xpm,
@@ -11236,14 +11242,14 @@
title-2-active.xpm, title-2-inactive.xpm, title-3-active.xpm,
title-3-inactive.xpm, title-4-active.xpm, title-4-inactive.xpm:
Change default theme for 4.2
-
+
2003-10-09 15:19 edscott
-
+
* xffm/: glade_intl, src/glade_callbacks.h, src/glade_gui.c.bak,
src/glade_gui.h: remove obsolete files
-
+
2003-10-09 07:04 edscott
-
+
* xffm/src/: Makefile.am, Makefile.in, callbacks.c,
keybindings.c,
keybindings.h, treeview.c, treeview.h: scroll by keyboard is now
@@ -11251,9 +11257,9 @@
proceed
backwards. Backward scroll-search will not wrap. Forward
scroll-sear ch will wrap (as before).
-
+
2003-10-09 04:14 edscott
-
+
* xffm/: glade/xffm_main.glade, libs/apps.c, libs/bookmarks.c,
libs/combo.c, libs/cpy.c, libs/dummies.c, libs/duplicate.c,
libs/entry.c, libs/filter.c, libs/find.h, libs/goto.c,
@@ -11266,9 +11272,9 @@
smb/smb_download.c, smb/smb_list.c, src/glade_main_gui.c,
src/main.c, src/treeview.c, src/widgets.c: eliminate all warnings
when compiling with --enable-debug
-
+
2003-10-09 01:46 edscott
-
+
* xffm/: xffm.glade, xffm.gladep, glade/xffm_find.glade,
glade/xffm_find.gladep, glade/xffm_main.glade,
glade/xffm_main.gladep, glade/xffm_remove.glade,
@@ -11295,22 +11301,22 @@
src/glade_remove_callbacks.h, src/glade_remove_gui.c,
src/glade_remove_gui.h, src/main.c, src/mcs-manager.c,
src/treeview.c, src/widgets.c: broke glade files into three parts
-
+
2003-10-08 23:43 xfce
-
+
* xfwm4/src/: client.c, events.c, settings.c: [no log message]
-
+
2003-10-08 22:29 xfce
-
+
* xfwm4/themes/default.keys/keythemerc: Change raise/lower key
-
+
2003-10-08 22:24 xfce
-
+
* xfwm4/: src/settings.c, themes/default.keys/keythemerc: Fix
raise/lower key shortcut patch
-
+
2003-10-08 22:12 xfce
-
+
* xfwm4/: configure, configure.ac, themes/Makefile.am,
themes/Makefile.in, themes/default/title-2-active.xpm,
themes/default/title-2-inactive.xpm,
@@ -11318,9 +11324,9 @@
themes/default/title-4-inactive.xpm,
themes/default/top-right-active.xpm,
themes/default/top-right-inactive.xpm: Add missing files
-
+
2003-10-08 10:20 huysmans
-
+
* xfdesktop/doc/C/xfdesktop.html, xfdesktop/doc/C/xfdesktop.xml,
xfdesktop/doc/C/images/Makefile.am,
xfdesktop/doc/C/images/Makefile.in,
@@ -11342,22 +11348,22 @@
update:
merge workspaces dialog from xfdesktop with workspace margins
dialog from xfwm4. The new dialog is part of xfwm4.
-
+
2003-10-07 22:44 xfce
-
+
* libxfcegui4/libxfcegui4/: Makefile.am, Makefile.in,
netk-class-group.c, netk-class-group.h, netk-private.h,
netk-screen.c, netk-screen.h, netk-tasklist.c, netk-window.c,
netk-window.h, netk-xutils.c, netk-xutils.h: Backport changes
from
libwnck HEAD cvs
-
+
2003-10-07 22:40 xfce
-
+
* xffm/libs/: input.c, run.c: Include Edscott patches
-
+
2003-10-07 22:31 xfce
-
+
* xfwm4/: configure, configure.ac, src/client.c, src/events.c,
themes/Makefile.am, themes/Makefile.in,
themes/default/bottom-active.xpm,
@@ -11439,7 +11445,7 @@
old 4.0 theme as default-4.0 and add tgc-large theme Include
improvements for fullscreen mode for gst from Arwed von Merkatz
<v.merkatz at gmx.net>
-
+
+++
2003-10-13 15:32 jasper
@@ -11450,11 +11456,11 @@
CVS history here, but for completeness sake I'm including the
ChangeLog
entries here:
-
+
+++
-
+
2003-10-11 00:08 edscott
-
+
* xffm/src/: add_folder.c, add_node_contents.c, callbacks.c,
keybindings.c, main.c, treeview.c: do second letter search if
first
@@ -11465,9 +11471,9 @@
--DONE g_strchug() crash on openwith by menu... --FIXED on go_up
do
not place in history, nor back nor forward --DONE
-
+
2003-10-11 00:05 edscott
-
+
* xffm/: libs/apps.c, libs/bookmarks.c, libs/constants.h,
libs/cpy.c, libs/dnd.c, libs/dummies.c, libs/duplicate.c,
libs/entry.c, libs/goto.c, libs/goto.h, libs/icons.c,
@@ -11485,14 +11491,14 @@
openwith
by menu... --FIXED on go_up do not place in history, nor back nor
forward --DONE
-
+
2003-10-10 23:19 xfce
-
+
* xfce-utils/scripts/xinitrc: Don't use cpp in xrdb so that DPI
settings load even on workstations w/out cpp
-
+
2003-10-10 22:17 xfce
-
+
* libxfcegui4/libxfcegui4/netk-pager.c, xfwm4/configure,
xfwm4/configure.ac, xfwm4/themes/Makefile.am,
xfwm4/themes/Makefile.in, xfwm4/themes/default/bottom-active.xpm,
@@ -11549,23 +11555,23 @@
xfwm4/themes/default/top-right-inactive.xpm: Revert xfwm4 default
theme to the one found in pre-release as it looked better Fix a
very small thing in netk-pager
-
+
2003-10-10 19:21 huysmans
-
+
* xfce4/plugins/pager/pager.c: Fix resizing bug
-
+
2003-10-09 23:41 huysmans
-
+
* xfwm4/: mcs-plugin/workspaces.c, src/settings.c: Move workspace
names settings into settings plugin. Rename count to
Xfwm/WorkspaceCount for consistency.
-
+
2003-10-09 23:03 xfce
-
+
* libxfcegui4/: configure, configure.ac: Increase version number
-
+
2003-10-09 22:13 xfce
-
+
* xfwm4/themes/default/: close-active.xpm, close-inactive.xpm,
close-pressed.xpm, hide-active.xpm, hide-inactive.xpm,
hide-pressed.xpm, maximize-active.xpm, maximize-inactive.xpm,
@@ -11580,14 +11586,14 @@
title-2-active.xpm, title-2-inactive.xpm, title-3-active.xpm,
title-3-inactive.xpm, title-4-active.xpm, title-4-inactive.xpm:
Change default theme for 4.2
-
+
2003-10-09 15:19 edscott
-
+
* xffm/: glade_intl, src/glade_callbacks.h, src/glade_gui.c.bak,
src/glade_gui.h: remove obsolete files
-
+
2003-10-09 07:04 edscott
-
+
* xffm/src/: Makefile.am, Makefile.in, callbacks.c,
keybindings.c,
keybindings.h, treeview.c, treeview.h: scroll by keyboard is now
@@ -11595,9 +11601,9 @@
proceed
backwards. Backward scroll-search will not wrap. Forward
scroll-sear ch will wrap (as before).
-
+
2003-10-09 04:14 edscott
-
+
* xffm/: glade/xffm_main.glade, libs/apps.c, libs/bookmarks.c,
libs/combo.c, libs/cpy.c, libs/dummies.c, libs/duplicate.c,
libs/entry.c, libs/filter.c, libs/find.h, libs/goto.c,
@@ -11610,9 +11616,9 @@
smb/smb_download.c, smb/smb_list.c, src/glade_main_gui.c,
src/main.c, src/treeview.c, src/widgets.c: eliminate all warnings
when compiling with --enable-debug
-
+
2003-10-09 01:46 edscott
-
+
* xffm/: xffm.glade, xffm.gladep, glade/xffm_find.glade,
glade/xffm_find.gladep, glade/xffm_main.glade,
glade/xffm_main.gladep, glade/xffm_remove.glade,
@@ -11639,22 +11645,22 @@
src/glade_remove_callbacks.h, src/glade_remove_gui.c,
src/glade_remove_gui.h, src/main.c, src/mcs-manager.c,
src/treeview.c, src/widgets.c: broke glade files into three parts
-
+
2003-10-08 23:43 xfce
-
+
* xfwm4/src/: client.c, events.c, settings.c: [no log message]
-
+
2003-10-08 22:29 xfce
-
+
* xfwm4/themes/default.keys/keythemerc: Change raise/lower key
-
+
2003-10-08 22:24 xfce
-
+
* xfwm4/: src/settings.c, themes/default.keys/keythemerc: Fix
raise/lower key shortcut patch
-
+
2003-10-08 22:12 xfce
-
+
* xfwm4/: configure, configure.ac, themes/Makefile.am,
themes/Makefile.in, themes/default/title-2-active.xpm,
themes/default/title-2-inactive.xpm,
@@ -11662,9 +11668,9 @@
themes/default/title-4-inactive.xpm,
themes/default/top-right-active.xpm,
themes/default/top-right-inactive.xpm: Add missing files
-
+
2003-10-08 10:20 huysmans
-
+
* xfdesktop/doc/C/xfdesktop.html, xfdesktop/doc/C/xfdesktop.xml,
xfdesktop/doc/C/images/Makefile.am,
xfdesktop/doc/C/images/Makefile.in,
@@ -11686,22 +11692,22 @@
update:
merge workspaces dialog from xfdesktop with workspace margins
dialog from xfwm4. The new dialog is part of xfwm4.
-
+
2003-10-07 22:44 xfce
-
+
* libxfcegui4/libxfcegui4/: Makefile.am, Makefile.in,
netk-class-group.c, netk-class-group.h, netk-private.h,
netk-screen.c, netk-screen.h, netk-tasklist.c, netk-window.c,
netk-window.h, netk-xutils.c, netk-xutils.h: Backport changes
from
libwnck HEAD cvs
-
+
2003-10-07 22:40 xfce
-
+
* xffm/libs/: input.c, run.c: Include Edscott patches
-
+
2003-10-07 22:31 xfce
-
+
* xfwm4/: configure, configure.ac, src/client.c, src/events.c,
themes/Makefile.am, themes/Makefile.in,
themes/default/bottom-active.xpm,
@@ -11783,7 +11789,7 @@
old 4.0 theme as default-4.0 and add tgc-large theme Include
improvements for fullscreen mode for gst from Arwed von Merkatz
<v.merkatz at gmx.net>
-
+
+++
2003-09-22 20:52 huysmans
@@ -12489,7 +12495,7 @@
* libxfcegui4/trunk/aclocal.m4, libxfcegui4/trunk/configure,
libxfcegui4/trunk/m4/debug.m4: Improved debug.m4:
-
+
1) --disable-debug no longer disables assert()'s
2) --enable-profiling now enables profiling code
3) --disable-asserts allows disabling of assert()'s
@@ -13004,12 +13010,12 @@
libxfcegui4/trunk/libxfcegui4/icons.c,
libxfcegui4/trunk/libxfcegui4/icons.h,
libxfcegui4/trunk/libxfcegui4/libxfcegui4.h: API addition :
-
+
GdkPixbuf *inline_icon_at_size(const guint8 *data, int width, int
height);
-
+
Bug fixes :
-
+
Includes in dialogs.h
2003-01-11 23:03 xfce
@@ -13647,7 +13653,7 @@
of the widgets, knowing that popup buttons and iconify/close
buttons will be added to the lib later)
-2002-10-06 13:12
+2002-10-06 13:12
* libxfcegui4/branches, libxfcegui4/tags, libxfcegui4/trunk: New
repository initialized by cvs2svn.
Modified: libxfcegui4/branches/xfce_4_4/NEWS
===================================================================
--- libxfcegui4/branches/xfce_4_4/NEWS 2007-07-01 15:04:05 UTC (rev 25875)
+++ libxfcegui4/branches/xfce_4_4/NEWS 2007-07-02 08:37:06 UTC (rev 25876)
@@ -3,6 +3,7 @@
- Allocate a copy of passed cliend id, program name and working directory
in session management, in case the application frees the data.
- Properly deal with %-starting 'field codes' in commands from .desktop files
+- Use localtime_r when available.
4.4.1
=====
Modified: libxfcegui4/branches/xfce_4_4/configure.in.in
===================================================================
--- libxfcegui4/branches/xfce_4_4/configure.in.in 2007-07-01 15:04:05 UTC (rev 25875)
+++ libxfcegui4/branches/xfce_4_4/configure.in.in 2007-07-02 08:37:06 UTC (rev 25876)
@@ -80,7 +80,7 @@
dnl ************************************************
AC_STDC_HEADERS()
AC_CHECK_HEADERS([fcntl.h limits.h stdarg.h stddef.h time.h varargs.h])
-AC_CHECK_FUNCS([setsid])
+AC_CHECK_FUNCS([setsid localtime_r])
dnl ******************************
dnl *** Check for i18n support ***
@@ -111,7 +111,7 @@
dnl *** Check for gtk-doc ***
dnl *************************
GTK_DOC_CHECK([1.0])
-
+
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
Modified: libxfcegui4/branches/xfce_4_4/libxfcegui4/xfce_clock.c
===================================================================
--- libxfcegui4/branches/xfce_4_4/libxfcegui4/xfce_clock.c 2007-07-01 15:04:05 UTC (rev 25875)
+++ libxfcegui4/branches/xfce_4_4/libxfcegui4/xfce_clock.c 2007-07-02 08:37:06 UTC (rev 25876)
@@ -386,10 +386,19 @@
{
time_t ticks;
struct tm *tm;
+#ifdef HAVE_LOCALTIME_R
+ struct tm tmbuf;
+#endif
gint h, m, s;
ticks = time (0);
+
+#ifdef HAVE_LOCALTIME_R
+ tm = localtime_r (&ticks, &tmbuf);
+#else
tm = localtime (&ticks);
+#endif
+
h = tm->tm_hour;
m = tm->tm_min;
s = tm->tm_sec;
@@ -742,6 +751,11 @@
gchar buffer[256];
XfceClock *clock;
guint ln = 0;
+ time_t ticks;
+ struct tm *tm;
+#ifdef HAVE_LOCALTIME_R
+ struct tm tmbuf;
+#endif
guint width = 0;
guint height = 0;
PangoLayout *layout = NULL;
@@ -757,10 +771,15 @@
case XFCE_CLOCK_DIGITAL:
if (clock->show_formatted)
{
- time_t ticks = time (0);
- struct tm *tm = localtime (&ticks);
+ ticks = time (0);
- xfce_clock_format_time_to_utf8 (buffer, sizeof(buffer),
+#ifdef HAVE_LOCALTIME_R
+ tm = localtime_r (&ticks, &tmbuf);
+#else
+ tm = localtime (&ticks);
+#endif
+
+ xfce_clock_format_time_to_utf8 (buffer, sizeof(buffer),
clock->format_string, tm);
}
else if (clock->military_time)
@@ -1057,6 +1076,9 @@
XfceClock *clock;
time_t ticks;
struct tm *tm;
+#ifdef HAVE_LOCALTIME_R
+ struct tm tmbuf;
+#endif
gint h, m, s;
gint x, y;
gchar ampm[3] = "AM";
@@ -1070,7 +1092,13 @@
clock = XFCE_CLOCK (widget);
ticks = time (0);
+
+#ifdef HAVE_LOCALTIME_R
+ tm = localtime_r (&ticks, &tmbuf);
+#else
tm = localtime (&ticks);
+#endif
+
h = tm->tm_hour;
m = tm->tm_min;
s = tm->tm_sec;
@@ -1089,7 +1117,7 @@
}
if ((clock->show_formatted) &&
- (clock->format_string != NULL) &&
+ (clock->format_string != NULL) &&
(strlen (clock->format_string) != 0))
{
xfce_clock_format_time_to_utf8 (time_buf, sizeof(time_buf), clock->format_string, tm);
@@ -1213,8 +1241,8 @@
widget->allocation.height);
}
- /*
- * Here we decide arbitrary that if the clock widget is smaller than
+ /*
+ * Here we decide arbitrary that if the clock widget is smaller than
* 20 pixels, we don't draw the shadow.
*/
if (MIN (xc, yc) >= 20)
@@ -1261,6 +1289,9 @@
XfceClock *clock;
time_t ticks;
struct tm *tm;
+#ifdef HAVE_LOCALTIME_R
+ struct tm tmbuf;
+#endif
gint h, m, s;
gint x, y;
guint c_width = 0;
@@ -1276,7 +1307,13 @@
clock = XFCE_CLOCK (widget);
ticks = time (0);
+
+#ifdef HAVE_LOCALTIME_R
+ tm = localtime_r (&ticks, &tmbuf);
+#else
tm = localtime (&ticks);
+#endif
+
h = tm->tm_hour;
m = tm->tm_min;
s = tm->tm_sec;
@@ -1461,13 +1498,22 @@
{
time_t ticks;
struct tm *tm;
+#ifdef HAVE_LOCALTIME_R
+ struct tm tmbuf;
+#endif
gint h, m, s;
g_return_val_if_fail (clock != NULL, FALSE);
g_return_val_if_fail (XFCE_IS_CLOCK (clock), FALSE);
ticks = time (0);
+
+#ifdef HAVE_LOCALTIME_R
+ tm = localtime_r (&ticks, &tmbuf);
+#else
tm = localtime (&ticks);
+#endif
+
h = tm->tm_hour;
m = tm->tm_min;
s = tm->tm_sec;
More information about the Xfce4-commits
mailing list