aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat-view.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-12-16 17:24:11 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-12-16 17:24:11 +0800
commit4782781b30c2884f07a7451da03eca3244c62b6f (patch)
treea13371defb894b023bf9d2bdfdffd60c345abf7c /libempathy-gtk/empathy-chat-view.c
parent92e2f7b40ef560f2bc35c5da887c0c3967b24ba5 (diff)
downloadgsoc2013-empathy-4782781b30c2884f07a7451da03eca3244c62b6f.tar
gsoc2013-empathy-4782781b30c2884f07a7451da03eca3244c62b6f.tar.gz
gsoc2013-empathy-4782781b30c2884f07a7451da03eca3244c62b6f.tar.bz2
gsoc2013-empathy-4782781b30c2884f07a7451da03eca3244c62b6f.tar.lz
gsoc2013-empathy-4782781b30c2884f07a7451da03eca3244c62b6f.tar.xz
gsoc2013-empathy-4782781b30c2884f07a7451da03eca3244c62b6f.tar.zst
gsoc2013-empathy-4782781b30c2884f07a7451da03eca3244c62b6f.zip
Move the smiley menu code from EmpathyChatView to EmpathyChatManager.
svn path=/trunk/; revision=1986
Diffstat (limited to 'libempathy-gtk/empathy-chat-view.c')
-rw-r--r--libempathy-gtk/empathy-chat-view.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/libempathy-gtk/empathy-chat-view.c b/libempathy-gtk/empathy-chat-view.c
index f38ab1750..25c1721a4 100644
--- a/libempathy-gtk/empathy-chat-view.c
+++ b/libempathy-gtk/empathy-chat-view.c
@@ -259,52 +259,3 @@ empathy_chat_view_get_last_contact (EmpathyChatView *view)
return NULL;
}
-GtkWidget *
-empathy_chat_view_get_smiley_menu (GCallback callback,
- gpointer user_data)
-{
- EmpathySmileyManager *smiley_manager;
- GSList *smileys, *l;
- GtkWidget *menu;
- gint x = 0;
- gint y = 0;
-
- g_return_val_if_fail (callback != NULL, NULL);
-
- menu = gtk_menu_new ();
-
- smiley_manager = empathy_smiley_manager_new ();
- smileys = empathy_smiley_manager_get_all (smiley_manager);
- for (l = smileys; l; l = l->next) {
- EmpathySmiley *smiley;
- GtkWidget *item;
- GtkWidget *image;
-
- smiley = l->data;
- image = gtk_image_new_from_pixbuf (smiley->pixbuf);
-
- item = gtk_image_menu_item_new_with_label ("");
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
-
- gtk_menu_attach (GTK_MENU (menu), item,
- x, x + 1, y, y + 1);
-
- gtk_widget_set_tooltip_text (item, smiley->str);
-
- g_object_set_data (G_OBJECT (item), "smiley_text", smiley->str);
- g_signal_connect (item, "activate", callback, user_data);
-
- if (x > 3) {
- y++;
- x = 0;
- } else {
- x++;
- }
- }
- g_object_unref (smiley_manager);
-
- gtk_widget_show_all (menu);
-
- return menu;
-}
-