mirror of
https://github.com/SoongNoonien/mpdevil.git
synced 2023-08-10 21:12:44 +03:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e62f4824c2 | ||
![]() |
b9b1ba989a | ||
![]() |
f1831a5569 | ||
![]() |
b904907f6f | ||
![]() |
54673a9840 |
@@ -92,7 +92,7 @@ class Client(MPDClient):
|
||||
class AlbumDialog(Gtk.Dialog):
|
||||
def __init__(self, parent, client, album, artist, year):
|
||||
Gtk.Dialog.__init__(self, title=(artist+" - "+album+" ("+year+")"), transient_for=parent)
|
||||
self.add_buttons(Gtk.STOCK_ADD, Gtk.ResponseType.ACCEPT, Gtk.STOCK_MEDIA_PLAY, Gtk.ResponseType.YES, Gtk.STOCK_OK, Gtk.ResponseType.OK, Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
|
||||
self.add_buttons(Gtk.STOCK_ADD, Gtk.ResponseType.ACCEPT, Gtk.STOCK_MEDIA_PLAY, Gtk.ResponseType.YES, Gtk.STOCK_OPEN, Gtk.ResponseType.OK, Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
|
||||
self.set_default_size(800, 600)
|
||||
|
||||
#adding vars
|
||||
@@ -145,6 +145,7 @@ class AlbumDialog(Gtk.Dialog):
|
||||
#packing
|
||||
scroll.add(self.treeview)
|
||||
self.vbox.pack_start(scroll, True, True, 0) #vbox default widget of dialogs
|
||||
self.vbox.set_spacing(6)
|
||||
self.show_all()
|
||||
|
||||
#selection workaround
|
||||
@@ -606,7 +607,7 @@ class Browser(Gtk.Box):
|
||||
album = AlbumDialog(self.window, self.client, selected_album, selected_artist, selected_album_year)
|
||||
response = album.run()
|
||||
if response == Gtk.ResponseType.OK:
|
||||
self.title_list.album_to_playlist(selected_album, selected_artist, selected_album_year, False)
|
||||
self.album_list.iconview.select_path(path)
|
||||
elif response == Gtk.ResponseType.ACCEPT:
|
||||
self.title_list.album_to_playlist(selected_album, selected_artist, selected_album_year, True)
|
||||
elif response == Gtk.ResponseType.YES:
|
||||
@@ -869,6 +870,7 @@ class SettingsDialog(Gtk.Dialog):
|
||||
tabs.append_page(general, Gtk.Label(label=_("General")))
|
||||
tabs.append_page(profiles, Gtk.Label(label=_("Profiles")))
|
||||
self.vbox.pack_start(tabs, True, True, 0) #vbox default widget of dialogs
|
||||
self.vbox.set_spacing(6)
|
||||
|
||||
self.show_all()
|
||||
|
||||
@@ -967,7 +969,9 @@ class SeekBar(Gtk.Box):
|
||||
|
||||
#widgets
|
||||
self.elapsed=Gtk.Label()
|
||||
self.elapsed.set_width_chars(7)
|
||||
self.rest=Gtk.Label()
|
||||
self.rest.set_width_chars(8)
|
||||
self.scale=Gtk.Scale.new_with_range(orientation=Gtk.Orientation.HORIZONTAL, min=0, max=100, step=0.001)
|
||||
self.scale.set_draw_value(False)
|
||||
|
||||
@@ -1572,6 +1576,7 @@ class MainWindow(Gtk.ApplicationWindow):
|
||||
self.hbox.pack_end(menu_button, False, False, 0)
|
||||
|
||||
self.add(self.vbox)
|
||||
self.show_all()
|
||||
|
||||
def update(self, app): #update title and send notify
|
||||
if self.client.connected():
|
||||
@@ -1663,15 +1668,15 @@ class mpdevil(Gtk.Application):
|
||||
BASE_KEY = "org.mpdevil"
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, application_id="org.mpdevil", flags=Gio.ApplicationFlags.FLAGS_NONE, **kwargs)
|
||||
#Gtk.window_set_default_icon_name("mpdevil")
|
||||
self.client=Client()
|
||||
self.settings = Gio.Settings.new(self.BASE_KEY)
|
||||
self.window=None
|
||||
|
||||
def do_activate(self):
|
||||
self.window = MainWindow(self, self.client, self.settings)
|
||||
self.window.connect("delete-event", self.on_delete_event)
|
||||
self.window.show_all()
|
||||
if not self.window: #allow just one instance
|
||||
self.window = MainWindow(self, self.client, self.settings)
|
||||
self.window.connect("delete-event", self.on_delete_event)
|
||||
self.window.present()
|
||||
|
||||
def do_startup(self):
|
||||
Gtk.Application.do_startup(self)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
dnl -*- Mode: autoconf -*-
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ([2.68])
|
||||
AC_INIT([mpdevil], [0.4.0])
|
||||
AC_INIT([mpdevil], [0.4.1])
|
||||
AC_CONFIG_SRCDIR([bin/mpdevil.py])
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1021 KiB After Width: | Height: | Size: 1005 KiB |
Reference in New Issue
Block a user