From 6388cda27235b0bb0f19fbd94eef5ca138cf075b Mon Sep 17 00:00:00 2001 From: Marco Barisione Date: Tue, 30 Jul 2013 08:23:26 +0100 Subject: tpaw-gsettings: move the avatar path stuff from Empathy to tp-aw https://bugzilla.gnome.org/show_bug.cgi?id=699492 --- libempathy-gtk/empathy-avatar-chooser.c | 8 +++---- libempathy/empathy-gsettings.h | 1 - tp-account-widgets/Makefile.am | 1 + tp-account-widgets/tpaw-gsettings.h | 37 +++++++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 tp-account-widgets/tpaw-gsettings.h 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 #include +#include #ifdef HAVE_CHEESE #include #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 + */ + +#ifndef __TPAW_GSETTINGS_H__ +#define __TPAW_GSETTINGS_H__ + +#include + +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__ */ + -- cgit v1.2.3