Mercurial > pidgin
comparison src/main.c @ 8601:cfb11d9a46fd
[gaim-migrate @ 9352]
the results of discussions between robot101 and datallah
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Tue, 06 Apr 2004 16:27:52 +0000 |
parents | 56360561af5e |
children | 543b19a96ac5 |
comparison
equal
deleted
inserted
replaced
8600:0349e319e1c0 | 8601:cfb11d9a46fd |
---|---|
602 int main(int argc, char *argv[]) | 602 int main(int argc, char *argv[]) |
603 #endif | 603 #endif |
604 { | 604 { |
605 int opt_acct = 0, opt_help = 0, opt_version = 0, opt_login = 0, opt_nologin = 0, dologin_ret = -1; | 605 int opt_acct = 0, opt_help = 0, opt_version = 0, opt_login = 0, opt_nologin = 0, dologin_ret = -1; |
606 char *opt_user_arg = NULL, *opt_login_arg = NULL; | 606 char *opt_user_arg = NULL, *opt_login_arg = NULL; |
607 char *opt_session_arg = NULL; | 607 char *opt_session_arg = NULL, *opt_config_dir_arg = NULL; |
608 char *plugin_search_paths[3]; | 608 char *plugin_search_paths[3]; |
609 #if HAVE_SIGNAL_H | 609 #if HAVE_SIGNAL_H |
610 int sig_indx; /* for setting up signal catching */ | 610 int sig_indx; /* for setting up signal catching */ |
611 sigset_t sigset; | 611 sigset_t sigset; |
612 void (*prev_sig_disp)(); | 612 void (*prev_sig_disp)(); |
773 case 'd': /* debug */ | 773 case 'd': /* debug */ |
774 opt_debug = 1; | 774 opt_debug = 1; |
775 break; | 775 break; |
776 case 'c': /* use specified config dir */ | 776 case 'c': /* use specified config dir */ |
777 set_gaim_user_dir(optarg); | 777 set_gaim_user_dir(optarg); |
778 opt_config_dir_arg = g_strdup(optarg); | |
778 break; | 779 break; |
779 case 's': /* use existing session ID */ | 780 case 's': /* use existing session ID */ |
780 opt_session_arg = g_strdup(optarg); | 781 opt_session_arg = g_strdup(optarg); |
781 break; | 782 break; |
782 case 'v': /* version */ | 783 case 'v': /* version */ |
863 | 864 |
864 load_pounces(); | 865 load_pounces(); |
865 ui_main(); | 866 ui_main(); |
866 | 867 |
867 #ifdef USE_SM | 868 #ifdef USE_SM |
868 session_init(argv[0], opt_session_arg); | 869 session_init(argv[0], opt_session_arg, opt_config_dir_arg); |
869 #endif | 870 #endif |
870 if (opt_session_arg != NULL) { | 871 if (opt_session_arg != NULL) { |
871 g_free(opt_session_arg); | 872 g_free(opt_session_arg); |
872 opt_session_arg = NULL; | 873 opt_session_arg = NULL; |
873 }; | 874 } |
875 | |
876 if (opt_config_dir_arg != NULL) { | |
877 g_free(opt_config_dir_arg); | |
878 opt_config_dir_arg = NULL; | |
879 } | |
874 | 880 |
875 /* set the default username */ | 881 /* set the default username */ |
876 if (opt_user_arg != NULL) { | 882 if (opt_user_arg != NULL) { |
877 set_first_user(opt_user_arg); | 883 set_first_user(opt_user_arg); |
878 g_free(opt_user_arg); | 884 g_free(opt_user_arg); |