Mercurial > pidgin
comparison src/gtkmain.c @ 13427:e3717f0d24ad
[gaim-migrate @ 15802]
#ifdef HAVE_SIGNAL_H instead of #if HAVE_SIGNAL_H to suppress warnings
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 07 Mar 2006 04:42:48 +0000 |
parents | c61c0a4ba6de |
children | c6de7d8869c9 |
comparison
equal
deleted
inserted
replaced
13426:47e51939c923 | 13427:e3717f0d24ad |
---|---|
63 #include "gtkthemes.h" | 63 #include "gtkthemes.h" |
64 #include "gtkutils.h" | 64 #include "gtkutils.h" |
65 #include "gtkstock.h" | 65 #include "gtkstock.h" |
66 #include "gtkwhiteboard.h" | 66 #include "gtkwhiteboard.h" |
67 | 67 |
68 #if HAVE_SIGNAL_H | 68 #ifdef HAVE_SIGNAL_H |
69 # include <signal.h> | 69 # include <signal.h> |
70 #endif | 70 #endif |
71 | 71 |
72 #include <getopt.h> | 72 #include <getopt.h> |
73 | 73 |
86 #ifdef HAVE_STARTUP_NOTIFICATION | 86 #ifdef HAVE_STARTUP_NOTIFICATION |
87 static SnLauncheeContext *sn_context = NULL; | 87 static SnLauncheeContext *sn_context = NULL; |
88 static SnDisplay *sn_display = NULL; | 88 static SnDisplay *sn_display = NULL; |
89 #endif | 89 #endif |
90 | 90 |
91 #if HAVE_SIGNAL_H | 91 #ifdef HAVE_SIGNAL_H |
92 /* | 92 /* |
93 * Lists of signals we wish to catch and those we wish to ignore. | 93 * Lists of signals we wish to catch and those we wish to ignore. |
94 * Each list terminated with -1 | 94 * Each list terminated with -1 |
95 */ | 95 */ |
96 static int catch_sig_list[] = { | 96 static int catch_sig_list[] = { |
140 } | 140 } |
141 | 141 |
142 return ret; | 142 return ret; |
143 } | 143 } |
144 | 144 |
145 #if HAVE_SIGNAL_H | 145 #ifdef HAVE_SIGNAL_H |
146 static void | 146 static void |
147 clean_pid(void) | 147 clean_pid(void) |
148 { | 148 { |
149 int status; | 149 int status; |
150 pid_t pid; | 150 pid_t pid; |
431 char *opt_config_dir_arg = NULL; | 431 char *opt_config_dir_arg = NULL; |
432 char *opt_login_arg = NULL; | 432 char *opt_login_arg = NULL; |
433 char *opt_session_arg = NULL; | 433 char *opt_session_arg = NULL; |
434 int dologin_ret = -1; | 434 int dologin_ret = -1; |
435 char *search_path; | 435 char *search_path; |
436 #if HAVE_SIGNAL_H | 436 #ifdef HAVE_SIGNAL_H |
437 int sig_indx; /* for setting up signal catching */ | 437 int sig_indx; /* for setting up signal catching */ |
438 sigset_t sigset; | 438 sigset_t sigset; |
439 RETSIGTYPE (*prev_sig_disp)(int); | 439 RETSIGTYPE (*prev_sig_disp)(int); |
440 #endif | 440 #endif |
441 int opt; | 441 int opt; |
442 gboolean gui_check; | 442 gboolean gui_check; |
443 gboolean debug_enabled; | 443 gboolean debug_enabled; |
444 #if HAVE_SIGNAL_H | 444 #ifdef HAVE_SIGNAL_H |
445 char errmsg[BUFSIZ]; | 445 char errmsg[BUFSIZ]; |
446 #ifndef DEBUG | 446 #ifndef DEBUG |
447 char *segfault_message_tmp; | 447 char *segfault_message_tmp; |
448 GError *error = NULL; | 448 GError *error = NULL; |
449 #endif | 449 #endif |
483 #ifdef HAVE_SETLOCALE | 483 #ifdef HAVE_SETLOCALE |
484 /* Locale initialization is not complete here. See gtk_init_check() */ | 484 /* Locale initialization is not complete here. See gtk_init_check() */ |
485 setlocale(LC_ALL, ""); | 485 setlocale(LC_ALL, ""); |
486 #endif | 486 #endif |
487 | 487 |
488 #if HAVE_SIGNAL_H | 488 #ifdef HAVE_SIGNAL_H |
489 | 489 |
490 #ifndef DEBUG | 490 #ifndef DEBUG |
491 /* We translate this here in case the crash breaks gettext. */ | 491 /* We translate this here in case the crash breaks gettext. */ |
492 segfault_message_tmp = g_strdup_printf(_( | 492 segfault_message_tmp = g_strdup_printf(_( |
493 "Gaim has segfaulted and attempted to dump a core file.\n" | 493 "Gaim has segfaulted and attempted to dump a core file.\n" |
686 /* TODO: Move blist loading into gaim_blist_init() */ | 686 /* TODO: Move blist loading into gaim_blist_init() */ |
687 gaim_set_blist(gaim_blist_new()); | 687 gaim_set_blist(gaim_blist_new()); |
688 gaim_blist_load(); | 688 gaim_blist_load(); |
689 | 689 |
690 /* TODO: Move prefs loading into gaim_prefs_init() */ | 690 /* TODO: Move prefs loading into gaim_prefs_init() */ |
691 gaim_prefs_load(); | 691 /*gaim_prefs_load();*/ |
692 gaim_prefs_update_old(); | 692 /*gaim_prefs_update_old();*/ |
693 gaim_gtk_prefs_update_old(); | 693 gaim_gtk_prefs_update_old(); |
694 | 694 |
695 /* load plugins we had when we quit */ | 695 /* load plugins we had when we quit */ |
696 gaim_plugins_load_saved("/gaim/gtk/plugins/loaded"); | 696 gaim_plugins_load_saved("/gaim/gtk/plugins/loaded"); |
697 | 697 |
762 startup_notification_complete(); | 762 startup_notification_complete(); |
763 #endif | 763 #endif |
764 | 764 |
765 gtk_main(); | 765 gtk_main(); |
766 | 766 |
767 #if HAVE_SIGNAL_H | 767 #ifdef HAVE_SIGNAL_H |
768 g_free(segfault_message); | 768 g_free(segfault_message); |
769 #endif | 769 #endif |
770 | 770 |
771 #ifdef _WIN32 | 771 #ifdef _WIN32 |
772 wgaim_cleanup(); | 772 wgaim_cleanup(); |