[gnome-music] Removed deprecated gtk stuff code side
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] Removed deprecated gtk stuff code side
- Date: Fri, 3 Oct 2014 11:49:32 +0000 (UTC)
commit fe9483bbbaeb9399b73b068d525c67bd1aaf9bb3
Author: Kris Thomsen <mail kristhomsen dk>
Date: Wed Sep 24 22:14:22 2014 +0200
Removed deprecated gtk stuff code side
I walked the way through the *.py files and changed the deprecated stuff to some more up to date stuff
https://bugzilla.gnome.org/show_bug.cgi?id=737142
gnomemusic/player.py | 12 ++++++++----
gnomemusic/widgets.py | 12 ++++++------
2 files changed, 14 insertions(+), 10 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 3c6e03e..1b81c1f 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -553,11 +553,15 @@ class Player(GObject.GObject):
self.repeatBtnImage = self._ui.get_object('playlistRepeat')
if Gtk.Settings.get_default().get_property('gtk_application_prefer_dark_theme'):
- color = Gdk.Color(red=65535, green=65535, blue=65535)
+ #color = Gdk.Color(red=65535, green=65535, blue=65535)
+ color = Gdk.RGBA(red=1.0, green=1.0, blue=1.0, alpha=1.0)
else:
- color = Gdk.Color(red=0, green=0, blue=0)
- self._playImage.modify_fg(Gtk.StateType.ACTIVE, color)
- self._pauseImage.modify_fg(Gtk.StateType.ACTIVE, color)
+ #color = Gdk.Color(red=0, green=0, blue=0)
+ color = Gdk.RGBA(red=0.0, green=0.0, blue=0.0, alpha=0.0)
+ #self._playImage.modify_fg(Gtk.StateType.ACTIVE, color)
+ #self._pauseImage.modify_fg(Gtk.StateType.ACTIVE, color)
+ self._playImage.override_color(Gtk.StateFlags.ACTIVE, color)
+ self._pauseImage.override_color(Gtk.StateFlags.ACTIVE, color)
self._sync_repeat_image()
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index bf11a38..113ad61 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -64,7 +64,7 @@ class AlbumWidget(Gtk.EventBox):
@log
def __init__(self, player):
- super(Gtk.EventBox, self).__init__()
+ Gtk.EventBox.__init__(self)
self.player = player
self.iterToClean = None
@@ -85,7 +85,7 @@ class AlbumWidget(Gtk.EventBox):
child_view = self.view.get_children()[0]
child_view.set_margin_top(64)
child_view.set_margin_bottom(64)
- child_view.set_margin_right(32)
+ child_view.set_margin_end(32)
self.view.remove(child_view)
view_box.add(child_view)
self.add(self.ui.get_object('AlbumWidget'))
@@ -309,12 +309,12 @@ class AlbumWidget(Gtk.EventBox):
return False
-class ArtistAlbums(Gtk.VBox):
+class ArtistAlbums(Gtk.Box):
@log
def __init__(self, artist, albums, player,
header_bar, selection_toolbar, selectionModeAllowed=False):
- Gtk.VBox.__init__(self)
+ Gtk.Box.__init__(self, orientation=Gtk.Orientation.VERTICAL)
self.player = player
self.artist = artist
self.albums = albums
@@ -463,13 +463,13 @@ class AllArtistsAlbums(ArtistAlbums):
self.add_album(item)
-class ArtistAlbumWidget(Gtk.HBox):
+class ArtistAlbumWidget(Gtk.Box):
pixbuf = AlbumArtCache.get_default().get_default_icon(128, 128)
@log
def __init__(self, artist, album, player, model, header_bar, selectionModeAllowed):
- super(Gtk.HBox, self).__init__()
+ Gtk.Box.__init__(self, orientation=Gtk.Orientation.HORIZONTAL)
self.player = player
self.album = album
self.artist = artist
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]