forked from AuroraMiddleware/gtk
Add a --quiet option.
2005-02-01 Matthias Clasen <mclasen@redhat.com> * gtk/updateiconcache.c (main): Add a --quiet option.
This commit is contained in:
parent
c4d19dfa21
commit
673f0a86b9
@ -1,3 +1,7 @@
|
||||
2005-02-01 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/updateiconcache.c (main): Add a --quiet option.
|
||||
|
||||
2005-02-01 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkkeys-win32.c (handle_special, set_shift_vks,
|
||||
|
@ -1,3 +1,7 @@
|
||||
2005-02-01 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/updateiconcache.c (main): Add a --quiet option.
|
||||
|
||||
2005-02-01 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkkeys-win32.c (handle_special, set_shift_vks,
|
||||
|
@ -1,3 +1,7 @@
|
||||
2005-02-01 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/updateiconcache.c (main): Add a --quiet option.
|
||||
|
||||
2005-02-01 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gdk/win32/gdkkeys-win32.c (handle_special, set_shift_vks,
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-02-01 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtk-update-icon-cache.xml:
|
||||
* gtk/gtk-update-icon-cache.1: Document the --quiet option.
|
||||
|
||||
2005-01-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtksocket.sgml:
|
||||
|
@ -24,7 +24,7 @@ gtk-update-icon-cache \- Icon theme caching utility
|
||||
.ad l
|
||||
.hy 0
|
||||
.HP 22
|
||||
\fBgtk\-update\-icon\-cache\fR [\-\-force] {iconpath}
|
||||
\fBgtk\-update\-icon\-cache\fR [\-\-force] [\-\-quiet] {iconpath}
|
||||
.ad
|
||||
.hy
|
||||
|
||||
@ -39,8 +39,15 @@ If expects to be given the path to a icon theme directory, e\&.g\&. \fI/usr/shar
|
||||
.PP
|
||||
GTK+ can use the cache files created by \fBgtk\-update\-icon\-cache\fR to avoid a lot of system call and disk seek overhead when the application starts\&. Since the format of the cache files allows them to be mmap()ed shared between multiple applications, the overall memory consumption is reduced as well\&.
|
||||
|
||||
.PP
|
||||
If called with the \-\-force argument, \fBgtk\-update\-icon\-cache\fR will overwrite an existing cache file even if it appears to be uptodate\&.
|
||||
.SH "OPTIONS"
|
||||
|
||||
.TP
|
||||
\-\-force, \-f
|
||||
Overwrite an existing cache file even if it appears to be uptodate\&.
|
||||
|
||||
.TP
|
||||
\-\-quiet, \-q
|
||||
Turn off verbose output\&.
|
||||
|
||||
.SH "BUGS"
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
<cmdsynopsis>
|
||||
<command>gtk-update-icon-cache</command>
|
||||
<arg choice="opt">--force</arg>
|
||||
<arg choice="opt">--quiet</arg>
|
||||
<arg choice="req">iconpath</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
@ -35,11 +36,23 @@ to avoid a lot of system call and disk seek overhead when the application starts
|
||||
Since the format of the cache files allows them to be mmap()ed shared between
|
||||
multiple applications, the overall memory consumption is reduced as well.
|
||||
</para>
|
||||
<para>
|
||||
If called with the --force argument,
|
||||
<command>gtk-update-icon-cache</command> will overwrite an existing cache
|
||||
file even if it appears to be uptodate.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>--force</term>
|
||||
<term>-f</term>
|
||||
<listitem><para>Overwrite an existing cache file even if it appears to be uptodate.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>--quiet</term>
|
||||
<term>-q</term>
|
||||
<listitem><para>Turn off verbose output.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Bugs</title>
|
||||
|
@ -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 }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user