From 1001f38a67a39214e0827c9386b5936ad2e09e72 Mon Sep 17 00:00:00 2001 From: coderkun Date: Sat, 11 Jun 2016 13:34:16 +0200 Subject: [PATCH] add button for fullscreen action to toolbar of cover panel --- data/gtk.glade | 20 +++++++++++++++++++- mcg/mcgGtk.py | 5 +++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/data/gtk.glade b/data/gtk.glade index 7d9ecde..82c6753 100644 --- a/data/gtk.glade +++ b/data/gtk.glade @@ -911,7 +911,25 @@ 6 end - + + True + True + True + + + + True + False + view-fullscreen-symbolic + + + + + False + False + 0 + True + diff --git a/mcg/mcgGtk.py b/mcg/mcgGtk.py index 7d6f3af..646fbf4 100755 --- a/mcg/mcgGtk.py +++ b/mcg/mcgGtk.py @@ -780,6 +780,7 @@ class CoverPanel(mcg.Base): def get_signal_handlers(self): return { + 'on_cover-toolbar-fullscreen_clicked': self.on_fullscreen_clicked, 'on_cover-box_button_press_event': self.on_cover_box_pressed, 'on_cover-scroll_size_allocate': self.on_cover_size_allocate, 'on_cover-songs_button_press_event': self.on_songs_start_change, @@ -787,6 +788,10 @@ class CoverPanel(mcg.Base): } + def on_fullscreen_clicked(self, widget): + self._callback(self.SIGNAL_TOGGLE_FULLSCREEN) + + def on_cover_box_pressed(self, widget, event): if event.type == Gdk.EventType._2BUTTON_PRESS: self._callback(self.SIGNAL_TOGGLE_FULLSCREEN)