Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
gajim
gajim-plugins
Commits
5731c87c
Commit
5731c87c
authored
Nov 01, 2018
by
Daniel Brötzmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[now_listen] Update GUI
parent
b7539744
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
115 deletions
+59
-115
now_listen/config_dialog.ui
now_listen/config_dialog.ui
+58
-109
now_listen/now_listen.py
now_listen/now_listen.py
+1
-6
No files found.
now_listen/config_dialog.ui
View file @
5731c87c
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.2
0.4
-->
<!-- Generated with glade 3.2
2.1
-->
<interface>
<requires
lib=
"gtk+"
version=
"3.0"
/>
<requires
lib=
"gtk+"
version=
"3.
2
0"
/>
<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=
"Gtk
Box
"
>
<object
class=
"Gtk
Label
"
>
<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=
"Gtk
Box
"
>
<object
class=
"Gtk
Label
"
>
<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"
>
Tru
e
</property>
<property
name=
"expand"
>
Fals
e
</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>
now_listen/now_listen.py
View file @
5731c87c
...
...
@@ -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 '
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment