mirror of
https://github.com/brl/mutter.git
synced 2025-05-29 10:00:03 +00:00
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:
parent
146ad60c7f
commit
8828532d14
@ -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>
|
2008-01-12 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
* src/core/main.[ch] (meta_get_main_loop): removed as it
|
* src/core/main.[ch] (meta_get_main_loop): removed as it
|
||||||
|
@ -304,6 +304,11 @@ main (int argc, char **argv)
|
|||||||
struct sigaction act;
|
struct sigaction act;
|
||||||
sigset_t empty_mask;
|
sigset_t empty_mask;
|
||||||
MetaArguments meta_args;
|
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)
|
if (setlocale (LC_ALL, "") == NULL)
|
||||||
meta_warning ("Locale not understood by C library, internationalization will not work\n");
|
meta_warning ("Locale not understood by C library, internationalization will not work\n");
|
||||||
@ -366,30 +371,12 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
g_log_set_handler (NULL,
|
|
||||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
for (i=0; i<G_N_ELEMENTS(log_domains); i++)
|
||||||
log_handler, NULL);
|
g_log_set_handler (log_domains[i],
|
||||||
g_log_set_handler (G_LOG_DOMAIN,
|
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
||||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
log_handler, NULL);
|
||||||
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",
|
|
||||||
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
|
|
||||||
log_handler, NULL);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (g_getenv ("METACITY_G_FATAL_WARNINGS") != NULL)
|
if (g_getenv ("METACITY_G_FATAL_WARNINGS") != NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user