diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-02-01 13:55:08 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-02-01 13:55:08 +0000 |
commit | 673f0a86b96eeacfc12ed4e1cd5d87e9a7a54983 (patch) | |
tree | 10da0b3a36f49810571362bf4cc5bda6b8f964c4 /gtk/updateiconcache.c | |
parent | c4d19dfa21e36cc51f122bb6c486a381e11701af (diff) | |
download | gtk+-673f0a86b96eeacfc12ed4e1cd5d87e9a7a54983.tar.gz |
Add a --quiet option.
2005-02-01 Matthias Clasen <mclasen@redhat.com>
* gtk/updateiconcache.c (main): Add a --quiet option.
Diffstat (limited to 'gtk/updateiconcache.c')
-rw-r--r-- | gtk/updateiconcache.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk/updateiconcache.c b/gtk/updateiconcache.c index 5231a064b6..cdf6afa5bc 100644 --- a/gtk/updateiconcache.c +++ b/gtk/updateiconcache.c @@ -29,6 +29,9 @@ #include <glib.h> #include <glib/gstdio.h> +static gboolean force_update = FALSE; +static gboolean quiet = FALSE; + #define CACHE_NAME "icon-theme.cache" #define HAS_SUFFIX_XPM (1 << 0) @@ -606,13 +609,13 @@ build_cache (const gchar *path) utime_buf.modtime = cache_stat.st_mtime; utime (path, &utime_buf); - g_printerr ("Cache file created successfully.\n"); + if (!quiet) + g_printerr ("Cache file created successfully.\n"); } -static gboolean force_update = FALSE; - static GOptionEntry args[] = { - { "force", 0, 0, G_OPTION_ARG_NONE, &force_update, "Overwrite an existing cache, even if uptodate", NULL }, + { "force", 'f', 0, G_OPTION_ARG_NONE, &force_update, "Overwrite an existing cache, even if uptodate", NULL }, + { "quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet, "Turn off verbose output", NULL }, { NULL } }; |