1
0
Fork 0

Refactor repeated lines in main() to iterate instead.

2008-01-12  Thomas Thurman  <tthurman@gnome.org>

        * src/core/main.c: Refactor repeated lines in main() to
       iterate instead.


svn path=/trunk/; revision=3516
This commit is contained in:
Thomas Thurman 2008-01-13 02:53:25 +00:00 committed by Thomas James Alexander Thurman
parent 146ad60c7f
commit 8828532d14
2 changed files with 16 additions and 24 deletions

View file

@ -1,3 +1,8 @@
2008-01-12 Thomas Thurman <tthurman@gnome.org>
* src/core/main.c: Refactor repeated lines in main() to
iterate instead.
2008-01-12 Thomas Thurman <tthurman@gnome.org>
* src/core/main.[ch] (meta_get_main_loop): removed as it

View file

@ -304,6 +304,11 @@ main (int argc, char **argv)
struct sigaction act;
sigset_t empty_mask;
MetaArguments meta_args;
const gchar *log_domains[] = {
NULL, G_LOG_DOMAIN, "Gtk", "Gdk", "GLib",
"Pango", "GLib-GObject", "GThread"
};
gint i;
if (setlocale (LC_ALL, "") == NULL)
meta_warning ("Locale not understood by C library, internationalization will not work\n");
@ -366,30 +371,12 @@ main (int argc, char **argv)
#if 1
g_log_set_handler (NULL,
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
log_handler, NULL);
g_log_set_handler (G_LOG_DOMAIN,
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
log_handler, NULL);
g_log_set_handler ("Gtk",
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
log_handler, NULL);
g_log_set_handler ("Gdk",
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
log_handler, NULL);
g_log_set_handler ("GLib",
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
log_handler, NULL);
g_log_set_handler ("Pango",
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
log_handler, NULL);
g_log_set_handler ("GLib-GObject",
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
log_handler, NULL);
g_log_set_handler ("GThread",
for (i=0; i<G_N_ELEMENTS(log_domains); i++)
g_log_set_handler (log_domains[i],
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
log_handler, NULL);
#endif
if (g_getenv ("METACITY_G_FATAL_WARNINGS") != NULL)