From: Marco Barisione Date: Tue, 30 Jul 2013 12:52:30 +0000 (+0100) Subject: tpaw-images: move the default avatar definition from Empathy to tp-aw X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=6338748568d1a37c423568e91e60eb838188a3c2 tpaw-images: move the default avatar definition from Empathy to tp-aw https://bugzilla.gnome.org/show_bug.cgi?id=699492 --- diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c index f6a423db..60556ff1 100644 --- a/libempathy-gtk/empathy-avatar-chooser.c +++ b/libempathy-gtk/empathy-avatar-chooser.c @@ -26,12 +26,12 @@ #include #include #include +#include #ifdef HAVE_CHEESE #include #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 8ee40f2a..3b7b8fdf 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 9094f694..f294502c 100644 --- a/libempathy-gtk/empathy-log-window.c +++ b/libempathy-gtk/empathy-log-window.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #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 2db024a3..22b36007 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 +#include -#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 721a0b4e..5fd61d33 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 +#include #include #include @@ -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 41e9bdfc..733199cf 100644 --- a/src/empathy-call-observer.c +++ b/src/empathy-call-observer.c @@ -22,8 +22,8 @@ #include "empathy-call-observer.h" #include +#include -#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 cac15bc6..5f10d919 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -27,6 +27,7 @@ #include #include #include +#include #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 fd6e659b..f2d19758 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -23,6 +23,7 @@ #include "empathy-event-manager.h" #include +#include #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 89e9a515..8ef8b4a3 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 00000000..48bc4cbf --- /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 + */ + +#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__ */