[gnome-system-monitor/gtk3: 13/17] Removed all references to gconf and bumped dependencies.
- From: Chris Kühl <chriskuehl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor/gtk3: 13/17] Removed all references to gconf and bumped dependencies.
- Date: Fri, 11 Feb 2011 15:21:32 +0000 (UTC)
commit 5d9e88d5ae71bbbffff7315913484f63229261aa
Author: Chris Kühl <chrisk openismus com>
Date: Wed Feb 9 10:41:44 2011 +0100
Removed all references to gconf and bumped dependencies.
configure.in | 14 ++++--------
src/Makefile.am | 32 +++++-----------------------
src/openfiles.cpp | 6 ++--
src/procdialogs.cpp | 10 ++++----
src/procman.cpp | 11 ++++-----
src/{gconf-keys.cpp => settings-keys.cpp} | 4 +-
src/{gconf-keys.h => settings-keys.h} | 9 +++----
7 files changed, 30 insertions(+), 56 deletions(-)
---
diff --git a/configure.in b/configure.in
index de060fc..f433565 100644
--- a/configure.in
+++ b/configure.in
@@ -24,20 +24,19 @@ AM_PROG_CC_STDC
AC_HEADER_STDC
GNOME_COMPILE_WARNINGS
-GLIB_REQUIRED=2.16.0
-GCONF_REQUIRED=2.31.1
+GLIB_REQUIRED=2.26.0
LIBWNCK_REQUIRED=2.5.0
LIBGTOP_REQUIRED=2.23.1
GTK_REQUIRED=2.20.0
GNOME_ICON_THEME_REQUIRED=2.15.3
-GTKMM_REQUIRED=2.8
-GIOMM_REQUIRED=2.25.0
-GLIBMM_REQUIRED=2.14
+GTKMM_REQUIRED=2.22
+GIOMM_REQUIRED=2.26.0
+GLIBMM_REQUIRED=2.22
LIBXML_REQUIRED=2.0
RSVG_REQUIRED=2.12
DBUS_REQUIRED=0.7
-PKG_CHECK_MODULES(PROCMAN, glib-2.0 >= $GLIB_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libgtop-2.0 >= $LIBGTOP_REQUIRED libwnck-1.0 >= $LIBWNCK_REQUIRED gtk+-2.0 >= $GTK_REQUIRED gnome-icon-theme >= $GNOME_ICON_THEME_REQUIRED gtkmm-2.4 >= $GTKMM_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED librsvg-2.0 >= $RSVG_REQUIRED glibmm-2.4 >= $GLIBMM_REQUIRED giomm-2.4 >= $GIOMM_REQUIRED dbus-glib-1 >= $DBUS_REQUIRED)
+PKG_CHECK_MODULES(PROCMAN, glib-2.0 >= $GLIB_REQUIRED libgtop-2.0 >= $LIBGTOP_REQUIRED libwnck-1.0 >= $LIBWNCK_REQUIRED gtk+-2.0 >= $GTK_REQUIRED gnome-icon-theme >= $GNOME_ICON_THEME_REQUIRED gtkmm-2.4 >= $GTKMM_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED librsvg-2.0 >= $RSVG_REQUIRED glibmm-2.4 >= $GLIBMM_REQUIRED giomm-2.4 >= $GIOMM_REQUIRED dbus-glib-1 >= $DBUS_REQUIRED)
AC_ARG_ENABLE(more-warnings,
@@ -64,8 +63,6 @@ fi
dnl CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden $CXXFLAGS"
dnl CXXFLAGS="-fvisibility-inlines-hidden $CXXFLAGS"
-AM_GCONF_SOURCE_2
-
GLIB_GSETTINGS
GETTEXT_PACKAGE=gnome-system-monitor
@@ -82,7 +79,6 @@ GLIB_DEFINE_LOCALEDIR(PACKAGE_LOCALE_DIR)
AC_CONFIG_FILES([
Makefile
src/Makefile
-src/gnome-system-monitor.schemas
pixmaps/Makefile
po/Makefile.in
help/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index fdabcbe..e29ec64 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,7 +30,7 @@ gnome_system_monitor_SOURCES = \
sysinfo.cpp sysinfo.h \
lsof.cpp lsof.h \
selection.cpp selection.h \
- gconf-keys.cpp gconf-keys.h \
+ settings-keys.cpp settings-keys.h \
iconthemewrapper.cpp iconthemewrapper.h \
e_date.c e_date.h \
gsm_color_button.c gsm_color_button.h
@@ -38,45 +38,25 @@ gnome_system_monitor_SOURCES = \
gnome_system_monitor_LDADD = @PROCMAN_LIBS@ libbacon.la
-
noinst_LTLIBRARIES = libbacon.la
libbacon_la_SOURCES = \
bacon-message-connection.c \
bacon-message-connection.h
-
specdir = $(datadir)/procman
-schemadir = $(GCONF_SCHEMA_FILE_DIR)
-schema_ins = gnome-system-monitor.schemas.in
-schema_DATA = $(schema_ins:.schemas.in=.schemas)
- INTLTOOL_SCHEMAS_RULE@
-
-EXTRA_DIST = \
- $(schema_ins)
-
# GSettings schemas, enum files and conversion file
gsettings_ENUM_NAMESPACE = org.gnome.gnome-system-monitor
gsettings_ENUM_FILES = $(top_srcdir)/src/*.h
-gsettings_SCHEMAS = org.gnome.gnome-system-monitor.gschema.xml
-
+gsettings_in_file = org.gnome.gnome-system-monitor.gschema.xml.in
+gsettings_SCHEMAS = $(gsettings_in_file:.xml.in=.xml)
@INTLTOOL_XML_NOMERGE_RULE@
@GSETTINGS_RULES@
+EXTRA_DIST = \
+ $(schema_ins)
+
CLEANFILES = \
- $(schema_DATA) \
$(gsettings_SCHEMAS)
MAINTAINERCLEANFILES = $(gsettings_SCHEMAS:.xml=.valid)
-
-if GCONF_SCHEMAS_INSTALL
-install-data-local:
- if test -z "$(DESTDIR)"; then \
- for p in $(schema_DATA); do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
- gconftool-2 --makefile-install-rule $(top_builddir)/src/$$p; \
- done; \
- fi
-else
-install-data-local:
-endif
diff --git a/src/openfiles.cpp b/src/openfiles.cpp
index 07ad327..98c14b7 100644
--- a/src/openfiles.cpp
+++ b/src/openfiles.cpp
@@ -13,7 +13,7 @@
#include "openfiles.h"
#include "proctable.h"
#include "util.h"
-#include "gconf-keys.h"
+#include "settings-keys.h"
enum
{
@@ -219,7 +219,7 @@ close_openfiles_dialog (GtkDialog *dialog, gint id, gpointer data)
guint timer;
settings = static_cast<GSettings*>(g_object_get_data (G_OBJECT (tree), "settings"));
- procman_save_tree_state (settings, tree, procman::gconf::open_files_tree_prefix.c_str());
+ procman_save_tree_state (settings, tree, procman::settings::open_files_tree_prefix.c_str());
timer = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (tree), "timer"));
g_source_remove (timer);
@@ -288,7 +288,7 @@ create_openfiles_tree (ProcData *procdata)
GTK_SORT_ASCENDING);*/
#endif
- procman_get_tree_state (procdata->settings, tree, procman::gconf::open_files_tree_prefix.c_str());
+ procman_get_tree_state (procdata->settings, tree, procman::settings::open_files_tree_prefix.c_str());
return tree;
diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp
index d84fdf9..eca4869 100644
--- a/src/procdialogs.cpp
+++ b/src/procdialogs.cpp
@@ -31,7 +31,7 @@
#include "procactions.h"
#include "util.h"
#include "load-graph.h"
-#include "gconf-keys.h"
+#include "settings-keys.h"
#include "procman_gnomesu.h"
#include "procman_gksu.h"
@@ -281,7 +281,7 @@ solaris_mode_toggled(GtkToggleButton *button, gpointer data)
gboolean toggled;
toggled = gtk_toggle_button_get_active(button);
- g_settings_set_boolean(settings, procman::gconf::solaris_mode.c_str(), toggled);
+ g_settings_set_boolean(settings, procman::settings::solaris_mode.c_str(), toggled);
}
@@ -293,7 +293,7 @@ network_in_bits_toggled(GtkToggleButton *button, gpointer data)
gboolean toggled;
toggled = gtk_toggle_button_get_active(button);
- g_settings_set_boolean(settings, procman::gconf::network_in_bits.c_str(), toggled);
+ g_settings_set_boolean(settings, procman::settings::network_in_bits.c_str(), toggled);
}
@@ -598,7 +598,7 @@ procdialog_create_preferences_dialog (ProcData *procdata)
solaris_button = gtk_check_button_new_with_mnemonic(_("Solaris mode"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(solaris_button),
g_settings_get_boolean(procdata->settings,
- procman::gconf::solaris_mode.c_str()));
+ procman::settings::solaris_mode.c_str()));
g_signal_connect(G_OBJECT(solaris_button), "toggled",
G_CALLBACK(solaris_mode_toggled), procdata);
gtk_box_pack_start(GTK_BOX(hbox2), solaris_button, TRUE, TRUE, 0);
@@ -679,7 +679,7 @@ procdialog_create_preferences_dialog (ProcData *procdata)
bits_button = gtk_check_button_new_with_mnemonic(_("Show network speed in bits"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(bits_button),
g_settings_get_boolean(procdata->settings,
- procman::gconf::network_in_bits.c_str()));
+ procman::settings::network_in_bits.c_str()));
g_signal_connect(G_OBJECT(bits_button), "toggled",
G_CALLBACK(network_in_bits_toggled), procdata);
gtk_box_pack_start(GTK_BOX(vbox2), bits_button, TRUE, TRUE, 0);
diff --git a/src/procman.cpp b/src/procman.cpp
index e9be87b..9b9292a 100644
--- a/src/procman.cpp
+++ b/src/procman.cpp
@@ -43,7 +43,7 @@
#include "callbacks.h"
#include "smooth_refresh.h"
#include "util.h"
-#include "gconf-keys.h"
+#include "settings-keys.h"
#include "argv.h"
@@ -236,12 +236,12 @@ procman_data_new (GSettings *settings)
pd->config.show_tree = g_settings_get_boolean (settings, "show-tree");
g_signal_connect (G_OBJECT(settings), "changed::show-tree", G_CALLBACK(tree_changed_cb), pd);
- pd->config.solaris_mode = g_settings_get_boolean(settings, procman::gconf::solaris_mode.c_str());
- std::string detail_string("changed::" + procman::gconf::solaris_mode);
+ pd->config.solaris_mode = g_settings_get_boolean(settings, procman::settings::solaris_mode.c_str());
+ std::string detail_string("changed::" + procman::settings::solaris_mode);
g_signal_connect(G_OBJECT(settings), detail_string.c_str(), G_CALLBACK(solaris_mode_changed_cb), pd);
- pd->config.network_in_bits = g_settings_get_boolean(settings, procman::gconf::network_in_bits.c_str());
- detail_string = "changed::" + procman::gconf::network_in_bits;
+ pd->config.network_in_bits = g_settings_get_boolean(settings, procman::settings::network_in_bits.c_str());
+ detail_string = "changed::" + procman::settings::network_in_bits;
g_signal_connect(G_OBJECT(settings), detail_string.c_str(), G_CALLBACK(network_in_bits_changed_cb), pd);
pd->config.show_kill_warning = g_settings_get_boolean (settings, "kill-dialog");
@@ -689,7 +689,6 @@ main (int argc, char *argv[])
g_set_application_name(_("System Monitor"));
settings = g_settings_new (GSM_GSETTINGS_SCHEMA);
- // gconf_client_add_dir(settings, "/apps/procman", GCONF_CLIENT_PRELOAD_NONE, NULL);
glibtop_init ();
diff --git a/src/gconf-keys.cpp b/src/settings-keys.cpp
similarity index 83%
rename from src/gconf-keys.cpp
rename to src/settings-keys.cpp
index 69792a0..a8a2e33 100644
--- a/src/gconf-keys.cpp
+++ b/src/settings-keys.cpp
@@ -1,9 +1,9 @@
-#include "gconf-keys.h"
+#include "settings-keys.h"
namespace procman
{
- namespace gconf
+ namespace settings
{
const std::string root("/apps/procman");
const std::string solaris_mode("solaris-mode");
diff --git a/src/gconf-keys.h b/src/settings-keys.h
similarity index 59%
rename from src/gconf-keys.h
rename to src/settings-keys.h
index 0d05fd6..e83f7b8 100644
--- a/src/gconf-keys.h
+++ b/src/settings-keys.h
@@ -1,12 +1,11 @@
-#ifndef H_PROCMAN_GCONF_KEYS_1177430397
-#define H_PROCMAN_GCONF_KEYS_1177430397
+#ifndef H_PROCMAN_SETTINGS_KEYS_1177430397
+#define H_PROCMAN_SETTINGS_KEYS_1177430397
#include <string>
-
namespace procman
{
- namespace gconf
+ namespace settings
{
extern const std::string root;
extern const std::string solaris_mode;
@@ -16,4 +15,4 @@ namespace procman
}
-#endif // H_PROCMAN_GCONF_KEYS_1177430397
+#endif // H_PROCMAN_SETTINGS_KEYS_1177430397
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]