[gnome-control-center] Factorize dependecies initialization
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Factorize dependecies initialization
- Date: Mon, 26 Nov 2018 15:58:38 +0000 (UTC)
commit 28de6f4c8a80ef2a4db6c094287477a917d700c1
Author: Adrien Plazas <kekun plazas laposte net>
Date: Mon Nov 26 15:21:27 2018 +0100
Factorize dependecies initialization
Add initialize_dependencies() to factorize the dependecies
initialization functions for better readability as another dependency
to initialize will be added in a following commit.
shell/main.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/shell/main.c b/shell/main.c
index 29b99cd2f..c0488149c 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -35,6 +35,19 @@
#include "cc-application.h"
+void
+initialize_dependencies (gint *argc,
+ gchar ***argv)
+{
+ #ifdef GDK_WINDOWING_X11
+ XInitThreads ();
+ #endif
+
+ #ifdef HAVE_CHEESE
+ cheese_gtk_init (argc, argv);
+ #endif /* HAVE_CHEESE */
+}
+
int
main (gint argc,
gchar **argv)
@@ -45,13 +58,7 @@ main (gint argc,
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
-#ifdef GDK_WINDOWING_X11
- XInitThreads ();
-#endif
-
-#ifdef HAVE_CHEESE
- cheese_gtk_init (&argc, &argv);
-#endif /* HAVE_CHEESE */
+ initialize_dependencies (&argc, &argv);
application = cc_application_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]