summaryrefslogtreecommitdiff
path: root/gtk/updateiconcache.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-02-01 13:55:08 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-02-01 13:55:08 +0000
commit673f0a86b96eeacfc12ed4e1cd5d87e9a7a54983 (patch)
tree10da0b3a36f49810571362bf4cc5bda6b8f964c4 /gtk/updateiconcache.c
parentc4d19dfa21e36cc51f122bb6c486a381e11701af (diff)
downloadgdk-pixbuf-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.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk/updateiconcache.c b/gtk/updateiconcache.c
index 5231a064b..cdf6afa5b 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 }
};