[gnome-panel/wip/3.0-freeze-break: 23/32] panel: Port tooltips_enabled key to GSettings
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip/3.0-freeze-break: 23/32] panel: Port tooltips_enabled key to GSettings
- Date: Thu, 24 Mar 2011 17:54:36 +0000 (UTC)
commit 70b5c7864f79799f5bcdcc203be220ae12d053b2
Author: Vincent Untz <vuntz gnome org>
Date: Wed Mar 23 19:34:25 2011 +0100
panel: Port tooltips_enabled key to GSettings
This also means we can get rid of panel-config-global.[ch] since it's
now doing nothing.
data/org.gnome.gnome-panel.gschema.xml | 2 +-
gnome-panel/Makefile.am | 2 -
gnome-panel/applet.c | 1 -
gnome-panel/button-widget.c | 1 -
gnome-panel/gnome-desktop-item-edit.c | 2 -
gnome-panel/launcher.c | 1 -
gnome-panel/main.c | 2 -
gnome-panel/menu.c | 1 -
gnome-panel/panel-action-button.c | 1 -
gnome-panel/panel-config-global.c | 101 --------------------------------
gnome-panel/panel-config-global.h | 39 ------------
gnome-panel/panel-context-menu.c | 1 -
gnome-panel/panel-global.schemas.in | 5 +-
gnome-panel/panel-schemas.h | 1 +
gnome-panel/panel-toplevel.c | 1 -
gnome-panel/panel-util.c | 12 +++-
gnome-panel/panel.c | 1 -
17 files changed, 14 insertions(+), 160 deletions(-)
---
diff --git a/data/org.gnome.gnome-panel.gschema.xml b/data/org.gnome.gnome-panel.gschema.xml
index b3df2b0..2c9d69b 100644
--- a/data/org.gnome.gnome-panel.gschema.xml
+++ b/data/org.gnome.gnome-panel.gschema.xml
@@ -11,7 +11,7 @@
<key name="enable-tooltips" type="b">
<default>true</default>
<summary>Enable tooltips</summary>
- <description>If true, tooltips are shown for objects in panels.</description>
+ <description>If true, tooltips are shown for objects in panels. Tooltips can be disabled for the whole desktop with the gtk-enable-tooltips property in GTK+.</description>
</key>
<key name="confirm-panel-removal" type="b">
<default>true</default>
diff --git a/gnome-panel/Makefile.am b/gnome-panel/Makefile.am
index 4459959..63e0c2f 100644
--- a/gnome-panel/Makefile.am
+++ b/gnome-panel/Makefile.am
@@ -32,7 +32,6 @@ panel_sources = \
panel-compatibility.c \
panel.c \
applet.c \
- panel-config-global.c \
panel-util.c \
panel-gconf.c \
panel-properties-dialog.c \
@@ -80,7 +79,6 @@ panel_headers = \
applet.h \
panel-util.h \
panel-properties-dialog.h \
- panel-config-global.h \
panel-gconf.h \
panel-run-dialog.h \
menu.h \
diff --git a/gnome-panel/applet.c b/gnome-panel/applet.c
index f8bf4db..e5dbd13 100644
--- a/gnome-panel/applet.c
+++ b/gnome-panel/applet.c
@@ -22,7 +22,6 @@
#include "panel-addto.h"
#include "panel-bindings.h"
#include "panel-gconf.h"
-#include "panel-config-global.h"
#include "panel-applet-frame.h"
#include "panel-action-button.h"
#include "panel-menu-bar.h"
diff --git a/gnome-panel/button-widget.c b/gnome-panel/button-widget.c
index 87de33a..85d59e7 100644
--- a/gnome-panel/button-widget.c
+++ b/gnome-panel/button-widget.c
@@ -11,7 +11,6 @@
#include "panel-widget.h"
#include "panel-types.h"
#include "panel-util.h"
-#include "panel-config-global.h"
#include "panel-marshal.h"
#include "panel-typebuiltins.h"
#include "panel-globals.h"
diff --git a/gnome-panel/gnome-desktop-item-edit.c b/gnome-panel/gnome-desktop-item-edit.c
index 8fd53a9..68c1dba 100644
--- a/gnome-panel/gnome-desktop-item-edit.c
+++ b/gnome-panel/gnome-desktop-item-edit.c
@@ -16,8 +16,6 @@
GSList *panel_applet_list_applets (void) { return NULL; }
#include "panel-gconf.h"
GConfClient *panel_gconf_get_client (void) { return NULL; }
-#include "panel-config-global.h"
-gboolean panel_global_config_get_tooltips_enabled (void) { return FALSE; }
#include "panel-lockdown.h"
gboolean panel_lockdown_get_disable_lock_screen (void) { return FALSE; }
#include "panel-bindings.h"
diff --git a/gnome-panel/launcher.c b/gnome-panel/launcher.c
index 916fa8e..7b035e8 100644
--- a/gnome-panel/launcher.c
+++ b/gnome-panel/launcher.c
@@ -32,7 +32,6 @@
#include "button-widget.h"
#include "panel-util.h"
-#include "panel-config-global.h"
#include "panel-gconf.h"
#include "panel-profile.h"
#include "xstuff.h"
diff --git a/gnome-panel/main.c b/gnome-panel/main.c
index 54a40cc..9200c23 100644
--- a/gnome-panel/main.c
+++ b/gnome-panel/main.c
@@ -21,7 +21,6 @@
#include <libpanel-util/panel-glib.h>
#include "panel-profile.h"
-#include "panel-config-global.h"
#include "panel-shell.h"
#include "panel-multiscreen.h"
#include "panel-session.h"
@@ -99,7 +98,6 @@ main (int argc, char **argv)
panel_multiscreen_init ();
panel_init_stock_icons_and_items ();
- panel_global_config_load ();
panel_lockdown_init ();
panel_profile_load ();
diff --git a/gnome-panel/menu.c b/gnome-panel/menu.c
index 60175f7..1298589 100644
--- a/gnome-panel/menu.c
+++ b/gnome-panel/menu.c
@@ -37,7 +37,6 @@
#include "launcher.h"
#include "panel-util.h"
#include "panel.h"
-#include "panel-config-global.h"
#include "panel-stock-icons.h"
#include "panel-action-button.h"
#include "panel-profile.h"
diff --git a/gnome-panel/panel-action-button.c b/gnome-panel/panel-action-button.c
index bf0ae88..e3f96f3 100644
--- a/gnome-panel/panel-action-button.c
+++ b/gnome-panel/panel-action-button.c
@@ -38,7 +38,6 @@
#include <libpanel-util/panel-show.h>
#include "applet.h"
-#include "panel-config-global.h"
#include "panel-gconf.h"
#include "panel-profile.h"
#include "panel-typebuiltins.h"
diff --git a/gnome-panel/panel-context-menu.c b/gnome-panel/panel-context-menu.c
index 0fe9367..e74dc4a 100644
--- a/gnome-panel/panel-context-menu.c
+++ b/gnome-panel/panel-context-menu.c
@@ -41,7 +41,6 @@
#include "panel-util.h"
#include "panel.h"
#include "menu.h"
-#include "panel-config-global.h"
#include "panel-profile.h"
#include "panel-properties-dialog.h"
#include "panel-lockdown.h"
diff --git a/gnome-panel/panel-global.schemas.in b/gnome-panel/panel-global.schemas.in
index 3691d33..4b0d3bd 100644
--- a/gnome-panel/panel-global.schemas.in
+++ b/gnome-panel/panel-global.schemas.in
@@ -14,9 +14,8 @@ Panel Global Config Schema File - work in progress
<type>bool</type>
<default>true</default>
<locale name="C">
- <short>Enable tooltips</short>
- <long>If true, tooltips are shown for objects in panels.
- </long>
+ <short>Deprecated</short>
+ <long></long>
</locale>
</schema>
diff --git a/gnome-panel/panel-schemas.h b/gnome-panel/panel-schemas.h
index 325c88e..f9e7934 100644
--- a/gnome-panel/panel-schemas.h
+++ b/gnome-panel/panel-schemas.h
@@ -3,6 +3,7 @@
#define PANEL_GENERAL_SCHEMA "org.gnome.gnome-panel.general"
#define PANEL_GENERAL_CONFIRM_PANEL_REMOVAL_KEY "confirm-panel-removal"
+#define PANEL_GENERAL_ENABLE_TOOLTIPS_KEY "enable-tooltips"
#define PANEL_RUN_SCHEMA "org.gnome.gnome-panel.run-dialog"
#define PANEL_RUN_HISTORY_KEY "history"
diff --git a/gnome-panel/panel-toplevel.c b/gnome-panel/panel-toplevel.c
index 90c26c9..980e1e9 100644
--- a/gnome-panel/panel-toplevel.c
+++ b/gnome-panel/panel-toplevel.c
@@ -45,7 +45,6 @@
#include "panel-widget.h"
#include "panel-bindings.h"
#include "panel-struts.h"
-#include "panel-config-global.h"
#include "panel-lockdown.h"
G_DEFINE_TYPE (PanelToplevel, panel_toplevel, GTK_TYPE_WINDOW)
diff --git a/gnome-panel/panel-util.c b/gnome-panel/panel-util.c
index 5c62564..24841fc 100644
--- a/gnome-panel/panel-util.c
+++ b/gnome-panel/panel-util.c
@@ -37,12 +37,12 @@
#include "applet.h"
#include "xstuff.h"
#include "panel-bindings.h"
-#include "panel-config-global.h"
#include "panel-gconf.h"
#include "panel-globals.h"
#include "launcher.h"
#include "panel-icon-names.h"
#include "panel-lockdown.h"
+#include "panel-schemas.h"
char *
panel_util_make_exec_uri_for_desktop (const char *exec)
@@ -1170,7 +1170,15 @@ panel_util_query_tooltip_cb (GtkWidget *widget,
GtkTooltip *tooltip,
const char *text)
{
- if (!panel_global_config_get_tooltips_enabled ())
+ GSettings *gsettings;
+ gboolean enable_tooltips;
+
+ gsettings = g_settings_new (PANEL_GENERAL_SCHEMA);
+ enable_tooltips = g_settings_get_boolean (gsettings,
+ PANEL_GENERAL_ENABLE_TOOLTIPS_KEY);
+ g_object_unref (gsettings);
+
+ if (!enable_tooltips)
return FALSE;
gtk_tooltip_set_text (tooltip, text);
diff --git a/gnome-panel/panel.c b/gnome-panel/panel.c
index ecb838b..aa9c9bd 100644
--- a/gnome-panel/panel.c
+++ b/gnome-panel/panel.c
@@ -30,7 +30,6 @@
#include "panel-bindings.h"
#include "panel-context-menu.h"
#include "panel-util.h"
-#include "panel-config-global.h"
#include "panel-gconf.h"
#include "panel-profile.h"
#include "panel-applet-frame.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]