preprent "tint2:" to all logging messages

This commit is contained in:
o9000
2017-09-01 18:23:46 +02:00
parent b7691afb8d
commit eb93af3622
30 changed files with 231 additions and 232 deletions

View File

@@ -119,7 +119,7 @@ void get_action(char *event, MouseAction *action)
else if (strcmp(event, "prev_task") == 0)
*action = PREV_TASK;
else
fprintf(stderr, "Error: unrecognized action '%s'. Please fix your config file.\n", event);
fprintf(stderr, "tint2: Error: unrecognized action '%s'. Please fix your config file.\n", event);
}
int get_task_status(char *status)
@@ -215,7 +215,7 @@ void load_launcher_app_dir(const char *path)
Separator *get_or_create_last_separator()
{
if (!panel_config.separator_list) {
fprintf(stderr, "Warning: separator items should shart with 'separator = new'\n");
fprintf(stderr, "tint2: Warning: separator items should shart with 'separator = new'\n");
panel_config.separator_list = g_list_append(panel_config.separator_list, create_separator());
}
return (Separator *)g_list_last(panel_config.separator_list)->data;
@@ -224,7 +224,7 @@ Separator *get_or_create_last_separator()
Execp *get_or_create_last_execp()
{
if (!panel_config.execp_list) {
fprintf(stderr, "Warning: execp items should start with 'execp = new'\n");
fprintf(stderr, "tint2: Warning: execp items should start with 'execp = new'\n");
panel_config.execp_list = g_list_append(panel_config.execp_list, create_execp());
}
return (Execp *)g_list_last(panel_config.execp_list)->data;
@@ -233,7 +233,7 @@ Execp *get_or_create_last_execp()
Button *get_or_create_last_button()
{
if (!panel_config.button_list) {
fprintf(stderr, "Warning: button items should start with 'button = new'\n");
fprintf(stderr, "tint2: Warning: button items should start with 'button = new'\n");
panel_config.button_list = g_list_append(panel_config.button_list, create_button());
}
return (Button *)g_list_last(panel_config.button_list)->data;
@@ -433,7 +433,7 @@ void add_entry(char *key, char *value)
#ifdef ENABLE_BATTERY
battery_enabled = 1;
#else
fprintf(stderr, "tint2 is build without battery support\n");
fprintf(stderr, "tint2: tint2 has been compiled without battery support\n");
#endif
}
if (panel_items_order[j] == 'S') {
@@ -654,7 +654,7 @@ void add_entry(char *key, char *value)
else if (g_str_equal(value, "dots"))
separator->style = SEPARATOR_DOTS;
else
fprintf(stderr, RED "Invalid separator_style value: %s" RESET "\n", value);
fprintf(stderr, RED "tint2: Invalid separator_style value: %s" RESET "\n", value);
} else if (strcmp(key, "separator_size") == 0) {
Separator *separator = get_or_create_last_separator();
separator->thickness = atoi(value);
@@ -681,7 +681,7 @@ void add_entry(char *key, char *value)
execp->backend->interval = 0;
int v = atoi(value);
if (v < 0) {
fprintf(stderr, "execp_interval must be an integer >= 0\n");
fprintf(stderr, "tint2: execp_interval must be an integer >= 0\n");
} else {
execp->backend->interval = v;
}
@@ -737,7 +737,7 @@ void add_entry(char *key, char *value)
Execp *execp = get_or_create_last_execp();
int v = atoi(value);
if (v < 0) {
fprintf(stderr, "execp_icon_w must be an integer >= 0\n");
fprintf(stderr, "tint2: execp_icon_w must be an integer >= 0\n");
} else {
execp->backend->icon_w = v;
}
@@ -745,7 +745,7 @@ void add_entry(char *key, char *value)
Execp *execp = get_or_create_last_execp();
int v = atoi(value);
if (v < 0) {
fprintf(stderr, "execp_icon_h must be an integer >= 0\n");
fprintf(stderr, "tint2: execp_icon_h must be an integer >= 0\n");
} else {
execp->backend->icon_h = v;
}
@@ -1290,7 +1290,7 @@ void add_entry(char *key, char *value)
else if (strcmp(key, "primary_monitor_first") == 0) {
fprintf(stderr,
"tint2: deprecated config option \"%s\"\n"
" Please see the documentation regarding the alternatives.\n",
" Please see the documentation regarding the alternatives.\n",
key);
} else
fprintf(stderr, "tint2: invalid option \"%s\",\n upgrade tint2 or correct your config file\n", key);
@@ -1305,7 +1305,7 @@ void add_entry(char *key, char *value)
gboolean config_read_file(const char *path)
{
fprintf(stderr, "Loading config file: %s\n", path);
fprintf(stderr, "tint2: Loading config file: %s\n", path);
FILE *fp = fopen(path, "r");
if (!fp)
@@ -1375,7 +1375,7 @@ gboolean config_read_default_path()
// copy tint2rc from system directory to user directory
fprintf(stderr, "tint2 warning: could not find a config file! Creating a default one.\n");
fprintf(stderr, "tint2: could not find a config file! Creating a default one.\n");
// According to the XDG Base Directory Specification
// (https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html)
// if the user's config directory does not exist, we should create it with permissions set to 0700.