[gnome-music/wip/merge: 7/343] add the src files
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/merge: 7/343] add the src files
- Date: Thu, 25 Jul 2013 11:14:06 +0000 (UTC)
commit 135869d7b2d6058346f0f25daf05eedad5f6ee04
Author: Eslam Mostafa <cseslam gmail com>
Date: Fri Jul 12 22:50:26 2013 +0200
add the src files
gnome-music/application.py | 27 +++++++++++++++++++++++++++
gnome-music/toolbar.py | 20 ++++++++++++++++++++
gnome-music/window.py | 20 ++++++++++++++++++++
3 files changed, 67 insertions(+), 0 deletions(-)
---
diff --git a/gnome-music/Makefile.am b/gnome-music/Makefile.am
new file mode 100644
index 0000000..e69de29
diff --git a/gnome-music/__init__.py b/gnome-music/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/gnome-music/application.py b/gnome-music/application.py
new file mode 100644
index 0000000..5eadcce
--- /dev/null
+++ b/gnome-music/application.py
@@ -0,0 +1,27 @@
+import os
+import sys
+from gi.repository import Gtk, Gio, GLib
+
+from window import Window
+
+class Application(Gtk.Application):
+ def __init__(self):
+ Gtk.Application.__init__(self,
+ application_id='org.gnome.Music',
+ flags=Gio.ApplicationFlags.FLAGS_NONE,
+ inactivity_timeout=12000)
+ GLib.set_application_name("Music")
+
+ def do_startup(self):
+ Gtk.Application.startup(self)
+
+ def do_activate(self):
+ self._window = Window(self)
+ self._window.present()
+
+ def Quit(self):
+ this.quit();
+
+if __name__ == '__main__':
+ app = Application()
+ sys.exit(app.run(sys.argv))
diff --git a/gnome-music/gnome-music.in b/gnome-music/gnome-music.in
new file mode 100644
index 0000000..e69de29
diff --git a/gnome-music/toolbar.py b/gnome-music/toolbar.py
new file mode 100644
index 0000000..5ab5f96
--- /dev/null
+++ b/gnome-music/toolbar.py
@@ -0,0 +1,20 @@
+from gi.repository import Gtk
+
+class Toolbar():
+ def __init__(self):
+ self._stackSwithcer = Gtk.StackSwitcher()
+ self._ui = Gtk.Builder()
+ self._ui.add_from_resource('/org/gnome/music/HeaderBar.ui')
+ self.headerBar = self._ui.get_object('header-bar')
+ self._selectButton = self._ui.get_object('select-button')
+ self._cancelButton = self._ui.get_object('cancel-button')
+ self._backButton = self._ui.get_object('back-button')
+ self._closeSeparator = self._ui.get_object("close-button-separator")
+ self._closeButton = self._ui.get_object("close-button")
+ self._selectionMenu = self._ui.get_object("selection-menu")
+ self._selectionMenuButton = self._ui.get_object("selection-menu-button")
+ self._selectionMenuButton.set_relief(Gtk.ReliefStyle.NONE);
+ self.header_bar.custom_title = this._stack_switcher;
+ self._searchButton = this._ui.get_object("search-button")
+ self._backButton.connect('clicked',self._setState)
+ self._closeButton.connect('clicked', self._closeButtonClicked)
diff --git a/gnome-music/window.py b/gnome-music/window.py
new file mode 100644
index 0000000..ebacd81
--- /dev/null
+++ b/gnome-music/window.py
@@ -0,0 +1,20 @@
+from gi.repository import Gtk, Gio, GLib
+from gettext import gettext as _
+
+class Window(Gtk.ApplicationWindow):
+ def __init__(self, app):
+ Gtk.ApplicationWindow.init(self,
+ application=app,
+ title=_('Music'))
+ settings = Gio.Settings.new('org.gnome.Music')
+ this.set_size_request(887, 640);
+ this._setupView();
+
+ def _setupView(self):
+ self._box = Gtk.VBox()
+ self.views = []
+ self._stack = Gtk.Stack(
+ transition_type=Gtk.StackTransitionType.CROSSFADE,
+ transition_duration=100,
+ visible=true)
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]