diff options
author | Marco Barisione <marco.barisione@collabora.co.uk> | 2013-07-30 20:52:30 +0800 |
---|---|---|
committer | Marco Barisione <marco.barisione@collabora.co.uk> | 2013-08-20 18:03:06 +0800 |
commit | 6338748568d1a37c423568e91e60eb838188a3c2 (patch) | |
tree | 595ab57251f486b7daedfe76d241e8cec567f3c9 | |
parent | 6388cda27235b0bb0f19fbd94eef5ca138cf075b (diff) | |
download | gsoc2013-empathy-6338748568d1a37c423568e91e60eb838188a3c2.tar gsoc2013-empathy-6338748568d1a37c423568e91e60eb838188a3c2.tar.gz gsoc2013-empathy-6338748568d1a37c423568e91e60eb838188a3c2.tar.bz2 gsoc2013-empathy-6338748568d1a37c423568e91e60eb838188a3c2.tar.lz gsoc2013-empathy-6338748568d1a37c423568e91e60eb838188a3c2.tar.xz gsoc2013-empathy-6338748568d1a37c423568e91e60eb838188a3c2.tar.zst gsoc2013-empathy-6338748568d1a37c423568e91e60eb838188a3c2.zip |
tpaw-images: move the default avatar definition from Empathy to tp-aw
https://bugzilla.gnome.org/show_bug.cgi?id=699492
-rw-r--r-- | libempathy-gtk/empathy-avatar-chooser.c | 4 | ||||
-rw-r--r-- | libempathy-gtk/empathy-images.h | 1 | ||||
-rw-r--r-- | libempathy-gtk/empathy-log-window.c | 3 | ||||
-rw-r--r-- | libempathy-gtk/empathy-roster-contact.c | 4 | ||||
-rw-r--r-- | libempathy-gtk/empathy-theme-adium.c | 3 | ||||
-rw-r--r-- | src/empathy-call-observer.c | 4 | ||||
-rw-r--r-- | src/empathy-call-window.c | 3 | ||||
-rw-r--r-- | src/empathy-event-manager.c | 5 | ||||
-rw-r--r-- | tp-account-widgets/Makefile.am | 1 | ||||
-rw-r--r-- | tp-account-widgets/tpaw-images.h | 31 |
10 files changed, 47 insertions, 12 deletions
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c index f6a423dbd..60556ff17 100644 --- a/libempathy-gtk/empathy-avatar-chooser.c +++ b/libempathy-gtk/empathy-avatar-chooser.c @@ -26,12 +26,12 @@ #include <glib/gi18n-lib.h> #include <tp-account-widgets/tpaw-camera-monitor.h> #include <tp-account-widgets/tpaw-gsettings.h> +#include <tp-account-widgets/tpaw-images.h> #ifdef HAVE_CHEESE #include <cheese-avatar-chooser.h> #endif /* HAVE_CHEESE */ -#include "empathy-images.h" #include "empathy-ui-utils.h" #include "empathy-utils.h" @@ -349,7 +349,7 @@ avatar_chooser_clear_image (EmpathyAvatarChooser *self) tp_clear_pointer (&self->priv->mime_type, g_free); self->priv->changed = TRUE; - image = gtk_image_new_from_icon_name (EMPATHY_IMAGE_AVATAR_DEFAULT, + image = gtk_image_new_from_icon_name (TPAW_IMAGE_AVATAR_DEFAULT, GTK_ICON_SIZE_DIALOG); gtk_button_set_image (GTK_BUTTON (self), image); } diff --git a/libempathy-gtk/empathy-images.h b/libempathy-gtk/empathy-images.h index 8ee40f2a9..3b7b8fdf9 100644 --- a/libempathy-gtk/empathy-images.h +++ b/libempathy-gtk/empathy-images.h @@ -45,7 +45,6 @@ G_BEGIN_DECLS #define EMPATHY_IMAGE_VIDEO_CALL "camera-web" #define EMPATHY_IMAGE_LOG "document-open-recent" #define EMPATHY_IMAGE_DOCUMENT_SEND "document-send" -#define EMPATHY_IMAGE_AVATAR_DEFAULT "avatar-default-symbolic" /* FIXME: need a better icon! */ #define EMPATHY_IMAGE_EDIT_MESSAGE "format-text-direction-ltr" #define EMPATHY_IMAGE_MIC "audio-input-microphone-symbolic" diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c index 9094f6946..f294502c6 100644 --- a/libempathy-gtk/empathy-log-window.c +++ b/libempathy-gtk/empathy-log-window.c @@ -28,6 +28,7 @@ #include <glib/gi18n-lib.h> #include <telepathy-glib/proxy-subclass.h> #include <tp-account-widgets/tpaw-builder.h> +#include <tp-account-widgets/tpaw-images.h> #include <tp-account-widgets/tpaw-camera-monitor.h> #include "action-chain-internal.h" @@ -1875,7 +1876,7 @@ add_event_to_store (EmpathyLogWindow *self, gtk_list_store_insert_with_values (store, NULL, -1, COL_WHO_TYPE, COL_TYPE_NORMAL, COL_WHO_ICON, room ? EMPATHY_IMAGE_GROUP_MESSAGE - : EMPATHY_IMAGE_AVATAR_DEFAULT, + : TPAW_IMAGE_AVATAR_DEFAULT, COL_WHO_NAME, name, COL_WHO_NAME_SORT_KEY, sort_key, COL_WHO_ID, tpl_entity_get_identifier (entity), diff --git a/libempathy-gtk/empathy-roster-contact.c b/libempathy-gtk/empathy-roster-contact.c index 2db024a3d..22b360075 100644 --- a/libempathy-gtk/empathy-roster-contact.c +++ b/libempathy-gtk/empathy-roster-contact.c @@ -2,8 +2,8 @@ #include "empathy-roster-contact.h" #include <glib/gi18n-lib.h> +#include <tp-account-widgets/tpaw-images.h> -#include "empathy-images.h" #include "empathy-ui-utils.h" #include "empathy-utils.h" @@ -125,7 +125,7 @@ avatar_loaded_cb (GObject *source, if (pixbuf == NULL) { pixbuf = empathy_pixbuf_from_icon_name_sized ( - EMPATHY_IMAGE_AVATAR_DEFAULT, AVATAR_SIZE); + TPAW_IMAGE_AVATAR_DEFAULT, AVATAR_SIZE); } gtk_image_set_from_pixbuf (GTK_IMAGE (self->priv->avatar), pixbuf); diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 721a0b4e5..5fd61d339 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -23,6 +23,7 @@ #include "empathy-theme-adium.h" #include <glib/gi18n-lib.h> +#include <tp-account-widgets/tpaw-images.h> #include <tp-account-widgets/tpaw-time.h> #include <tp-account-widgets/tpaw-utils.h> @@ -953,7 +954,7 @@ theme_adium_add_message (EmpathyThemeAdium *self, { if (!self->priv->data->default_avatar_filename) self->priv->data->default_avatar_filename = - empathy_filename_from_icon_name (EMPATHY_IMAGE_AVATAR_DEFAULT, + empathy_filename_from_icon_name (TPAW_IMAGE_AVATAR_DEFAULT, GTK_ICON_SIZE_DIALOG); avatar_filename = self->priv->data->default_avatar_filename; diff --git a/src/empathy-call-observer.c b/src/empathy-call-observer.c index 41e9bdfc1..733199cff 100644 --- a/src/empathy-call-observer.c +++ b/src/empathy-call-observer.c @@ -22,8 +22,8 @@ #include "empathy-call-observer.h" #include <glib/gi18n-lib.h> +#include <tp-account-widgets/tpaw-images.h> -#include "empathy-images.h" #include "empathy-notify-manager.h" #define DEBUG_FLAG EMPATHY_DEBUG_VOIP @@ -115,7 +115,7 @@ display_reject_notification (EmpathyCallObserver *self, emp_contact = empathy_contact_dup_from_tp_contact (contact); pixbuf = empathy_notify_manager_get_pixbuf_for_notification ( - self->priv->notify_mgr, emp_contact, EMPATHY_IMAGE_AVATAR_DEFAULT); + self->priv->notify_mgr, emp_contact, TPAW_IMAGE_AVATAR_DEFAULT); if (pixbuf != NULL) { diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index cac15bc66..5f10d919e 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -27,6 +27,7 @@ #include <farstream/fs-utils.h> #include <tp-account-widgets/tpaw-builder.h> #include <tp-account-widgets/tpaw-camera-monitor.h> +#include <tp-account-widgets/tpaw-images.h> #include "empathy-about-dialog.h" #include "empathy-audio-sink.h" @@ -1892,7 +1893,7 @@ init_contact_avatar_with_size (EmpathyContact *contact, if (pixbuf_avatar == NULL) { pixbuf_avatar = empathy_pixbuf_from_icon_name_sized ( - EMPATHY_IMAGE_AVATAR_DEFAULT, size); + TPAW_IMAGE_AVATAR_DEFAULT, size); } gtk_image_set_from_pixbuf (GTK_IMAGE (image_widget), pixbuf_avatar); diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index fd6e659b2..f2d197580 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -23,6 +23,7 @@ #include "empathy-event-manager.h" #include <glib/gi18n.h> +#include <tp-account-widgets/tpaw-images.h> #include "empathy-call-utils.h" #include "empathy-connection-aggregator.h" @@ -1165,7 +1166,7 @@ check_presence (EmpathyEventManager *manager, { event_manager_add (manager, NULL, contact, EMPATHY_EVENT_TYPE_PRESENCE_OFFLINE, - EMPATHY_IMAGE_AVATAR_DEFAULT, + TPAW_IMAGE_AVATAR_DEFAULT, empathy_contact_get_alias (contact), _("Disconnected"), NULL, NULL, NULL); } @@ -1186,7 +1187,7 @@ check_presence (EmpathyEventManager *manager, { event_manager_add (manager, NULL, contact, EMPATHY_EVENT_TYPE_PRESENCE_ONLINE, - EMPATHY_IMAGE_AVATAR_DEFAULT, + TPAW_IMAGE_AVATAR_DEFAULT, empathy_contact_get_alias (contact), _("Connected"), NULL, NULL, NULL); } diff --git a/tp-account-widgets/Makefile.am b/tp-account-widgets/Makefile.am index 89e9a515d..8ef8b4a36 100644 --- a/tp-account-widgets/Makefile.am +++ b/tp-account-widgets/Makefile.am @@ -56,6 +56,7 @@ libtp_account_widgets_headers = \ tpaw-connection-managers.h \ tpaw-contactinfo-utils.h \ tpaw-gsettings.h \ + tpaw-images.h \ tpaw-keyring.h \ tpaw-irc-network-chooser-dialog.h \ tpaw-irc-network-chooser.h \ diff --git a/tp-account-widgets/tpaw-images.h b/tp-account-widgets/tpaw-images.h new file mode 100644 index 000000000..48bc4cbf4 --- /dev/null +++ b/tp-account-widgets/tpaw-images.h @@ -0,0 +1,31 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 2007-2008 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: Xavier Claessens <xclaesse@gmail.com> + */ + +#ifndef __TPAW_IMAGES_H__ +#define __TPAW_IMAGES_H__ + +G_BEGIN_DECLS + +#define TPAW_IMAGE_AVATAR_DEFAULT "avatar-default-symbolic" + +G_END_DECLS + +#endif /* __TPAW_IMAGES_ICONS_H__ */ |