Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
4401a560
Commit
4401a560
authored
May 18, 2011
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpris.py: convert from glade to gtk builder
thanks to mirsal
parent
64980825
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
148 additions
and
146 deletions
+148
-146
extras/misc/mpris.py
extras/misc/mpris.py
+25
-25
extras/misc/mpris.xml
extras/misc/mpris.xml
+123
-121
No files found.
extras/misc/mpris.py
View file @
4401a560
...
...
@@ -37,7 +37,6 @@ import dbus.glib
# core interface stuff
import
gtk
import
gtk.glade
# timer
import
gobject
...
...
@@ -287,34 +286,35 @@ def GetPlayStatus(widget):
bt_loop
.
set_active
(
loop
)
repeat
=
status
[
3
]
==
1
bt_repeat
.
set_active
(
repeat
)
# loads
glade
file from the directory where the script is,
# loads
UI
file from the directory where the script is,
# so we can use /path/to/mpris.py to execute it.
import
sys
xml
=
gtk
.
glade
.
XML
(
os
.
path
.
join
(
os
.
path
.
dirname
(
sys
.
argv
[
0
])
,
'mpris.glade'
))
xml
=
gtk
.
Builder
()
gtk
.
Builder
.
add_from_file
(
xml
,
os
.
path
.
join
(
os
.
path
.
dirname
(
sys
.
argv
[
0
])
,
'mpris.xml'
))
# ui setup
bt_close
=
xml
.
get_
widge
t
(
'close'
)
bt_quit
=
xml
.
get_
widge
t
(
'quit'
)
bt_file
=
xml
.
get_
widge
t
(
'ChooseFile'
)
bt_next
=
xml
.
get_
widge
t
(
'next'
)
bt_prev
=
xml
.
get_
widge
t
(
'prev'
)
bt_stop
=
xml
.
get_
widge
t
(
'stop'
)
bt_toggle
=
xml
.
get_
widge
t
(
'toggle'
)
bt_mrl
=
xml
.
get_
widge
t
(
'AddMRL'
)
bt_shuffle
=
xml
.
get_
widge
t
(
'shuffle'
)
bt_repeat
=
xml
.
get_
widge
t
(
'repeat'
)
bt_loop
=
xml
.
get_
widge
t
(
'loop'
)
l_artist
=
xml
.
get_
widge
t
(
'l_artist'
)
l_title
=
xml
.
get_
widge
t
(
'l_title'
)
e_mrl
=
xml
.
get_
widge
t
(
'mrl'
)
window
=
xml
.
get_
widge
t
(
'window1'
)
img_bt_toggle
=
xml
.
get_
widge
t
(
'image6'
)
exp
=
xml
.
get_
widge
t
(
'expander2'
)
expvbox
=
xml
.
get_
widge
t
(
'expandvbox'
)
audioicon
=
xml
.
get_
widge
t
(
'eventicon'
)
vol
=
xml
.
get_
widge
t
(
'vol'
)
time_s
=
xml
.
get_
widge
t
(
'time_s'
)
time_l
=
xml
.
get_
widge
t
(
'time_l'
)
bt_close
=
xml
.
get_
objec
t
(
'close'
)
bt_quit
=
xml
.
get_
objec
t
(
'quit'
)
bt_file
=
xml
.
get_
objec
t
(
'ChooseFile'
)
bt_next
=
xml
.
get_
objec
t
(
'next'
)
bt_prev
=
xml
.
get_
objec
t
(
'prev'
)
bt_stop
=
xml
.
get_
objec
t
(
'stop'
)
bt_toggle
=
xml
.
get_
objec
t
(
'toggle'
)
bt_mrl
=
xml
.
get_
objec
t
(
'AddMRL'
)
bt_shuffle
=
xml
.
get_
objec
t
(
'shuffle'
)
bt_repeat
=
xml
.
get_
objec
t
(
'repeat'
)
bt_loop
=
xml
.
get_
objec
t
(
'loop'
)
l_artist
=
xml
.
get_
objec
t
(
'l_artist'
)
l_title
=
xml
.
get_
objec
t
(
'l_title'
)
e_mrl
=
xml
.
get_
objec
t
(
'mrl'
)
window
=
xml
.
get_
objec
t
(
'window1'
)
img_bt_toggle
=
xml
.
get_
objec
t
(
'image6'
)
exp
=
xml
.
get_
objec
t
(
'expander2'
)
expvbox
=
xml
.
get_
objec
t
(
'expandvbox'
)
audioicon
=
xml
.
get_
objec
t
(
'eventicon'
)
vol
=
xml
.
get_
objec
t
(
'vol'
)
time_s
=
xml
.
get_
objec
t
(
'time_s'
)
time_l
=
xml
.
get_
objec
t
(
'time_l'
)
# connect to the different callbacks
...
...
extras/misc/mpris.
glade
→
extras/misc/mpris.
xml
View file @
4401a560
This diff is collapsed.
Click to expand it.
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