After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685899 - Smileys are always inserted at the end of the entry, not at the cursor position
Smileys are always inserted at the end of the entry, not at the cursor position
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Chat
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2012-10-10 16:20 UTC by Will Thompson
Modified: 2013-11-17 19:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Insert smileys at the cursor position instead of the end of entry (1.15 KB, patch)
2013-11-11 19:44 UTC, veenakatiyar0509
none Details | Review
Insert smileys at the cursor position instead of the end of entry (3.58 KB, patch)
2013-11-15 13:16 UTC, veenakatiyar0509
none Details | Review

Description Will Thompson 2012-10-10 16:20:41 UTC
The cursor in the following description is “|”.

1. Open a conversation window: entry shows “|”
2. Type some text: entry shows “hello|”
3. Move the cursor to the beginning of the line: “|hello”
4. Right-click the entry, choose Insert Smiley → :-(|).

Expected result: a monkey is inserted where the cursor is, before the word “hello”.

Actual result: a monkey is inserted at the end of the entry.
Comment 1 veenakatiyar0509 2013-11-11 19:44:41 UTC
Created attachment 259585 [details] [review]
Insert smileys at the cursor position instead of the end of entry
Comment 2 Chandni Verma 2013-11-12 17:11:44 UTC
Looks good to me. Cassidy, could you please check?
Comment 3 Will Thompson 2013-11-12 21:11:05 UTC
Review of attachment 259585 [details] [review]:

This fixes the right-click menu case, but it doesn't fix picking that option in the Conversation menu at the top of the window.

The code for that lives in src/empathy-chat-window.c . It would be good to add an empathy_chat_insert_smiley() method to libempathy-gtk/empathy-chat.c and call it from src/empathy-chat-window.c rather than duplicating the logic!
Comment 4 veenakatiyar0509 2013-11-15 13:16:09 UTC
Created attachment 259873 [details] [review]
Insert smileys at the cursor position instead of the end of entry

Updated patch.
Comment 5 Chandni Verma 2013-11-17 16:03:21 UTC
Looks good to me now. Should I apply it locally and commit with my credentials? I am new at committing patches for others.
Comment 6 Chandni Verma 2013-11-17 19:19:55 UTC
veena, check: https://git.gnome.org/browse/empathy/commit/?id=25b40bf1b21a7c73a5b87649e3fb3536d64d0a97

Your submission had trailing whitespaces at line 32. I have corrected that before committing. Be careful not to include those in your future submissions.


This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.