Mercurial > pidgin.yaz
comparison pidgin/gtkmain.c @ 19512:c88e64f1ed76
Move purple_prefs_load() to purple_prefs_init() - there's been a TODO for this for a long time. I have no idea why this wasn't done sooner; it seems to work just fine and fixes some bugs where stuff isn't loaded before being used. Fixes #1848 (and I'm sure others). Yell at me if this breaks anything.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 28 Aug 2007 03:59:44 +0000 |
parents | f8bea3e688b0 |
children | 57d350900136 fe51c6de1a7f 7f8cf35fc99b |
comparison
equal
deleted
inserted
replaced
19508:f0c3497e2ea6 | 19512:c88e64f1ed76 |
---|---|
766 | 766 |
767 /* TODO: Move blist loading into purple_blist_init() */ | 767 /* TODO: Move blist loading into purple_blist_init() */ |
768 purple_set_blist(purple_blist_new()); | 768 purple_set_blist(purple_blist_new()); |
769 purple_blist_load(); | 769 purple_blist_load(); |
770 | 770 |
771 /* TODO: Move prefs loading into purple_prefs_init() */ | |
772 purple_prefs_load(); | |
773 purple_prefs_update_old(); | |
774 pidgin_prefs_update_old(); | |
775 | |
776 /* load plugins we had when we quit */ | 771 /* load plugins we had when we quit */ |
777 purple_plugins_load_saved(PIDGIN_PREFS_ROOT "/plugins/loaded"); | 772 purple_plugins_load_saved(PIDGIN_PREFS_ROOT "/plugins/loaded"); |
778 | 773 |
779 /* TODO: Move pounces loading into purple_pounces_init() */ | 774 /* TODO: Move pounces loading into purple_pounces_init() */ |
780 purple_pounces_load(); | 775 purple_pounces_load(); |
781 | |
782 /* Call this early on to try to auto-detect our IP address and | |
783 * hopefully save some time later. | |
784 * TODO: move this (back) into purple_core_init() when purple_prefs_load() is in purple_prefs_init() */ | |
785 purple_network_get_my_ip(-1); | |
786 | 776 |
787 /* HACK BY SEANEGAN: | 777 /* HACK BY SEANEGAN: |
788 * We've renamed prpl-oscar to prpl-aim and prpl-icq, accordingly. | 778 * We've renamed prpl-oscar to prpl-aim and prpl-icq, accordingly. |
789 * Let's do that change right here... after everything's loaded, but | 779 * Let's do that change right here... after everything's loaded, but |
790 * before anything has happened | 780 * before anything has happened |
835 dologin_named(opt_login_arg); | 825 dologin_named(opt_login_arg); |
836 if (opt_login_arg != NULL) { | 826 if (opt_login_arg != NULL) { |
837 g_free(opt_login_arg); | 827 g_free(opt_login_arg); |
838 opt_login_arg = NULL; | 828 opt_login_arg = NULL; |
839 } | 829 } |
840 } | 830 } else if (opt_nologin) { |
841 | |
842 if (opt_nologin && !opt_login) | |
843 { | |
844 /* Set all accounts to "offline" */ | 831 /* Set all accounts to "offline" */ |
845 PurpleSavedStatus *saved_status; | 832 PurpleSavedStatus *saved_status; |
846 | 833 |
847 /* If we've used this type+message before, lookup the transient status */ | 834 /* If we've used this type+message before, lookup the transient status */ |
848 saved_status = purple_savedstatus_find_transient_by_type_and_message( | 835 saved_status = purple_savedstatus_find_transient_by_type_and_message( |
852 if (saved_status == NULL) | 839 if (saved_status == NULL) |
853 saved_status = purple_savedstatus_new(NULL, PURPLE_STATUS_OFFLINE); | 840 saved_status = purple_savedstatus_new(NULL, PURPLE_STATUS_OFFLINE); |
854 | 841 |
855 /* Set the status for each account */ | 842 /* Set the status for each account */ |
856 purple_savedstatus_activate(saved_status); | 843 purple_savedstatus_activate(saved_status); |
857 } | 844 } else { |
858 else if (!opt_login) | |
859 { | |
860 /* Everything is good to go--sign on already */ | 845 /* Everything is good to go--sign on already */ |
861 if (!purple_prefs_get_bool("/purple/savedstatus/startup_current_status")) | 846 if (!purple_prefs_get_bool("/purple/savedstatus/startup_current_status")) |
862 purple_savedstatus_activate(purple_savedstatus_get_startup()); | 847 purple_savedstatus_activate(purple_savedstatus_get_startup()); |
863 purple_accounts_restore_current_statuses(); | 848 purple_accounts_restore_current_statuses(); |
864 } | 849 } |