pidgin/gtkimhtml.c

changeset 27259
50ab3ce89cdb
parent 27173
e601bcf2e1a6
child 27359
3d884bc7b99e
equal deleted inserted replaced
27256:86a80298202e 27259:50ab3ce89cdb
3865 3865
3866 gtk_widget_show(image->filesel); 3866 gtk_widget_show(image->filesel);
3867 } 3867 }
3868 3868
3869 static void 3869 static void
3870 gtk_imhtml_custom_smiley_save(GtkWidget *w, GtkIMHtmlImage *image) 3870 gtk_imhtml_custom_smiley_save(GtkWidget *w, GtkIMHtmlImageSave *save)
3871 { 3871 {
3872 GtkIMHtmlImage *image = (GtkIMHtmlImage *)save->image;
3873
3872 /* Create an add dialog */ 3874 /* Create an add dialog */
3873 PidginSmiley *editor = pidgin_smiley_edit(NULL, NULL); 3875 PidginSmiley *editor = pidgin_smiley_edit(NULL, NULL);
3874 pidgin_smiley_editor_set_shortcut(editor, image->filename); 3876 pidgin_smiley_editor_set_shortcut(editor, image->filename);
3875 pidgin_smiley_editor_set_image(editor, image->pixbuf); 3877 pidgin_smiley_editor_set_image(editor, image->pixbuf);
3878 pidgin_smiley_editor_set_data(editor, save->data, save->datasize);
3876 } 3879 }
3877 3880
3878 /* 3881 /*
3879 * So, um, AIM Direct IM lets you send any file, not just images. You can 3882 * So, um, AIM Direct IM lets you send any file, not just images. You can
3880 * just insert a sound or a file or whatever in a conversation. It's 3883 * just insert a sound or a file or whatever in a conversation. It's
3905 if (image->width <= 96 && image->height <= 96) { 3908 if (image->width <= 96 && image->height <= 96) {
3906 img = gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_MENU); 3909 img = gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_MENU);
3907 item = gtk_image_menu_item_new_with_mnemonic(_("_Add Custom Smiley...")); 3910 item = gtk_image_menu_item_new_with_mnemonic(_("_Add Custom Smiley..."));
3908 gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), img); 3911 gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), img);
3909 g_signal_connect(G_OBJECT(item), "activate", 3912 g_signal_connect(G_OBJECT(item), "activate",
3910 G_CALLBACK(gtk_imhtml_custom_smiley_save), image); 3913 G_CALLBACK(gtk_imhtml_custom_smiley_save), save);
3911 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); 3914 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
3912 } 3915 }
3913 3916
3914 gtk_widget_show_all(menu); 3917 gtk_widget_show_all(menu);
3915 gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 3918 gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,

mercurial