]> git.0d.be Git - empathy.git/commitdiff
tpaw-images: move the default avatar definition from Empathy to tp-aw
authorMarco Barisione <marco.barisione@collabora.co.uk>
Tue, 30 Jul 2013 12:52:30 +0000 (13:52 +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-gtk/empathy-images.h
libempathy-gtk/empathy-log-window.c
libempathy-gtk/empathy-roster-contact.c
libempathy-gtk/empathy-theme-adium.c
src/empathy-call-observer.c
src/empathy-call-window.c
src/empathy-event-manager.c
tp-account-widgets/Makefile.am
tp-account-widgets/tpaw-images.h [new file with mode: 0644]

index f6a423dbdcc204c225d54266c3fe89a722b6717a..60556ff173c91880a71ffb9f9d66fb23d6f7879b 100644 (file)
 #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);
 }
index 8ee40f2a926b863a317a8ed5be15cfb53406a3b2..3b7b8fdf99352471aaba1cb18b836e38a6a0c76e 100644 (file)
@@ -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"
index 9094f69467e4169122d0ed32c35991d1d8a3526b..f294502c6ce43c838ffffd33d2dcd3331f452404 100644 (file)
@@ -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),
index 2db024a3d8a9a5283483a4794dc60c3e89a264aa..22b360075671217efaeb4b6b9c2d4cbb392503c7 100644 (file)
@@ -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);
index 721a0b4e583da0d3156d8dffc9f1b3bd4ee0211e..5fd61d3395085c2d1e3d8420b70e2635ecb1b7d1 100644 (file)
@@ -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;
index 41e9bdfc11e5e016da9689e3dc69c316372bf9d3..733199cffd8a3abd1490c1218d225029a7979ba3 100644 (file)
@@ -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)
     {
index cac15bc662b0dcbe4499991b94cd34204602f563..5f10d919e45cafa5758121075e5726b9eda06813 100644 (file)
@@ -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);
index fd6e659b201cb8e9597f67b94db689f3802f3723..f2d197580262aa8009855afba274c7f890741c5a 100644 (file)
@@ -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);
             }
index 89e9a515d6246ef9f96f654b9d738ede18e2136e..8ef8b4a36307cf18e92cb0bf22bbe6496984ed16 100644 (file)
@@ -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 (file)
index 0000000..48bc4cb
--- /dev/null
@@ -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__ */