[eog-plugins] [exif-display] Migrate from GConf to GSettings
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog-plugins] [exif-display] Migrate from GConf to GSettings
- Date: Wed, 9 Feb 2011 17:03:49 +0000 (UTC)
commit 9a10baacbf01c11e7360162504646c74444416f9
Author: Felix Riemann <friemann gnome org>
Date: Tue Feb 8 14:45:14 2011 +0100
[exif-display] Migrate from GConf to GSettings
The keys don't have descriptions yet.
configure.ac | 14 +-
plugins/exif-display/Makefile.am | 16 ++-
.../eog-exif-display-plugin-settings.h | 31 +++++
.../exif-display/eog-exif-display-plugin-setup.c | 77 +++---------
plugins/exif-display/eog-exif-display-plugin.c | 135 ++++++++++----------
plugins/exif-display/eog-exif-display-plugin.h | 5 +
...nome.eog.plugins.exif-display.gschema.xml.in.in | 13 ++
7 files changed, 148 insertions(+), 143 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index aa8e2ce..ff1ac1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,7 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
# **********
PKG_CHECK_MODULES([EOG], [
- glib-2.0 >= 2.12.0
+ glib-2.0 >= 2.26.0
gtk+-3.0 >= 2.99.3
libpeas-1.0 >= 0.7.0
eog >= 2.91.6
@@ -128,12 +128,10 @@ IFS="$eogpl_save_ifs"
AC_MSG_RESULT([$PLUGINS])
# *****
-# GConf
+# GSettings
# *****
-AC_PATH_PROG(GCONFTOOL, gconftool-2)
-
-AM_GCONF_SOURCE_2
+GLIB_GSETTINGS
# **************
# Python Support
@@ -353,14 +351,13 @@ if test "$?" = 1
then
PKG_CHECK_MODULES(EXIFDISPLAY,
- [ libexif >= 0.6.16,
- gconf-2.0 >= 2.5.90 ],
+ [ libexif >= 0.6.16 ],
[],[have_exifdisplay=no])
AC_SUBST(EXIFDISPLAY_LIBS)
AC_SUBST(EXIFDISPLAY_CFLAGS)
if test "x$have_exifdisplay" = "xno"
then
- undef_plugin exif-display "libexif or gconf2 was not found"
+ undef_plugin exif-display "libexif was not found"
fi
fi
@@ -388,6 +385,7 @@ plugins/Makefile
plugins/map/Makefile
plugins/fit-to-width/Makefile
plugins/exif-display/Makefile
+plugins/exif-display/org.gnome.eog.plugins.exif-display.gschema.xml.in
plugins/send-by-mail/Makefile
plugins/slideshowshuffle/Makefile
plugins/postr/Makefile
diff --git a/plugins/exif-display/Makefile.am b/plugins/exif-display/Makefile.am
index d6cd327..c390f19 100644
--- a/plugins/exif-display/Makefile.am
+++ b/plugins/exif-display/Makefile.am
@@ -36,9 +36,17 @@ uidir = $(plugindir)/exif-display
plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-EXTRA_DIST = $(plugin_in_files) $(UI_FILES)
-
-CLEANFILES = $(plugin_DATA)
-DISTCLEANFILES = $(plugin_DATA)
+gsettings_SCHEMAS = org.gnome.eog.plugins.exif-display.gschema.xml
+ INTLTOOL_XML_NOMERGE_RULE@
+ GSETTINGS_RULES@
+
+EXTRA_DIST = \
+ $(plugin_in_files) \
+ $(UI_FILES) \
+ org.gnome.eog.plugins.exif-display.gschema.xml.in.in
+
+CLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS)
+DISTCLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS)
+MAINTAINERCLEANFILES = $(gsettings_SCHEMAS:.xml=.valid)
-include $(top_srcdir)/git.mk
diff --git a/plugins/exif-display/eog-exif-display-plugin-settings.h b/plugins/exif-display/eog-exif-display-plugin-settings.h
new file mode 100644
index 0000000..91410e6
--- /dev/null
+++ b/plugins/exif-display/eog-exif-display-plugin-settings.h
@@ -0,0 +1,31 @@
+/* Exif-display Plugin - GSettings Keys Macros
+ *
+ * Copyright (C) 2011 The Free Software Foundation
+ *
+ * Author: Felix Riemann <friemann gnome org>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __EOG_EXIF_DISPLAY_PLUGIN_SETTINGS_H__
+#define __EOG_EXIF_DISPLAY_PLUGIN_SETTINGS_H__
+
+#define EOG_EXIF_DISPLAY_CONF_SCHEMA_ID "org.gnome.eog.plugins.exif-display"
+
+#define EOG_EXIF_DISPLAY_CONF_CHANNELS_HISTOGRAM "channels-histogram"
+#define EOG_EXIF_DISPLAY_CONF_RGB_HISTOGRAM "rgb-histogram"
+#define EOG_EXIF_DISPLAY_CONF_EXIF_IN_STATUSBAR "exif-in-statusbar"
+
+#endif /* __EOG_EXIF_DISPLAY_PLUGIN_SETTINGS_H__*/
diff --git a/plugins/exif-display/eog-exif-display-plugin-setup.c b/plugins/exif-display/eog-exif-display-plugin-setup.c
index e9e1c8e..7a9418e 100644
--- a/plugins/exif-display/eog-exif-display-plugin-setup.c
+++ b/plugins/exif-display/eog-exif-display-plugin-setup.c
@@ -26,26 +26,14 @@
#include <gtk/gtk.h>
-#include <gconf/gconf-client.h>
-
#include <glib/gi18n-lib.h>
#include <eog/eog-debug.h>
#include <libpeas-gtk/peas-gtk-configurable.h>
-#include "eog-exif-display-plugin-setup.h"
-
-#define EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_CHANNELS_HISTOGRAM "/apps/eog/plugins/exif_display/display_channels_histogram"
-#define EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_RGB_HISTOGRAM "/apps/eog/plugins/exif_display/display_rgb_histogram"
-#define EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_EXIF_STATUSBAR "/apps/eog/plugins/exif_display/display_exif_in_statusbar"
+#include "eog-exif-display-plugin-settings.h"
-/* copy-pasted from eog-preferences-dialog.c */
-#define GCONF_OBJECT_KEY "GCONF_KEY"
-
-/* copy-pasted from eog-preferences-dialog.c */
-#define TOGGLE_INVERT_VALUE "TOGGLE_INVERT_VALUE"
-
-static GConfClient *gconf_client = NULL;
+#include "eog-exif-display-plugin-setup.h"
#define GTKBUILDER_CONFIG_FILE EOG_PLUGINDIR"/exif-display/exif-display-config.ui"
@@ -64,27 +52,6 @@ eog_exif_display_plugin_setup_init (EogExifDisplayPluginSetup *setup)
setup->vbox = NULL;
}
-/* copy-pasted from eog-preferences-dialog.c */
-static void
-pd_check_toggle_cb (GtkWidget *widget, gpointer data)
-{
- char *key = NULL;
- gboolean invert = FALSE;
- gboolean value;
-
- key = g_object_get_data (G_OBJECT (widget), GCONF_OBJECT_KEY);
- invert = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), TOGGLE_INVERT_VALUE));
-
- value = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
-
- if (key == NULL) return;
-
- gconf_client_set_bool (GCONF_CLIENT (data),
- key,
- (invert) ? !value : value,
- NULL);
-}
-
static void
close_config_window_cb(GtkWidget *widget, gpointer _data)
{
@@ -93,28 +60,11 @@ close_config_window_cb(GtkWidget *widget, gpointer _data)
gtk_widget_destroy (GTK_WIDGET (gtk_widget_get_toplevel (data)));
}
-static void
-connect_checkbox_to_gconf_setting (GtkToggleButton *checkbox, char *gconf_key)
-{
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox),
- gconf_client_get_bool (gconf_client,
- gconf_key,
- NULL));
-
- g_object_set_data (G_OBJECT (checkbox),
- GCONF_OBJECT_KEY,
- gconf_key);
-
- g_signal_connect (G_OBJECT (checkbox),
- "toggled",
- G_CALLBACK (pd_check_toggle_cb),
- gconf_client);
-}
-
static GtkWidget *
impl_create_config_widget (PeasGtkConfigurable *configurable)
{
EogExifDisplayPluginSetup *setup;
+ GSettings *settings;
GtkBuilder *config_builder;
GError *error = NULL;
GtkWidget *display_channels_histogram_widget, *display_rgb_histogram_widget;
@@ -122,6 +72,7 @@ impl_create_config_widget (PeasGtkConfigurable *configurable)
GtkWidget *result;
setup = EOG_EXIF_DISPLAY_PLUGIN_SETUP (configurable);
+ settings = g_settings_new (EOG_EXIF_DISPLAY_CONF_SCHEMA_ID);
config_builder = gtk_builder_new ();
gtk_builder_set_translation_domain (config_builder, GETTEXT_PACKAGE);
@@ -139,12 +90,18 @@ impl_create_config_widget (PeasGtkConfigurable *configurable)
display_camera_settings_in_statusbar = GTK_WIDGET (
gtk_builder_get_object (config_builder, "display_camerasettings_statusbar"));
- connect_checkbox_to_gconf_setting (GTK_TOGGLE_BUTTON (display_channels_histogram_widget),
- EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_CHANNELS_HISTOGRAM);
- connect_checkbox_to_gconf_setting (GTK_TOGGLE_BUTTON (display_rgb_histogram_widget),
- EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_RGB_HISTOGRAM);
- connect_checkbox_to_gconf_setting (GTK_TOGGLE_BUTTON (display_camera_settings_in_statusbar),
- EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_EXIF_STATUSBAR);
+ g_settings_bind (settings, EOG_EXIF_DISPLAY_CONF_CHANNELS_HISTOGRAM,
+ display_channels_histogram_widget,
+ "active", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (settings, EOG_EXIF_DISPLAY_CONF_RGB_HISTOGRAM,
+ display_rgb_histogram_widget,
+ "active", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (settings, EOG_EXIF_DISPLAY_CONF_EXIF_IN_STATUSBAR,
+ display_camera_settings_in_statusbar,
+ "active", G_SETTINGS_BIND_DEFAULT);
+
+ g_object_unref (settings);
+
return result;
}
@@ -170,8 +127,6 @@ eog_exif_display_plugin_setup_class_init (EogExifDisplayPluginSetupClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- gconf_client = gconf_client_get_default ();
-
object_class->dispose = eog_exif_display_plugin_setup_dispose;
}
diff --git a/plugins/exif-display/eog-exif-display-plugin.c b/plugins/exif-display/eog-exif-display-plugin.c
index 2a9f71e..687d091 100644
--- a/plugins/exif-display/eog-exif-display-plugin.c
+++ b/plugins/exif-display/eog-exif-display-plugin.c
@@ -25,8 +25,6 @@
#include <gtk/gtk.h>
-#include <gconf/gconf-client.h>
-
#include <glib/gi18n-lib.h>
#include <eog/eog-debug.h>
@@ -42,33 +40,23 @@
#include <eog/eog-sidebar.h>
#include <eog/eog-window-activatable.h>
+#include "eog-exif-display-plugin-settings.h"
#include "eog-exif-display-plugin-setup.h"
#include "eog-exif-display-plugin.h"
-#define EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_CHANNELS_HISTOGRAM "/apps/eog/plugins/exif_display/display_channels_histogram"
-#define EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_RGB_HISTOGRAM "/apps/eog/plugins/exif_display/display_rgb_histogram"
-#define EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_EXIF_STATUSBAR "/apps/eog/plugins/exif_display/display_exif_in_statusbar"
-
-/* copy-pasted from eog-preferences-dialog.c */
-#define GCONF_OBJECT_KEY "GCONF_KEY"
-
-/* copy-pasted from eog-preferences-dialog.c */
-#define TOGGLE_INVERT_VALUE "TOGGLE_INVERT_VALUE"
-
-static GConfClient *gconf_client = NULL;
-
#define GTKBUILDER_FILE EOG_PLUGINDIR"/exif-display/exif-display.ui"
-#define GTKBUILDER_CONFIG_FILE EOG_PLUGINDIR"/exif-display/exif-display-config.ui"
enum {
- PROP_O,
- PROP_WINDOW
+ PROP_O,
+ PROP_DRAW_CHAN_HISTOGRAM,
+ PROP_DRAW_RGB_HISTOGRAM,
+ PROP_ENABLE_STATUSBAR,
+ PROP_WINDOW
};
static void
eog_window_activatable_iface_init (EogWindowActivatableInterface *iface);
-
G_DEFINE_DYNAMIC_TYPE_EXTENDED (EogExifDisplayPlugin, eog_exif_display_plugin,
PEAS_TYPE_EXTENSION_BASE, 0,
G_IMPLEMENT_INTERFACE_DYNAMIC(EOG_TYPE_WINDOW_ACTIVATABLE,
@@ -415,25 +403,6 @@ draw_histogram_graph (cairo_t *cr, int *histogram_values, int max_of_array_sums)
cairo_fill (cr);
}
-static gboolean
-read_gconf_bool_setting (const char *gconf_key)
-{
- gboolean result = FALSE;
- GConfEntry *mode_entry = gconf_client_get_entry (gconf_client,
- gconf_key,
- NULL, TRUE, NULL);
-
- if (G_LIKELY (mode_entry != NULL)) {
- if (mode_entry->value != NULL &&
- mode_entry->value->type == GCONF_VALUE_BOOL) {
- result = gconf_value_get_bool (mode_entry->value);
- }
- gconf_entry_unref (mode_entry);
- }
-
- return result;
-}
-
static void
drawing_area_draw_cb (GtkDrawingArea *drawing_area, cairo_t *cr,
EogExifDisplayPlugin *plugin)
@@ -447,10 +416,8 @@ drawing_area_draw_cb (GtkDrawingArea *drawing_area, cairo_t *cr,
if (!gtk_widget_get_realized (GTK_WIDGET (drawing_area)))
return;
- draw_channels_histogram = read_gconf_bool_setting (
- EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_CHANNELS_HISTOGRAM);
- draw_rgb_histogram = read_gconf_bool_setting (
- EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_RGB_HISTOGRAM);
+ draw_channels_histogram = plugin->draw_chan_histogram;
+ draw_rgb_histogram = plugin->draw_rgb_histogram;
eog_image = eog_thumb_view_get_first_selected_image (plugin->thumbview);
g_return_if_fail (eog_image != NULL);
@@ -600,7 +567,7 @@ selection_changed_cb (EogThumbView *view, EogExifDisplayPlugin *plugin)
image = eog_thumb_view_get_first_selected_image (view);
g_return_if_fail (image != NULL);
- if (read_gconf_bool_setting (EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_EXIF_STATUSBAR)) {
+ if (plugin->enable_statusbar) {
statusbar_update_exif_data (GTK_STATUSBAR (plugin->statusbar_exif), view);
}
@@ -634,17 +601,20 @@ selection_changed_cb (EogThumbView *view, EogExifDisplayPlugin *plugin)
}
static void
-eog_display_histogram_settings_changed_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer data)
+eog_display_histogram_settings_changed_cb (GSettings *setting,
+ gchar *key,
+ gpointer data)
{
- g_return_if_fail (GTK_IS_WIDGET (data));
+ EogExifDisplayPlugin *plugin;
+
+ g_return_if_fail (EOG_IS_EXIF_DISPLAY_PLUGIN (data));
+
+ plugin = EOG_EXIF_DISPLAY_PLUGIN(data);
/* redrawing the histogram will be enough to make
* that the changes are applied.
*/
- gtk_widget_queue_draw (GTK_WIDGET (data));
+ gtk_widget_queue_draw (GTK_WIDGET (plugin->drawing_area));
}
static void
@@ -665,7 +635,7 @@ setup_statusbar_exif (EogExifDisplayPlugin *plugin)
{
GtkWidget *statusbar = eog_window_get_statusbar (plugin->window);
- if (read_gconf_bool_setting (EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_EXIF_STATUSBAR)) {
+ if (plugin->enable_statusbar) {
plugin->statusbar_exif = gtk_statusbar_new ();
gtk_widget_set_size_request (plugin->statusbar_exif, 280, 10);
gtk_box_pack_end (GTK_BOX (statusbar),
@@ -680,10 +650,9 @@ setup_statusbar_exif (EogExifDisplayPlugin *plugin)
}
static void
-eog_display_statusbar_settings_changed_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer data)
+eog_display_statusbar_settings_changed_cb (GSettings *settings,
+ gchar *key,
+ gpointer data)
{
setup_statusbar_exif (EOG_EXIF_DISPLAY_PLUGIN (data));
}
@@ -693,12 +662,13 @@ impl_activate (EogWindowActivatable *activatable)
{
EogExifDisplayPlugin *plugin = EOG_EXIF_DISPLAY_PLUGIN (activatable);
EogWindow *window = plugin->window;
+ GSettings *settings;
GtkWidget *thumbview;
GtkWidget *sidebar;
GtkWidget *drawing_area;
GError* error = NULL;
- gconf_client = gconf_client_get_default ();
+ settings = g_settings_new (EOG_EXIF_DISPLAY_CONF_SCHEMA_ID);
thumbview = eog_window_get_thumb_view (window);
plugin->thumbview = EOG_THUMB_VIEW (thumbview);
@@ -738,27 +708,22 @@ impl_activate (EogWindowActivatable *activatable)
plugin->gtkbuilder_widget);
gtk_widget_show_all (plugin->gtkbuilder_widget);
+ g_settings_bind (settings, EOG_EXIF_DISPLAY_CONF_CHANNELS_HISTOGRAM,
+ plugin, "draw-chan-histogram", G_SETTINGS_BIND_GET);
+ g_settings_bind (settings, EOG_EXIF_DISPLAY_CONF_RGB_HISTOGRAM,
+ plugin, "draw-rgb-histogram", G_SETTINGS_BIND_GET);
+ g_settings_bind (settings, EOG_EXIF_DISPLAY_CONF_EXIF_IN_STATUSBAR,
+ plugin, "enable-statusbar", G_SETTINGS_BIND_GET);
+
/* force display of data now */
selection_changed_cb (plugin->thumbview, plugin);
- if (read_gconf_bool_setting (EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_EXIF_STATUSBAR)) {
+ if (plugin->enable_statusbar)
+ {
statusbar_update_exif_data (GTK_STATUSBAR (plugin->statusbar_exif),
EOG_THUMB_VIEW (thumbview));
}
- gconf_client_notify_add (gconf_client,
- EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_CHANNELS_HISTOGRAM,
- eog_display_histogram_settings_changed_cb,
- plugin->drawing_area, NULL, NULL);
-
- gconf_client_notify_add (gconf_client,
- EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_RGB_HISTOGRAM,
- eog_display_histogram_settings_changed_cb,
- plugin->drawing_area, NULL, NULL);
-
- gconf_client_notify_add (gconf_client,
- EOG_EXIF_DISPLAY_CONF_UI_DISPLAY_EXIF_STATUSBAR,
- eog_display_statusbar_settings_changed_cb,
- plugin, NULL, NULL);
+ g_object_unref (settings);
}
static void
@@ -789,6 +754,15 @@ eog_exif_display_plugin_get_property (GObject *object,
switch (prop_id)
{
+ case PROP_DRAW_CHAN_HISTOGRAM:
+ g_value_set_boolean (value, plugin->draw_chan_histogram);
+ break;
+ case PROP_DRAW_RGB_HISTOGRAM:
+ g_value_set_boolean (value, plugin->draw_rgb_histogram);
+ break;
+ case PROP_ENABLE_STATUSBAR:
+ g_value_set_boolean (value, plugin->enable_statusbar);
+ break;
case PROP_WINDOW:
g_value_set_object (value, plugin->window);
break;
@@ -809,6 +783,15 @@ eog_exif_display_plugin_set_property (GObject *object,
switch (prop_id)
{
+ case PROP_DRAW_CHAN_HISTOGRAM:
+ plugin->draw_chan_histogram = g_value_get_boolean (value);
+ break;
+ case PROP_DRAW_RGB_HISTOGRAM:
+ plugin->draw_rgb_histogram = g_value_get_boolean (value);
+ break;
+ case PROP_ENABLE_STATUSBAR:
+ plugin->enable_statusbar = g_value_get_boolean (value);
+ break;
case PROP_WINDOW:
plugin->window = EOG_WINDOW (g_value_dup_object (value));
break;
@@ -838,10 +821,22 @@ eog_exif_display_plugin_class_init (EogExifDisplayPluginClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = eog_exif_display_plugin_dispose;
+ object_class->dispose = eog_exif_display_plugin_dispose;
object_class->set_property = eog_exif_display_plugin_set_property;
object_class->get_property = eog_exif_display_plugin_get_property;
+ g_object_class_install_property (object_class, PROP_DRAW_CHAN_HISTOGRAM,
+ g_param_spec_boolean ("draw-chan-histogram", NULL, NULL, FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_NAME));
+
+ g_object_class_install_property (object_class, PROP_DRAW_RGB_HISTOGRAM,
+ g_param_spec_boolean ("draw-rgb-histogram", NULL, NULL, FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_NAME));
+
+ g_object_class_install_property (object_class, PROP_ENABLE_STATUSBAR,
+ g_param_spec_boolean ("enable-statusbar", NULL, NULL, FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_NAME));
+
g_object_class_override_property (object_class, PROP_WINDOW, "window");
}
diff --git a/plugins/exif-display/eog-exif-display-plugin.h b/plugins/exif-display/eog-exif-display-plugin.h
index adb91f2..2fede17 100644
--- a/plugins/exif-display/eog-exif-display-plugin.h
+++ b/plugins/exif-display/eog-exif-display-plugin.h
@@ -74,6 +74,11 @@ struct _EogExifDisplayPlugin
/* Handlers ids */
guint selection_changed_id;
+
+ /* Settings */
+ gboolean enable_statusbar;
+ gboolean draw_chan_histogram;
+ gboolean draw_rgb_histogram;
};
/*
diff --git a/plugins/exif-display/org.gnome.eog.plugins.exif-display.gschema.xml.in.in b/plugins/exif-display/org.gnome.eog.plugins.exif-display.gschema.xml.in.in
new file mode 100644
index 0000000..5fc0a18
--- /dev/null
+++ b/plugins/exif-display/org.gnome.eog.plugins.exif-display.gschema.xml.in.in
@@ -0,0 +1,13 @@
+<schemalist>
+ <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.eog.plugins.exif-display" path="/apps/eog/plugins/exif-display/">
+ <key name="channels-histogram" type="b">
+ <default>false</default>
+ </key>
+ <key name="rgb-histogram" type="b">
+ <default>false</default>
+ </key>
+ <key name="exif-in-statusbar" type="b">
+ <default>false</default>
+ </key>
+ </schema>
+</schemalist>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]