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 559570 - The context menu in chat should be more consistent with other Gnome apps.
The context menu in chat should be more consistent with other Gnome apps.
Status: RESOLVED DUPLICATE of bug 629544
Product: empathy
Classification: Core
Component: Chat
2.24.x
Other All
: Normal enhancement
: ---
Assigned To: empathy-maint
: 621474 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-11-06 09:37 UTC by Pierre-Luc Beaudoin
Modified: 2010-10-04 08:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This positions Clear entry in the right place. (865 bytes, patch)
2009-07-15 23:16 UTC, Juan R. Garcia Blanco
none Details | Review
[NOTE: This is the poor patch] This first patch sets the Clear item in the right position, below the Select All item; and also adds an icon to the Open Link item, as Epiphany does. (2.17 KB, patch)
2009-07-20 10:13 UTC, Juan R. Garcia Blanco
reviewed Details | Review
[NOTE: rich patch] This patch adds a new field to EmpathyChatTextView class; positions well the Clear item, and remove it on logs window; also, adds an icon to Open Link (5.73 KB, patch)
2009-07-20 10:59 UTC, Juan R. Garcia Blanco
reviewed Details | Review

Description Pierre-Luc Beaudoin 2008-11-06 09:37:42 UTC
The context menu when you right click in a chat window should have the following items (in that specific order):

Copy
---- (separator)
Select All
Clear

That would match Epiphany's context menu when you click on the address bar.  If the user were to click on a link, the options should be (like in xchat-gnome):

Open Link in Browser
Copy Link Address
---- (separator)
Select All
Clear


Other information:
Comment 1 Guillaume Desmottes 2009-01-18 20:19:35 UTC
Is there any guidelines in GNOME HIG about this?
Comment 2 Pierre-Luc Beaudoin 2009-01-19 00:22:25 UTC
There isn't specifically for context menu, but regular edit menus should look like that: 
http://library.gnome.org/devel/hig-book/stable/menus-standard.html.en#menu-standard-edit

The suggestion I made happen to match this.
Comment 3 Pierre-Luc Beaudoin 2009-06-18 19:51:27 UTC
Marking Gnome-love
Comment 4 Juan R. Garcia Blanco 2009-07-12 10:32:23 UTC
Hi, i'm trying to fix this. This is what i have already done:
- add an entry to the context menu
- write the callback function and the ConversationPanel member function
- write a function inside GtkXText which selects all the entries

It seems to work: it can be selected and deselected; but the last line always keep unselected, and i don't know why. I will investigate this more, but some help on where i can find the last line is welcome.

Thank you very much.
Comment 5 Juan R. Garcia Blanco 2009-07-12 10:38:58 UTC
Sorry, i mixed up tabs :(
Comment 6 Guillaume Desmottes 2009-07-14 10:18:32 UTC
Hi Juan and thanks for your interest in Empathy. :)

Could you please attach a patch or upload a git branch with your work? That would be easier for us to help you.
Comment 7 Juan R. Garcia Blanco 2009-07-15 22:05:53 UTC
Hi, i thought this bug was related to xchat-gnome, and i fixed what Pierre-Luc said in xchat-gnome... so i'm sorry.

However, i'm an Empathy's user, and i can confirm what Pierre-Luc have said: in chat window's menu the order of entries is wrong, but clear option is implemented; and also i think there should be a clear option in the input text field (where you write), which, at least on my empathy, is missing.
i will try to solve these issues in a few days, but i promise anything as i am a poor-experienced developer.
Comment 8 Juan R. Garcia Blanco 2009-07-15 23:16:01 UTC
Created attachment 138487 [details] [review]
This positions Clear entry in the right place.
Comment 9 Danielle Madeley 2009-07-17 10:29:24 UTC
Which menu is this meant to change?
Comment 10 Juan R. Garcia Blanco 2009-07-17 11:27:37 UTC
There is a problem. EmpathyChatTextView is also used to display Previous Conversations, so the clear option will appear there, and i do not know if there it makes much sense... So the solution: check the type of the container of EmpathyChatTextView; but i do not know how to do that...

So here is what i have been working on:
-fix popup menu order in EmpathyChatTextView
-add clear option to the input text field (which actually is a TextView)
-iconify the Open Link option, matching Epiphany context menu

I need, then, some help on determining which is the container of EmpathyChatTextView... Thank you very much
Comment 11 Juan R. Garcia Blanco 2009-07-17 11:30:35 UTC
Davyd, the menu which appears when you right click in a conversation window, in the space reserved to the conversation itself.
Comment 12 Danielle Madeley 2009-07-17 11:31:55 UTC
That's what I thought. This patch doesn't seem to work for me at all.
Comment 13 Juan R. Garcia Blanco 2009-07-17 11:37:14 UTC
Where does the clear item appears for you?
Comment 14 Danielle Madeley 2009-07-17 11:42:03 UTC
At the top.
Comment 15 Juan R. Garcia Blanco 2009-07-17 11:46:11 UTC
Maybe (surely) the patch is bad-generated since i do not know how to create patches, sorry for this; i plan to read a git tutorial this afternoon. But if you change the code by hand, it should work.

I have found how to get the parent of a widget; so, what should be the hierarchy of the conversation window?
Comment 16 Juan R. Garcia Blanco 2009-07-20 10:13:35 UTC
Created attachment 138791 [details] [review]
[NOTE: This is the poor patch] This first patch sets the Clear item in the right position, below the Select All item; and also adds an icon to the Open Link item, as Epiphany does.

I have fixed this bug in two ways:

- the first patch positions the Clear item below the Select All one, as it should be (as Pierre-Luc pointed out). However, i realized this option does not make sense in the logs window, so i did a few more changes (the second patch)

- the second patch adds a new field to the EmpathyChatTextView class, which represent the need of displaying the Clear item; it is set to TRUE by default, and in the EmpathyLogWindow::empathy_log_window_show() function i set it to FALSE. This way, the Clear item is not displayed in the logs window. Finally, i have added a Clear item to the input text view in the EmpathyChat class, as i think it should have one.

I made two patches because maybe you do not want to modify class' fields... but i encourage you to see the second patch: it works and solves this issue, and the other minor issues i told you a few lines up.
Thank you for your help, i hope you like my work
Comment 17 Juan R. Garcia Blanco 2009-07-20 10:59:34 UTC
Created attachment 138796 [details] [review]
[NOTE: rich patch] This patch adds a new field to EmpathyChatTextView class; positions well the Clear item, and remove it on logs window; also, adds an icon to Open Link
Comment 18 Juan R. Garcia Blanco 2009-09-05 10:59:36 UTC
No one has tried it?
Comment 19 Guillaume Desmottes 2009-11-18 16:35:46 UTC
Review of attachment 138796 [details] [review]:

Thanks for your patch. Sorry for the late reply. I inlined a comment; except that your patch looks fine.

::: libempathy-gtk/empathy-chat-text-view.c
@@ +271,2 @@
 	/* Clear menu item */
+	g_object_get (view, "show-clear", &show_clear, NULL);

You shouldn't get the property as you are already in the object. Just use priv->show_clear
Comment 20 Juan R. Garcia Blanco 2009-11-18 16:59:15 UTC
Ok. I think last time I used Empathy this issue was already solved, so this solutions is outdated. But thank you very much! this was my first patch, and I learnt a lot looking in Empathy's code. And of course I agree with you: within the object I should use direct access to the property. Thank you!
Comment 21 Guillaume Desmottes 2009-11-18 17:59:33 UTC
I just check with master and the context menu in master is:

Clear
-----
Copy
Select All

or

Open Link
Copy Link Address
-----
Clear
-----
Select All

According ot Pierre-Luc's initial report, in the first case "Copy" should be first and in the link case we shouldn't put a separator between "Clear" and "Select All".
Comment 22 Omer Akram 2010-08-31 05:11:00 UTC
*** Bug 621474 has been marked as a duplicate of this bug. ***
Comment 23 Omer Akram 2010-08-31 05:13:23 UTC
due to a bug in gtk i.e. it selects the first item when you right click. if you have a little mal-functioning left click you could easily remove the text by mistake.

also reported at: https://bugs.launchpad.net/empathy/+bug/589974
Comment 24 Bilal Akhtar 2010-10-02 06:12:42 UTC
This bug has been fixed, as a result of the fix for bug #629544 .
Comment 25 Guillaume Desmottes 2010-10-04 08:05:32 UTC

*** This bug has been marked as a duplicate of bug 629544 ***