From c6bd6b0ee75d77f6f4d6d3987a185639a008c02c Mon Sep 17 00:00:00 2001 From: Laurent Monin Date: Wed, 9 Apr 2008 13:53:01 +0000 Subject: [PATCH] Replace occurences of Geeqie / geeqie by constants defined in main.h. --- src/bar_info.c | 2 +- src/cache_maint.c | 11 +++++++---- src/collect-io.c | 4 ++-- src/collect.c | 2 +- src/dupe.c | 6 +++++- src/editors.c | 2 +- src/fullscreen.c | 6 +++++- src/img-view.c | 4 ++-- src/info.c | 6 +++++- src/layout.c | 24 +++++++++++++--------- src/layout_image.c | 2 +- src/main.c | 43 +++++++++++++++++++++++++++++----------- src/main.h | 11 ++++++++--- src/pan-view.c | 7 ++++++- src/pixbuf_util.c | 2 +- src/preferences.c | 19 +++++++++++++----- src/print.c | 14 ++++++++++--- src/rcfile.c | 12 +++++------ src/search.c | 6 +++++- src/thumb_standard.c | 2 +- src/utilops.c | 47 +++++++++++++++++++++++++++----------------- 21 files changed, 158 insertions(+), 74 deletions(-) diff --git a/src/bar_info.c b/src/bar_info.c index 31b53411..dd526eb8 100644 --- a/src/bar_info.c +++ b/src/bar_info.c @@ -56,7 +56,7 @@ static gint comment_file_write(gchar *path, GList *keywords, const gchar *commen f = fopen(path, "w"); if (!f) return FALSE; - fprintf(f, "#Geeqie comment (%s)\n\n", VERSION); + fprintf(f, "#%s comment (%s)\n\n", GQ_APPNAME, VERSION); fprintf(f, "[keywords]\n"); while (keywords) diff --git a/src/cache_maint.c b/src/cache_maint.c index ae2383eb..ace59a98 100644 --- a/src/cache_maint.c +++ b/src/cache_maint.c @@ -344,7 +344,7 @@ void cache_maintain_home(gint metadata, gint clear, GtkWidget *parent) cm->idle_id = g_idle_add(cache_maintain_home_cb, cm); } -/* This checks all files in ~/.geeqie/thumbnails and +/* This checks all files in ~/GQ_RC_DIR/thumbnails and * removes them if thay have no source counterpart. * (this assumes all cache files have an extension of 4 chars including '.') */ @@ -1152,6 +1152,7 @@ void cache_manager_show(void) GtkWidget *table; GtkSizeGroup *sizegroup; gchar *buf; + gchar *title; if (cache_manager) { @@ -1161,10 +1162,12 @@ void cache_manager_show(void) cache_manager = g_new0(CacheManager, 1); - cache_manager->dialog = generic_dialog_new(_("Cache Maintenance - Geeqie"), + title = g_strdup_printf("%s - %s", _("Cache Maintenance"), GQ_APPNAME); + cache_manager->dialog = generic_dialog_new(title, GQ_WMCLASS, "cache_manager", NULL, FALSE, NULL, cache_manager); + g_free(title); gd = cache_manager->dialog; gd->cancel_cb = cache_manager_close_cb; @@ -1175,7 +1178,7 @@ void cache_manager_show(void) sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - group = pref_group_new(gd->vbox, FALSE, _("Geeqie thumbnail cache"), GTK_ORIENTATION_VERTICAL); + group = pref_group_new(gd->vbox, FALSE, _("Thumbnail cache"), GTK_ORIENTATION_VERTICAL); buf = g_strconcat(_("Location:"), " ", homedir(), "/", GQ_CACHE_RC_THUMB, NULL); label = pref_label_new(group, buf); @@ -1224,7 +1227,7 @@ void cache_manager_show(void) pref_table_label(table, 1, 1, _("Render thumbnails for a specific folder."), 0.0); group = pref_group_new(gd->vbox, FALSE, _("Metadata"), GTK_ORIENTATION_VERTICAL); - + buf = g_strconcat(_("Location:"), " ", homedir(), "/", GQ_CACHE_RC_METADATA, NULL); label = pref_label_new(group, buf); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); diff --git a/src/collect-io.c b/src/collect-io.c index 2136c9cd..6243e145 100644 --- a/src/collect-io.c +++ b/src/collect-io.c @@ -21,7 +21,7 @@ #include "filelist.h" -#define GQ_COLLECTION_MARKER "#Geeqie" +#define GQ_COLLECTION_MARKER "#" GQ_APPNAME #define GQ_COLLECTION_FAIL_MIN 300 #define GQ_COLLECTION_FAIL_PERCENT 98 @@ -311,7 +311,7 @@ static gint collection_save_private(CollectionData *cd, const gchar *path) } fprintf(f, "%s collection\n", GQ_COLLECTION_MARKER); - fprintf(f, "#created with Geeqie version %s\n", VERSION); + fprintf(f, "#created with %s version %s\n", GQ_APPNAME, VERSION); collection_update_geometry(cd); if (cd->window_read) diff --git a/src/collect.c b/src/collect.c index deaee713..9f9c0bf9 100644 --- a/src/collect.c +++ b/src/collect.c @@ -970,7 +970,7 @@ static void collection_window_update_title(CollectWindow *cw) if (!cw) return; - buf = g_strdup_printf(_("%s - Geeqie Collection"), cw->cd->name); + buf = g_strdup_printf(_("%s - Collection - %s"), cw->cd->name, GQ_APPNAME); gtk_window_set_title(GTK_WINDOW(cw->window), buf); g_free(buf); } diff --git a/src/dupe.c b/src/dupe.c index 4dc64b3e..3a6aad84 100644 --- a/src/dupe.c +++ b/src/dupe.c @@ -3116,7 +3116,11 @@ DupeWindow *dupe_window_new(DupeMatchType match_mask) gtk_window_set_default_size(GTK_WINDOW(dw->window), DUPE_DEF_WIDTH, DUPE_DEF_HEIGHT); gtk_window_set_resizable(GTK_WINDOW(dw->window), TRUE); - gtk_window_set_title(GTK_WINDOW(dw->window), _("Find duplicates - Geeqie")); + { + gchar *title = g_strdup_printf("%s - %s", _("Find duplicates"), GQ_APPNAME); + gtk_window_set_title(GTK_WINDOW(dw->window), title); + g_free(title); + } gtk_window_set_wmclass(GTK_WINDOW(dw->window), "dupe", GQ_WMCLASS); gtk_container_set_border_width (GTK_CONTAINER (dw->window), 0); diff --git a/src/editors.c b/src/editors.c index 54899798..191dddba 100644 --- a/src/editors.c +++ b/src/editors.c @@ -244,7 +244,7 @@ static gboolean editor_verbose_io_cb(GIOChannel *source, GIOCondition condition, } else { - editor_verbose_window_fill(ed->vd, "Geeqie: Error converting text to valid utf8\n", -1); + editor_verbose_window_fill(ed->vd, "Error converting text to valid utf8\n", -1); } } else diff --git a/src/fullscreen.c b/src/fullscreen.c index 1cbd6af6..53c1c713 100644 --- a/src/fullscreen.c +++ b/src/fullscreen.c @@ -264,7 +264,11 @@ FullScreenData *fullscreen_start(GtkWidget *window, ImageWindow *imd, g_signal_connect(G_OBJECT(fs->window), "delete_event", G_CALLBACK(fullscreen_delete_cb), fs); - gtk_window_set_title(GTK_WINDOW(fs->window), _("Geeqie full screen")); + { + gchar *title = g_strdup_printf("%s - %s", _("Full screen"), GQ_APPNAME); + gtk_window_set_title(GTK_WINDOW(fs->window), title); + g_free(title); + } geometry.min_width = w; geometry.min_height = h; diff --git a/src/img-view.c b/src/img-view.c index f4f69ca5..69c8660b 100644 --- a/src/img-view.c +++ b/src/img-view.c @@ -851,7 +851,7 @@ static ViewWindow *real_view_window_new(FileData *fd, GList *list, CollectionDat gtk_window_set_geometry_hints(GTK_WINDOW(vw->window), NULL, &geometry, GDK_HINT_MIN_SIZE); gtk_window_set_resizable(GTK_WINDOW(vw->window), TRUE); - gtk_window_set_title (GTK_WINDOW(vw->window), "Geeqie"); + gtk_window_set_title (GTK_WINDOW(vw->window), GQ_APPNAME); gtk_window_set_wmclass(GTK_WINDOW(vw->window), "view", GQ_WMCLASS); gtk_container_set_border_width(GTK_CONTAINER(vw->window), 0); @@ -861,7 +861,7 @@ static ViewWindow *real_view_window_new(FileData *fd, GList *list, CollectionDat image_background_set_color(vw->imd, user_specified_window_background ? &window_background_color : NULL); - image_attach_window(vw->imd, vw->window, NULL, "Geeqie", TRUE); + image_attach_window(vw->imd, vw->window, NULL, GQ_APPNAME, TRUE); image_auto_refresh(vw->imd, 0); image_top_window_set_sync(vw->imd, TRUE); diff --git a/src/info.c b/src/info.c index 025d0587..dfb61c65 100644 --- a/src/info.c +++ b/src/info.c @@ -780,7 +780,11 @@ void info_window_new(FileData *fd, GList *list) window_set_icon(id->window, NULL, NULL); gtk_window_set_resizable(GTK_WINDOW(id->window), TRUE); - gtk_window_set_title(GTK_WINDOW(id->window), _("Image properties - Geeqie")); + { + gchar *title = g_strdup_printf("%s - %s", _("Image properties"), GQ_APPNAME); + gtk_window_set_title(GTK_WINDOW(id->window), title); + g_free(title); + } gtk_window_set_wmclass(GTK_WINDOW(id->window), "properties", GQ_WMCLASS); geometry.min_width = 32; diff --git a/src/layout.c b/src/layout.c index 4a233a88..3a519f82 100644 --- a/src/layout.c +++ b/src/layout.c @@ -373,6 +373,14 @@ static gchar *layout_color_name_parse(const gchar *name) static void layout_color_button_press_cb(GtkWidget *widget, gpointer data) { +#ifndef HAVE_LCMS + gchar *msg = g_strdup_printf(_("This installation of %s was not built with support for color profiles."), GQ_APPNAME); + file_util_warning_dialog(_("Color profiles not supported"), + msg, + GTK_STOCK_DIALOG_INFO, widget); + g_free(msg); + return; +#else LayoutWindow *lw = data; GtkWidget *menu; GtkWidget *item; @@ -385,13 +393,6 @@ static void layout_color_button_press_cb(GtkWidget *widget, gpointer data) gint use_image = 0; gint i; -#ifndef HAVE_LCMS - file_util_warning_dialog(_("Color profiles not supported"), - _("This installation of Geeqie was not built with support for color profiles."), - GTK_STOCK_DIALOG_INFO, widget); - return; -#endif - if (!layout_image_color_profile_get(lw, &input, &screen, &use_image)) return; menu = popup_menu_short_lived(); @@ -454,6 +455,7 @@ static void layout_color_button_press_cb(GtkWidget *widget, gpointer data) gtk_widget_set_sensitive(item, active && color_profile_screen_file); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); +#endif /* HAVE_LCMS */ } static GtkWidget *layout_color_button(LayoutWindow *lw) @@ -1338,7 +1340,11 @@ static void layout_tools_setup(LayoutWindow *lw, GtkWidget *tools, GtkWidget *fi gtk_window_set_resizable(GTK_WINDOW(lw->tools), TRUE); - gtk_window_set_title(GTK_WINDOW(lw->tools), _("Geeqie Tools")); + { + gchar *title = g_strdup_printf("%s - %s", _("Tools"), GQ_APPNAME); + gtk_window_set_title(GTK_WINDOW(lw->tools), title); + g_free(title); + } gtk_window_set_wmclass(GTK_WINDOW(lw->tools), "tools", GQ_WMCLASS); gtk_container_set_border_width(GTK_CONTAINER(lw->tools), 0); @@ -1927,7 +1933,7 @@ LayoutWindow *layout_new_with_geometry(const gchar *path, gint popped, gint hidd lw->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_resizable(GTK_WINDOW(lw->window), TRUE); - gtk_window_set_title(GTK_WINDOW(lw->window), "Geeqie"); + gtk_window_set_title(GTK_WINDOW(lw->window), GQ_APPNAME); gtk_window_set_wmclass(GTK_WINDOW(lw->window), GQ_WMCLASS, GQ_WMCLASS); gtk_container_set_border_width(GTK_CONTAINER(lw->window), 0); diff --git a/src/layout_image.c b/src/layout_image.c index 5106c3c0..49218dad 100644 --- a/src/layout_image.c +++ b/src/layout_image.c @@ -1742,7 +1742,7 @@ void layout_image_activate(LayoutWindow *lw, gint i) layout_image_set_buttons(lw); image_set_drag_func(lw->image, layout_image_drag_cb, lw); - image_attach_window(lw->image, lw->window, NULL, "Geeqie", FALSE); + image_attach_window(lw->image, lw->window, NULL, GQ_APPNAME, FALSE); /* do not hilight selected image in SPLIT_NONE */ /* maybe the image should be selected always and hilight should be controled by diff --git a/src/main.c b/src/main.c index de291ffd..c4f5b80e 100644 --- a/src/main.c +++ b/src/main.c @@ -235,8 +235,12 @@ void help_window_show(const gchar *key) return; } - help_window = help_window_new(_("Help - Geeqie"), GQ_WMCLASS, "help", + { + gchar *title = g_strdup_printf("%s - %s", _("Help"), GQ_APPNAME); + help_window = help_window_new(title, GQ_WMCLASS, "help", GQ_HELPDIR "/README", key); + g_free(title); + } g_signal_connect(G_OBJECT(help_window), "destroy", G_CALLBACK(help_window_destroy_cb), NULL); } @@ -636,7 +640,12 @@ static void remote_control(const gchar *arg_exec, GList *remote_list, const gcha gint retry_count = 12; gint blank = FALSE; - print_term(_("Remote Geeqie not running, starting...")); + { + gchar *msg = g_strdup_printf(_("Remote %s not running, starting..."), GQ_APPNAME); + print_term(msg); + g_free(msg); + } + command = g_string_new(arg_exec); work = remote_list; @@ -978,7 +987,7 @@ static void parse_command_line(int argc, char *argv[], gchar **path, gchar **fil else if (strcmp(cmd_line, "-v") == 0 || strcmp(cmd_line, "--version") == 0) { - printf("Geeqie %s\n", VERSION); + printf("%s %s\n", GQ_APPNAME, VERSION); exit (0); } else if (strcmp(cmd_line, "--alternate") == 0) @@ -990,8 +999,10 @@ static void parse_command_line(int argc, char *argv[], gchar **path, gchar **fil else if (strcmp(cmd_line, "-h") == 0 || strcmp(cmd_line, "--help") == 0) { - printf("Geeqie %s\n", VERSION); - print_term(_("Usage: gqview [options] [path]\n\n")); + gchar *usage = g_strdup_printf(_("Usage: %s [options] [path]\n\n"), GQ_APPNAME_LC); + printf("%s %s\n", GQ_APPNAME, VERSION); + print_term(usage); + g_free(usage); print_term(_("valid options are:\n")); print_term(_(" +t, --with-tools force show of tools\n")); print_term(_(" -t, --without-tools force hide of tools\n")); @@ -1095,7 +1106,7 @@ static void check_for_home_path(gchar *path) { gchar *tmp; - tmp = g_strdup_printf(_("Creating Geeqie dir:%s\n"), buf); + tmp = g_strdup_printf(_("Creating %s dir:%s\n"), GQ_APPNAME, buf); print_term(tmp); g_free(tmp); @@ -1216,6 +1227,7 @@ static gint exit_confirm_dlg(void) { GtkWidget *parent; LayoutWindow *lw; + gchar *msg; if (exit_dialog) { @@ -1232,11 +1244,15 @@ static gint exit_confirm_dlg(void) parent = lw->window; } - exit_dialog = generic_dialog_new(_("Geeqie - exit"), + msg = g_strdup_printf("%s - %s", GQ_APPNAME, _("exit")); + exit_dialog = generic_dialog_new(msg, GQ_WMCLASS, "exit", parent, FALSE, exit_confirm_cancel_cb, NULL); + g_free(msg); + msg = g_strdup_printf(_("Quit %s"), GQ_APPNAME); generic_dialog_add_message(exit_dialog, GTK_STOCK_DIALOG_QUESTION, - _("Quit Geeqie"), _("Collections have been modified. Quit anyway?")); + msg, _("Collections have been modified. Quit anyway?")); + g_free(msg); generic_dialog_add_button(exit_dialog, GTK_STOCK_QUIT, NULL, exit_confirm_exit_cb, TRUE); gtk_widget_show(exit_dialog->dialog); @@ -1276,7 +1292,7 @@ int main (int argc, char *argv[]) srand(time(NULL)); #if 1 - printf("geeqie %s, This is an alpha release.\n", VERSION); + printf("%s %s, This is an alpha release.\n", GQ_APPNAME, VERSION); #endif layout_order = g_strdup("123"); @@ -1291,15 +1307,20 @@ int main (int argc, char *argv[]) (gtk_major_version == GTK_MAJOR_VERSION && gtk_minor_version < GTK_MINOR_VERSION) ) { gchar *msg; + print_term("!!! This is a friendly warning.\n"); - print_term("!!! The version of GTK+ in use now is older than when Geeqie was compiled.\n"); + msg = g_strdup_printf("!!! The version of GTK+ in use now is older than when %s was compiled.\n", GQ_APPNAME); + print_term(msg); + g_free(msg); msg = g_strdup_printf("!!! compiled with GTK+-%d.%d\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION); print_term(msg); g_free(msg); msg = g_strdup_printf("!!! running with GTK+-%d.%d\n", gtk_major_version, gtk_minor_version); print_term(msg); g_free(msg); - print_term("!!! Geeqie may quit unexpectedly with a relocation error.\n"); + msg = g_strdup_printf("!!! %s may quit unexpectedly with a relocation error.\n", GQ_APPNAME); + print_term(msg); + g_free(msg); } check_for_home_path(GQ_RC_DIR); diff --git a/src/main.h b/src/main.h index b29c1f3a..1511822d 100644 --- a/src/main.h +++ b/src/main.h @@ -62,13 +62,18 @@ *---------------------------------------------------------------------------- */ -#define GQ_WMCLASS "geeqie" +#define GQ_APPNAME "Geeqie" +#define GQ_APPNAME_LC "geeqie" +#define GQ_WEBSITE "geeqie.sourceforge.net" +#define GQ_EMAIL_ADDRESS "geeqie-devel@lists.sourceforge.net" -#define GQ_RC_DIR ".geeqie" +#define GQ_WMCLASS GQ_APPNAME_LC + +#define GQ_RC_DIR "." GQ_APPNAME_LC #define GQ_RC_DIR_COLLECTIONS GQ_RC_DIR"/collections" #define GQ_RC_DIR_TRASH GQ_RC_DIR"/trash" -#define RC_FILE_NAME "geeqierc" +#define RC_FILE_NAME GQ_APPNAME_LC "rc" #define ZOOM_RESET_ORIGINAL 0 #define ZOOM_RESET_FIT_WINDOW 1 diff --git a/src/pan-view.c b/src/pan-view.c index 8cf2a2fd..be1f3a6a 100644 --- a/src/pan-view.c +++ b/src/pan-view.c @@ -2361,7 +2361,12 @@ static void pan_window_new_real(const gchar *path) gtk_window_set_geometry_hints(GTK_WINDOW(pw->window), NULL, &geometry, GDK_HINT_MIN_SIZE); gtk_window_set_resizable(GTK_WINDOW(pw->window), TRUE); - gtk_window_set_title (GTK_WINDOW(pw->window), _("Pan View - Geeqie")); + + { + gchar *title = g_strdup_printf("%s - %s", _("Pan View"), GQ_APPNAME); + gtk_window_set_title(GTK_WINDOW(pw->window), title); + g_free(title); + } gtk_window_set_wmclass(GTK_WINDOW(pw->window), "view", GQ_WMCLASS); gtk_container_set_border_width(GTK_CONTAINER(pw->window), 0); diff --git a/src/pixbuf_util.c b/src/pixbuf_util.c index 2d3fbe00..ea3b9148 100644 --- a/src/pixbuf_util.c +++ b/src/pixbuf_util.c @@ -32,7 +32,7 @@ gboolean pixbuf_to_file_as_png (GdkPixbuf *pixbuf, const char *filename) if (!pixbuf || !filename) return FALSE; ret = gdk_pixbuf_save(pixbuf, filename, "png", &error, - "tEXt::Software", "Geeqie "VERSION, NULL); + "tEXt::Software", GQ_APPNAME " " VERSION, NULL); if (error) { diff --git a/src/preferences.c b/src/preferences.c index dffa79f6..95e1004a 100644 --- a/src/preferences.c +++ b/src/preferences.c @@ -1514,7 +1514,11 @@ static void config_window_create(void) G_CALLBACK(config_window_delete), NULL); gtk_window_set_default_size(GTK_WINDOW(configwindow), CONFIG_WINDOW_DEF_WIDTH, CONFIG_WINDOW_DEF_HEIGHT); gtk_window_set_resizable(GTK_WINDOW(configwindow), TRUE); - gtk_window_set_title(GTK_WINDOW(configwindow), _("Geeqie Preferences")); + { + gchar *title = g_strdup_printf("%s - %s", _("Preferences"), GQ_APPNAME); + gtk_window_set_title(GTK_WINDOW(configwindow), title); + g_free(title); + } gtk_window_set_wmclass(GTK_WINDOW(configwindow), "config", GQ_WMCLASS); gtk_container_set_border_width(GTK_CONTAINER(configwindow), PREF_PAD_BORDER); @@ -1641,7 +1645,11 @@ void show_about_window(void) g_signal_connect(G_OBJECT(about), "delete_event", G_CALLBACK(about_delete_cb), NULL); - gtk_window_set_title(GTK_WINDOW(about), _("About - Geeqie")); + { + gchar *title = g_strdup_printf("%s - %s", _("About"), GQ_APPNAME); + gtk_window_set_title(GTK_WINDOW(about), title); + g_free(title); + } gtk_container_set_border_width(GTK_CONTAINER(about), PREF_PAD_BORDER); vbox = gtk_vbox_new(FALSE, PREF_PAD_SPACE); @@ -1654,11 +1662,12 @@ void show_about_window(void) gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, TRUE, 0); gtk_widget_show(button); - buf = g_strdup_printf(_("Geeqie %s\n\nCopyright (c) %s John Ellis\nwebsite: %s\nemail: %s\n\nReleased under the GNU General Public License"), + buf = g_strdup_printf(_("%s %s\n\nCopyright (c) %s John Ellis\nwebsite: %s\nemail: %s\n\nReleased under the GNU General Public License"), + GQ_APPNAME, VERSION, "2006", - "geeqie.sourceforge.net", - "geeqie-devel@lists.sourceforge.net"); + GQ_WEBSITE, + GQ_EMAIL_ADDRESS); label = gtk_label_new(buf); g_free(buf); diff --git a/src/print.c b/src/print.c index be7015cc..fde85762 100644 --- a/src/print.c +++ b/src/print.c @@ -1097,7 +1097,7 @@ static gint print_job_ps_init(PrintWindow *pw) /* comments, etc. */ fprintf(f, "%%!PS-Adobe-3.0\n"); - fprintf(f, "%%%%Creator: Geeqie Version %s\n", VERSION); + fprintf(f, "%%%%Creator: %s Version %s\n", GQ_APPNAME, VERSION); fprintf(f, "%%%%CreationDate: \n"); fprintf(f, "%%%%LanguageLevel 2\n"); fprintf(f, "%%%%DocumentMedia: \n"); @@ -2611,9 +2611,13 @@ static gint print_job_start(PrintWindow *pw, RenderFormat format, PrintOutput ou gtk_widget_hide(pw->dialog->dialog); - pw->job_dialog = file_util_gen_dlg(_("Print - Geeqie"), GQ_WMCLASS, "print_job_dialog", + { + gchar *title = g_strdup_printf("%s - %s", _("Print"), GQ_APPNAME); + pw->job_dialog = file_util_gen_dlg(title, GQ_WMCLASS, "print_job_dialog", (GtkWidget *)gtk_window_get_transient_for(GTK_WINDOW(pw->dialog->dialog)), FALSE, print_job_cancel_cb, pw); + g_free(title); + } msg = g_strdup_printf(_("Printing %d pages to %s."), print_layout_page_count(pw), print_output_name(pw->output)); generic_dialog_add_message(pw->job_dialog, NULL, msg, NULL); @@ -3367,9 +3371,13 @@ void print_window_new(FileData *fd, GList *selection, GList *list, GtkWidget *pa pw->save_settings = print_pref_int(PRINT_PREF_SAVE, TRUE); - pw->dialog = file_util_gen_dlg(_("Print - Geeqie"), GQ_WMCLASS, "print_dialog", + { + gchar *title = g_strdup_printf("%s - %s", _("Print"), GQ_APPNAME); + pw->dialog = file_util_gen_dlg(title, GQ_WMCLASS, "print_dialog", parent, FALSE, print_window_cancel_cb, pw); + g_free(title); + } geometry.min_width = 32; geometry.min_height = 32; diff --git a/src/rcfile.c b/src/rcfile.c index 3c2d1dd5..578b0182 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -30,8 +30,8 @@ /* If ssi->secure_save is TRUE: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * - * A call to secure_open("/home/me/.geeqie/filename", mask) will open a file - * named "filename.tmp_XXXXXX" in /home/me/.geeqie/ and return a pointer to a + * A call to secure_open("/home/me/.confdir/filename", mask) will open a file + * named "filename.tmp_XXXXXX" in /home/me/.confdir/ and return a pointer to a * structure SecureSaveInfo on success or NULL on error. * * filename.tmp_XXXXXX can't conflict with any file since it's created using @@ -612,7 +612,7 @@ void save_options(void) } secure_fprintf(ssi, "######################################################################\n"); - secure_fprintf(ssi, "# Geeqie config file version %7s #\n", VERSION); + secure_fprintf(ssi, "# %30s config file version %7s #\n", GQ_APPNAME, VERSION); secure_fprintf(ssi, "######################################################################\n"); secure_fputc(ssi, '\n'); @@ -736,8 +736,8 @@ void save_options(void) secure_fprintf(ssi, "\n##### Color Profiles #####\n\n"); #ifndef HAVE_LCMS - secure_fprintf(ssi, "# NOTICE: Geeqie was not built with support for color profiles,\n" - "# color profile options will have no effect.\n\n"); + secure_fprintf(ssi, "# NOTICE: %s was not built with support for color profiles,\n" + "# color profile options will have no effect.\n\n", GQ_APPNAME); #endif write_bool_option(ssi, "color_profile_enabled", color_profile_enabled); @@ -802,7 +802,7 @@ void save_options(void) secure_fputc(ssi, '\n'); secure_fprintf(ssi, "######################################################################\n"); - secure_fprintf(ssi, "# end of Geeqie config file #\n"); + secure_fprintf(ssi, "# end of config file #\n"); secure_fprintf(ssi, "######################################################################\n"); diff --git a/src/search.c b/src/search.c index 587b461b..d455ebb7 100644 --- a/src/search.c +++ b/src/search.c @@ -2556,7 +2556,11 @@ void search_new(const gchar *path, const gchar *example_file) window_set_icon(sd->window, NULL, NULL); gtk_window_set_resizable(GTK_WINDOW(sd->window), TRUE); - gtk_window_set_title(GTK_WINDOW(sd->window), _("Image search - Geeqie")); + { + gchar *title = g_strdup_printf("%s - %s", _("Image search"), GQ_APPNAME); + gtk_window_set_title(GTK_WINDOW(sd->window), title); + g_free(title); + } gtk_window_set_wmclass(GTK_WINDOW(sd->window), "search", GQ_WMCLASS); geometry.min_width = 32; diff --git a/src/thumb_standard.c b/src/thumb_standard.c index 985e1623..bd9df197 100644 --- a/src/thumb_standard.c +++ b/src/thumb_standard.c @@ -353,7 +353,7 @@ static void thumb_loader_std_save(ThumbLoaderStd *tl, GdkPixbuf *pixbuf) mark_uri = (tl->cache_local) ? tl->local_uri :tl->thumb_uri; - mark_app = g_strdup_printf("Geeqie %s", VERSION); + mark_app = g_strdup_printf("%s %s", GQ_APPNAME, VERSION); mark_mtime = g_strdup_printf("%lu", tl->source_mtime); pathl = path_from_utf8(tmp_path); diff --git a/src/utilops.c b/src/utilops.c index 2fb2047b..9983b9af 100644 --- a/src/utilops.c +++ b/src/utilops.c @@ -1145,7 +1145,7 @@ static void real_file_util_move(FileData *source_fd, GList *source_list, FileData *fd = NULL; gint multiple; const gchar *text; - const gchar *title; + gchar *title; const gchar *op_text; const gchar *stock_id; @@ -1170,7 +1170,7 @@ static void real_file_util_move(FileData *source_fd, GList *source_list, if (copy) { - title = _("Copy - Geeqie"); + title = g_strdup_printf("%s -%s", _("Copy"), GQ_APPNAME); op_text = _("_Copy"); if (fd) { @@ -1184,7 +1184,7 @@ static void real_file_util_move(FileData *source_fd, GList *source_list, } else { - title = _("Move - Geeqie"); + title = g_strdup_printf("%s -%s", _("Move"), GQ_APPNAME); op_text = _("_Move"); if (fd) { @@ -1199,6 +1199,7 @@ static void real_file_util_move(FileData *source_fd, GList *source_list, fdlg = file_util_file_dlg(title, GQ_WMCLASS, "dlg_copymove", parent, file_util_move_cancel_cb, NULL); + g_free(title); generic_dialog_add_message(GENERIC_DIALOG(fdlg), NULL, text, NULL); if (fd) @@ -1757,11 +1758,12 @@ static void file_util_delete_multiple(GList *source_list, GtkWidget *parent) GtkWidget *label; ImageWindow *imd; gchar *buf; + gchar *title = g_strdup_printf("%s -%s", _("Delete files"), GQ_APPNAME); - gd = file_util_gen_dlg(_("Delete files - Geeqie"), - GQ_WMCLASS, "dlg_confirm", parent, TRUE, - file_util_delete_multiple_cancel_cb, source_list); - + gd = file_util_gen_dlg(title, GQ_WMCLASS, "dlg_confirm", parent, TRUE, + file_util_delete_multiple_cancel_cb, source_list); + g_free(title); + generic_dialog_add_message(gd, NULL, _("Delete multiple files"), NULL); generic_dialog_add_image(gd, NULL, NULL, NULL, NULL, NULL, TRUE); @@ -1853,10 +1855,11 @@ static void file_util_delete_single(FileData *fd, GtkWidget *parent) GenericDialog *gd; GtkWidget *table; gchar *base; + gchar *title = g_strdup_printf("%s -%s", _("Delete file"), GQ_APPNAME); - gd = file_util_gen_dlg(_("Delete file - Geeqie"), GQ_WMCLASS, "dlg_confirm", - parent, TRUE, - file_util_delete_cancel_cb, file_data_ref(fd)); + gd = file_util_gen_dlg(title, GQ_WMCLASS, "dlg_confirm", parent, TRUE, + file_util_delete_cancel_cb, file_data_ref(fd)); + g_free(title); generic_dialog_add_message(gd, NULL, _("Delete file?"), NULL); @@ -2537,12 +2540,14 @@ static void file_util_rename_multiple_do(GList *source_list, GtkWidget *parent) GtkWidget *combo; GList *work; const gchar *name; + gchar *title; rd = g_new0(RenameDataMult, 1); - - rd->fdlg = file_util_file_dlg(_("Rename - Geeqie"), - GQ_WMCLASS, "dlg_rename", parent, - file_util_rename_multiple_close_cb, rd); + + title = g_strdup_printf("%s -%s", _("Rename"), GQ_APPNAME); + rd->fdlg = file_util_file_dlg(title, GQ_WMCLASS, "dlg_rename", parent, + file_util_rename_multiple_close_cb, rd); + g_free(title); generic_dialog_add_message(GENERIC_DIALOG(rd->fdlg), NULL, _("Rename multiple files"), NULL); file_dialog_add_button(rd->fdlg, GTK_STOCK_OK, _("_Rename"), file_util_rename_multiple_cb, TRUE); @@ -2796,9 +2801,12 @@ static void file_util_rename_single_do(FileData *source_fd, GtkWidget *parent) FileDialog *fdlg; GtkWidget *table; const gchar *name; + gchar *title; - fdlg = file_util_file_dlg(_("Rename - Geeqie"), GQ_WMCLASS, "dlg_rename", parent, - file_util_rename_single_close_cb, NULL); + title = g_strdup_printf("%s -%s", _("Rename"), GQ_APPNAME); + fdlg = file_util_file_dlg(title, GQ_WMCLASS, "dlg_rename", parent, + file_util_rename_single_close_cb, NULL); + g_free(title); generic_dialog_add_message(GENERIC_DIALOG(fdlg), NULL, _("Rename file"), NULL); generic_dialog_add_image(GENERIC_DIALOG(fdlg), NULL, source_fd, NULL, NULL, NULL, FALSE); @@ -2916,11 +2924,14 @@ void file_util_create_dir(const gchar *path, GtkWidget *parent) { FileDialog *fdlg; gchar *text; + gchar *title; if (!isdir(path)) return; - fdlg = file_util_file_dlg(_("New folder - Geeqie"), GQ_WMCLASS, "dlg_newdir", parent, - file_util_create_dir_close_cb, NULL); + title = g_strdup_printf("%s -%s", _("New folder"), GQ_APPNAME); + fdlg = file_util_file_dlg(title, GQ_WMCLASS, "dlg_newdir", parent, + file_util_create_dir_close_cb, NULL); + g_free(title); text = g_strdup_printf(_("Create folder in:\n%s\nnamed:"), path); generic_dialog_add_message(GENERIC_DIALOG(fdlg), NULL, NULL, text); -- 2.20.1