Mercurial > geeqie.yaz
comparison src/main.c @ 714:0f177c151368
Use g_build_filename() where applicable.
author | zas_ |
---|---|
date | Wed, 21 May 2008 00:20:13 +0000 |
parents | e07895754e65 |
children | a1dcef8cd1ae |
comparison
equal
deleted
inserted
replaced
713:e291995a7dc2 | 714:0f177c151368 |
---|---|
513 | 513 |
514 static void keys_load(void) | 514 static void keys_load(void) |
515 { | 515 { |
516 gchar *path; | 516 gchar *path; |
517 | 517 |
518 path = g_strconcat(homedir(), "/", GQ_RC_DIR, "/", RC_HISTORY_NAME, NULL); | 518 path = g_build_filename(homedir(), GQ_RC_DIR, RC_HISTORY_NAME, NULL); |
519 history_list_load(path); | 519 history_list_load(path); |
520 g_free(path); | 520 g_free(path); |
521 } | 521 } |
522 | 522 |
523 static void keys_save(void) | 523 static void keys_save(void) |
524 { | 524 { |
525 gchar *path; | 525 gchar *path; |
526 | 526 |
527 path = g_strconcat(homedir(), "/", GQ_RC_DIR, "/", RC_HISTORY_NAME, NULL); | 527 path = g_build_filename(homedir(), GQ_RC_DIR, RC_HISTORY_NAME, NULL); |
528 history_list_save(path); | 528 history_list_save(path); |
529 g_free(path); | 529 g_free(path); |
530 } | 530 } |
531 | 531 |
532 static void check_for_home_path(gchar *path) | 532 static void check_for_home_path(gchar *path) |
533 { | 533 { |
534 gchar *buf; | 534 gchar *buf; |
535 | 535 |
536 buf = g_strconcat(homedir(), "/", path, NULL); | 536 buf = g_build_filename(homedir(), path, NULL); |
537 if (!isdir(buf)) | 537 if (!isdir(buf)) |
538 { | 538 { |
539 log_printf(_("Creating %s dir:%s\n"), GQ_APPNAME, buf); | 539 log_printf(_("Creating %s dir:%s\n"), GQ_APPNAME, buf); |
540 | 540 |
541 if (!mkdir_utf8(buf, 0755)) | 541 if (!mkdir_utf8(buf, 0755)) |
631 } | 631 } |
632 | 632 |
633 save_options(); | 633 save_options(); |
634 keys_save(); | 634 keys_save(); |
635 | 635 |
636 path = g_strconcat(homedir(), "/", GQ_RC_DIR, "/accels", NULL); | 636 path = g_build_filename(homedir(), GQ_RC_DIR, "accels", NULL); |
637 pathl = path_from_utf8(path); | 637 pathl = path_from_utf8(path); |
638 gtk_accel_map_save(pathl); | 638 gtk_accel_map_save(pathl); |
639 g_free(pathl); | 639 g_free(pathl); |
640 g_free(path); | 640 g_free(path); |
641 | 641 |
762 | 762 |
763 keys_load(); | 763 keys_load(); |
764 filter_add_defaults(); | 764 filter_add_defaults(); |
765 filter_rebuild(); | 765 filter_rebuild(); |
766 | 766 |
767 buf = g_strconcat(homedir(), "/", GQ_RC_DIR, "/accels", NULL); | 767 buf = g_build_filename(homedir(), GQ_RC_DIR, "accels", NULL); |
768 bufl = path_from_utf8(buf); | 768 bufl = path_from_utf8(buf); |
769 gtk_accel_map_load(bufl); | 769 gtk_accel_map_load(bufl); |
770 g_free(bufl); | 770 g_free(bufl); |
771 g_free(buf); | 771 g_free(buf); |
772 | 772 |
891 g_free(path); | 891 g_free(path); |
892 | 892 |
893 if (startup_full_screen) layout_image_full_screen_start(lw); | 893 if (startup_full_screen) layout_image_full_screen_start(lw); |
894 if (startup_in_slideshow) layout_image_slideshow_start(lw); | 894 if (startup_in_slideshow) layout_image_slideshow_start(lw); |
895 | 895 |
896 buf = g_strconcat(homedir(), "/", GQ_RC_DIR, "/.command", NULL); | 896 buf = g_build_filename(homedir(), GQ_RC_DIR, ".command", NULL); |
897 remote_connection = remote_server_init(buf, cd); | 897 remote_connection = remote_server_init(buf, cd); |
898 g_free(buf); | 898 g_free(buf); |
899 | 899 |
900 gtk_main(); | 900 gtk_main(); |
901 return 0; | 901 return 0; |