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 695852 - "Select" toolbar button shouldn't work when empty
"Select" toolbar button shouldn't work when empty
Status: RESOLVED FIXED
Product: gnome-weather
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Weather Maintainer(s)
GNOME Weather Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-03-14 14:58 UTC by Bastien Nocera
Modified: 2013-03-26 14:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a welcome screen for when there are no locations added (8.18 KB, patch)
2013-03-16 00:07 UTC, Giovanni Campagna
committed Details | Review

Description Bastien Nocera 2013-03-14 14:58:17 UTC
As there's nothing to select.
Comment 1 Giovanni Campagna 2013-03-16 00:07:27 UTC
Created attachment 239014 [details] [review]
Add a welcome screen for when there are no locations added

Following the example of gnome-documents and gnome-clocks, add some
placeholder text when the content view is empty.
Then also tie the availability of the select button to the emptyness
of the view.

Patch is attached if you want to try it, I will merge it in master
after 3.8 is out.
Comment 2 Paolo Borelli 2013-03-17 21:17:37 UTC
Review of attachment 239014 [details] [review]:

The patch is not applying so I have not tested it.

Looking at the code it looks good to me, some minor comments inline...

::: src/world.js
@@ -175,0 +175,12 @@
+
+const WorldContentView = new Lang.Class({
+    Name: 'WorldContentView',
... 9 more ...

You could move here some of the implementation details that are now in window.js, in particular

iconView.connect('selection-mode-request', Lang.bind(this, function() {
   this.selection_mode = true;
}));

@@ -175,0 +175,14 @@
+
+const WorldContentView = new Lang.Class({
+    Name: 'WorldContentView',
... 11 more ...

Do we need to set a css class on the placeholder? In documents/clocks the placeholder has to have the same lighter background color user for the iconview, but without testing I am not sure if this apply for a dark theme app.

@@ -175,0 +175,19 @@
+
+const WorldContentView = new Lang.Class({
+    Name: 'WorldContentView',
... 16 more ...

Use the enumeration name instead of hardcoding 6 (I have not checked if it is available in gjs, but it should)
Comment 3 Giovanni Campagna 2013-03-26 14:59:54 UTC
Attachment 239014 [details] pushed as 5bd0b2a - Add a welcome screen for when there are no locations added