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 706636 - Add scrolled window to SearchPopup
Add scrolled window to SearchPopup
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: 706635
Blocks: 706715
 
 
Reported: 2013-08-23 08:20 UTC by Jonas Danielsson
Modified: 2013-08-27 23:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
SearchPopup: add scrolled window (4.84 KB, patch)
2013-08-23 08:21 UTC, Jonas Danielsson
none Details | Review
SearchPopup: add scrolled window V2 (4.65 KB, patch)
2013-08-23 08:23 UTC, Jonas Danielsson
reviewed Details | Review
SearchPopup: Add scrolled window v3 (4.59 KB, patch)
2013-08-23 15:24 UTC, Jonas Danielsson
none Details | Review
SearchPopup: Add scrolled window v4 (4.54 KB, patch)
2013-08-23 15:51 UTC, Jonas Danielsson
none Details | Review
SearchPopup: Add scrolled window v5 (4.83 KB, patch)
2013-08-23 20:51 UTC, Jonas Danielsson
none Details | Review
SearchPopup: Add scrolled window v6 (4.80 KB, patch)
2013-08-24 08:05 UTC, Jonas Danielsson
needs-work Details | Review
SearchPopup: add scrolled window v7 (4.57 KB, patch)
2013-08-27 06:51 UTC, Jonas Danielsson
committed Details | Review
MainWindow: No need to reset model on SearchPopup (721 bytes, patch)
2013-08-27 06:51 UTC, Jonas Danielsson
committed Details | Review

Description Jonas Danielsson 2013-08-23 08:20:29 UTC
If we want to display more results than we can comfortably show in the popup, we should have a ScrolledWindow.
Comment 1 Jonas Danielsson 2013-08-23 08:21:14 UTC
Created attachment 252816 [details] [review]
SearchPopup: add scrolled window
Comment 2 Jonas Danielsson 2013-08-23 08:23:58 UTC
Created attachment 252817 [details] [review]
SearchPopup: add scrolled window V2

Some spillage from future stack/spinner work :)
Comment 3 Zeeshan Ali 2013-08-23 14:05:48 UTC
Review of attachment 252817 [details] [review]:

Looks good otherwise

::: src/searchPopup.js
@@ +92,3 @@
     },
 
+    showResults: function() {

why not just override show?
Comment 4 Jonas Danielsson 2013-08-23 15:23:18 UTC
(In reply to comment #3)
> Review of attachment 252817 [details] [review]:
> 
> Looks good otherwise
> 
> ::: src/searchPopup.js
> @@ +92,3 @@
>      },
> 
> +    showResults: function() {
> 
> why not just override show?

My thinking was because when I add the spinner there will be another way of showing the search popup. Either you show in when you want to show results or when you want to show the spinner.

But since the spinner isn't here, maybe override show is the way to go.
Comment 5 Jonas Danielsson 2013-08-23 15:24:19 UTC
Created attachment 252880 [details] [review]
SearchPopup: Add scrolled window v3
Comment 6 Zeeshan Ali 2013-08-23 15:34:38 UTC
Review of attachment 252880 [details] [review]:

::: src/searchPopup.js
@@ +92,3 @@
     },
 
+    show: function() {

Don't you want to chain-up?
Comment 7 Jonas Danielsson 2013-08-23 15:51:57 UTC
Created attachment 252895 [details] [review]
SearchPopup: Add scrolled window v4
Comment 8 Jonas Danielsson 2013-08-23 20:51:36 UTC
Created attachment 252952 [details] [review]
SearchPopup: Add scrolled window v5

Needed to define treeView before chaining up, or treeView would be undefined on the first show call.
Comment 9 Jonas Danielsson 2013-08-24 08:05:03 UTC
Created attachment 252983 [details] [review]
SearchPopup: Add scrolled window v6

Remove silly new newline
Comment 10 Zeeshan Ali 2013-08-26 22:44:43 UTC
Review of attachment 252983 [details] [review]:

Looks good otherwise.

::: src/mainWindow.js
@@ -252,3 @@
                        location]);
         });
-        this._searchPopup.setModel(model);

Why is this call getting removed?
Comment 11 Jonas Danielsson 2013-08-27 06:45:05 UTC
(In reply to comment #10)
> Review of attachment 252983 [details] [review]:
> 
> Looks good otherwise.
> 
> ::: src/mainWindow.js
> @@ -252,3 @@
>                         location]);
>          });
> -        this._searchPopup.setModel(model);
> 
> Why is this call getting removed?

Well, it does nothing. We set the model in _initSearchWidgets and then just clear it/update it when searching. The call to set_model on the gtk_tree_view will just return if the model you are trying to set is the same as the one currently set.

But. It might not belong in this bug. We could have a separate patch for it.
Comment 12 Jonas Danielsson 2013-08-27 06:51:00 UTC
Created attachment 253221 [details] [review]
SearchPopup: add scrolled window v7

* Does not remove setting of search popup model after searching.
Comment 13 Jonas Danielsson 2013-08-27 06:51:56 UTC
Created attachment 253222 [details] [review]
MainWindow: No need to reset model on SearchPopup
Comment 14 Zeeshan Ali 2013-08-27 12:48:26 UTC
Review of attachment 253222 [details] [review]:

::: src/mainWindow.js
@@ -252,3 @@
                        location]);
         });
-        this._searchPopup.setModel(model);

Thanks for separating it out. Does anything use SearchPopup.setModel() then? If not, please remove it in this patch.
Comment 15 Zeeshan Ali 2013-08-27 12:49:05 UTC
Review of attachment 253221 [details] [review]:

ACK
Comment 16 Jonas Danielsson 2013-08-27 12:51:23 UTC
(In reply to comment #14)
> Review of attachment 253222 [details] [review]:
> 
> ::: src/mainWindow.js
> @@ -252,3 @@
>                         location]);
>          });
> -        this._searchPopup.setModel(model);
> 
> Thanks for separating it out. Does anything use SearchPopup.setModel() then? If
> not, please remove it in this patch.

Yes it is used in _initSearchWidgets to set the newly created model that we later add and remove search results to.
Comment 17 Zeeshan Ali 2013-08-27 14:37:28 UTC
Review of attachment 253222 [details] [review]:

ack
Comment 18 Zeeshan Ali 2013-08-27 23:33:53 UTC
Attachment 253222 [details] pushed as e44df61 - MainWindow: No need to reset model on SearchPopup