]> git.0d.be Git - empathy.git/commitdiff
tpaw-gsettings: move the avatar path stuff from Empathy to tp-aw
authorMarco Barisione <marco.barisione@collabora.co.uk>
Tue, 30 Jul 2013 07:23:26 +0000 (08:23 +0100)
committerMarco Barisione <marco.barisione@collabora.co.uk>
Tue, 20 Aug 2013 10:03:06 +0000 (11:03 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=699492

libempathy-gtk/empathy-avatar-chooser.c
libempathy/empathy-gsettings.h
tp-account-widgets/Makefile.am
tp-account-widgets/tpaw-gsettings.h [new file with mode: 0644]

index e145d3ffce377b733c5eb6819dbfa39f74e398ef..f6a423dbdcc204c225d54266c3fe89a722b6717a 100644 (file)
 
 #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),
index 0a7a18c3ed81171ceb50af64c9eb85eb88a820c3..6f6fb3cf2409ac0cf4ed43d484420a1bcdadf546 100644 (file)
@@ -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"
index 26e80340d6cda1f8d57385c03ab31df5aaf6012b..89e9a515d6246ef9f96f654b9d738ede18e2136e 100644 (file)
@@ -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 (file)
index 0000000..527af14
--- /dev/null
@@ -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__ */
+