Ticket #5855 (closed patch: fixed)

Opened 2 years ago

Last modified 2 years ago

Add context menu alternative to add received custom smiley

Reported by: malu Owned by: sadrul
Milestone: Component: pidgin (gtk)
Version: Keywords: custom smileys add
Cc:

Description

I have added a patch to add a context menu alternative to add received custom smileys. Currently it is hard-coded to save smileys as PNGs (because the original smiley data is not easily available in gtkimhtml.c). Also the newly added smileys only show up as text in the custom smiley manager list until a restart of Pidgin. I don't know why this happens, so I would appreciate help finding out why. The new smiley _do_ however show up in the smiley selection.

The patch is against im.pidgin.pidgin.next.minor

Attachments

pidgin-custom-smiley-add-received.diff (5.4 kB) - added by malu 2 years ago.
Add menu alternative to add received custom smiley
pidgin-custom-smiley-add-received2.diff (6.8 kB) - added by malu 2 years ago.

Change History

Changed 2 years ago by malu

Add menu alternative to add received custom smiley

follow-up: ↓ 2   Changed 2 years ago by sadrul

  • owner set to sadrul
  • status changed from new to assigned

I think it'll be really good if we can use pidgin_smiley_edit instead. For example, the code could look like:

    editor = pidgin_smiley_edit(imhtml, NULL);   /* Edit a new smiley */
    pidgin_smiley_editor_set_image(editor, ...);
    pidgin_smiley_editor_set_shortcut(editor, ...);

Some API changes+additions will be necessary, of course, and this is the perfect time for it!

Thoughts?

in reply to: ↑ 1   Changed 2 years ago by malu

Replying to sadrul:

I think it'll be really good if we can use pidgin_smiley_edit instead. For example, the code could look like: {{{ editor = pidgin_smiley_edit(imhtml, NULL); /* Edit a new smiley */ pidgin_smiley_editor_set_image(editor, ...); pidgin_smiley_editor_set_shortcut(editor, ...); }}} Some API changes+additions will be necessary, of course, and this is the perfect time for it! Thoughts?

That seems like a good idea. I suppose the "editor" would be able to save from a GdkPixbuf? in addition to a filename (as it gets now from the file selector). I haven't quite descided if I should pass a GdkPixbuf? or the raw data to the "set_image" method. "pidgin_smiley_editor_set_data" could take the image data provided from gdk_pixbuf_save_buffer as it is now. Then it would merely call purple_smiley_set_data. But on the other hand we want the edit window to set the image button to the smiley image... As it is now, we always get a GdkPixbuf? from the GtkIMHtmlImage, but I would like to be able to handle the original smiley image, maybe that would be possible later using webkit?

Changed 2 years ago by malu

  Changed 2 years ago by malu

Added a new patch. Uses the gtksmiley editor to add smileys. New functions to set smiley parameters on an editor.

There still remains an issue, newly added smileys don't work correctly until restarting Pidgin...

  Changed 2 years ago by sadrul@…

  • status changed from assigned to closed
  • resolution set to fixed

(In [07fc1ad334326d74e31bc239fc0064b83c4c6086]):
Modified patch from malu to "Add context menu alternative to add received custom smiley". Closes #5855.

  Changed 2 years ago by Robby

This goes into 2.5.0?

  Changed 2 years ago by phannent

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!