support --version, #92796 patch from Christian Neumair

2002-09-24  Havoc Pennington  <hp@redhat.com>

	* src/main.c (main): support --version, #92796 patch from
	Christian Neumair

	* autogen.sh: change gettext test to be happy with
	glib-gettextize, #81425

	* src/menu.c: change mnemonics to match bug #78999

	* src/theme.c (meta_theme_validate): consolidate some
	nearly-identical themes for ease of translation, #70962
This commit is contained in:
Havoc Pennington 2002-09-24 20:43:45 +00:00 committed by Havoc Pennington
parent ee26de98de
commit d027c27ca1
5 changed files with 56 additions and 18 deletions

View File

@ -1,3 +1,16 @@
2002-09-24 Havoc Pennington <hp@redhat.com>
* src/main.c (main): support --version, #92796 patch from
Christian Neumair
* autogen.sh: change gettext test to be happy with
glib-gettextize, #81425
* src/menu.c: change mnemonics to match bug #78999
* src/theme.c (meta_theme_validate): consolidate some
nearly-identical themes for ease of translation, #70962
2002-09-24 Arvind Samptur <arvind.samptur@wipro.com>
* src/menu.c: Replace strings Shade with Roll Up and
Unshade with Unroll.

View File

@ -46,16 +46,28 @@ ACLOCAL=aclocal-1.4
}
}
grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null && {
grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
(gettext --version) < /dev/null > /dev/null 2>&1 || {
if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
GETTEXTIZE=""
else
if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then
GETTEXTIZE="glib-gettextize"
GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.0.tar.gz"
else
GETTEXTIZE="gettextize"
GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
fi
$GETTEXTIZE --version < /dev/null > /dev/null 2>&1
if test $? -ne 0; then
echo
echo "**Error**: You must have \`gettext' installed to compile $PROJECT."
echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
echo "**Error**: You must have \`$GETTEXTIZE' installed to compile $PKG_NAME."
echo "Get $GETTEXTIZE_URL"
echo "(or a newer version if it is available)"
DIE=1
}
}
fi
fi
fi
if test "$DIE" -eq 1; then
exit 1

View File

@ -60,10 +60,21 @@ log_handler (const gchar *log_domain,
static void
usage (void)
{
g_print (_("metacity [--disable-sm] [--sm-save-file=FILENAME] [--display=DISPLAY] [--replace]\n"));
g_print (_("metacity [--disable-sm] [--sm-save-file=FILENAME] [--display=DISPLAY] [--replace] [--version]\n"));
exit (1);
}
static void
version (void)
{
g_print (_("metacity %s\n"
"Copyright (C) 2001-2002 Havoc Pennington, Red Hat, Inc., and others\n"
"This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"),
VERSION);
exit (0);
}
int
main (int argc, char **argv)
{
@ -136,6 +147,8 @@ main (int argc, char **argv)
strcmp (arg, "-h") == 0 ||
strcmp (arg, "-?") == 0)
usage ();
else if (strcmp (arg, "--version") == 0)
version ();
else if (strcmp (arg, "--sm-disable") == 0)
disable_sm = TRUE;
else if (strcmp (arg, "--replace") == 0)

View File

@ -48,12 +48,12 @@ struct _MenuData
static void activate_cb (GtkWidget *menuitem, gpointer data);
static MenuItem menuitems[] = {
{ META_MENU_OP_MINIMIZE, METACITY_STOCK_MINIMIZE, N_("_Minimize") },
{ META_MENU_OP_MINIMIZE, METACITY_STOCK_MINIMIZE, N_("Mi_nimize") },
{ META_MENU_OP_MAXIMIZE, METACITY_STOCK_MAXIMIZE, N_("Ma_ximize") },
{ META_MENU_OP_UNMAXIMIZE, NULL, N_("Unma_ximize") },
{ META_MENU_OP_SHADE, NULL, N_("Roll _Up") },
{ META_MENU_OP_UNSHADE, NULL, N_("_Unroll") },
{ META_MENU_OP_MOVE, NULL, N_("Mo_ve") },
{ META_MENU_OP_MOVE, NULL, N_("_Move") },
{ META_MENU_OP_RESIZE, NULL, N_("_Resize") },
{ 0, NULL, NULL }, /* separator */
{ META_MENU_OP_DELETE, METACITY_STOCK_DELETE, N_("_Close") },

View File

@ -4229,35 +4229,35 @@ meta_theme_validate (MetaTheme *theme,
if (theme->readable_name == NULL)
{
g_set_error (error, META_THEME_ERROR, META_THEME_ERROR_FAILED,
_("No <name> set for theme \"%s\""), theme->name);
_("No <%s> set for theme \"%s\""), "name", theme->name);
return FALSE;
}
if (theme->author == NULL)
{
g_set_error (error, META_THEME_ERROR, META_THEME_ERROR_FAILED,
_("No <author> set for theme \"%s\""), theme->name);
_("No <%s> set for theme \"%s\""), "author", theme->name);
return FALSE;
}
if (theme->date == NULL)
{
g_set_error (error, META_THEME_ERROR, META_THEME_ERROR_FAILED,
_("No <date> set for theme \"%s\""), theme->name);
_("No <%s> set for theme \"%s\""), "date", theme->name);
return FALSE;
}
if (theme->description == NULL)
{
g_set_error (error, META_THEME_ERROR, META_THEME_ERROR_FAILED,
_("No <description> set for theme \"%s\""), theme->name);
_("No <%s> set for theme \"%s\""), "description", theme->name);
return FALSE;
}
if (theme->copyright == NULL)
{
g_set_error (error, META_THEME_ERROR, META_THEME_ERROR_FAILED,
_("No <copyright> set for theme \"%s\""), theme->name);
_("No <%s> set for theme \"%s\""), "copyright", theme->name);
return FALSE;
}