aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Barisione <marco.barisione@collabora.co.uk>2013-07-30 15:23:26 +0800
committerMarco Barisione <marco.barisione@collabora.co.uk>2013-08-20 18:03:06 +0800
commit6388cda27235b0bb0f19fbd94eef5ca138cf075b (patch)
treeea26d1de9c9b0d32741531124505712451a1fc36
parentf6d827a6b1006858de979d6627598fa17098ee62 (diff)
downloadgsoc2013-empathy-6388cda27235b0bb0f19fbd94eef5ca138cf075b.tar
gsoc2013-empathy-6388cda27235b0bb0f19fbd94eef5ca138cf075b.tar.gz
gsoc2013-empathy-6388cda27235b0bb0f19fbd94eef5ca138cf075b.tar.bz2
gsoc2013-empathy-6388cda27235b0bb0f19fbd94eef5ca138cf075b.tar.lz
gsoc2013-empathy-6388cda27235b0bb0f19fbd94eef5ca138cf075b.tar.xz
gsoc2013-empathy-6388cda27235b0bb0f19fbd94eef5ca138cf075b.tar.zst
gsoc2013-empathy-6388cda27235b0bb0f19fbd94eef5ca138cf075b.zip
tpaw-gsettings: move the avatar path stuff from Empathy to tp-aw
https://bugzilla.gnome.org/show_bug.cgi?id=699492
-rw-r--r--libempathy-gtk/empathy-avatar-chooser.c8
-rw-r--r--libempathy/empathy-gsettings.h1
-rw-r--r--tp-account-widgets/Makefile.am1
-rw-r--r--tp-account-widgets/tpaw-gsettings.h37
4 files changed, 42 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c
index e145d3ffc..f6a423dbd 100644
--- a/libempathy-gtk/empathy-avatar-chooser.c
+++ b/libempathy-gtk/empathy-avatar-chooser.c
@@ -25,12 +25,12 @@
#include <glib/gi18n-lib.h>
#include <tp-account-widgets/tpaw-camera-monitor.h>
+#include <tp-account-widgets/tpaw-gsettings.h>
#ifdef HAVE_CHEESE
#include <cheese-avatar-chooser.h>
#endif /* HAVE_CHEESE */
-#include "empathy-gsettings.h"
#include "empathy-images.h"
#include "empathy-ui-utils.h"
#include "empathy-utils.h"
@@ -977,7 +977,7 @@ avatar_chooser_response_cb (GtkWidget *widget,
if (path != NULL)
{
g_settings_set_string (self->priv->gsettings_ui,
- EMPATHY_PREFS_UI_AVATAR_DIRECTORY,
+ TPAW_PREFS_UI_AVATAR_DIRECTORY,
path);
g_free (path);
@@ -1052,7 +1052,7 @@ avatar_chooser_clicked_cb (GtkWidget *button,
/* Get special dirs */
saved_dir = g_settings_get_string (self->priv->gsettings_ui,
- EMPATHY_PREFS_UI_AVATAR_DIRECTORY);
+ TPAW_PREFS_UI_AVATAR_DIRECTORY);
if (saved_dir != NULL &&
!g_file_test (saved_dir, G_FILE_TEST_IS_DIR))
@@ -1132,7 +1132,7 @@ empathy_avatar_chooser_init (EmpathyAvatarChooser *self)
G_N_ELEMENTS (drop_types),
GDK_ACTION_COPY);
- self->priv->gsettings_ui = g_settings_new (EMPATHY_PREFS_UI_SCHEMA);
+ self->priv->gsettings_ui = g_settings_new (TPAW_PREFS_UI_SCHEMA);
g_signal_connect (self, "drag-motion",
G_CALLBACK (avatar_chooser_drag_motion_cb),
diff --git a/libempathy/empathy-gsettings.h b/libempathy/empathy-gsettings.h
index 0a7a18c3e..6f6fb3cf2 100644
--- a/libempathy/empathy-gsettings.h
+++ b/libempathy/empathy-gsettings.h
@@ -73,7 +73,6 @@ G_BEGIN_DECLS
#define EMPATHY_PREFS_UI_SEPARATE_CHAT_WINDOWS "separate-chat-windows"
#define EMPATHY_PREFS_UI_EVENTS_NOTIFY_AREA "events-notify-area"
#define EMPATHY_PREFS_UI_MAIN_WINDOW_HIDDEN "main-window-hidden"
-#define EMPATHY_PREFS_UI_AVATAR_DIRECTORY "avatar-directory"
#define EMPATHY_PREFS_UI_SHOW_BALANCES "show-balance-in-roster"
#define EMPATHY_PREFS_UI_CHAT_WINDOW_PANED_POS "chat-window-paned-pos"
#define EMPATHY_PREFS_UI_SHOW_OFFLINE "show-offline"
diff --git a/tp-account-widgets/Makefile.am b/tp-account-widgets/Makefile.am
index 26e80340d..89e9a515d 100644
--- a/tp-account-widgets/Makefile.am
+++ b/tp-account-widgets/Makefile.am
@@ -55,6 +55,7 @@ libtp_account_widgets_headers = \
tpaw-camera-monitor.h \
tpaw-connection-managers.h \
tpaw-contactinfo-utils.h \
+ tpaw-gsettings.h \
tpaw-keyring.h \
tpaw-irc-network-chooser-dialog.h \
tpaw-irc-network-chooser.h \
diff --git a/tp-account-widgets/tpaw-gsettings.h b/tp-account-widgets/tpaw-gsettings.h
new file mode 100644
index 000000000..527af141c
--- /dev/null
+++ b/tp-account-widgets/tpaw-gsettings.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2010-2013 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Authors: Danielle Madeley <danielle.madeley@collabora.co.uk>
+ */
+
+#ifndef __TPAW_GSETTINGS_H__
+#define __TPAW_GSETTINGS_H__
+
+#include <gio/gio.h>
+
+G_BEGIN_DECLS
+
+/* FIXME: Move this after the split of tp-account-widgets. */
+#define TPAW_PREFS_SCHEMA "org.gnome.Empathy"
+
+#define TPAW_PREFS_UI_SCHEMA TPAW_PREFS_SCHEMA ".ui"
+#define TPAW_PREFS_UI_AVATAR_DIRECTORY "avatar-directory"
+
+G_END_DECLS
+
+#endif /* __TPAW_GSETTINGS_H__ */
+