diff options
author | Hans Breuer <hans@breuer.org> | 2003-07-20 15:50:14 +0000 |
---|---|---|
committer | Hans Breuer <hans@src.gnome.org> | 2003-07-20 15:50:14 +0000 |
commit | 364272b5b9464085c6acc87c57fb1ddf8bd5f947 (patch) | |
tree | 4ec9a6a85d8ca5f5734e528d0cc01147bb163295 /gtk/gtkicontheme.c | |
parent | c80e5e66e817417cbef53808ba07ca0575cbe448 (diff) | |
download | gtk+-364272b5b9464085c6acc87c57fb1ddf8bd5f947.tar.gz |
new file to build it all ... added to EXTRA_DIST
2003-07-20 Hans Breuer <hans@breuer.org>
* makefile.msc : new file to build it all
* Makefile.am : ... added to EXTRA_DIST
* gdk/makefile.msc gtk/stock-icons/makefile.msc
gtk/makefile.msc.in tests/makefile.msc : updated
* gdk/gdk.def gtk/gtk.def : export a bunch of new
functions
* gtk/gtkbbox.c : use g_return_val_if_fail() if
there is a value to return
* gtk/gtkfontsel.c gtk/gtkiconfactory.c :
static correctness
* gtk/gtkicontheme.c : ported to use GTimeVal instead of
struct timeval and GTK_DATA_PREFIX instead of GTK_DATADIR
* gtk/gtkicontheme.c : use HAVE_LC_MESSAGES
* gtk/gtkimmulticontext.c : use gtkprivate.h
* gtk/stock-icons/stock_color_picker_25.png
gtk/stock-icons/stock_jump_to_rtl_16.png
gtk/stock-icons/stock_jump_to_rtl_24.png
gtk/stock-icons/stock_redo_rtl_16.png
gtk/stock-icons/stock_redo_rtl_24.png
gtk/stock-icons/stock_undelete_rtl_16.png
gtk/stock-icons/stock_undelete_rtl_24.png
gtk/stock-icons/stock_undo_rtl_16.png :
gtk/stock-icons/stock_undo_rtl_24.png :
readded as binary
Diffstat (limited to 'gtk/gtkicontheme.c')
-rw-r--r-- | gtk/gtkicontheme.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index d1f7aa6987..63adc33f1d 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -17,18 +17,28 @@ * Boston, MA 02111-1307, USA. */ -#include <sys/time.h> +#include "config.h" + #include <sys/types.h> #include <sys/stat.h> +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif #include <string.h> #include <stdlib.h> #include <glib.h> +#ifdef G_OS_WIN32 +#ifndef S_ISDIR +#define S_ISDIR(mode) ((mode)&_S_IFDIR) +#endif +#endif /* G_OS_WIN32 */ + #include "gtkicontheme.h" #include "gtkiconthemeparser.h" #include "gtkintl.h" #include "gtksettings.h" +#include "gtkprivate.h" #define DEFAULT_THEME_NAME "hicolor" @@ -514,8 +524,8 @@ gtk_icon_theme_init (GtkIconTheme *icon_theme) priv->search_path[0] = g_build_filename (g_get_home_dir (), ".icons", NULL); - priv->search_path[1] = g_strdup (GTK_DATADIR "/pixmaps"); - priv->search_path[2] = g_strdup (GTK_DATADIR "/icons"); + priv->search_path[1] = g_build_filename (GTK_DATA_PREFIX, "pixmaps", NULL); + priv->search_path[2] = g_build_filename (GTK_DATA_PREFIX, "icons", NULL); priv->search_path[3] = g_strdup ("/usr/share/icons"); priv->search_path[4] = g_strdup ("/usr/share/pixmaps"); priv->search_path_len = 5; @@ -920,7 +930,7 @@ load_themes (GtkIconTheme *icon_theme) char *abs_file; UnthemedIcon *unthemed_icon; IconSuffix old_suffix, new_suffix; - struct timeval tv; + GTimeVal tv; priv = icon_theme->priv; @@ -1008,7 +1018,7 @@ load_themes (GtkIconTheme *icon_theme) priv->themes_valid = TRUE; - gettimeofday(&tv, NULL); + g_get_current_time(&tv); priv->last_stat_time = tv.tv_sec; } @@ -1016,11 +1026,11 @@ static void ensure_valid_themes (GtkIconTheme *icon_theme) { GtkIconThemePrivate *priv = icon_theme->priv; - struct timeval tv; + GTimeVal tv; if (priv->themes_valid) { - gettimeofday(&tv, NULL); + g_get_current_time(&tv); if (ABS (tv.tv_sec - priv->last_stat_time) > 5) gtk_icon_theme_rescan_if_needed (icon_theme); @@ -1367,7 +1377,7 @@ gtk_icon_theme_rescan_if_needed (GtkIconTheme *icon_theme) GList *d; int stat_res; struct stat stat_buf; - struct timeval tv; + GTimeVal tv; g_return_val_if_fail (GTK_IS_ICON_THEME (icon_theme), FALSE); @@ -1393,7 +1403,7 @@ gtk_icon_theme_rescan_if_needed (GtkIconTheme *icon_theme) return TRUE; } - gettimeofday (&tv, NULL); + g_get_current_time (&tv); priv->last_stat_time = tv.tv_sec; return FALSE; |