diff options
author | Daniel Brötzmann <mailtrash@posteo.de> | 2018-11-01 23:59:11 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2018-11-10 03:12:43 +0300 |
commit | e7030cdc7f06edd76ed018057f25186edff5396b (patch) | |
tree | 14818ca5e7d3f9de16c1fd62523dc66ec81c60a3 | |
parent | 556eb1608b64c73ef0f22f5d8c6660774ad3c890 (diff) |
[now_listen] Update GUI
-rw-r--r-- | now_listen/config_dialog.ui | 167 | ||||
-rw-r--r-- | now_listen/now_listen.py | 7 |
2 files changed, 59 insertions, 115 deletions
diff --git a/now_listen/config_dialog.ui b/now_listen/config_dialog.ui index 4a83744..27f2e96 100644 --- a/now_listen/config_dialog.ui +++ b/now_listen/config_dialog.ui @@ -1,10 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.4 --> +<!-- Generated with glade 3.22.1 --> <interface> - <requires lib="gtk+" version="3.0"/> + <requires lib="gtk+" version="3.20"/> <object class="GtkWindow" id="config_window"> + <property name="width_request">400</property> + <property name="height_request">-1</property> <property name="can_focus">False</property> <property name="title" translatable="yes">Now Listen Configuration</property> + <child type="titlebar"> + <placeholder/> + </child> <child> <object class="GtkBox" id="now_listen_config"> <property name="visible">True</property> @@ -13,145 +18,89 @@ <property name="margin_right">5</property> <property name="margin_top">5</property> <property name="margin_bottom">5</property> + <property name="border_width">18</property> <property name="orientation">vertical</property> - <property name="spacing">5</property> + <property name="spacing">6</property> <child> - <object class="GtkBox"> + <object class="GtkLabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="margin_left">5</property> - <property name="margin_right">5</property> - <property name="orientation">vertical</property> - <property name="spacing">5</property> - <child> - <object class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes"><b>Format string:</b></property> - <property name="use_markup">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">-1</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="format_string"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">●</property> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> + <property name="halign">start</property> + <property name="label" translatable="yes">Format string</property> + <style> + <class name="bold"/> + <class name="dim-label"/> + </style> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">0</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="format_string"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">4</property> </packing> </child> <child> - <object class="GtkBox"> + <object class="GtkLabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="margin_left">5</property> - <property name="margin_right">5</property> - <property name="orientation">vertical</property> - <property name="spacing">5</property> - <child> - <object class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes"><b>Format string for non-local files (MPRIS2 only):</b></property> - <property name="use_markup">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="format_string_http"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">●</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> + <property name="halign">start</property> + <property name="label" translatable="yes">Format string for non-local files (MPRIS2 only)</property> + <style> + <class name="bold"/> + <class name="dim-label"/> + <class name="margin-top6"/> + </style> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">5</property> </packing> </child> <child> - <object class="GtkFrame" id="frame1"> + <object class="GtkEntry" id="format_string_http"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">6</property> + </packing> + </child> + <child> + <object class="GtkLabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="margin_left">5</property> - <property name="margin_right">5</property> - <property name="margin_top">5</property> - <property name="margin_bottom">5</property> - <property name="label_xalign">0.05000000074505806</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkAlignment" id="alignment1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">5</property> - <property name="margin_right">5</property> - <property name="margin_top">5</property> - <property name="margin_bottom">5</property> - <property name="top_padding">5</property> - <property name="left_padding">15</property> - <child> - <object class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">%title - title of the track being played + <property name="halign">start</property> + <property name="label" translatable="yes">%title - title of the track being played %artist - artist %album - album -<b>For MPRIS2:</b> %url - URL of the file, local files use the file://-schema</property> - <property name="use_markup">True</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - </object> - </child> - </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes"><b>Information:</b></property> - <property name="use_markup">True</property> - </object> - </child> + <style> + <class name="dim-label"/> + </style> </object> <packing> - <property name="expand">True</property> + <property name="expand">False</property> <property name="fill">True</property> - <property name="pack_type">end</property> - <property name="position">2</property> + <property name="position">7</property> </packing> </child> </object> </child> - <child type="titlebar"> - <placeholder/> - </child> </object> </interface> diff --git a/now_listen/now_listen.py b/now_listen/now_listen.py index d301f26..6f2dd78 100644 --- a/now_listen/now_listen.py +++ b/now_listen/now_listen.py @@ -7,20 +7,15 @@ from gi.repository import Gdk from gajim.plugins import GajimPlugin from gajim.plugins.helpers import log_calls from gajim.plugins.gui import GajimPluginConfigDialog +from gajim.plugins.plugins_i18n import _ from gajim.common.dbus.music_track import MusicTrackListener -# Since Gajim 1.1.0 _() has to be imported -try: - from gajim.common.i18n import _ -except ImportError: - pass log = logging.getLogger('gajim.plugin_system.now_listen') class NowListenPlugin(GajimPlugin): - @log_calls('NowListenPlugin') def init(self): self.description = _('Copy tune info of playing music to conversation ' |