[ekiga/ds-gsettings3] main (): Ported to GSettings.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga/ds-gsettings3] main (): Ported to GSettings.
- Date: Sun, 17 Nov 2013 16:54:51 +0000 (UTC)
commit 8fcf7f263975a3a67a350b587b83bca34f03a48c
Author: Damien Sandras <dsandras beip be>
Date: Sun Nov 17 16:07:12 2013 +0100
main (): Ported to GSettings.
src/gui/main.cpp | 18 +++++-------------
1 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index ce5081d..222c56a 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -56,8 +56,7 @@
#include <cstdio>
#endif
-#include "gmconf.h"
-#include "gmconf-upgrade.h"
+#include "ekiga-settings.h"
#include "engine.h"
#include "runtime.h"
@@ -126,9 +125,6 @@ main (int argc,
chdir (win32_datadir ());
#endif
- /* Configuration backend initialization */
- gm_conf_init ();
-
/* Arguments initialization */
GOptionEntry arguments [] =
{
@@ -219,23 +215,23 @@ main (int argc,
boost::shared_ptr<GtkFrontend> gtk_frontend
= service_core->get<GtkFrontend>("gtk-frontend");
+ boost::shared_ptr<Ekiga::Settings> general_settings;
+ boost::shared_ptr<Ekiga::Settings> (new Ekiga::Settings (GENERAL_SCHEMA));
GtkWidget *main_window = GTK_WIDGET (gtk_frontend->get_main_window ());
const int schema_version = MAJOR_VERSION * 1000
+ MINOR_VERSION * 10
+ BUILD_NUMBER;
- int crt_version = gm_conf_get_int (GENERAL_KEY "version");
+ int crt_version = general_settings->get_int ("version");
if (crt_version < schema_version) {
- gmconf_upgrade_version ();
-
// show the assistant if there is no config file
if (crt_version == 0)
gtk_widget_show_all (GTK_WIDGET (gtk_frontend->get_assistant_window ()));
/* Update the version number */
- gm_conf_set_int (GENERAL_KEY "version", schema_version);
+ general_settings->set_int ("version", schema_version);
}
/* Show the main window */
@@ -267,10 +263,6 @@ main (int argc,
service_core.reset ();
Ekiga::Runtime::quit ();
- /* Save and shutdown the configuration */
- gm_conf_save ();
- gm_conf_shutdown ();
-
/* deinitialize platform-specific code */
gm_platform_shutdown ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]