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 723895 - Move search widget logic from MainWindow
Move search widget logic from MainWindow
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks: 724028
 
 
Reported: 2014-02-08 13:04 UTC by Jonas Danielsson
Modified: 2014-03-06 12:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Move search result model knowledge to SearchPopup (8.57 KB, patch)
2014-02-08 13:05 UTC, Jonas Danielsson
committed Details | Review
Move completion match function to PlaceStore (2.12 KB, patch)
2014-02-08 13:05 UTC, Jonas Danielsson
committed Details | Review

Description Jonas Danielsson 2014-02-08 13:04:58 UTC
We need to refactor a bit. To enable the use of PlaceStore for completion and SearchPopup for displaying search results from other places than mainWindow. 

For instance in the sidebar for routing.
Comment 1 Jonas Danielsson 2014-02-08 13:05:20 UTC
Created attachment 268488 [details] [review]
Move search result model knowledge to SearchPopup

This allows easy use of the SearchPopup from more places than
mainwindow.
Comment 2 Jonas Danielsson 2014-02-08 13:05:22 UTC
Created attachment 268489 [details] [review]
Move completion match function to PlaceStore

This enables the use of the PlaceStore for entry completion in more
places than MainWindow.
Comment 3 Mattias Bengtsson 2014-02-09 00:20:11 UTC
Review of attachment 268488 [details] [review]:

Great work, thanks!

::: src/searchPopup.js
@@ +30,3 @@
+    ICON:         0,
+    DESCRIPTION:  1,
+    PLACE:        2

Should this be in a separate patch?
Comment 4 Mattias Bengtsson 2014-02-09 00:21:59 UTC
Review of attachment 268489 [details] [review]:

Looks good.
Comment 5 Jonas Danielsson 2014-02-09 08:43:18 UTC
Review of attachment 268488 [details] [review]:

::: src/searchPopup.js
@@ +30,3 @@
+    ICON:         0,
+    DESCRIPTION:  1,
+    PLACE:        2

Hmm, I don't think so. Before this patch the SearchPopup only needed to know about icon and text, because it created a cellTextRenderer and a cellPixbufRenderer. With the moving of the adding logic from mainWindow to here, it needs to know more and it need to know that the text is a description.

So I think it makes sense to have the change in this patch.
Comment 6 Jonas Danielsson 2014-02-28 11:56:07 UTC
Zeeshan: any comments on these?
Comment 7 Zeeshan Ali 2014-02-28 14:56:58 UTC
(In reply to comment #6)
> Zeeshan: any comments on these?

Havent checked the patch but I'm usually happy about refactoring of this sort. :)
Comment 8 Jonas Danielsson 2014-03-02 12:09:48 UTC
Think it could go in now? Would like to base some other patches on these.
Comment 9 Jonas Danielsson 2014-03-06 12:37:22 UTC
Attachment 268488 [details] pushed as 7b13078 - Move search result model knowledge to SearchPopup
Attachment 268489 [details] pushed as 61b5379 - Move completion match function to PlaceStore