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 643183 - Stop live search when an action is started
Stop live search when an action is started
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Contact List
unspecified
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-24 11:28 UTC by Xavier Claessens
Modified: 2013-08-27 14:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Roster: Hide search-bar on hitting "Enter" on selected individual (1.47 KB, patch)
2013-07-18 11:54 UTC, Chandni Verma
none Details | Review
Add "search-bar" property to EmpathyIndividualMenu (6.18 KB, patch)
2013-07-18 11:54 UTC, Chandni Verma
none Details | Review
Hide search bar when an action is performed from the individual menu (15.43 KB, patch)
2013-07-18 11:54 UTC, Chandni Verma
none Details | Review
Roster: Hide search-bar on hitting Enter on selected individual (1.56 KB, patch)
2013-07-22 17:46 UTC, Chandni Verma
none Details | Review
Deploy a signal "menu-item-activated" in EmpathyIndividualMenu (1.45 KB, patch)
2013-07-22 17:46 UTC, Chandni Verma
none Details | Review
Emit menu-item-activated when an action is performed from the individual menu (15.21 KB, patch)
2013-07-22 17:46 UTC, Chandni Verma
none Details | Review
RosterWindow: Connect to signal "menu-item-activated" from EmpathyIndividualMenu (1.50 KB, patch)
2013-07-22 17:47 UTC, Chandni Verma
none Details | Review
Roster: Hide search-bar on hitting Enter on selected individual (1.56 KB, patch)
2013-08-23 13:50 UTC, Chandni Verma
none Details | Review
Deploy a signal "menu-item-activated" in EmpathyIndividualMenu (1.45 KB, patch)
2013-08-23 13:50 UTC, Chandni Verma
none Details | Review
Emit menu-item-activated when an action is performed from the individual menu (13.98 KB, patch)
2013-08-23 13:50 UTC, Chandni Verma
none Details | Review
RosterWindow: Connect to signal "menu-item-activated" from EmpathyIndividualMenu (1.42 KB, patch)
2013-08-23 13:50 UTC, Chandni Verma
none Details | Review

Description Xavier Claessens 2011-02-24 11:28:41 UTC
I often use the live search to start a chat with a contact, then forget about my contact list. When I come back later to the contact list to start another chat, it is still filtered to match only the previous contact and I have to first close the live search, to start again.

I think it would be great to close the live search is some situations:
1) When starting an action with one of the contacts (chat, call, etc)
2) When closing the main window
3) after a time out ?
Comment 1 Felix Kaser 2011-02-24 11:48:13 UTC
I agree and afaik the search is closed when you open a chat with the enter key. This should definitely be extended to opening chat, start call and similar stuff.

But imho a time out is bad. because I often use the search when I'm waiting for a buddy to come online, so I search for him and leave the search open. When I come back to the contact list I immediately see if he's online or not.

You can always close the search by hitting escape when the contact list is focused.
Comment 2 Guillaume Desmottes 2011-02-24 11:53:11 UTC
I agree with a) and b).
Comment 3 Xavier Claessens 2011-02-24 12:01:29 UTC
right, 3) is probably a bad idea :)
Comment 4 Xavier Claessens 2011-05-26 11:22:48 UTC
point 2 in initial comment is already fixed. I agree 3 is a bad idea after all.

For 1, here is a partial fix:
http://cgit.collabora.com/git/user/xclaesse/empathy.git/log/?h=live-search-action

what is missing:
a) close when starting a call from the webcam icon
b) close when starting any action from context menu
Comment 5 Chandni Verma 2013-07-18 11:53:40 UTC
The above work is obsolete due to roster design changes. I have reworked a fix for this bug where action = opening any of the following channels:

chat
SMS
Audio call
Video call
File Transfer
Desktop share

Patches follow.
Comment 6 Chandni Verma 2013-07-18 11:54:11 UTC
Created attachment 249492 [details] [review]
Roster: Hide search-bar on hitting "Enter" on selected individual
Comment 7 Chandni Verma 2013-07-18 11:54:16 UTC
Created attachment 249493 [details] [review]
Add "search-bar" property to EmpathyIndividualMenu
Comment 8 Chandni Verma 2013-07-18 11:54:22 UTC
Created attachment 249494 [details] [review]
Hide search bar when an action is performed from the individual menu
Comment 9 Xavier Claessens 2013-07-18 12:31:20 UTC
Review of attachment 249492 [details] [review]:

Seems easier to do that in empathy_roster_view_child_activated()
Comment 10 Xavier Claessens 2013-07-18 13:08:33 UTC
Review of attachment 249493 [details] [review]:

I would rather add an "activated" signal, and connect that signal in empathy-roster-window.c
Comment 11 Chandni Verma 2013-07-22 08:06:09 UTC
(In reply to comment #9)
> Review of attachment 249492 [details] [review]:
> 
> Seems easier to do that in empathy_roster_view_child_activated()

Xavier, why do you want me to edit empathy_roster_view_child_activated () for that. it will be unnecessarily complex to do this at a lower level and I'll have to pass in the search-bar there. empathy_roster_view_child_activated emits individual-activated signal which is caught by individual_activated_cb where the code presently lies.

empathy_roster_view_child_activated () also emits event-activated which gets caught by event_activated_cb. I think I should hide the search bar there too!

(In reply to comment #10)
> Review of attachment 249493 [details] [review]:
> 
> I would rather add an "activated" signal, and connect that signal in
> empathy-roster-window.c

Ok, I'll change that.
Comment 12 Chandni Verma 2013-07-22 17:46:47 UTC
Created attachment 249823 [details] [review]
Roster: Hide search-bar on hitting Enter on selected individual
Comment 13 Chandni Verma 2013-07-22 17:46:53 UTC
Created attachment 249824 [details] [review]
Deploy a signal "menu-item-activated" in EmpathyIndividualMenu
Comment 14 Chandni Verma 2013-07-22 17:46:59 UTC
Created attachment 249825 [details] [review]
Emit menu-item-activated when an action is performed from the individual menu
Comment 15 Chandni Verma 2013-07-22 17:47:05 UTC
Created attachment 249826 [details] [review]
RosterWindow: Connect to signal "menu-item-activated" from EmpathyIndividualMenu
Comment 16 Chandni Verma 2013-07-22 18:02:10 UTC
I hope they look good now!
Comment 17 Xavier Claessens 2013-08-23 11:46:50 UTC
Review of attachment 249825 [details] [review]:

I think you should add a function:

static void
emit_menu_item_activated (GtkMenuItem *item)
{
  self = EMPATHY_INDIVIDUAL_MENU (g_object_get_data (G_OBJECT (item),
      "individual-menu"));
  g_signal_emit (self, signals [MENU_ITEM_ACTIVATED], 0);
}

To avoid repeating that code everywhere.
Comment 18 Xavier Claessens 2013-08-23 11:48:44 UTC
Review of attachment 249826 [details] [review]:

::: src/empathy-roster-window.c
@@ +1969,3 @@
+
+    if (gtk_widget_is_visible (roster_window->priv->search_bar))
+      gtk_widget_hide (roster_window->priv->search_bar);

Can't you call hide_search_bar() here ?
Comment 19 Chandni Verma 2013-08-23 13:47:30 UTC
Corrected patches follow!
Comment 20 Chandni Verma 2013-08-23 13:50:13 UTC
Created attachment 252856 [details] [review]
Roster: Hide search-bar on hitting Enter on selected individual
Comment 21 Chandni Verma 2013-08-23 13:50:19 UTC
Created attachment 252857 [details] [review]
Deploy a signal "menu-item-activated" in EmpathyIndividualMenu
Comment 22 Chandni Verma 2013-08-23 13:50:25 UTC
Created attachment 252858 [details] [review]
Emit menu-item-activated when an action is performed from the individual menu
Comment 23 Chandni Verma 2013-08-23 13:50:31 UTC
Created attachment 252859 [details] [review]
RosterWindow: Connect to signal "menu-item-activated" from EmpathyIndividualMenu
Comment 24 Xavier Claessens 2013-08-23 15:07:42 UTC
Looks good, +1
Comment 25 Chandni Verma 2013-08-23 15:12:02 UTC
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.
Comment 26 Jussi Kukkonen 2013-08-27 14:13:33 UTC
(In reply to comment #20)
> Created an attachment (id=252856) [details] [review]
> Roster: Hide search-bar on hitting Enter on selected individual

For reference: This commit breaks the build (it still uses EMPATHY_IS_LIVE_SEARCH instead of TPAW_IS_LIVE_SEARCH), there's a patch in bug 706830.