From 0d0b4d754bd31988e8eed4f3eef0f519b1abf21c Mon Sep 17 00:00:00 2001 From: Laurent Monin Date: Tue, 8 Apr 2008 23:16:12 +0000 Subject: [PATCH] GQVIEW_* -> GQ_* --- configure.in | 6 +++--- src/bar_info.c | 2 +- src/bar_sort.c | 4 ++-- src/cache.c | 18 +++++++++--------- src/cache.h | 14 +++++++------- src/cache_maint.c | 22 +++++++++++----------- src/collect-dlg.c | 2 +- src/collect-io.c | 16 ++++++++-------- src/editors.c | 8 ++++---- src/filelist.c | 12 ++++++------ src/globals.c | 4 ++-- src/main.c | 32 ++++++++++++++++---------------- src/main.h | 8 ++++---- src/menu.c | 2 +- src/pan-util.c | 2 +- src/pixbuf-renderer.c | 8 ++++---- src/preferences.c | 16 ++++++++-------- src/rcfile.c | 8 ++++---- src/search.c | 2 +- src/thumb.c | 4 ++-- src/typedefs.h | 4 ++-- src/utilops.c | 2 +- 22 files changed, 98 insertions(+), 98 deletions(-) diff --git a/configure.in b/configure.in index 87c61b1d..92f164c3 100644 --- a/configure.in +++ b/configure.in @@ -20,8 +20,8 @@ fi AM_PATH_GTK_2_0(2.4.0,,AC_MSG_ERROR(GTK+ >= 2.4.0 not installed.)) -AC_DEFINE_UNQUOTED(GQVIEW_HELPDIR, "$prefix/share/doc/geeqie-$VERSION", [Location of documentation files]) -AC_DEFINE_UNQUOTED(GQVIEW_HTMLDIR, "$prefix/share/doc/geeqie-$VERSION/html", [Location of html documentation]) +AC_DEFINE_UNQUOTED(GQ_HELPDIR, "$prefix/share/doc/geeqie-$VERSION", [Location of documentation files]) +AC_DEFINE_UNQUOTED(GQ_HTMLDIR, "$prefix/share/doc/geeqie-$VERSION/html", [Location of html documentation]) dnl checks for functions AC_CHECK_FUNCS(strverscmp access fsync fflush) @@ -68,7 +68,7 @@ ALL_LINGUAS="ar be bg ca cs da de eo es et eu fi fr hu id it ja ko nl no pl pt_B GETTEXT_PACKAGE=$PACKAGE AC_SUBST(GETTEXT_PACKAGE) AM_GLIB_GNU_GETTEXT -AM_GLIB_DEFINE_LOCALEDIR(GQVIEW_LOCALEDIR) +AM_GLIB_DEFINE_LOCALEDIR(GQ_LOCALEDIR) AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) diff --git a/src/bar_info.c b/src/bar_info.c index 953b2306..31b53411 100644 --- a/src/bar_info.c +++ b/src/bar_info.c @@ -102,7 +102,7 @@ static gint comment_legacy_write(FileData *fd, GList *keywords, const gchar *com if (cache_ensure_dir_exists(comment_dir, mode)) { comment_path = g_strconcat(comment_dir, "/", fd->name, - GQVIEW_CACHE_EXT_METADATA, NULL); + GQ_CACHE_EXT_METADATA, NULL); } g_free(comment_dir); } diff --git a/src/bar_sort.c b/src/bar_sort.c index ea96435d..3b76471e 100644 --- a/src/bar_sort.c +++ b/src/bar_sort.c @@ -95,7 +95,7 @@ static void bar_sort_collection_list_build(GtkWidget *bookmarks) history_list_free_key(SORT_KEY_COLLECTIONS); bookmark_list_set_key(bookmarks, SORT_KEY_COLLECTIONS); - collect_path = g_strconcat(homedir(), "/", GQVIEW_RC_DIR_COLLECTIONS, NULL); + collect_path = g_strconcat(homedir(), "/", GQ_RC_DIR_COLLECTIONS, NULL); path_list(collect_path, &list, NULL); g_free(collect_path); @@ -429,7 +429,7 @@ static void bar_sort_add_ok_cb(FileDialog *fd, gpointer data) ext = ".gqv"; } - path = g_strconcat(homedir(), "/", GQVIEW_RC_DIR_COLLECTIONS, "/", name, ext, NULL); + path = g_strconcat(homedir(), "/", GQ_RC_DIR_COLLECTIONS, "/", name, ext, NULL); if (isfile(path)) { gchar *text = g_strdup_printf(_("The collection:\n%s\nalready exists."), name); diff --git a/src/cache.c b/src/cache.c index 55fd4757..95e77935 100644 --- a/src/cache.c +++ b/src/cache.c @@ -620,19 +620,19 @@ static void cache_path_parts(CacheType type, switch (type) { case CACHE_TYPE_THUMB: - *cache_rc = GQVIEW_CACHE_RC_THUMB; - *cache_local = GQVIEW_CACHE_LOCAL_THUMB; - *cache_ext = GQVIEW_CACHE_EXT_THUMB; + *cache_rc = GQ_CACHE_RC_THUMB; + *cache_local = GQ_CACHE_LOCAL_THUMB; + *cache_ext = GQ_CACHE_EXT_THUMB; break; case CACHE_TYPE_SIM: - *cache_rc = GQVIEW_CACHE_RC_THUMB; - *cache_local = GQVIEW_CACHE_LOCAL_THUMB; - *cache_ext = GQVIEW_CACHE_EXT_SIM; + *cache_rc = GQ_CACHE_RC_THUMB; + *cache_local = GQ_CACHE_LOCAL_THUMB; + *cache_ext = GQ_CACHE_EXT_SIM; break; case CACHE_TYPE_METADATA: - *cache_rc = GQVIEW_CACHE_RC_METADATA; - *cache_local = GQVIEW_CACHE_LOCAL_METADATA; - *cache_ext = GQVIEW_CACHE_EXT_METADATA; + *cache_rc = GQ_CACHE_RC_METADATA; + *cache_local = GQ_CACHE_LOCAL_METADATA; + *cache_ext = GQ_CACHE_EXT_METADATA; break; } } diff --git a/src/cache.h b/src/cache.h index 03af88e4..b755a526 100644 --- a/src/cache.h +++ b/src/cache.h @@ -17,15 +17,15 @@ #include "similar.h" -#define GQVIEW_CACHE_RC_THUMB GQVIEW_RC_DIR"/thumbnails" -#define GQVIEW_CACHE_RC_METADATA GQVIEW_RC_DIR"/metadata" +#define GQ_CACHE_RC_THUMB GQ_RC_DIR"/thumbnails" +#define GQ_CACHE_RC_METADATA GQ_RC_DIR"/metadata" -#define GQVIEW_CACHE_LOCAL_THUMB ".thumbnails" -#define GQVIEW_CACHE_LOCAL_METADATA ".metadata" +#define GQ_CACHE_LOCAL_THUMB ".thumbnails" +#define GQ_CACHE_LOCAL_METADATA ".metadata" -#define GQVIEW_CACHE_EXT_THUMB ".png" -#define GQVIEW_CACHE_EXT_SIM ".sim" -#define GQVIEW_CACHE_EXT_METADATA ".meta" +#define GQ_CACHE_EXT_THUMB ".png" +#define GQ_CACHE_EXT_SIM ".sim" +#define GQ_CACHE_EXT_METADATA ".meta" typedef enum { diff --git a/src/cache_maint.c b/src/cache_maint.c index 946b564e..ae2383eb 100644 --- a/src/cache_maint.c +++ b/src/cache_maint.c @@ -143,11 +143,11 @@ static gint cache_maintain_home_cb(gpointer data) if (cm->metadata) { - cache_folder = GQVIEW_CACHE_RC_METADATA; + cache_folder = GQ_CACHE_RC_METADATA; } else { - cache_folder = GQVIEW_CACHE_RC_THUMB; + cache_folder = GQ_CACHE_RC_THUMB; } base_length = strlen(homedir()) + strlen("/") + strlen(cache_folder); @@ -275,11 +275,11 @@ void cache_maintain_home(gint metadata, gint clear, GtkWidget *parent) if (metadata) { - cache_folder = GQVIEW_CACHE_RC_METADATA; + cache_folder = GQ_CACHE_RC_METADATA; } else { - cache_folder = GQVIEW_CACHE_RC_THUMB; + cache_folder = GQ_CACHE_RC_THUMB; } base = g_strconcat(homedir(), "/", cache_folder, NULL); @@ -358,8 +358,8 @@ gint cache_maintain_home_dir(const gchar *dir, gint recursive, gint clear) if (debug) printf("maintainance check: %s\n", dir); - base_length = strlen(homedir()) + strlen("/") + strlen(GQVIEW_CACHE_RC_THUMB); - base = g_strconcat(homedir(), "/", GQVIEW_CACHE_RC_THUMB, dir, NULL); + base_length = strlen(homedir()) + strlen("/") + strlen(GQ_CACHE_RC_THUMB); + base = g_strconcat(homedir(), "/", GQ_CACHE_RC_THUMB, dir, NULL); if (path_list(base, &flist, &dlist)) { @@ -426,7 +426,7 @@ gint cache_maintain_dir(const gchar *dir, gint recursive, gint clear) gint still_have_a_file = FALSE; GList *work; - cachedir = g_strconcat(dir, "/", GQVIEW_CACHE_LOCAL_THUMB, NULL); + cachedir = g_strconcat(dir, "/", GQ_CACHE_LOCAL_THUMB, NULL); path_list(cachedir, &list, NULL); work = list; @@ -442,8 +442,8 @@ gint cache_maintain_dir(const gchar *dir, gint recursive, gint clear) source = g_strconcat(dir, "/", filename_from_path(path), NULL); if (clear || - extension_truncate(source, GQVIEW_CACHE_EXT_THUMB) || - extension_truncate(source, GQVIEW_CACHE_EXT_SIM)) + extension_truncate(source, GQ_CACHE_EXT_THUMB) || + extension_truncate(source, GQ_CACHE_EXT_SIM)) { if (!clear && isfile(source)) { @@ -1177,7 +1177,7 @@ void cache_manager_show(void) group = pref_group_new(gd->vbox, FALSE, _("Geeqie thumbnail cache"), GTK_ORIENTATION_VERTICAL); - buf = g_strconcat(_("Location:"), " ", homedir(), "/", GQVIEW_CACHE_RC_THUMB, NULL); + buf = g_strconcat(_("Location:"), " ", homedir(), "/", GQ_CACHE_RC_THUMB, NULL); label = pref_label_new(group, buf); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); g_free(buf); @@ -1225,7 +1225,7 @@ void cache_manager_show(void) group = pref_group_new(gd->vbox, FALSE, _("Metadata"), GTK_ORIENTATION_VERTICAL); - buf = g_strconcat(_("Location:"), " ", homedir(), "/", GQVIEW_CACHE_RC_METADATA, NULL); + 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); g_free(buf); diff --git a/src/collect-dlg.c b/src/collect-dlg.c index ce5c7cac..cb30c779 100644 --- a/src/collect-dlg.c +++ b/src/collect-dlg.c @@ -198,7 +198,7 @@ static void collection_save_or_load_dialog(const gchar *path, generic_dialog_add_message(GENERIC_DIALOG(fd), NULL, title, NULL); file_dialog_add_button(fd, stock_id, btntext, btnfunc, TRUE); - base = g_strconcat(homedir(), "/", GQVIEW_RC_DIR_COLLECTIONS, NULL); + base = g_strconcat(homedir(), "/", GQ_RC_DIR_COLLECTIONS, NULL); file_dialog_add_path_widgets(fd, base, path, "collection_load_save", ".gqv", _("Collection Files")); g_free(base); diff --git a/src/collect-io.c b/src/collect-io.c index 1b0862ab..2136c9cd 100644 --- a/src/collect-io.c +++ b/src/collect-io.c @@ -21,10 +21,10 @@ #include "filelist.h" -#define GQVIEW_COLLECTION_MARKER "#Geeqie" +#define GQ_COLLECTION_MARKER "#Geeqie" -#define GQVIEW_COLLECTION_FAIL_MIN 300 -#define GQVIEW_COLLECTION_FAIL_PERCENT 98 +#define GQ_COLLECTION_FAIL_MIN 300 +#define GQ_COLLECTION_FAIL_PERCENT 98 typedef struct _CollectManagerEntry CollectManagerEntry; @@ -94,7 +94,7 @@ static gint collection_load_private(CollectionData *cd, const gchar *path, gint gchar *buf; if (s_buf[0]=='#') { - if (strncasecmp(s_buf, GQVIEW_COLLECTION_MARKER, strlen(GQVIEW_COLLECTION_MARKER)) == 0) + if (strncasecmp(s_buf, GQ_COLLECTION_MARKER, strlen(GQ_COLLECTION_MARKER)) == 0) { /* Looks like an official collection, allow unchecked input. * All this does is allow adding files that may not exist, @@ -127,8 +127,8 @@ static gint collection_load_private(CollectionData *cd, const gchar *path, gint if (!valid && !official) { fail++; - if (fail > GQVIEW_COLLECTION_FAIL_MIN && - fail * 100 / total > GQVIEW_COLLECTION_FAIL_PERCENT) + if (fail > GQ_COLLECTION_FAIL_MIN && + fail * 100 / total > GQ_COLLECTION_FAIL_PERCENT) { printf("Too many invalid filenames in unoffical collection file, closing: %s\n", path); success = FALSE; @@ -310,7 +310,7 @@ static gint collection_save_private(CollectionData *cd, const gchar *path) return FALSE; } - fprintf(f, "%s collection\n", GQVIEW_COLLECTION_MARKER); + fprintf(f, "%s collection\n", GQ_COLLECTION_MARKER); fprintf(f, "#created with Geeqie version %s\n", VERSION); collection_update_geometry(cd); @@ -675,7 +675,7 @@ static void collect_manager_refresh(void) GList *work; gchar *base; - base = g_strconcat(homedir(), "/", GQVIEW_RC_DIR_COLLECTIONS, NULL); + base = g_strconcat(homedir(), "/", GQ_RC_DIR_COLLECTIONS, NULL); path_list(base, &list, NULL); g_free(base); diff --git a/src/editors.c b/src/editors.c index 16c9eefa..54899798 100644 --- a/src/editors.c +++ b/src/editors.c @@ -55,7 +55,7 @@ struct _EditorData { }; -static gchar *editor_slot_defaults[GQVIEW_EDITOR_SLOTS * 2] = { +static gchar *editor_slot_defaults[GQ_EDITOR_SLOTS * 2] = { N_("The Gimp"), "gimp-remote -n %{.cr2;.crw;.nef;.raw;*}f", N_("XV"), "xv %f", N_("Xpaint"), "xpaint %f", @@ -98,7 +98,7 @@ void editor_reset_defaults(void) { gint i; - for (i = 0; i < GQVIEW_EDITOR_SLOTS; i++) + for (i = 0; i < GQ_EDITOR_SLOTS; i++) { g_free(editor_name[i]); editor_name[i] = g_strdup(_(editor_slot_defaults[i * 2])); @@ -784,7 +784,7 @@ gint start_editor_from_filelist_full(gint n, GList *list, EditorCallback cb, gpo gchar *command; gint error; - if (n < 0 || n >= GQVIEW_EDITOR_SLOTS || !list || + if (n < 0 || n >= GQ_EDITOR_SLOTS || !list || !editor_command[n] || strlen(editor_command[n]) == 0) return FALSE; @@ -820,7 +820,7 @@ gint start_editor_from_file(gint n, FileData *fd) gint editor_window_flag_set(gint n) { - if (n < 0 || n >= GQVIEW_EDITOR_SLOTS || + if (n < 0 || n >= GQ_EDITOR_SLOTS || !editor_command[n] || strlen(editor_command[n]) == 0) return TRUE; diff --git a/src/filelist.c b/src/filelist.c index 145e6fd4..45de1862 100644 --- a/src/filelist.c +++ b/src/filelist.c @@ -434,8 +434,8 @@ GList *path_list_filter(GList *list, gint is_dir_list) if ((!show_dot_files && ishidden(base)) || (!is_dir_list && !filter_name_exists(base)) || - (is_dir_list && base[0] == '.' && (strcmp(base, GQVIEW_CACHE_LOCAL_THUMB) == 0 || - strcmp(base, GQVIEW_CACHE_LOCAL_METADATA) == 0)) ) + (is_dir_list && base[0] == '.' && (strcmp(base, GQ_CACHE_LOCAL_THUMB) == 0 || + strcmp(base, GQ_CACHE_LOCAL_METADATA) == 0)) ) { GList *link = work; work = work->next; @@ -1231,8 +1231,8 @@ static gint filelist_read_real(const gchar *path, GList **files, GList **dirs, g /* we ignore the .thumbnails dir for cleanliness */ if ((dirs) && !(name[0] == '.' && (name[1] == '\0' || (name[1] == '.' && name[2] == '\0'))) && - strcmp(name, GQVIEW_CACHE_LOCAL_THUMB) != 0 && - strcmp(name, GQVIEW_CACHE_LOCAL_METADATA) != 0 && + strcmp(name, GQ_CACHE_LOCAL_THUMB) != 0 && + strcmp(name, GQ_CACHE_LOCAL_METADATA) != 0 && strcmp(name, THUMB_FOLDER_LOCAL) != 0) { dlist = g_list_prepend(dlist, file_data_new_local(filepath, &ent_sbuf, FALSE)); @@ -1358,8 +1358,8 @@ GList *filelist_filter(GList *list, gint is_dir_list) if ((!show_dot_files && ishidden(name)) || (!is_dir_list && !filter_name_exists(name)) || - (is_dir_list && name[0] == '.' && (strcmp(name, GQVIEW_CACHE_LOCAL_THUMB) == 0 || - strcmp(name, GQVIEW_CACHE_LOCAL_METADATA) == 0)) ) + (is_dir_list && name[0] == '.' && (strcmp(name, GQ_CACHE_LOCAL_THUMB) == 0 || + strcmp(name, GQ_CACHE_LOCAL_METADATA) == 0)) ) { GList *link = work; work = work->next; diff --git a/src/globals.c b/src/globals.c index c9b2a842..84f07783 100644 --- a/src/globals.c +++ b/src/globals.c @@ -64,8 +64,8 @@ gint thumbnail_spec_standard = TRUE; gint enable_metadata_dirs = FALSE; gint show_dot_files = FALSE; gint file_filter_disable = FALSE; -gchar *editor_name[GQVIEW_EDITOR_SLOTS]; -gchar *editor_command[GQVIEW_EDITOR_SLOTS]; +gchar *editor_name[GQ_EDITOR_SLOTS]; +gchar *editor_command[GQ_EDITOR_SLOTS]; gint thumbnails_enabled = FALSE; SortType file_sort_method = SORT_NAME; diff --git a/src/main.c b/src/main.c index 00b8b696..de291ffd 100644 --- a/src/main.c +++ b/src/main.c @@ -202,7 +202,7 @@ static void help_browser_run(void) return; } - help_browser_command(result, GQVIEW_HTMLDIR "/index.html"); + help_browser_command(result, GQ_HTMLDIR "/index.html"); g_free(result); } @@ -236,7 +236,7 @@ void help_window_show(const gchar *key) } help_window = help_window_new(_("Help - Geeqie"), GQ_WMCLASS, "help", - GQVIEW_HELPDIR "/README", key); + GQ_HELPDIR "/README", key); g_signal_connect(G_OBJECT(help_window), "destroy", G_CALLBACK(help_window_destroy_cb), NULL); } @@ -627,7 +627,7 @@ static void remote_control(const gchar *arg_exec, GList *remote_list, const gcha gint started = FALSE; gchar *buf; - buf = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/.command", NULL); + buf = g_strconcat(homedir(), "/", GQ_RC_DIR, "/.command", NULL); rc = remote_client_open(buf); if (!rc) { @@ -1072,7 +1072,7 @@ static void keys_load(void) { gchar *path; - path = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/", RC_HISTORY_NAME, NULL); + path = g_strconcat(homedir(), "/", GQ_RC_DIR, "/", RC_HISTORY_NAME, NULL); history_list_load(path); g_free(path); } @@ -1081,7 +1081,7 @@ static void keys_save(void) { gchar *path; - path = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/", RC_HISTORY_NAME, NULL); + path = g_strconcat(homedir(), "/", GQ_RC_DIR, "/", RC_HISTORY_NAME, NULL); history_list_save(path); g_free(path); } @@ -1114,7 +1114,7 @@ static void setup_default_options(void) gchar *path; gint i; - for (i = 0; i < GQVIEW_EDITOR_SLOTS; i++) + for (i = 0; i < GQ_EDITOR_SLOTS; i++) { editor_name[i] = NULL; editor_command[i] = NULL; @@ -1126,12 +1126,12 @@ static void setup_default_options(void) path = concat_dir_and_file(homedir(), "Desktop"); bookmark_add_default(_("Desktop"), path); g_free(path); - path = concat_dir_and_file(homedir(), GQVIEW_RC_DIR_COLLECTIONS); + path = concat_dir_and_file(homedir(), GQ_RC_DIR_COLLECTIONS); bookmark_add_default(_("Collections"), path); g_free(path); g_free(safe_delete_path); - safe_delete_path = concat_dir_and_file(homedir(), GQVIEW_RC_DIR_TRASH); + safe_delete_path = concat_dir_and_file(homedir(), GQ_RC_DIR_TRASH); for (i = 0; i < COLOR_PROFILE_INPUTS; i++) { @@ -1188,7 +1188,7 @@ static void exit_program_final(void) save_options(); keys_save(); - path = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/accels", NULL); + path = g_strconcat(homedir(), "/", GQ_RC_DIR, "/accels", NULL); pathl = path_from_utf8(path); gtk_accel_map_save(pathl); g_free(pathl); @@ -1268,7 +1268,7 @@ int main (int argc, char *argv[]) /* setup locale, i18n */ gtk_set_locale(); - bindtextdomain(PACKAGE, GQVIEW_LOCALEDIR); + bindtextdomain(PACKAGE, GQ_LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); textdomain(PACKAGE); @@ -1302,16 +1302,16 @@ int main (int argc, char *argv[]) print_term("!!! Geeqie may quit unexpectedly with a relocation error.\n"); } - check_for_home_path(GQVIEW_RC_DIR); - check_for_home_path(GQVIEW_RC_DIR_COLLECTIONS); - check_for_home_path(GQVIEW_CACHE_RC_THUMB); - check_for_home_path(GQVIEW_CACHE_RC_METADATA); + check_for_home_path(GQ_RC_DIR); + check_for_home_path(GQ_RC_DIR_COLLECTIONS); + check_for_home_path(GQ_CACHE_RC_THUMB); + check_for_home_path(GQ_CACHE_RC_METADATA); keys_load(); filter_add_defaults(); filter_rebuild(); - buf = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/accels", NULL); + buf = g_strconcat(homedir(), "/", GQ_RC_DIR, "/accels", NULL); bufl = path_from_utf8(buf); gtk_accel_map_load(bufl); g_free(bufl); @@ -1441,7 +1441,7 @@ int main (int argc, char *argv[]) if (startup_full_screen) layout_image_full_screen_start(lw); if (startup_in_slideshow) layout_image_slideshow_start(lw); - buf = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/.command", NULL); + buf = g_strconcat(homedir(), "/", GQ_RC_DIR, "/.command", NULL); remote_connection = remote_server_open(buf); remote_server_subscribe(remote_connection, remote_cb, NULL); g_free(buf); diff --git a/src/main.h b/src/main.h index 5717f812..b29c1f3a 100644 --- a/src/main.h +++ b/src/main.h @@ -64,9 +64,9 @@ #define GQ_WMCLASS "geeqie" -#define GQVIEW_RC_DIR ".geeqie" -#define GQVIEW_RC_DIR_COLLECTIONS GQVIEW_RC_DIR"/collections" -#define GQVIEW_RC_DIR_TRASH GQVIEW_RC_DIR"/trash" +#define GQ_RC_DIR ".geeqie" +#define GQ_RC_DIR_COLLECTIONS GQ_RC_DIR"/collections" +#define GQ_RC_DIR_TRASH GQ_RC_DIR"/trash" #define RC_FILE_NAME "geeqierc" @@ -80,7 +80,7 @@ #define MOUSEWHEEL_SCROLL_SIZE 20 -#define GQVIEW_EDITOR_GENERIC_SLOTS 10 +#define GQ_EDITOR_GENERIC_SLOTS 10 #define COLOR_PROFILE_INPUTS 4 diff --git a/src/menu.c b/src/menu.c index f24677e0..04c9eeb6 100644 --- a/src/menu.c +++ b/src/menu.c @@ -65,7 +65,7 @@ gpointer submenu_item_get_data(GtkWidget *menu) static void add_edit_items(GtkWidget *menu, GCallback func, GtkAccelGroup *accel_grp) { gint i; - for (i = 0; i < GQVIEW_EDITOR_SLOTS; i++) + for (i = 0; i < GQ_EDITOR_SLOTS; i++) { if (editor_command[i] && strlen(editor_command[i]) > 0) { diff --git a/src/pan-util.c b/src/pan-util.c index 43c7017c..9ff673bd 100644 --- a/src/pan-util.c +++ b/src/pan-util.c @@ -202,7 +202,7 @@ gint pan_is_ignored(const gchar *s, gint ignore_symlinks) if (S_ISLNK(st.st_mode) && (ignore_symlinks || pan_is_link_loop(s))) return TRUE; n = filename_from_path(s); - if (n && strcmp(n, GQVIEW_RC_DIR) == 0) return TRUE; + if (n && strcmp(n, GQ_RC_DIR) == 0) return TRUE; return FALSE; } diff --git a/src/pixbuf-renderer.c b/src/pixbuf-renderer.c index 30c32f24..34edcdf6 100644 --- a/src/pixbuf-renderer.c +++ b/src/pixbuf-renderer.c @@ -19,13 +19,13 @@ /* comment this out if not using this from within Geeqie - * defining GQVIEW_BUILD does these things: + * defining GQ_BUILD does these things: * - Sets the shift-click scroller pixbuf to a nice icon instead of a black box */ -#define GQVIEW_BUILD 1 +#define GQ_BUILD 1 -#ifdef GQVIEW_BUILD +#ifdef GQ_BUILD #include "pixbuf_util.h" #endif @@ -1201,7 +1201,7 @@ static void pr_scroller_start(PixbufRenderer *pr, gint x, gint y) GdkPixbuf *pixbuf; gint w, h; -#ifdef GQVIEW_BUILD +#ifdef GQ_BUILD pixbuf = pixbuf_inline(PIXBUF_INLINE_SCROLLER); #else pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, 32, 32); diff --git a/src/preferences.c b/src/preferences.c index 9b30170f..dffa79f6 100644 --- a/src/preferences.c +++ b/src/preferences.c @@ -137,8 +137,8 @@ static gint debug_c; static GtkWidget *configwindow = NULL; static GtkWidget *startup_path_entry; static GtkListStore *filter_store = NULL; -static GtkWidget *editor_name_entry[GQVIEW_EDITOR_SLOTS]; -static GtkWidget *editor_command_entry[GQVIEW_EDITOR_SLOTS]; +static GtkWidget *editor_name_entry[GQ_EDITOR_SLOTS]; +static GtkWidget *editor_command_entry[GQ_EDITOR_SLOTS]; static GtkWidget *layout_widget; @@ -213,9 +213,9 @@ static void config_window_apply(void) gint i; gint refresh = FALSE; - for(i = 0; i < GQVIEW_EDITOR_SLOTS; i++) + for(i = 0; i < GQ_EDITOR_SLOTS; i++) { - if (i < GQVIEW_EDITOR_GENERIC_SLOTS) + if (i < GQ_EDITOR_GENERIC_SLOTS) { g_free(editor_name[i]); editor_name[i] = NULL; @@ -768,9 +768,9 @@ static void editor_default_ok_cb(GenericDialog *gd, gpointer data) editor_reset_defaults(); if (!configwindow) return; - for (i = 0; i < GQVIEW_EDITOR_SLOTS; i++) + for (i = 0; i < GQ_EDITOR_SLOTS; i++) { - if (i < GQVIEW_EDITOR_GENERIC_SLOTS) + if (i < GQ_EDITOR_GENERIC_SLOTS) gtk_entry_set_text(GTK_ENTRY(editor_name_entry[i]), (editor_name[i]) ? editor_name[i] : ""); gtk_entry_set_text(GTK_ENTRY(editor_command_entry[i]), @@ -1184,11 +1184,11 @@ static void config_tab_editors(GtkWidget *notebook) label = pref_table_label(table, 2, 0, _("Command Line"), 0.0); pref_label_bold(label, TRUE, FALSE); - for (i = 0; i < GQVIEW_EDITOR_SLOTS; i++) + for (i = 0; i < GQ_EDITOR_SLOTS; i++) { GtkWidget *entry; - if (i < GQVIEW_EDITOR_GENERIC_SLOTS) + if (i < GQ_EDITOR_GENERIC_SLOTS) { gchar *buf; diff --git a/src/rcfile.c b/src/rcfile.c index a5aee85a..3c2d1dd5 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -594,7 +594,7 @@ void save_options(void) gchar *rc_pathl; gint i; - rc_path = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/", RC_FILE_NAME, NULL); + rc_path = g_strconcat(homedir(), "/", GQ_RC_DIR, "/", RC_FILE_NAME, NULL); rc_pathl = path_from_utf8(rc_path); ssi = secure_open(rc_pathl); @@ -763,7 +763,7 @@ void save_options(void) secure_fprintf(ssi, "# Maximum of 10 programs (external_1 through external_10)\n"); secure_fprintf(ssi, "# format: external_n: \"menu name\" \"command line\"\n\n"); - for (i = 0; i < GQVIEW_EDITOR_SLOTS; i++) + for (i = 0; i < GQ_EDITOR_SLOTS; i++) { gchar *qname = escquote_value(editor_name[i]); gchar *qcommand = escquote_value(editor_command[i]); @@ -843,7 +843,7 @@ void load_options(void) for (i = 0; ExifUIList[i].key; i++) ExifUIList[i].current = ExifUIList[i].default_value; - rc_path = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/", RC_FILE_NAME, NULL); + rc_path = g_strconcat(homedir(), "/", GQ_RC_DIR, "/", RC_FILE_NAME, NULL); rc_pathl = path_from_utf8(rc_path); f = fopen(rc_pathl,"r"); @@ -1087,7 +1087,7 @@ void load_options(void) if (strncasecmp(option, "external_", 9) == 0) { i = strtol(option + 9, NULL, 0); - if (i > 0 && i <= GQVIEW_EDITOR_SLOTS) + if (i > 0 && i <= GQ_EDITOR_SLOTS) { const gchar *ptr; i--; diff --git a/src/search.c b/src/search.c index fa2e6afe..587b461b 100644 --- a/src/search.c +++ b/src/search.c @@ -2138,7 +2138,7 @@ static void search_start_cb(GtkWidget *widget, gpointer data) /* search metadata */ g_free(sd->search_path); - sd->search_path = g_strconcat(homedir(), "/", GQVIEW_CACHE_RC_METADATA, NULL); + sd->search_path = g_strconcat(homedir(), "/", GQ_CACHE_RC_METADATA, NULL); search_start(sd); } diff --git a/src/thumb.c b/src/thumb.c index 50450b8f..f4f47471 100644 --- a/src/thumb.c +++ b/src/thumb.c @@ -52,7 +52,7 @@ static gint thumb_loader_save_to_cache(ThumbLoader *tl) gchar *pathl; cache_path = g_strconcat(cache_dir, "/", filename_from_path(tl->path), - GQVIEW_CACHE_EXT_THUMB, NULL); + GQ_CACHE_EXT_THUMB, NULL); if (debug) printf("Saving thumb: %s\n", cache_path); @@ -100,7 +100,7 @@ static gint thumb_loader_mark_failure(ThumbLoader *tl) FILE *f; cache_path = g_strconcat(cache_dir, "/", filename_from_path(tl->path), - GQVIEW_CACHE_EXT_THUMB, NULL); + GQ_CACHE_EXT_THUMB, NULL); if (debug) printf("marking thumb failure: %s\n", cache_path); diff --git a/src/typedefs.h b/src/typedefs.h index a4879873..2c963f5b 100644 --- a/src/typedefs.h +++ b/src/typedefs.h @@ -14,12 +14,12 @@ #define TYPEDEFS_H typedef enum { - CMD_COPY = GQVIEW_EDITOR_GENERIC_SLOTS, + CMD_COPY = GQ_EDITOR_GENERIC_SLOTS, CMD_MOVE, CMD_RENAME, CMD_DELETE, CMD_FOLDER, - GQVIEW_EDITOR_SLOTS + GQ_EDITOR_SLOTS } SpecialEditor; typedef enum { diff --git a/src/utilops.c b/src/utilops.c index dc6a12f0..2fb2047b 100644 --- a/src/utilops.c +++ b/src/utilops.c @@ -3289,7 +3289,7 @@ static GList *file_util_delete_dir_remaining_folders(GList *dlist) if (!fd->name || (strcmp(fd->name, THUMB_FOLDER_GLOBAL) != 0 && strcmp(fd->name, THUMB_FOLDER_LOCAL) != 0 && - strcmp(fd->name, GQVIEW_CACHE_LOCAL_METADATA) != 0) ) + strcmp(fd->name, GQ_CACHE_LOCAL_METADATA) != 0) ) { rlist = g_list_prepend(rlist, fd); } -- 2.20.1