GNOME Bugzilla – Bug 643183
Stop live search when an action is started
Last modified: 2013-08-27 14:13:33 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 ?
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.
I agree with a) and b).
right, 3) is probably a bad idea :)
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
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.
Created attachment 249492 [details] [review] Roster: Hide search-bar on hitting "Enter" on selected individual
Created attachment 249493 [details] [review] Add "search-bar" property to EmpathyIndividualMenu
Created attachment 249494 [details] [review] Hide search bar when an action is performed from the individual menu
Review of attachment 249492 [details] [review]: Seems easier to do that in empathy_roster_view_child_activated()
Review of attachment 249493 [details] [review]: I would rather add an "activated" signal, and connect that signal in empathy-roster-window.c
(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.
Created attachment 249823 [details] [review] Roster: Hide search-bar on hitting Enter on selected individual
Created attachment 249824 [details] [review] Deploy a signal "menu-item-activated" in EmpathyIndividualMenu
Created attachment 249825 [details] [review] Emit menu-item-activated when an action is performed from the individual menu
Created attachment 249826 [details] [review] RosterWindow: Connect to signal "menu-item-activated" from EmpathyIndividualMenu
I hope they look good now!
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.
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 ?
Corrected patches follow!
Created attachment 252856 [details] [review] Roster: Hide search-bar on hitting Enter on selected individual
Created attachment 252857 [details] [review] Deploy a signal "menu-item-activated" in EmpathyIndividualMenu
Created attachment 252858 [details] [review] Emit menu-item-activated when an action is performed from the individual menu
Created attachment 252859 [details] [review] RosterWindow: Connect to signal "menu-item-activated" from EmpathyIndividualMenu
Looks good, +1
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.
(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.