[now_listen] Update GUI
This commit is contained in:
@@ -1,10 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.20.4 -->
|
<!-- Generated with glade 3.22.1 -->
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.0"/>
|
<requires lib="gtk+" version="3.20"/>
|
||||||
<object class="GtkWindow" id="config_window">
|
<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="can_focus">False</property>
|
||||||
<property name="title" translatable="yes">Now Listen Configuration</property>
|
<property name="title" translatable="yes">Now Listen Configuration</property>
|
||||||
|
<child type="titlebar">
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="now_listen_config">
|
<object class="GtkBox" id="now_listen_config">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -13,145 +18,89 @@
|
|||||||
<property name="margin_right">5</property>
|
<property name="margin_right">5</property>
|
||||||
<property name="margin_top">5</property>
|
<property name="margin_top">5</property>
|
||||||
<property name="margin_bottom">5</property>
|
<property name="margin_bottom">5</property>
|
||||||
|
<property name="border_width">18</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="spacing">5</property>
|
<property name="spacing">6</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkLabel">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="margin_left">5</property>
|
<property name="halign">start</property>
|
||||||
<property name="margin_right">5</property>
|
<property name="label" translatable="yes">Format string</property>
|
||||||
<property name="orientation">vertical</property>
|
<style>
|
||||||
<property name="spacing">5</property>
|
<class name="bold"/>
|
||||||
<child>
|
<class name="dim-label"/>
|
||||||
<object class="GtkLabel" id="label1">
|
</style>
|
||||||
<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>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">0</property>
|
<property name="position">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkEntry" id="format_string">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="margin_left">5</property>
|
<property name="invisible_char">●</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>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkFrame" id="frame1">
|
|
||||||
<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
|
|
||||||
%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>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="pack_type">end</property>
|
<property name="position">4</property>
|
||||||
<property name="position">2</property>
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<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">5</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">6</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="label" translatable="yes">%title - title of the track being played
|
||||||
|
%artist - artist
|
||||||
|
%album - album
|
||||||
|
|
||||||
|
%url - URL of the file, local files use the file://-schema</property>
|
||||||
|
<style>
|
||||||
|
<class name="dim-label"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">7</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child type="titlebar">
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</interface>
|
</interface>
|
||||||
|
|||||||
@@ -7,20 +7,15 @@ from gi.repository import Gdk
|
|||||||
from gajim.plugins import GajimPlugin
|
from gajim.plugins import GajimPlugin
|
||||||
from gajim.plugins.helpers import log_calls
|
from gajim.plugins.helpers import log_calls
|
||||||
from gajim.plugins.gui import GajimPluginConfigDialog
|
from gajim.plugins.gui import GajimPluginConfigDialog
|
||||||
|
from gajim.plugins.plugins_i18n import _
|
||||||
|
|
||||||
from gajim.common.dbus.music_track import MusicTrackListener
|
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')
|
log = logging.getLogger('gajim.plugin_system.now_listen')
|
||||||
|
|
||||||
|
|
||||||
class NowListenPlugin(GajimPlugin):
|
class NowListenPlugin(GajimPlugin):
|
||||||
|
|
||||||
@log_calls('NowListenPlugin')
|
@log_calls('NowListenPlugin')
|
||||||
def init(self):
|
def init(self):
|
||||||
self.description = _('Copy tune info of playing music to conversation '
|
self.description = _('Copy tune info of playing music to conversation '
|
||||||
|
|||||||
Reference in New Issue
Block a user