Improve support for PROGNAME_DESKTOP
This commit is contained in:
parent
21c08442ff
commit
0558a7cb68
|
@ -64,14 +64,14 @@
|
|||
|
||||
|
||||
/* constants */
|
||||
#ifndef PROGNAME
|
||||
# define PROGNAME "desktop"
|
||||
#ifndef PROGNAME_DESKTOP
|
||||
# define PROGNAME_DESKTOP "desktop"
|
||||
#endif
|
||||
#ifndef PREFIX
|
||||
# define PREFIX "/usr/local"
|
||||
# define PREFIX "/usr/local"
|
||||
#endif
|
||||
#ifndef DATADIR
|
||||
# define DATADIR PREFIX "/share"
|
||||
# define DATADIR PREFIX "/share"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1438,7 +1438,7 @@ static int _desktop_error(Desktop * desktop, char const * message,
|
|||
|
||||
static int _error_text(char const * message, char const * error, int ret)
|
||||
{
|
||||
fprintf(stderr, "%s: %s%s%s\n", PROGNAME,
|
||||
fprintf(stderr, "%s: %s%s%s\n", PROGNAME_DESKTOP,
|
||||
(message != NULL) ? message : "",
|
||||
(message != NULL) ? ": " : "", error);
|
||||
return ret;
|
||||
|
@ -2443,7 +2443,7 @@ static void _on_preferences_response_apply(gpointer data)
|
|||
{
|
||||
/* FIXME save configuration in _on_preferences_ok() instead */
|
||||
if(config_save(config, p) != 0)
|
||||
error_print(PROGNAME);
|
||||
error_print(PROGNAME_DESKTOP);
|
||||
string_delete(p);
|
||||
}
|
||||
config_delete(config);
|
||||
|
|
|
@ -53,15 +53,15 @@
|
|||
|
||||
|
||||
/* constants */
|
||||
#ifndef PROGNAME
|
||||
# define PROGNAME "desktop"
|
||||
#endif
|
||||
#ifndef PROGNAME_BROWSER
|
||||
# define PROGNAME_BROWSER "browser"
|
||||
#endif
|
||||
#ifndef PROGNAME_DELETE
|
||||
# define PROGNAME_DELETE "delete"
|
||||
#endif
|
||||
#ifndef PROGNAME_DESKTOP
|
||||
# define PROGNAME_DESKTOP "desktop"
|
||||
#endif
|
||||
#ifndef PROGNAME_HTMLAPP
|
||||
# define PROGNAME_HTMLAPP "htmlapp"
|
||||
#endif
|
||||
|
@ -186,7 +186,8 @@ DesktopIcon * desktopicon_new(Desktop * desktop, char const * name,
|
|||
if((p = g_filename_to_utf8(path, -1, NULL, NULL, &error))
|
||||
== NULL)
|
||||
{
|
||||
fprintf(stderr, "%s%s\n", "desktop: ", error->message);
|
||||
fprintf(stderr, "%s: %s\n", PROGNAME_DESKTOP,
|
||||
error->message);
|
||||
name = path;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user