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 745494 - dateMenu: Hide sections that are disallowed by section mode
dateMenu: Hide sections that are disallowed by section mode
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-03-03 02:23 UTC by Florian Müllner
Modified: 2015-03-04 12:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dateMenu: Hide displays section when disabled by session mode (2.43 KB, patch)
2015-03-03 02:23 UTC, Florian Müllner
committed Details | Review
calendar: Respect session mode for section visibility (3.74 KB, patch)
2015-03-03 02:23 UTC, Florian Müllner
none Details | Review
calendar: Hide message list when all sections are disallowed (1.50 KB, patch)
2015-03-03 02:23 UTC, Florian Müllner
committed Details | Review
dateMenu: Move bottom-padding into displays-section (891 bytes, patch)
2015-03-03 02:31 UTC, Florian Müllner
committed Details | Review
calendar: Respect session mode for section visibility (3.75 KB, patch)
2015-03-03 03:46 UTC, Florian Müllner
committed Details | Review
Calendar with and without extra padding (174.53 KB, image/png)
2015-03-03 22:48 UTC, Florian Müllner
  Details

Description Florian Müllner 2015-03-03 02:23:05 UTC
See patches. In particular this fixes having the full monty on the login screen.
Comment 1 Florian Müllner 2015-03-03 02:23:12 UTC
Created attachment 298358 [details] [review]
dateMenu: Hide displays section when disabled by session mode

We currently show the world clocks section unconditionally, even when
the session mode disallows launching the Clocks app to configure the
displayed clocks. This does not make sense, so hide the entire section
when the session mode disallows settings.
Comment 2 Florian Müllner 2015-03-03 02:23:18 UTC
Created attachment 298359 [details] [review]
calendar: Respect session mode for section visibility

It doesn't make much sense to show a section if it must remain empty
due to the session mode - there won't be any events if the session
mode disallows events, or notifications if those are disallowed. So
take the session mode into account and update the sections' visibility
accordingly.
Comment 3 Florian Müllner 2015-03-03 02:23:24 UTC
Created attachment 298360 [details] [review]
calendar: Hide message list when all sections are disallowed

If none of the sections is allowed to display anything, it doesn't
make sense to show the message list at all, so hide it in that case.
Comment 4 Florian Müllner 2015-03-03 02:31:14 UTC
Created attachment 298362 [details] [review]
dateMenu: Move bottom-padding into displays-section

We don't need additional padding when the column contains only the
calendar.
Comment 5 Florian Müllner 2015-03-03 03:46:35 UTC
Created attachment 298364 [details] [review]
calendar: Respect session mode for section visibility

Fix session mode property for events, whoops.
Comment 6 Rui Matos 2015-03-03 15:01:32 UTC
Review of attachment 298362 [details] [review]:

sure
Comment 7 Rui Matos 2015-03-03 15:01:36 UTC
Review of attachment 298358 [details] [review]:

ok
Comment 8 Rui Matos 2015-03-03 15:04:51 UTC
Review of attachment 298360 [details] [review]:

right
Comment 9 Rui Matos 2015-03-03 15:22:32 UTC
Review of attachment 298364 [details] [review]:

Looks good

::: js/ui/calendar.js
@@ +1254,3 @@
+        let id = Main.sessionMode.connect('updated',
+                                          Lang.bind(this, this._sync));
+        this.actor.connect('destroy', function() {

Obviously correct but I couldn't find any place where MessageListSections are destroyed.
Comment 10 Florian Müllner 2015-03-03 15:53:20 UTC
(In reply to Rui Matos from comment #9)
> Obviously correct but I couldn't find any place where MessageListSections
> are destroyed.

Right, we don't destroy our built-in sections. Still, extensions might want to add their own sections, which need to be removed/destroyed on disable() ...
Comment 11 Florian Müllner 2015-03-03 18:36:06 UTC
Attachment 298358 [details] pushed as 61c5f25 - dateMenu: Hide displays section when disabled by session mode
Attachment 298360 [details] pushed as db4076b - calendar: Hide message list when all sections are disallowed
Attachment 298364 [details] pushed as 313ee70 - calendar: Respect session mode for section visibility
Comment 12 Florian Müllner 2015-03-03 22:48:42 UTC
Created attachment 298490 [details]
Calendar with and without extra padding

So I got myself a fixed mesa build and can take screenshots again - here's a comparison between master (extra padding at bottom) and with the remaining patch applied.
Jakub?
Comment 13 Matthias Clasen 2015-03-04 11:45:57 UTC
my vote goes to the right: strip the padding
Comment 14 Jakub Steiner 2015-03-04 12:06:52 UTC
strip the padding indeed