gnome-games r8580 - trunk/libgames-support
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8580 - trunk/libgames-support
- Date: Sun, 18 Jan 2009 14:21:21 +0000 (UTC)
Author: chpe
Date: Sun Jan 18 14:21:21 2009
New Revision: 8580
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8580&view=rev
Log:
Use G_OPTION_ARG_FILENAME for the args that really are filenames.
Use g_printerr().
Modified:
trunk/libgames-support/render-cards.c
Modified: trunk/libgames-support/render-cards.c
==============================================================================
--- trunk/libgames-support/render-cards.c (original)
+++ trunk/libgames-support/render-cards.c Sun Jan 18 14:21:21 2009
@@ -54,9 +54,9 @@
const GOptionEntry options[] = {
{ "theme", 't', 0, G_OPTION_ARG_STRING, &theme_name,
"Select the theme to render", "NAME" },
- { "theme-directory", 'd', 0, G_OPTION_ARG_STRING, &theme_dir,
+ { "theme-directory", 'd', 0, G_OPTION_ARG_FILENAME, &theme_dir,
"The directory where the scalable card themes are installed", "DIR" },
- { "output-directory", 'o', 0, G_OPTION_ARG_STRING, &outpath,
+ { "output-directory", 'o', 0, G_OPTION_ARG_FILENAME, &outpath,
"Select the output root directoy", "DIR" },
{ "antialias", 'a', 0, G_OPTION_ARG_STRING, &antialias,
"Enable antialiasing", NULL },
@@ -72,7 +72,7 @@
if (!gtk_init_with_args
(&argc, &argv, NULL, (GOptionEntry *) options, NULL, &err)) {
- g_print ("Error parsing arguments: %s\n", err->message);
+ g_printerr ("Error parsing arguments: %s\n", err->message);
g_error_free (err);
goto loser;
}
@@ -89,7 +89,7 @@
} else if (g_ascii_strcasecmp (subpixel_order, "vbgr") == 0) {
subpixels = CAIRO_SUBPIXEL_ORDER_VBGR;
} else {
- g_print
+ g_printerr
("Unknown subpixel order '%s' specified. Valid orders are none, rgb, bgr, vrgb, vbgr.\n",
subpixel_order);
goto loser;
@@ -106,7 +106,7 @@
} else if (g_ascii_strcasecmp (antialias, "subpixel") == 0) {
antialias_mode = CAIRO_ANTIALIAS_SUBPIXEL;
} else {
- g_print
+ g_printerr
("Unknown antialias mode '%s' specified. Valid modes are default, none, grey and subpixel.\n",
antialias);
goto loser;
@@ -115,17 +115,17 @@
}
if (!outpath) {
- g_print ("No output directory specified.\n");
+ g_printerr ("No output directory specified.\n");
goto loser;
}
if (!theme_name) {
- g_print ("No card theme specified.\n");
+ g_printerr ("No card theme specified.\n");
goto loser;
}
if (!args) {
- g_print ("No output size(s) specified.\n");
+ g_printerr ("No output size(s) specified.\n");
goto loser;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]