From 8081bbd2c18c17e018e080b36ace269d4a6f4903 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Sun, 1 Sep 2019 07:48:33 -0600 Subject: [PATCH] Icons for Configure Servers dialog --- libremsonic/ui/common/players.py | 2 ++ libremsonic/ui/configure_servers.py | 23 +++++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/libremsonic/ui/common/players.py b/libremsonic/ui/common/players.py index cdba6b2..da7358c 100644 --- a/libremsonic/ui/common/players.py +++ b/libremsonic/ui/common/players.py @@ -253,6 +253,8 @@ class ChromecastPlayer(Player): # Set host_ip # TODO should have a mechanism to update this. Maybe it should be # determined every time we try and play a song. + # TODO does not work properyfly when on VPNs when the DNS is piped over + # the VPN tunnel. try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(('8.8.8.8', 80)) diff --git a/libremsonic/ui/configure_servers.py b/libremsonic/ui/configure_servers.py index 59aadda..4310837 100644 --- a/libremsonic/ui/configure_servers.py +++ b/libremsonic/ui/configure_servers.py @@ -6,7 +6,7 @@ from gi.repository import Gtk, GObject from libremsonic.server import Server from libremsonic.config import ServerConfiguration -from libremsonic.ui.common import EditFormDialog +from libremsonic.ui.common import EditFormDialog, IconButton class EditServerDialog(EditFormDialog): @@ -94,7 +94,7 @@ class ConfigureServersDialog(Gtk.Dialog): self.server_configs = config.servers self.selected_server_index = config.current_server - self.set_default_size(450, 300) + self.set_default_size(500, 300) # Flow box to hold the server list and the buttons. flowbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) @@ -110,15 +110,18 @@ class ConfigureServersDialog(Gtk.Dialog): # Add all of the buttons to the button box. self.buttons = [ # TODO get good icons for these - (Gtk.Button(label='Edit...'), - lambda e: self.on_edit_clicked(e, False), 'start', True), - (Gtk.Button(label='Add...'), + (IconButton('document-edit-symbolic', label='Edit...', + relief=True), lambda e: self.on_edit_clicked(e, False), + 'start', True), + (IconButton('list-add', label='Add...', relief=True), lambda e: self.on_edit_clicked(e, True), 'start', False), - (Gtk.Button(label='Remove'), self.on_remove_clicked, 'start', - True), - (Gtk.Button(label='Close'), lambda _: self.close(), 'end', False), - (Gtk.Button(label='Connect'), self.on_connect_clicked, 'end', - True), + (IconButton('list-remove', label='Remove', + relief=True), self.on_remove_clicked, 'start', True), + (IconButton('window-close', label='Close', + relief=True), lambda _: self.close(), 'end', False), + (IconButton('network-transmit-receive', + label='Connect', + relief=True), self.on_connect_clicked, 'end', True), ] for button_cfg in self.buttons: btn, action, pack_end, requires_selection = button_cfg