[ekiga] Moved src/gui/conf.* to lib/gmconf/gmconf-upgrade.* as C files



commit 651ac8d40c9a58ca05a82f716e8a1c5ae26acd26
Author: Julien Puydt <jpuydt free fr>
Date:   Mon Jan 14 08:30:21 2013 +0100

    Moved src/gui/conf.* to lib/gmconf/gmconf-upgrade.* as C files
    
    This paves the way for the move to GSettings, by putting all eggs in
    the same basket.

 lib/Makefile.am                                 |    4 ++-
 src/gui/conf.cpp => lib/gmconf/gmconf-upgrade.c |   25 ++++++++++------------
 src/gui/conf.h => lib/gmconf/gmconf-upgrade.h   |   16 +++++++++-----
 src/Makefile.am                                 |    2 -
 src/gui/main.cpp                                |    6 ++--
 5 files changed, 27 insertions(+), 26 deletions(-)
---
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 66e0bf6..f8ce75f 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -111,7 +111,9 @@ endif
 ##
 libekiga_la_SOURCES += \
 	$(top_srcdir)/lib/gmconf/gmconf.h \
-	$(top_srcdir)/lib/gmconf/gmconf-ekiga-keys.h
+	$(top_srcdir)/lib/gmconf/gmconf-ekiga-keys.h \
+	$(top_srcdir)/lib/gmconf/gmconf-upgrade.h \
+	$(top_srcdir)/lib/gmconf/gmconf-upgrade.c
 
 if HAVE_GCONF
 libekiga_la_SOURCES += $(top_srcdir)/lib/gmconf/gmconf-gconf.c
diff --git a/src/gui/conf.cpp b/lib/gmconf/gmconf-upgrade.c
similarity index 96%
rename from src/gui/conf.cpp
rename to lib/gmconf/gmconf-upgrade.c
index ac600b9..53e4900 100644
--- a/src/gui/conf.cpp
+++ b/lib/gmconf/gmconf-upgrade.c
@@ -1,6 +1,6 @@
 
 /* Ekiga -- A VoIP and Video-Conferencing application
- * Copyright (C) 2000-2009 Damien Sandras <dsandras seconix com>
+ * Copyright (C) 2000-2013 Damien Sandras <dsandras seconix com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@
 
 
 /*
- *                         config.cpp  -  description
+ *                         gmconf-upgrade.c  -  description
  *                         --------------------------
  *   begin                : Wed Feb 14 2001
  *   copyright            : (C) 2000-2006 by Damien Sandras
@@ -41,15 +41,12 @@
  */
 
 
-#include "config.h"
-
-#include "conf.h"
+#include "gmconf-upgrade.h"
 
-#include "gmconf.h"
+#include "config.h"
 
-/* The functions */
 void
-gnomemeeting_conf_upgrade ()
+gmconf_upgrade_version ()
 {
   int version = gm_conf_get_int (GENERAL_KEY "version");
 
@@ -63,9 +60,9 @@ gnomemeeting_conf_upgrade ()
 			"ekiga -c \"%s\"");
 
     gm_conf_set_bool ("/desktop/gnome/url-handlers/callto/needs_terminal",
-		      false);
+		      FALSE);
 
-    gm_conf_set_bool ("/desktop/gnome/url-handlers/callto/enabled", true);
+    gm_conf_set_bool ("/desktop/gnome/url-handlers/callto/enabled", TRUE);
   }
   g_free (conf_url);
 
@@ -76,9 +73,9 @@ gnomemeeting_conf_upgrade ()
     gm_conf_set_string ("/desktop/gnome/url-handlers/h323/command",
                         "ekiga -c \"%s\"");
 
-    gm_conf_set_bool ("/desktop/gnome/url-handlers/h323/needs_terminal", false);
+    gm_conf_set_bool ("/desktop/gnome/url-handlers/h323/needs_terminal", FALSE);
 
-    gm_conf_set_bool ("/desktop/gnome/url-handlers/h323/enabled", true);
+    gm_conf_set_bool ("/desktop/gnome/url-handlers/h323/enabled", TRUE);
   }
   g_free (conf_url);
 
@@ -89,9 +86,9 @@ gnomemeeting_conf_upgrade ()
     gm_conf_set_string ("/desktop/gnome/url-handlers/sip/command",
                         "ekiga -c \"%s\"");
 
-    gm_conf_set_bool ("/desktop/gnome/url-handlers/sip/needs_terminal", false);
+    gm_conf_set_bool ("/desktop/gnome/url-handlers/sip/needs_terminal", FALSE);
 
-    gm_conf_set_bool ("/desktop/gnome/url-handlers/sip/enabled", true);
+    gm_conf_set_bool ("/desktop/gnome/url-handlers/sip/enabled", TRUE);
   }
   g_free (conf_url);
 
diff --git a/src/gui/conf.h b/lib/gmconf/gmconf-upgrade.h
similarity index 88%
rename from src/gui/conf.h
rename to lib/gmconf/gmconf-upgrade.h
index 51acf00..ca3bab8 100644
--- a/src/gui/conf.h
+++ b/lib/gmconf/gmconf-upgrade.h
@@ -1,6 +1,6 @@
 
 /* Ekiga -- A VoIP and Video-Conferencing application
- * Copyright (C) 2000-2009 Damien Sandras <dsandras seconix com>
+ * Copyright (C) 2000-2013 Damien Sandras <dsandras seconix com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@
 
 
 /*
- *                         conf.h  -  description
+ *                         gmconf-upgrade.h  -  description
  *                         ------------------------
  *   begin                : Wed Feb 14 2001
  *   copyright            : (C) 2000-2006 by Damien Sandras
@@ -41,16 +41,20 @@
  */
 
 
-#ifndef _CONFIG_H
-#define _CONFIG_H
+#ifndef _GMCONF_UPGRADE_H
+#define _GMCONF_UPGRADE_H
 
-/* The functions */
+#include "gmconf.h"
+
+G_BEGIN_DECLS
 
 /* DESCRIPTION  :  /
  * BEHAVIOR     :  This function updates the GConf keys from version
  *                 to version.
  * PRE          :  /
  */
-void gnomemeeting_conf_upgrade ();
+void gmconf_upgrade_version ();
+
+G_END_DECLS
 
 #endif
diff --git a/src/Makefile.am b/src/Makefile.am
index 2b72585..2f61ef1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -57,8 +57,6 @@ nodist_ekiga_SOURCES =
 ekiga_SOURCES +=			\
 	gui/assistant.h			\
 	gui/assistant.cpp		\
-	gui/conf.h			\
-	gui/conf.cpp			\
 	gui/main.cpp		        \
 	gui/main_window.h		\
 	gui/main_window.cpp
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index faea422..2079ac9 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -57,12 +57,12 @@
 #endif
 
 #include "gmconf.h"
+#include "gmconf-upgrade.h"
+
 #include "engine.h"
 
 #include "call-core.h"
 
-#include "conf.h" // FIXME: Kill Me
-
 #include "ekiga.h"
 
 #ifdef WIN32
@@ -198,7 +198,7 @@ main (int argc,
   int crt_version = gm_conf_get_int (GENERAL_KEY "version");
   if (crt_version < schema_version) {
 
-    gnomemeeting_conf_upgrade ();
+    gmconf_upgrade_version ();
 
     // show the assistant if there is no config file
     if (crt_version == 0)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]