comparison src/core.c @ 9649:ce434e22edf2

[gaim-migrate @ 10497] gaim_signals_uninit() needsta be called after the plugins are destroyed. ops->quit() also gave me a little warning when I called it after gaim_signals_uninit() committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 02 Aug 2004 22:52:58 +0000
parents 81b31af2752d
children e4a27c9aec4c
comparison
equal deleted inserted replaced
9648:2316cb7a115f 9649:ce434e22edf2
107 GaimCoreUiOps *ops; 107 GaimCoreUiOps *ops;
108 GaimCore *core = gaim_get_core(); 108 GaimCore *core = gaim_get_core();
109 109
110 g_return_if_fail(core != NULL); 110 g_return_if_fail(core != NULL);
111 111
112 ops = gaim_core_get_ui_ops();
113
114 /* The self destruct sequence has been initiated */ 112 /* The self destruct sequence has been initiated */
115 gaim_signal_emit(gaim_get_core(), "quitting"); 113 gaim_signal_emit(gaim_get_core(), "quitting");
116 114
117 /* Transmission ends */ 115 /* Transmission ends */
118 gaim_connections_disconnect_all(); 116 gaim_connections_disconnect_all();
119
120 gaim_debug(GAIM_DEBUG_INFO, "main", "Unloading all plugins\n");
121 117
122 /* Save .xml files, remove signals, etc. */ 118 /* Save .xml files, remove signals, etc. */
123 gaim_ssl_uninit(); 119 gaim_ssl_uninit();
124 gaim_pounces_uninit(); 120 gaim_pounces_uninit();
125 gaim_blist_uninit(); 121 gaim_blist_uninit();
127 gaim_connections_uninit(); 123 gaim_connections_uninit();
128 gaim_buddy_icons_uninit(); 124 gaim_buddy_icons_uninit();
129 gaim_accounts_uninit(); 125 gaim_accounts_uninit();
130 gaim_prefs_uninit(); 126 gaim_prefs_uninit();
131 127
128 gaim_debug(GAIM_DEBUG_INFO, "main", "Unloading all plugins\n");
129 gaim_plugins_destroy_all();
130
131 ops = gaim_core_get_ui_ops();
132 if (ops != NULL && ops->quit != NULL)
133 ops->quit();
134
132 gaim_signals_uninit(); 135 gaim_signals_uninit();
133
134 gaim_plugins_destroy_all();
135 136
136 if (core->ui != NULL) { 137 if (core->ui != NULL) {
137 g_free(core->ui); 138 g_free(core->ui);
138 core->ui = NULL; 139 core->ui = NULL;
139 } 140 }
140 141
141 g_free(core); 142 g_free(core);
142 143
143 _core = NULL; 144 _core = NULL;
144
145 if (ops != NULL && ops->quit != NULL)
146 ops->quit();
147
148 } 145 }
149 146
150 gboolean 147 gboolean
151 gaim_core_quit_cb(gpointer unused) 148 gaim_core_quit_cb(gpointer unused)
152 { 149 {