calendar: Only show section title for other days

The section titles usually don't provide a lot of value - messages
themselves are usually pretty unambiguous about their type, and
having a hidden shortcut to some settings panel or application isn't
essential either - except when showing the selected date when browsing
other days, as it adds context to the listed events. Based on that,
remove the section title as a general MessageListSection feature and
move it into the EventsSection, where we only show it when it is useful.

https://bugzilla.gnome.org/show_bug.cgi?id=775763
This commit is contained in:
Florian Müllner
2017-02-26 04:35:43 +01:00
parent 8a6157c7c1
commit fec511c786
6 changed files with 29 additions and 51 deletions

View File

@ -520,19 +520,10 @@ Signals.addSignalMethods(Message.prototype);
const MessageListSection = new Lang.Class({
Name: 'MessageListSection',
_init: function(title) {
_init: function() {
this.actor = new St.BoxLayout({ style_class: 'message-list-section',
clip_to_allocation: true,
x_expand: true, vertical: true });
this._title = new St.Button({ style_class: 'message-list-section-title',
label: title,
can_focus: true,
x_expand: true,
x_align: St.Align.START });
this.actor.add_actor(this._title);
this._title.connect('clicked', Lang.bind(this, this._onTitleClicked));
this._title.connect('key-focus-in', Lang.bind(this, this._onKeyFocusIn));
this._list = new St.BoxLayout({ style_class: 'message-list-section-list',
vertical: true });
@ -554,11 +545,6 @@ const MessageListSection = new Lang.Class({
this._sync();
},
_onTitleClicked: function() {
Main.overview.hide();
Main.panel.closeCalendar();
},
_onKeyFocusIn: function(actor) {
this.emit('key-focus-in', actor);
},