Mercurial > geeqie.yaz
comparison src/main.c @ 283:e213fb025621
GQVIEW_* -> GQ_*
author | zas_ |
---|---|
date | Tue, 08 Apr 2008 23:16:12 +0000 |
parents | 9995c5fb202a |
children | d1f74154463e |
comparison
equal
deleted
inserted
replaced
282:c2cb12def9d6 | 283:e213fb025621 |
---|---|
200 { | 200 { |
201 printf("Unable to detect an installed browser.\n"); | 201 printf("Unable to detect an installed browser.\n"); |
202 return; | 202 return; |
203 } | 203 } |
204 | 204 |
205 help_browser_command(result, GQVIEW_HTMLDIR "/index.html"); | 205 help_browser_command(result, GQ_HTMLDIR "/index.html"); |
206 | 206 |
207 g_free(result); | 207 g_free(result); |
208 } | 208 } |
209 | 209 |
210 /* | 210 /* |
234 if (key) help_window_set_key(help_window, key); | 234 if (key) help_window_set_key(help_window, key); |
235 return; | 235 return; |
236 } | 236 } |
237 | 237 |
238 help_window = help_window_new(_("Help - Geeqie"), GQ_WMCLASS, "help", | 238 help_window = help_window_new(_("Help - Geeqie"), GQ_WMCLASS, "help", |
239 GQVIEW_HELPDIR "/README", key); | 239 GQ_HELPDIR "/README", key); |
240 g_signal_connect(G_OBJECT(help_window), "destroy", | 240 g_signal_connect(G_OBJECT(help_window), "destroy", |
241 G_CALLBACK(help_window_destroy_cb), NULL); | 241 G_CALLBACK(help_window_destroy_cb), NULL); |
242 } | 242 } |
243 | 243 |
244 | 244 |
625 { | 625 { |
626 RemoteConnection *rc; | 626 RemoteConnection *rc; |
627 gint started = FALSE; | 627 gint started = FALSE; |
628 gchar *buf; | 628 gchar *buf; |
629 | 629 |
630 buf = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/.command", NULL); | 630 buf = g_strconcat(homedir(), "/", GQ_RC_DIR, "/.command", NULL); |
631 rc = remote_client_open(buf); | 631 rc = remote_client_open(buf); |
632 if (!rc) | 632 if (!rc) |
633 { | 633 { |
634 GString *command; | 634 GString *command; |
635 GList *work; | 635 GList *work; |
1070 | 1070 |
1071 static void keys_load(void) | 1071 static void keys_load(void) |
1072 { | 1072 { |
1073 gchar *path; | 1073 gchar *path; |
1074 | 1074 |
1075 path = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/", RC_HISTORY_NAME, NULL); | 1075 path = g_strconcat(homedir(), "/", GQ_RC_DIR, "/", RC_HISTORY_NAME, NULL); |
1076 history_list_load(path); | 1076 history_list_load(path); |
1077 g_free(path); | 1077 g_free(path); |
1078 } | 1078 } |
1079 | 1079 |
1080 static void keys_save(void) | 1080 static void keys_save(void) |
1081 { | 1081 { |
1082 gchar *path; | 1082 gchar *path; |
1083 | 1083 |
1084 path = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/", RC_HISTORY_NAME, NULL); | 1084 path = g_strconcat(homedir(), "/", GQ_RC_DIR, "/", RC_HISTORY_NAME, NULL); |
1085 history_list_save(path); | 1085 history_list_save(path); |
1086 g_free(path); | 1086 g_free(path); |
1087 } | 1087 } |
1088 | 1088 |
1089 static void check_for_home_path(gchar *path) | 1089 static void check_for_home_path(gchar *path) |
1112 static void setup_default_options(void) | 1112 static void setup_default_options(void) |
1113 { | 1113 { |
1114 gchar *path; | 1114 gchar *path; |
1115 gint i; | 1115 gint i; |
1116 | 1116 |
1117 for (i = 0; i < GQVIEW_EDITOR_SLOTS; i++) | 1117 for (i = 0; i < GQ_EDITOR_SLOTS; i++) |
1118 { | 1118 { |
1119 editor_name[i] = NULL; | 1119 editor_name[i] = NULL; |
1120 editor_command[i] = NULL; | 1120 editor_command[i] = NULL; |
1121 } | 1121 } |
1122 | 1122 |
1124 | 1124 |
1125 bookmark_add_default(_("Home"), homedir()); | 1125 bookmark_add_default(_("Home"), homedir()); |
1126 path = concat_dir_and_file(homedir(), "Desktop"); | 1126 path = concat_dir_and_file(homedir(), "Desktop"); |
1127 bookmark_add_default(_("Desktop"), path); | 1127 bookmark_add_default(_("Desktop"), path); |
1128 g_free(path); | 1128 g_free(path); |
1129 path = concat_dir_and_file(homedir(), GQVIEW_RC_DIR_COLLECTIONS); | 1129 path = concat_dir_and_file(homedir(), GQ_RC_DIR_COLLECTIONS); |
1130 bookmark_add_default(_("Collections"), path); | 1130 bookmark_add_default(_("Collections"), path); |
1131 g_free(path); | 1131 g_free(path); |
1132 | 1132 |
1133 g_free(safe_delete_path); | 1133 g_free(safe_delete_path); |
1134 safe_delete_path = concat_dir_and_file(homedir(), GQVIEW_RC_DIR_TRASH); | 1134 safe_delete_path = concat_dir_and_file(homedir(), GQ_RC_DIR_TRASH); |
1135 | 1135 |
1136 for (i = 0; i < COLOR_PROFILE_INPUTS; i++) | 1136 for (i = 0; i < COLOR_PROFILE_INPUTS; i++) |
1137 { | 1137 { |
1138 color_profile_input_file[i] = NULL; | 1138 color_profile_input_file[i] = NULL; |
1139 color_profile_input_name[i] = NULL; | 1139 color_profile_input_name[i] = NULL; |
1186 &color_profile_use_image); | 1186 &color_profile_use_image); |
1187 | 1187 |
1188 save_options(); | 1188 save_options(); |
1189 keys_save(); | 1189 keys_save(); |
1190 | 1190 |
1191 path = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/accels", NULL); | 1191 path = g_strconcat(homedir(), "/", GQ_RC_DIR, "/accels", NULL); |
1192 pathl = path_from_utf8(path); | 1192 pathl = path_from_utf8(path); |
1193 gtk_accel_map_save(pathl); | 1193 gtk_accel_map_save(pathl); |
1194 g_free(pathl); | 1194 g_free(pathl); |
1195 g_free(path); | 1195 g_free(path); |
1196 | 1196 |
1266 gchar *buf; | 1266 gchar *buf; |
1267 gchar *bufl; | 1267 gchar *bufl; |
1268 | 1268 |
1269 /* setup locale, i18n */ | 1269 /* setup locale, i18n */ |
1270 gtk_set_locale(); | 1270 gtk_set_locale(); |
1271 bindtextdomain(PACKAGE, GQVIEW_LOCALEDIR); | 1271 bindtextdomain(PACKAGE, GQ_LOCALEDIR); |
1272 bind_textdomain_codeset(PACKAGE, "UTF-8"); | 1272 bind_textdomain_codeset(PACKAGE, "UTF-8"); |
1273 textdomain(PACKAGE); | 1273 textdomain(PACKAGE); |
1274 | 1274 |
1275 /* setup random seed for random slideshow */ | 1275 /* setup random seed for random slideshow */ |
1276 srand(time(NULL)); | 1276 srand(time(NULL)); |
1300 print_term(msg); | 1300 print_term(msg); |
1301 g_free(msg); | 1301 g_free(msg); |
1302 print_term("!!! Geeqie may quit unexpectedly with a relocation error.\n"); | 1302 print_term("!!! Geeqie may quit unexpectedly with a relocation error.\n"); |
1303 } | 1303 } |
1304 | 1304 |
1305 check_for_home_path(GQVIEW_RC_DIR); | 1305 check_for_home_path(GQ_RC_DIR); |
1306 check_for_home_path(GQVIEW_RC_DIR_COLLECTIONS); | 1306 check_for_home_path(GQ_RC_DIR_COLLECTIONS); |
1307 check_for_home_path(GQVIEW_CACHE_RC_THUMB); | 1307 check_for_home_path(GQ_CACHE_RC_THUMB); |
1308 check_for_home_path(GQVIEW_CACHE_RC_METADATA); | 1308 check_for_home_path(GQ_CACHE_RC_METADATA); |
1309 | 1309 |
1310 keys_load(); | 1310 keys_load(); |
1311 filter_add_defaults(); | 1311 filter_add_defaults(); |
1312 filter_rebuild(); | 1312 filter_rebuild(); |
1313 | 1313 |
1314 buf = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/accels", NULL); | 1314 buf = g_strconcat(homedir(), "/", GQ_RC_DIR, "/accels", NULL); |
1315 bufl = path_from_utf8(buf); | 1315 bufl = path_from_utf8(buf); |
1316 gtk_accel_map_load(bufl); | 1316 gtk_accel_map_load(bufl); |
1317 g_free(bufl); | 1317 g_free(bufl); |
1318 g_free(buf); | 1318 g_free(buf); |
1319 | 1319 |
1439 g_free(path); | 1439 g_free(path); |
1440 | 1440 |
1441 if (startup_full_screen) layout_image_full_screen_start(lw); | 1441 if (startup_full_screen) layout_image_full_screen_start(lw); |
1442 if (startup_in_slideshow) layout_image_slideshow_start(lw); | 1442 if (startup_in_slideshow) layout_image_slideshow_start(lw); |
1443 | 1443 |
1444 buf = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/.command", NULL); | 1444 buf = g_strconcat(homedir(), "/", GQ_RC_DIR, "/.command", NULL); |
1445 remote_connection = remote_server_open(buf); | 1445 remote_connection = remote_server_open(buf); |
1446 remote_server_subscribe(remote_connection, remote_cb, NULL); | 1446 remote_server_subscribe(remote_connection, remote_cb, NULL); |
1447 g_free(buf); | 1447 g_free(buf); |
1448 | 1448 |
1449 gtk_main (); | 1449 gtk_main (); |