Mercurial > pidgin.yaz
comparison src/main.c @ 5684:b61520e71679
[gaim-migrate @ 6104]
sound is now really core/ui split.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 03 Jun 2003 03:33:20 +0000 |
parents | 9befba33f7c8 |
children | 1d140b31d4b3 |
comparison
equal
deleted
inserted
replaced
5683:9befba33f7c8 | 5684:b61520e71679 |
---|---|
46 #include <stdarg.h> | 46 #include <stdarg.h> |
47 #include <stdlib.h> | 47 #include <stdlib.h> |
48 #include <ctype.h> | 48 #include <ctype.h> |
49 #include "prpl.h" | 49 #include "prpl.h" |
50 #include "sound.h" | 50 #include "sound.h" |
51 #include "gtksound.h" | |
51 #include "gaim.h" | 52 #include "gaim.h" |
52 #include "gaim-socket.h" | 53 #include "gaim-socket.h" |
53 #include "account.h" | 54 #include "account.h" |
54 #include "prefs.h" | 55 #include "prefs.h" |
55 #include "notify.h" | 56 #include "notify.h" |
56 #include "gtkaccount.h" | 57 #include "gtkaccount.h" |
57 #include "gtkblist.h" | 58 #include "gtkblist.h" |
58 #include "gtkdebug.h" | 59 #include "gtkdebug.h" |
59 #include "gtknotify.h" | 60 #include "gtknotify.h" |
60 #include "gtkrequest.h" | 61 #include "gtkrequest.h" |
62 #include "gtksound.h" | |
61 #if HAVE_SIGNAL_H | 63 #if HAVE_SIGNAL_H |
62 #include <signal.h> | 64 #include <signal.h> |
63 #endif | 65 #endif |
64 #include "locale.h" | 66 #include "locale.h" |
65 #include <getopt.h> | 67 #include <getopt.h> |
148 } | 150 } |
149 | 151 |
150 static guint snd_tmout = 0; | 152 static guint snd_tmout = 0; |
151 static gboolean sound_timeout(gpointer data) | 153 static gboolean sound_timeout(gpointer data) |
152 { | 154 { |
153 gaim_sound_set_login_mute(FALSE); | 155 gaim_gtk_sound_set_login_mute(FALSE); |
154 snd_tmout = 0; | 156 snd_tmout = 0; |
155 return FALSE; | 157 return FALSE; |
156 } | 158 } |
157 | 159 |
158 /* we need to do this for Oscar because serv_login only starts the login | 160 /* we need to do this for Oscar because serv_login only starts the login |
162 { | 164 { |
163 if (gaim_prefs_get_bool("/core/sound/login") && gaim_prefs_get_bool("/core/sound/silent_signon")) { | 165 if (gaim_prefs_get_bool("/core/sound/login") && gaim_prefs_get_bool("/core/sound/silent_signon")) { |
164 if(snd_tmout) { | 166 if(snd_tmout) { |
165 g_source_remove(snd_tmout); | 167 g_source_remove(snd_tmout); |
166 } | 168 } |
167 gaim_sound_set_login_mute(TRUE); | 169 gaim_gtk_sound_set_login_mute(TRUE); |
168 snd_tmout = g_timeout_add(10000, sound_timeout, NULL); | 170 snd_tmout = g_timeout_add(10000, sound_timeout, NULL); |
169 } | 171 } |
170 } | 172 } |
171 | 173 |
172 static gboolean domiddleclick(GtkWidget *w, GdkEventButton *event, gpointer null) | 174 static gboolean domiddleclick(GtkWidget *w, GdkEventButton *event, gpointer null) |
874 if (opt_version) { | 876 if (opt_version) { |
875 printf("Gaim %s\n",VERSION); | 877 printf("Gaim %s\n",VERSION); |
876 return 0; | 878 return 0; |
877 } | 879 } |
878 | 880 |
881 gaim_prefs_init(); | |
882 gaim_gtk_prefs_init(); | |
883 | |
884 /* This kind of has to be here.. sucks, but it's important. */ | |
885 gaim_set_debug_ui_ops(gaim_get_gtk_debug_ui_ops()); | |
886 gaim_gtk_debug_init(); | |
887 | |
879 /* Set the UI operation structures. */ | 888 /* Set the UI operation structures. */ |
880 gaim_set_debug_ui_ops(gaim_get_gtk_debug_ui_ops()); | |
881 gaim_set_win_ui_ops(gaim_get_gtk_window_ui_ops()); | 889 gaim_set_win_ui_ops(gaim_get_gtk_window_ui_ops()); |
882 gaim_set_xfer_ui_ops(gaim_get_gtk_xfer_ui_ops()); | 890 gaim_set_xfer_ui_ops(gaim_get_gtk_xfer_ui_ops()); |
883 gaim_set_blist_ui_ops(gaim_get_gtk_blist_ui_ops()); | 891 gaim_set_blist_ui_ops(gaim_get_gtk_blist_ui_ops()); |
884 gaim_set_notify_ui_ops(gaim_get_gtk_notify_ui_ops()); | 892 gaim_set_notify_ui_ops(gaim_get_gtk_notify_ui_ops()); |
885 gaim_set_request_ui_ops(gaim_get_gtk_request_ui_ops()); | 893 gaim_set_request_ui_ops(gaim_get_gtk_request_ui_ops()); |
886 | 894 gaim_set_sound_ui_ops(gaim_get_gtk_sound_ui_ops()); |
887 gaim_prefs_init(); | 895 |
888 gaim_proxy_init(); | 896 gaim_proxy_init(); |
889 | 897 gaim_sound_init(); |
890 gaim_gtk_prefs_init(); | 898 |
891 gaim_gtk_conversation_init(); | 899 gaim_gtk_conversation_init(); |
892 | 900 |
893 plugin_search_paths[0] = LIBDIR; | 901 plugin_search_paths[0] = LIBDIR; |
894 plugin_search_paths[1] = gaim_user_dir(); | 902 plugin_search_paths[1] = gaim_user_dir(); |
895 plugin_search_paths[2] = g_strdup_printf("%s/plugins", gaim_user_dir()); | 903 plugin_search_paths[2] = g_strdup_printf("%s/plugins", gaim_user_dir()); |
905 if (!gaim_prefs_load()) { | 913 if (!gaim_prefs_load()) { |
906 load_prefs(); | 914 load_prefs(); |
907 gaim_prefs_sync(); | 915 gaim_prefs_sync(); |
908 } | 916 } |
909 | 917 |
910 /* This kind of has to be here.. sucks, but it's important. */ | |
911 gaim_gtk_debug_init(); | |
912 | 918 |
913 gaim_accounts_load(); | 919 gaim_accounts_load(); |
914 | 920 |
915 #ifdef _WIN32 | 921 #ifdef _WIN32 |
916 /* Various win32 initializations */ | 922 /* Various win32 initializations */ |
958 } else if ((dologin_ret == -1) && !gaim_connections_get_all()) | 964 } else if ((dologin_ret == -1) && !gaim_connections_get_all()) |
959 show_login(); | 965 show_login(); |
960 | 966 |
961 gtk_main(); | 967 gtk_main(); |
962 core_quit(); | 968 core_quit(); |
963 gaim_sound_quit(); | 969 gaim_sound_shutdown(); |
964 #ifdef _WIN32 | 970 #ifdef _WIN32 |
965 wgaim_cleanup(); | 971 wgaim_cleanup(); |
966 #endif | 972 #endif |
967 return 0; | 973 return 0; |
968 | 974 |