Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Brötzmann <mailtrash@posteo.de>2018-11-01 23:59:11 +0300
committerPhilipp Hörist <philipp@hoerist.com>2018-11-10 03:12:43 +0300
commite7030cdc7f06edd76ed018057f25186edff5396b (patch)
tree14818ca5e7d3f9de16c1fd62523dc66ec81c60a3
parent556eb1608b64c73ef0f22f5d8c6660774ad3c890 (diff)
[now_listen] Update GUI
-rw-r--r--now_listen/config_dialog.ui167
-rw-r--r--now_listen/now_listen.py7
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">&lt;b&gt;Format string:&lt;/b&gt;</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">&lt;b&gt;Format string for non-local files (MPRIS2 only):&lt;/b&gt;</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
-&lt;b&gt;For MPRIS2:&lt;/b&gt;
%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">&lt;b&gt;Information:&lt;/b&gt;</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 '