Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
f8d12bd9
Commit
f8d12bd9
authored
Aug 22, 2007
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates dbus pygtk controller
parent
56299eb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
14 deletions
+48
-14
extras/dbus-vlc.glade
extras/dbus-vlc.glade
+26
-3
extras/dbus-vlc.py
extras/dbus-vlc.py
+22
-11
No files found.
extras/dbus-vlc.glade
View file @
f8d12bd9
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.
2.0 on Sat Apr 7 01:02:24 2007 by fun@ubuntu
-->
<!--Generated with glade3 3.
3.3 on Wed Aug 22 03:00:39 2007
-->
<glade-interface>
<widget
class=
"GtkWindow"
id=
"window1"
>
<property
name=
"resizable"
>
False
</property>
...
...
@@ -19,6 +19,7 @@
<property
name=
"visible"
>
True
</property>
<property
name=
"tooltip"
translatable=
"yes"
>
Previous
</property>
<property
name=
"relief"
>
GTK_RELIEF_NONE
</property>
<property
name=
"response_id"
>
0
</property>
<child>
<widget
class=
"GtkImage"
id=
"image8"
>
<property
name=
"visible"
>
True
</property>
...
...
@@ -37,6 +38,7 @@
<property
name=
"visible"
>
True
</property>
<property
name=
"tooltip"
translatable=
"yes"
>
Play/Pause
</property>
<property
name=
"relief"
>
GTK_RELIEF_NONE
</property>
<property
name=
"response_id"
>
0
</property>
<child>
<widget
class=
"GtkImage"
id=
"image6"
>
<property
name=
"visible"
>
True
</property>
...
...
@@ -56,6 +58,7 @@
<property
name=
"visible"
>
True
</property>
<property
name=
"tooltip"
translatable=
"yes"
>
Next
</property>
<property
name=
"relief"
>
GTK_RELIEF_NONE
</property>
<property
name=
"response_id"
>
0
</property>
<child>
<widget
class=
"GtkImage"
id=
"image1"
>
<property
name=
"visible"
>
True
</property>
...
...
@@ -75,6 +78,7 @@
<property
name=
"visible"
>
True
</property>
<property
name=
"tooltip"
translatable=
"yes"
>
Stop
</property>
<property
name=
"relief"
>
GTK_RELIEF_NONE
</property>
<property
name=
"response_id"
>
0
</property>
<child>
<widget
class=
"GtkImage"
id=
"image9"
>
<property
name=
"visible"
>
True
</property>
...
...
@@ -95,6 +99,7 @@
<property
name=
"visible"
>
True
</property>
<property
name=
"tooltip"
translatable=
"yes"
>
Quit vlc
</property>
<property
name=
"relief"
>
GTK_RELIEF_NONE
</property>
<property
name=
"response_id"
>
0
</property>
<child>
<widget
class=
"GtkImage"
id=
"image5"
>
<property
name=
"width_request"
>
26
</property>
...
...
@@ -116,6 +121,7 @@
<property
name=
"visible"
>
True
</property>
<property
name=
"tooltip"
translatable=
"yes"
>
Close controller
</property>
<property
name=
"relief"
>
GTK_RELIEF_NONE
</property>
<property
name=
"response_id"
>
0
</property>
<child>
<widget
class=
"GtkImage"
id=
"image2"
>
<property
name=
"visible"
>
True
</property>
...
...
@@ -220,11 +226,13 @@
<property
name=
"visible"
>
True
</property>
<property
name=
"tooltip"
translatable=
"yes"
>
Add MRL, or directory if empty
</property>
<property
name=
"relief"
>
GTK_RELIEF_NONE
</property>
<property
name=
"response_id"
>
0
</property>
<child>
<widget
class=
"GtkImage"
id=
"image4"
>
<property
name=
"width_request"
>
100
</property>
<property
name=
"height_request"
>
80
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"tooltip"
translatable=
"yes"
>
Add to playlist
</property>
<property
name=
"stock"
>
gtk-add
</property>
</widget>
</child>
...
...
@@ -243,11 +251,25 @@
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<widget
class=
"GtkLabel"
id=
"l_artist"
>
<property
name=
"width_request"
>
180
</property>
<property
name=
"height_request"
>
20
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"justify"
>
GTK_JUSTIFY_CENTER
</property>
<property
name=
"wrap"
>
True
</property>
<property
name=
"ellipsize"
>
PANGO_ELLIPSIZE_MIDDLE
</property>
<property
name=
"single_line_mode"
>
True
</property>
</widget>
<packing>
<property
name=
"position"
>
2
</property>
</packing>
</child>
<child>
<widget
class=
"GtkHBox"
id=
"hbox3"
>
<property
name=
"visible"
>
True
</property>
<child>
<widget
class=
"GtkLabel"
id=
"
item
"
>
<widget
class=
"GtkLabel"
id=
"
l_title
"
>
<property
name=
"width_request"
>
180
</property>
<property
name=
"height_request"
>
20
</property>
<property
name=
"visible"
>
True
</property>
...
...
@@ -264,6 +286,7 @@
<widget
class=
"GtkImage"
id=
"vlcicon"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"events"
></property>
<property
name=
"tooltip"
translatable=
"yes"
>
Update meta info
</property>
<property
name=
"xpad"
>
8
</property>
<property
name=
"icon_name"
>
vlc
</property>
</widget>
...
...
@@ -275,7 +298,7 @@
</child>
</widget>
<packing>
<property
name=
"position"
>
2
</property>
<property
name=
"position"
>
3
</property>
</packing>
</child>
</widget>
...
...
extras/dbus-vlc.py
View file @
f8d12bd9
...
...
@@ -47,14 +47,19 @@ def itemchange_handler(item):
a
=
item
[
"artist"
]
except
:
a
=
""
if
a
==
""
:
a
=
item
[
"URI"
]
l_item
.
set_text
(
a
)
try
:
t
=
item
[
"title"
]
except
:
t
=
""
if
t
==
""
:
t
=
item
[
"URI"
]
l_artist
.
set_text
(
a
)
l_title
.
set_text
(
t
)
#connect to the bus
bus
=
dbus
.
SessionBus
()
player_o
=
bus
.
get_object
(
"org.
freedesktop.MediaPlayer
"
,
"/Player"
)
tracklist_o
=
bus
.
get_object
(
"org.
freedesktop.MediaPlayer
"
,
"/TrackList"
)
player_o
=
bus
.
get_object
(
"org.
mpris.vlc
"
,
"/Player"
)
tracklist_o
=
bus
.
get_object
(
"org.
mpris.vlc
"
,
"/TrackList"
)
tracklist
=
dbus
.
Interface
(
tracklist_o
,
"org.freedesktop.MediaPlayer"
)
player
=
dbus
.
Interface
(
player_o
,
"org.freedesktop.MediaPlayer"
)
...
...
@@ -68,6 +73,7 @@ def AddTrack(widget):
mrl
=
e_mrl
.
get_text
()
if
mrl
!=
None
and
mrl
!=
""
:
tracklist
.
AddTrack
(
mrl
,
True
)
e_mrl
.
set_text
(
''
)
else
:
mrl
=
bt_file
.
get_filename
()
if
mrl
!=
None
and
mrl
!=
""
:
...
...
@@ -94,9 +100,13 @@ def update(widget):
try
:
a
=
item
[
"artist"
]
except
:
a
=
""
if
a
==
""
:
a
=
item
[
"URI"
]
l_item
.
set_text
(
a
)
try
:
t
=
item
[
"title"
]
except
:
t
=
""
if
t
==
""
:
t
=
item
[
"URI"
]
l_artist
.
set_text
(
a
)
l_title
.
set_text
(
t
)
GetPlayStatus
(
0
)
#get playing status from remote vlc
...
...
@@ -112,7 +122,7 @@ def GetPlayStatus(widget):
def
Quit
(
widget
):
player
.
Quit
(
reply_handler
=
(
lambda
*
args
:
None
),
error_handler
=
(
lambda
*
args
:
None
))
l_
item
.
set_text
(
""
)
l_
title
.
set_text
(
""
)
def
Pause
(
widget
):
player
.
Pause
()
...
...
@@ -174,12 +184,13 @@ xml = gtk.glade.XML('dbus-vlc.glade')
bt_close
=
xml
.
get_widget
(
'close'
)
bt_quit
=
xml
.
get_widget
(
'quit'
)
bt_file
=
xml
.
get_widget
(
'ChooseFile'
)
bt_mrl
=
xml
.
get_widget
(
'AddMRL'
)
bt_next
=
xml
.
get_widget
(
'next'
)
bt_prev
=
xml
.
get_widget
(
'prev'
)
bt_stop
=
xml
.
get_widget
(
'stop'
)
bt_toggle
=
xml
.
get_widget
(
'toggle'
)
l_item
=
xml
.
get_widget
(
'item'
)
bt_mrl
=
xml
.
get_widget
(
'AddMRL'
)
l_artist
=
xml
.
get_widget
(
'l_artist'
)
l_title
=
xml
.
get_widget
(
'l_title'
)
e_mrl
=
xml
.
get_widget
(
'mrl'
)
window
=
xml
.
get_widget
(
'window1'
)
img_bt_toggle
=
xml
.
get_widget
(
'image6'
)
...
...
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