[Xfce4-commits] <parole:master> Merge branch bluesabre/gtk3
Sean Davis
noreply at xfce.org
Fri Oct 11 11:53:04 CEST 2013
Updating branch refs/heads/master
to f049a8c293479c2836d8f2ade34a88a8ccb17bda (commit)
from 9e27aa0ba60d02f98609abcaa722260f927fae72 (commit)
commit f049a8c293479c2836d8f2ade34a88a8ccb17bda
Merge: 9e27aa0 319707d
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Fri Oct 11 05:47:37 2013 -0400
Merge branch bluesabre/gtk3
commit 319707d65b26d960916a68226b28f351035724a9
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Mon Oct 7 06:16:09 2013 -0400
Fix fullscreen controls/mouse visibility
commit a2e7c914795687bab7a2510013b579bbde9f5f90
Merge: 52bc073 498c4e3
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Mon Oct 7 06:09:05 2013 -0400
Merge branch 'bluesabre/gtk3' of ssh://git.xfce.org/apps/parole into bluesabre/gtk3
commit 52bc073e30f29b32fea574257ad61b6626638567
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Mon Oct 7 06:08:59 2013 -0400
Cleanup styles
commit 498c4e30332227259d1dc522ee040528043f9282
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Mon Oct 7 11:54:31 2013 +0200
Drop unused var
commit ecdfdc33de4d432af56d71705f87ad836fb8abab
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Mon Oct 7 11:38:51 2013 +0200
Properly hide the mouse-cursor again in fullscreen mode
commit 5e2bc996c1db4f0b081526d212df02f5cd86f856
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Mon Oct 7 11:12:14 2013 +0200
Force LTR orientation on some of the controls (Bug #9822)
The controls now use this layout in RTL:
[Show/Hide playlist] [Fullscreen] [Volume] [Previous/Play/Next] [Playtime]
commit 4de371b7136f6d3d65778aac9a1cd9a14dfade10
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sun Oct 6 18:25:33 2013 +0200
Fix small leak
commit 802f64f142e1198cb10c3f52149d6e3e559376d0
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Oct 6 12:08:16 2013 -0400
Fix tooltips, fix controls disappearing while being used
commit de76a6bd55c0bb5f0a38723b9aa364dd039ccd18
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Fri Oct 4 22:00:58 2013 -0400
Get rid of parole_player_stop_clicked
commit 3988db6ec1d2182321707b55a9d265c19ecc82bf
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Fri Oct 4 21:40:32 2013 -0400
Set minimum width to accomodate controls, adjust minimum height to accomodate coverart
commit 9a8bb2e1f24084e0fb2b039cf90abcd9bd5658dd
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Oct 3 22:24:00 2013 -0400
Make fallback image 256 to match artwork
commit fd367c2058d1c6549d2def25c245c6ec7cc5bce5
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Oct 3 19:19:05 2013 -0400
Update changelog
commit 03e61de7415054e1e79c9162622570a9873d08ab
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Oct 3 19:13:53 2013 -0400
Use GtkAction in plugins
commit ac3ea42c1c8d78177c87b0ec23944cae5b4224d8
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 29 11:38:21 2013 -0400
Attempt to further debug
commit e8848253c34aa8d34603e52e23efc7bca7f348af
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 29 08:31:39 2013 -0400
Enhanced plugin load checking
commit 25fad955b1b2c0e8ba64660b1d60a43dc1bef4e9
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Sep 24 16:38:16 2013 +0200
Drop column-title for the checkbox to activate Plugins
commit 661219642ad8b4c871017a232dea6a94a16f47a1
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Mon Sep 23 11:33:37 2013 +0200
Remove previous dummy-warning and add another
commit e543e3a646ae4b7832a75c00d02fd569a7b57537
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 22 23:44:32 2013 -0400
Cleanup, rearrange code
commit c0652d293c4afc4f98a9ba97bcc9e17ea7af6ef6
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 22 22:43:23 2013 -0400
Remove unused code from parole-medialist.c
commit 97a15428d98a099991d00d1125a9f7a479fe4c94
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 22 22:33:52 2013 -0400
Fix errors when removing last item from playlist
commit 130d28415d83ad17b0ba2177bc924077ad0609b9
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 22 21:57:18 2013 -0400
Use parole icon for dialogs, do not disable subtitle font setting, improve plugin failure dialog
commit ecb38cf19ff13fc8e03a714ae64a3caac6474231
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 22 09:34:08 2013 -0400
Fix Show Menubar check_menu_item, only allow showing when not fullscreen
commit c37796d31a2ddfc01ce0f0db2fa2978aba52d697
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 22 09:24:41 2013 -0400
Add separator for show/hide menubar, do not show in fullscreen
commit 8cff83fe9f4f16721e4c55352b94032bfb738c46
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 22 09:07:35 2013 -0400
Make windows properly decorated
commit 830ad1ab377d3d09fa65449c72e8d8073b784d63
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 22 08:46:23 2013 -0400
Add bug report to parole -V
commit ab8c02b34a0064dd36308ef8e282c717a12e35ec
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 22 08:42:27 2013 -0400
Make cli more friendly, remove deprecated stop item
commit 4f8e3ca6f9b55823e3fcca8f8241b87de4694c21
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 22 07:57:18 2013 -0400
Remove broken seekf/seekb from dbus/cli commands. Improve mute dbus/cli command. Add unmute dbus/cli command
commit 38ac3e19be4efa57157e15f588bf10665a0a7704
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 22 07:05:51 2013 -0400
Remove playlist if empty on close, make hide_menubar static
commit ea95a43cd4edb449cdd662a67ae252f99be44aaa
Merge: f6c2868 8cb12d4
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 22 06:55:14 2013 -0400
Merge branch 'bluesabre/gtk3' of ssh://git.xfce.org/apps/parole into bluesabre/gtk3
commit f6c28682248152abf58a88f7a5c269285c7ae7e4
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 22 06:55:04 2013 -0400
Remove empty playlist files
commit 8cb12d45f65f64ee68991b23907114e9d9372db7
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sat Sep 21 09:57:12 2013 +0200
Remove/clear auto-saved-playlist file upon using the clear-playlist button
commit 071acfe9893612c7a498029993e311fa358b61c5
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sat Sep 21 01:54:54 2013 +0200
Add a dummy-test to see whether plugin-loading fails
commit 01bf90e358e4580553d6a0d6cd03cc825c291e60
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Sep 18 12:18:42 2013 +0200
Add a menu accelerator to make the keyboard-shortcut more discoverable
commit 497cd7e12e737e214b8acbffe601589949d73ee1
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Sep 18 10:25:50 2013 +0200
Add keyboard-shortcut (Control+m) to hide menubar
commit d7594d0c7bd9cf706e36b8beb9055ded57e020a0
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Mon Sep 16 22:24:28 2013 +0200
Add option to hide the menubar to the context-menu
commit 080c0cc842363c01880d8ebc91be73ceb6ff1cd5
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 15 23:41:42 2013 -0400
Move DVD menu code to glade
commit 6df307e49d45b7b4a0c8b7d7c1babfb1d1135eed
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 15 23:20:21 2013 -0400
Remove deplicate widget load
commit 364ae1c8f82473738657d1abd40563e88d8a2e0c
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 15 23:16:17 2013 -0400
Allow DND for output widget
commit bd77a00f98c72b9506a471e22dcda5b7ab70a1b1
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 15 23:05:48 2013 -0400
Move motion-notify-event to glade
commit 9183a35bf0a349c3f68aef3da3cbfa4572db4395
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 15 22:49:34 2013 -0400
Add button-release event to the output widget
commit 6e16deee93dbd13996e856dba6529bf7a183b3c1
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 15 22:38:48 2013 -0400
Move gst enum to parole-gst.h
commit dea0a2e1675b778b69abffb397622c70938bdccc
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 15 22:23:22 2013 -0400
Make previous/next sensitive only when n_items > 1
commit bde5e5b8f297e66b0ee5026f0a6b70574fa521ad
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 15 22:07:50 2013 -0400
Remove redundant playlist title code
commit 98b00eedc3a7418b241d6f839f9bf0bfd2dbca12
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Sep 14 09:51:31 2013 -0400
Only use colorkey with xv
commit 344fb9d567d09c174007e9e30d15a691412af6ea
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Sep 14 09:41:09 2013 -0400
Minor fixes for help
commit 908908c6458d8942f4d378630e3b3fa06980c167
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Sep 14 08:32:04 2013 -0400
Increased verbosity in changelog
commit 7c737fa4ed0c0ff21cb044dd6935dec8b50e98ed
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Sep 14 08:07:54 2013 -0400
Update changelog
commit 9b5f3d70a1ab846c2407f757a68b3fbe8c60d486
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Sep 14 07:58:12 2013 -0400
Remember window size and maximization across sessions
commit 47326162d61d91bddbba2865bc01f72bb0eaa810
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Sep 14 07:48:09 2013 -0400
Do not save window size when maximizing
commit 0abb84efc45f142e15dd5f99cdcf7c81438cc58f
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Sep 14 07:07:04 2013 -0400
Change gst timeout to 250ms from 1000ms for better update of timer
commit a03409ba80661e2d513f21e94f00f22adcfe6d04
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Sep 12 21:57:45 2013 -0400
Fix remaining Coverity defects
commit b78593c7f23934f9aefcc5fce126b0302cb715cb
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Sep 12 21:03:09 2013 -0400
Correctly toggle remember-playlist option in preferences
commit 3c5d4f71fe84a86b4c3dfd147027fe9e8e2551cb
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Sep 12 20:52:44 2013 -0400
Coverity fixes
commit ce2d71b625142f5b161a711ad98368c6e089e764
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Sep 11 15:23:56 2013 +0200
Change bug-reporting URL to http://docs.xfce.org/apps/parole/bugs
commit 87aec01f5e087534257f77f02670da9ea50e4f52
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Sep 11 07:35:34 2013 -0400
Bump version number, prettify the configure file
commit 4cc5176c0181893e64facb10260b7736e06f3f1a
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Sep 11 07:01:57 2013 -0400
Align the checkbox in the tray plugin exit dialog
commit 2b1808a80ac4cbd3ed55ce56b6879ff20bc5c6d3
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Sep 11 06:56:35 2013 -0400
Update bug report menu item
commit 2da05b83dc80818f9096ce1864b1df0638a86044
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Sep 11 06:40:07 2013 -0400
Improved preferences dialog
commit 3c4f9f5d6b46149931311d5e19df6de831d0fbc6
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Sep 10 17:34:46 2013 +0200
Use theme-colors to draw the overlay background and border
Add 3px padding (=border-width) to the play-box
commit f258ca80b8a990a8d8830faad05a265280570846
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Tue Sep 10 07:22:21 2013 -0400
Make repeat and shuffle inaccessible on dvd playback
commit 7ef40199cb85f0b96ca4e5e4524ab1a196f6ef8f
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Tue Sep 10 06:54:59 2013 -0400
Add mnemonics to actions
commit ed4fe2eca1abc79fc568cd8623e735a1a12af7af
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Mon Sep 9 23:44:25 2013 -0400
Use GtkAction for Repeat/Shuffle
commit 5e2fffef8e7aba5889f8906a4a458f6bc546a7ca
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Mon Sep 9 22:40:03 2013 -0400
Initial GtkAction implementation
commit 0e4103763f45c0930d8d12664713f7ae3d72442c
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 8 13:24:58 2013 -0400
Fix settings-dialog crashing on close
commit 8c440ac6f3f1a9740ba2f2379fd18fa19844b1f8
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 8 10:12:17 2013 -0400
Fix errors displayed with save-playlist dialog
commit 73567b11927e9afc90d64e479eccc2603978ce4a
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 8 08:22:00 2013 -0400
Fix null to gchararray in save-playlist startup
commit c27b3c4d9b4ebb243a6a074a148ec32d7d9f5502
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 8 07:38:39 2013 -0400
Fix spacing on plugins dialog
commit 9d6f4185744a9bf5bab3f2b9c7052031e3571ed8
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Sep 7 08:49:15 2013 -0400
Update changelog
commit cde8212adb5a05a561f25709da0bea2388a62970
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Sep 7 08:47:38 2013 -0400
Remove playlist settings button, add playlist move-up and move-down
commit 6a58040cdde2d16316d9d11bd1d2631659b868f3
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Fri Sep 6 20:25:42 2013 -0400
Add colorkey back for < 3.8
commit 703503a83226f4dc9c43c0286faabcf7db9fea30
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Sep 4 18:06:52 2013 +0200
Drop gstreamer colorkey as Cairo keeps GtkOverlay on top of Video
FIXME: Use theme-colors to draw instead of hardcoded white and black
commit ce6db476014edc3bbe7f92bf0e3ef121c919fc23
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Sep 3 15:38:34 2013 +0200
Small layout tweaks to account for the marks on the scales
commit 278101c8baad399ee572bcd96cd9d89a2ee9096e
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Sep 3 15:09:09 2013 +0200
Add marks to display-manipulation scales to make resetting to 0 easier
commit 133a53a86c4d18e86e7fc0eda68b6f90f132e4f0
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Tue Sep 3 06:59:49 2013 -0400
Fix padding to look like Xfce GTK2 dialogs
commit e55884cbfff3c2bc36e1b8d58b4ff87da4fc83fa
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Sep 3 11:11:38 2013 +0200
Add some minimal cairo-drawing to the GtkOverlay
Mainly to illustrate spacing problems and help test/fix them
commit 97c2d23589e6b3f916107c7c8a9ddf056fab8f44
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Sep 3 09:29:57 2013 +0200
Drop border on xfcetitleddialog in Preferences
commit 44bc193a56da8fd75fc312df4cbf4571b996da6d
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Mon Sep 2 23:23:33 2013 -0400
Add tooltips to playlist buttons
commit 2ca763e0b589124c25993f17186eed5a261ca8df
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Mon Sep 2 23:17:20 2013 -0400
Remove useless separator
commit 29dd056eff2a4ade5ec867471d40799f210c6f01
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Mon Sep 2 23:09:53 2013 -0400
Better playlist count showing
commit 0ed70cda2d529eabf80ed1d832446a229d651100
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Mon Sep 2 21:47:42 2013 -0400
Make widgets focus-able
commit 446a49ab1eb5bee9c19133f94a3f449b2244b03c
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Mon Sep 2 21:31:27 2013 -0400
Replace checkboxes with switches in prefs dialog
commit 6063931151c10a172449e2c216d06e47c46eb7f0
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Mon Sep 2 00:01:29 2013 -0400
Fix startup error handling
commit 58979637bbd0bdcecbe97ac545de171dc823cc9d
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 1 22:38:40 2013 -0400
Use GtkMessageDialog for stream taking too long message
commit 0a2464ce6415f8b0637af50e28e802266fd99c27
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 1 22:31:32 2013 -0400
Fix button image on minimize dialog
commit 741f56098af5baeceabbe86f63690f69fbb4c4de
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 1 22:08:31 2013 -0400
Symbolic icons do not work in playlist
commit 13f13b7769758a4810736f811ccf98d15d2b0318
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 1 22:04:04 2013 -0400
Update changelog
commit 02a00ad8893ca4235dd824b50535c33ef53b289e
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 1 21:58:09 2013 -0400
Fix/improve tray icon window minimizing
commit feeff0de0af6f64633280475b60e9d876a1970ab
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 1 19:42:57 2013 -0400
Fix playlist settings button
commit ff1820f7add4af001d5e9fccbc6d4e3f399687f7
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 1 13:18:06 2013 -0400
Update changelog
commit ca59dd938940f83287b82bbb9bdbf3166fd89b60
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 1 13:14:19 2013 -0400
Do not show playlist on disc
commit a143f82569fdb23d1497c17ee1bd1d8ed8f87f06
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 1 13:09:51 2013 -0400
Add DVD chapters to DVD Menu
commit 470e540221a16b6fce29734e5df623d24a5e3999
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 1 08:26:03 2013 -0400
Only show DVD menu when DVD loaded
commit d5f64f8f184529d791fa737b62780fe67dcdb981
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 1 08:10:13 2013 -0400
Update changelog
commit f97a2753d1f889f9be32284f7b85c63e33deda65
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 1 08:06:08 2013 -0400
(Re)Add ability to play DVD ISO, select from Open dialog
commit 6bbe02976885a4578f5ac00735b19734ebddab63
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 31 21:56:27 2013 -0400
Add Previous/Next Track to Notify Plugin
commit e297f9073f4112e0d567af1d8ef013607c83e83e
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 31 15:20:32 2013 -0400
fix hiding
commit 518302b29b9f9435bd1cc0774c3d135aea2b6c8f
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 31 15:14:01 2013 -0400
Use overlay exclusively, replace fs-window, autohide when content playing
commit 161fa1438b8d027c7b7d6ce80fc9a948cd7a1dd1
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 31 13:02:41 2013 -0400
Support displaying the controls over gst video
commit 0e427f3519fa6c047c652e083fee68a1fac357c0
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 31 06:14:45 2013 -0400
Fix window placing with gst1.0
commit 4f85818fcac47d754b115d2502349baa919b5dfd
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Fri Aug 30 23:27:31 2013 -0400
Initial GtkOverlay controls... Gst overlays controls at this point
commit c2f47b715a6f8aafd65db4a66e3a417ac576ffa3
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sun Aug 25 23:01:41 2013 +0200
Improve 24 and 48px version of appicon
commit 66c981627a7ba288fd9a8a07d15a00b0d4bad694
Merge: 989232e 7cc8fd3
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sun Aug 25 22:22:55 2013 +0200
Merge branch 'bluesabre/gtk3' of ssh://git.xfce.org/apps/parole into bluesabre/gtk3
commit 989232e92255ebb86ac32e6ea60e9ac60f2f8668
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sun Aug 25 22:22:44 2013 +0200
Bump icon-size of scalable to 64px
commit 7cc8fd3a03d89062fc3afac461af6aa78b9699bf
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Aug 25 16:17:38 2013 -0400
Use symbolics in parole.desktop (for use with plank)
commit a7b166bb88b51cd4f05fb2b5d9ecfca184d27a2d
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Aug 25 15:54:46 2013 -0400
Use symbolic icons and fallback on standard
commit 8c5dc571db71c194941a553da72314e6c532b807
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sun Aug 25 21:32:07 2013 +0200
Add symbolic menu-icon for Parole plugins
commit 98281fce85445656b1a03e093b968eda1394faa9
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Aug 25 12:08:47 2013 -0400
Initial DVD menu move to menubar, will hide later
commit 0a01424bb69834da0bb2c244033737ecad2deb54
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Aug 25 10:15:11 2013 -0400
Avoid usage of stock items and functions (gtk 3.10)
commit 1b1ca850b7991e93f107286f9f546f5a37657e80
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Aug 25 09:13:44 2013 -0400
Remove gtk_stock from source
commit ddeff8b44c7ef10b242dccd47dc9702a3a8cadd9
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Aug 25 08:45:19 2013 -0400
Replace new_from_stock
commit bf76222ef098d24a0b7810562d0166fe4befe985
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Aug 25 08:30:28 2013 -0400
Use symbolic icons for tray plugin popup menu
commit a6ecf8ff302af24cd2380f7d316b82be28364f40
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Aug 25 08:16:53 2013 -0400
At 16px, a cdrom is a dvdrom, etc
commit 55ce061751ca71aa412f5c4c7402d6390ec7e344
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Aug 25 00:03:33 2013 -0400
Fix toolbutton error
commit 1f20a784163bb67eb62e87866a70a025b68cd4e3
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 24 22:36:30 2013 -0400
Do not auto-resize the playlist
commit bda031875ee1cb1b5c6668fdde9d880066c3b39b
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 24 22:13:55 2013 -0400
Update changelog to this point
commit b1cf05d232ced98c1395043fba69c6f6807cd096
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 24 22:07:14 2013 -0400
Add previous and next to tray plugin
commit 0cc56610666e7773226b5b2d2bb07018a28b0d7f
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 24 12:35:00 2013 -0400
Replace tabs with spaces, improve readability for remaining files and plugins*
commit 8f1e768dd3dee21d574c5f81c6dff3d99c9222ce
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 24 10:30:32 2013 -0400
Replace tabs with spaces, improve readability for misc/*
commit d5d575ad72cd77fa82223f16fa52728024434f57
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 24 09:39:46 2013 -0400
Replace tabs with spaces, improve readability for main.c
commit d42d0c00a2d40fbed9a3f0221f8f816522239489
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 24 09:34:49 2013 -0400
Replace tabs with spaces, improve readability for common, dbus, and gst.
commit 90831afd60954c0e3aa80b09062347d449a7665c
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 24 08:02:10 2013 -0400
Remove GTK2 compatability code
commit 5e90e6d3dc8547b8cd33527b495d2da052ec7bfc
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 24 07:23:40 2013 -0400
Replace non-existent playcontrol_box
commit 4d42b4c0f46f9d60b22e3561167e637bc8f5be3e
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 24 07:14:06 2013 -0400
Fix crash in save playlist
commit 53f336f6e184e24a4c0e694f750b64df16d723b4
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 24 06:44:48 2013 -0400
Fully setup save playlist button
commit e2d530fe571cef6dd37aa0a780d9468b804c452c
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 24 06:17:37 2013 -0400
Rearrange and update menu
commit 36aea8b31d94c49d657cd4e0ddd92f56d9c48e51
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Fri Aug 23 22:23:31 2013 -0400
Fix gtk_widget_set_sensitive error on playback
commit 42eaaac853253dac1e0d84346c1d51da87843f1a
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Fri Aug 23 21:51:55 2013 -0400
Add adjustment so startup state looks normal
commit fa541d88c5231bed1464ca3f44b16873d4c22dd8
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Fri Aug 23 21:44:32 2013 -0400
Add bug reporting menuitem
commit 8ce910cfbfd7d0abfd2f81d00d5d4725e63629fc
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Fri Aug 23 21:18:47 2013 -0400
Make menu item insensitive
commit 6f8ae26e95a4dfd81f5a65700b54ed4d8aebe171
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Aug 22 06:03:12 2013 -0400
Minor fixes, menu mnemonics
commit 428a3218bb322d09cc1e06796a0956a9b4c454b8
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Thu Aug 22 02:18:22 2013 +0200
More symbolic icon fixes for the media-menu
commit d0d209f31fc81971bc2c49368ad96619b06f9165
Merge: 39cb913 99321f3
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Aug 21 20:15:41 2013 -0400
Merge branch 'bluesabre/gtk2' of ssh://git.xfce.org/apps/parole into bluesabre/gtk3
commit 39cb913bc4085e54160bfe3aaf6ee3e8449ffbec
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Aug 21 20:14:38 2013 -0400
Make infobar look nicer
commit 99321f39ffe24c137e22d9457665456d76a25402
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Thu Aug 22 01:31:00 2013 +0200
Improve 32px app-icon
commit 9e9ae122090074909f06920cef016b68ada90b20
Merge: 8e4fb48 520cd96
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Thu Aug 22 01:30:26 2013 +0200
Merge branch 'bluesabre/gtk3' of ssh://git.xfce.org/apps/parole into bluesabre/gtk3
commit 8e4fb48b1bdce6f920d7db093163a402fa92fb81
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Thu Aug 22 01:28:05 2013 +0200
Make a few more menuitems use symbolic icons
commit 520cd967196f6291bd5415830d49683bc64a1752
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Aug 21 19:22:24 2013 -0400
More symbolics
commit 6717712c86eacb83296c8b979b7115b2a1f61882
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Aug 21 18:53:54 2013 -0400
Cleanup for full-debug
commit 32597d83a30d0c8dc57944b20c1c2ff7a33a4908
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Aug 21 18:32:33 2013 -0400
Fix invalid cast warning
commit 8ab5d96b3a6b1449f1611003044e1cc1827fc410
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Aug 21 21:32:04 2013 +0200
Improve 16px app-icon
commit aeb88a608f158b5a8e6145ef1d5ffddd1a39f103
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Aug 21 18:17:55 2013 +0200
Set icon-size back to 16px for crisper icons
commit 89453a6cce9ddbd50a960d15bc277ef2212ddac4
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Aug 21 18:10:58 2013 +0200
Improve parole-logo
commit 757525ea245d009e685218c2f80535f486fb942d
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Aug 21 07:44:51 2013 -0400
Use new logo, no resize events
commit 080c45bce1b7666633f721c86934f3a28d01554c
Merge: 735559a 827331c
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Aug 21 07:24:15 2013 -0400
Merge branch 'bluesabre/gtk2' of ssh://git.xfce.org/apps/parole into bluesabre/gtk3
commit 735559aeb9c4eeaed4c31661ee68b14590cfd497
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Aug 21 07:24:02 2013 -0400
inline-toolbar, sensitive fixes
commit 827331ce42a228f54b1ff8a6c95a0121a4ddb0ab
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Aug 21 12:36:06 2013 +0200
New appicon
Thanks to sixsixfive and his awesome icon-theme Rodentium for the inspiration!
TODO: 16px and 32px
commit 416c64fbbf0534620de26effdab71525c515bcb9
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Aug 21 12:26:59 2013 +0200
Test new logo
commit 7478b8ba62276915e07d49859369faf760f8d9b0
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Wed Aug 21 06:19:15 2013 -0400
Scrollbars fix
commit e7e93e678b6d07b99fb0dbb1004f0641889879fe
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Aug 21 11:33:10 2013 +0200
Fix build-error
Forgot to remove more gtk-2.0 stuff
commit ebf026d2bbc2cba656c581bf952567892fd61b72
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Aug 21 10:47:24 2013 +0200
Disable scrollbars in logo-area
commit 0379f945b101376530b57fc782ba8bc6cf5721bc
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Tue Aug 20 22:33:00 2013 -0400
Make window title translateable
commit bb53a5371d7a93746eeb32e9437dff68d4a31aea
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Tue Aug 20 21:17:04 2013 -0400
Cleanup and organize widgets code
commit 6728aaa9202732026dfd5ccf586fa354619a2476
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Tue Aug 20 20:29:16 2013 -0400
Fix parole background image
commit e00256f810a195e6ce79dcce4e7a4c26d2083fa9
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Aug 20 15:12:08 2013 +0200
Drop fullscreen-widget-name
as we're using the osd-class in Gtk3 anyway
commit f1f727cfa13fdc345f44353ecd0ef86d07f36509
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Aug 20 14:00:47 2013 +0200
Drop gtkrc file
commit 107c5ac67a3fbf933a4735282f464a1054c1ac24
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Tue Aug 20 07:21:33 2013 -0400
Remove useless child placeholders
commit 4a220b26cbf35604c5b64f2820d457b76e45edf2
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Tue Aug 20 07:11:42 2013 -0400
Rename GTK3 ui files to remove -3.ui
commit 3424775cac176caed5a1eee7caa64f50915abdd6
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Tue Aug 20 07:08:57 2013 -0400
Remove GTK2 interface files
commit d0f9677e793eea4bdb8ba2289f16b74275ceff60
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Tue Aug 20 07:07:00 2013 -0400
Remove building in gtk2
commit 35ea6ecf2c09ceb59a73604ce0627ebf4900d12c
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Tue Aug 20 06:41:42 2013 -0400
Make Leave Fullscreen a tooltip instead of label
commit cd5ff993de30e9245ae85450ca8e8a451ba35f82
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Aug 20 11:37:58 2013 +0200
Use the osd-class for the fullscreen-widget
Is present in most themes, because the OSDs are widespread in newer Gnome-apps, so we can get dark theming without the overhead of adding our own custom class/stylesheet
commit f046c0f08298da556cbfba9a83dea650847ed1e6
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Aug 20 09:25:37 2013 +0200
Fix icon not being shown on fullscreen-button
commit 5698714a4e4235fa457dcc349487945b8bf93773
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Mon Aug 19 22:50:52 2013 -0400
Start reimplementing gst-logo
commit b285c76bcac9b894c871716f8ee2b9144cd2b7b6
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Aug 11 20:16:34 2013 -0400
More general fixes
commit ed702ea8a2560b0af83bc5fbef240b23d20cca4c
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Aug 11 17:16:52 2013 -0400
Initial gtk3 fixes
commit 0b2de95d94f29a1855936b51df9c1d0c1ed62de6
Merge: 48525dc 44bbee4
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Aug 11 09:14:02 2013 -0400
Merge latest from trunk into gtk3
commit 44bbee42bb9e5279181af96c4c98f398e3e25685
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Feb 17 15:44:26 2013 -0500
GTK+3 Parole interface.
commit 5172df1b1d530b7ecccee022e397fa055ae3d207
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Feb 17 11:25:30 2013 -0500
GTK+3 Playlist.
commit 2114d25306708c290ecaae4abdb9329cd8871e67
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Feb 17 09:44:01 2013 -0500
GTK+3 Save Playlist dialog.
commit 9a37941ca3c6cd55c31fd5171f6324891187c5c1
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Feb 17 09:24:08 2013 -0500
GTK+3 Plugins dialog.
commit e50b87ae5721c8110ba86cc77d0acda18c7d88d6
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Feb 17 08:53:37 2013 -0500
GTK+3 Open Location dialog.
commit 74bb2f66a7ea49c9fabefc1cc61bdc03053be655
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Feb 17 08:28:21 2013 -0500
GTK+3 Media Chooser dialog.
commit 27d42a8846498524420ca7c1c021b1a4de90f9b7
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Feb 17 08:12:48 2013 -0500
GTK+3 Settings dialog.
commit b383387fb57927437be8792d3a6eddaca9d9e5a6
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Feb 17 03:28:38 2013 -0500
Fix visualization loading.
commit 8060b259e08aea7a45653f39332719c78b5ee904
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Feb 17 01:42:10 2013 -0500
Initial GTK+3 port. Configure with --enable-gtk3=yes
commit c6429490cb5a519be718f7f78798b7fd7c428ff4
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Feb 16 10:33:10 2013 -0500
Prepared for gtk3 with -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE
ChangeLog | 34 +
README | 8 +-
configure.ac.in | 128 +-
data/Makefile.am | 1 -
data/desktop/desktop.sh | 12 +-
data/desktop/parole.desktop.in.in | 10 +-
data/gtk-2.0/Makefile.am | 7 -
data/gtk-2.0/parole.gtkrc | 19 -
data/icons/16x16/Makefile.am | 3 +-
data/icons/16x16/parole-extension-symbolic.svg | 136 +
data/icons/16x16/parole.png | Bin 795 -> 500 bytes
data/icons/24x24/parole.png | Bin 1417 -> 656 bytes
data/icons/32x32/parole.png | Bin 2000 -> 1171 bytes
data/icons/48x48/parole.png | Bin 3146 -> 1858 bytes
data/icons/scalable/apps/parole.svg | 1187 ++++---
data/icons/scalable/parole.svg | 1142 +++++--
data/interfaces/Makefile.am | 8 +-
data/interfaces/mediachooser.ui | 110 +-
data/interfaces/open-location.ui | 71 +-
data/interfaces/parole-settings.ui | 966 +++---
data/interfaces/parole.ui | 1253 ++++----
data/interfaces/playlist.ui | 351 +-
data/interfaces/plugins.ui | 221 +-
data/interfaces/save-playlist.ui | 50 +-
data/pixmaps/parole.png | Bin 40546 -> 5622 bytes
docs/plugin-api/tmpl/Parole-Plugins-unused.sgml | 16 +
docs/plugin-api/tmpl/parole-provider-player.sgml | 18 -
src/common/parole-common.c | 51 +-
src/common/parole-common.h | 16 +-
src/common/parole-rc-utils.c | 26 +-
src/common/parole-rc-utils.h | 26 +-
src/common/parole-screensaver.c | 6 +-
src/common/parole-screensaver.h | 12 +-
src/dbus/parole-dbus.c | 37 +-
src/dbus/parole-dbus.h | 22 +-
src/gst/parole-gst.c | 2303 +++++++------
src/gst/parole-gst.h | 175 +-
src/main.c | 322 +-
src/misc/parole-debug.c | 10 +-
src/misc/parole-debug.h | 28 +-
src/misc/parole-file.c | 386 +--
src/misc/parole-file.h | 46 +-
src/misc/parole-filters.c | 33 +-
src/misc/parole-filters.h | 23 +-
src/misc/parole-pl-parser.c | 404 +--
src/misc/parole-pl-parser.h | 16 +-
src/misc/parole-provider-player.c | 192 +-
src/misc/parole-provider-player.h | 108 +-
src/misc/parole-provider-plugin.c | 36 +-
src/misc/parole-provider-plugin.h | 40 +-
src/misc/parole-stream.c | 646 ++--
src/misc/parole-stream.h | 15 +-
src/org.parole.media.player.xml | 12 +-
src/parole-about.c | 38 +-
src/parole-about.h | 2 +-
src/parole-builder.c | 10 +-
src/parole-builder.h | 6 +-
src/parole-button.c | 70 +-
src/parole-button.h | 14 +-
src/parole-conf-dialog.c | 435 ++-
src/parole-conf-dialog.h | 14 +-
src/parole-conf.c | 288 +-
src/parole-conf.h | 10 +-
src/parole-disc.c | 239 +-
src/parole-disc.h | 26 +-
src/parole-mediachooser.c | 132 +-
src/parole-mediachooser.h | 6 +-
src/parole-medialist.c | 1775 +++++-----
src/parole-medialist.h | 174 +-
src/parole-module.c | 99 +-
src/parole-module.h | 42 +-
src/parole-open-location.c | 65 +-
src/parole-open-location.h | 14 +-
src/parole-player.c | 3734 ++++++++++++----------
src/parole-player.h | 50 +-
src/parole-plugin-player.c | 65 +-
src/parole-plugin-player.h | 10 +-
src/parole-plugins-manager.c | 83 +-
src/parole-plugins-manager.h | 22 +-
src/parole-subtitle-encoding.c | 33 +-
src/parole-subtitle-encoding.h | 4 +-
src/parole-utils.c | 490 +--
src/parole-utils.h | 38 +-
src/parole-vis.c | 16 +-
src/parole-vis.h | 2 +-
src/plugins/notify/notify-plugin.c | 8 +-
src/plugins/notify/notify-provider.c | 137 +-
src/plugins/notify/notify-provider.h | 4 +-
src/plugins/sample/sample-plugin.c | 6 +-
src/plugins/sample/sample-provider.c | 20 +-
src/plugins/sample/sample-provider.h | 4 +-
src/plugins/tray/tray-plugin.c | 6 +-
src/plugins/tray/tray-provider.c | 207 +-
src/plugins/tray/tray-provider.h | 4 +-
94 files changed, 10160 insertions(+), 8984 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7c2091c..b13f482 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2013-10-11: bluesabre at xfce.org
+ * Road to 0.6.0...
+ * Completed port to GTK+3
+ - Remove deprecated GTK+2 items
+ - Use GtkOverlay for player controls
+ - Use symbolic icons for menus, plugins
+ * Improved window maximization
+ - Window dimensions are no longer saved when maximizing
+ - Added "window-maximized" setting to xfconf to keep maximization across sessions
+ * Rearranged and improved menubar
+ - Renamed "Edit" menu to "Playback"
+ - Renamed "Languages" menu item to "Audio Track"
+ - Added Tools menu
+ - Moved Plugins and Preferences to Tools menu
+ - Added DVD menu (visible only when a DVD or DVD ISO is being played)
+ - Added "Save Playlist" item to Media menu
+ - Added "Report Bug" item to Help menu
+ * Improved playlist
+ - Use symbolic icons in an inline toolbar
+ - Removed redundant settings button
+ - Added Move Up/Down buttons
+ * Updated/improved included plugins
+ - Added Previous/Next Track menu items to Tray plugin
+ - Added Previous/Next Track menu items to Notification plugin
+ * Other improvements
+ - Updated artwork (background image, icons)
+ - Fixed GStreamer 1.0 support
+ - Added ability to play DVD ISOs from the Open dialog
+ - Plugins now correctly report when they fail to load
+ * Bugs fixed
+ - missing option to open DVD from iso (bug #10300)
+ - Allow a playlist to be sorted and/or items to be moved (bug #10066)
+ - Remember playlist option in GUI not working (bug #10269)
+
2013-08-03: bluesabre at xfce.org
* Bugfix release 0.5.3
* Fix “Remember playlist” option in GUI not working (bug #10269)
diff --git a/README b/README
index c1d91bf..4f72d97 100644
--- a/README
+++ b/README
@@ -10,14 +10,14 @@ Required packages
=================
Parole depends on the following packages:
- - Gtk 2.24 or above.
+ - Gtk 3.0 or above.
- Glib 2.32 or above.
- - Gio 2.16 or above.
+ - Gio 2.28 or above.
- DBus 0.60 or above.
- DBus glib 0.70 or above.
- GStreamer: base, video, interface and GStreamer X, version 0.10.24 or above.
- - libxfce4ui 4.8.0 or above.
- - libxfce4util 4.8.0 or above.
+ - libxfce4ui 4.11.0 or above.
+ - libxfce4util 4.11.0 or above.
How to report bugs?
===================
diff --git a/configure.ac.in b/configure.ac.in
index cf95cf5..0e8ef00 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -1,11 +1,11 @@
m4_define([intltool_minimum_version], [0.31])
-m4_define([parole_verinfo], [0:5:3])
-m4_define([parole_version_api], [0])
-m4_define([parole_version_major], [0])
-m4_define([parole_version_minor], [5])
-m4_define([parole_version_micro], [3])
-m4_define([parole_version_build], [])
-m4_define([parole_version_tag], [])
+m4_define([parole_verinfo], [0:6:0])
+m4_define([parole_version_api], [0])
+m4_define([parole_version_major], [0])
+m4_define([parole_version_minor], [6])
+m4_define([parole_version_micro], [0])
+m4_define([parole_version_build], [])
+m4_define([parole_version_tag], [])
m4_define([parole_version], [parole_version_major().parole_version_minor().parole_version_micro()ifelse(parole_version_tag(), [git], [parole_version_tag().parole_version_build()], [parole_version_tag()])])
AC_INIT([parole], [parole_version], [aliov at xfce.org])
@@ -17,13 +17,13 @@ AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
AM_CONFIG_HEADER([config.h])
if test x${enable_gtk_doc} = x"yes"; then
- AM_MAINTAINER_MODE([enable])
+ AM_MAINTAINER_MODE([enable])
else
- if test x${enable_debug} != x"no"; then
- AM_MAINTAINER_MODE([enable])
- else
- AM_MAINTAINER_MODE()
- fi
+ if test x${enable_debug} != x"no"; then
+ AM_MAINTAINER_MODE([enable])
+ else
+ AM_MAINTAINER_MODE()
+ fi
fi
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -41,14 +41,14 @@ AC_PROG_INSTALL()
AC_PROG_INTLTOOL([intltool_minimum_version], [no-xml])
# ===================================================== #
-# Initialize libtool #
+# Initialize libtool #
# ===================================================== #
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
# ===================================================== #
-# Version information #
+# Version information #
# ===================================================== #
PAROLE_VERINFO=parole_verinfo()
PAROLE_VERSION_API=parole_version_api()
@@ -61,24 +61,24 @@ AC_SUBST([PAROLE_VERSION_MAJOR])
AC_SUBST([PAROLE_VERSION_MINOR])
AC_SUBST([PAROLE_VERSION_MICRO])
-# ==================================================== #
-# Check for headers needed for standard interfaces #
-# ==================================================== #
+# ===================================================== #
+# Check for headers needed for standard interfaces #
+# ===================================================== #
AC_HEADER_STDC
AC_CHECK_HEADERS([errno.h signal.h stddef.h sys/ioctl.h fcntl.h\
string.h sys/stat.h sys/types.h sys/wait.h time.h \
unistd.h])
# ===================================================== #
-# Check for i18n support #
+# Check for i18n support #
# ===================================================== #
XDT_I18N([@LINGUAS@])
-#==================================================== #
-# Check for required packages #
-#=====================================================#
-m4_define([gtk_minimum_version], [2.24.0])
+# ===================================================== #
+# Check for required packages #
+# ===================================================== #
+m4_define([gtk_minimum_version], [3.0.0])
m4_define([glib_minimum_version], [2.32.0])
dnl gstreamer version
@@ -110,18 +110,29 @@ AC_DEFINE_UNQUOTED(GSTREAMER_API_VERSION, $gstreamer_api_version, [Define the GS
m4_define([dbus_minimum_version], [0.60])
m4_define([dbus_glib_minimum_version], [0.70])
-m4_define([libxfce4ui_minimum_version],[4.8.0])
-m4_define([libxfce4util_minimum_version],[4.8.0])
+m4_define([libxfce4ui_minimum_version],[4.10.0])
+m4_define([libxfce4util_minimum_version],[4.10.0])
m4_define([libnotify_minimum_version], [0.4.1])
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [gtk_minimum_version])
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [glib_minimum_version])
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [glib_minimum_version])
+XDT_CHECK_PACKAGE([DBUS], [dbus-1], [dbus_minimum_version])
+XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [dbus_glib_minimum_version])
+
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0],[libxfce4util_minimum_version])
+XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.10.0])
+
+dnl ************************************
+dnl *** Compile against GTK3 ***
+dnl ************************************
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.10.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.2.0])
+
XDT_CHECK_PACKAGE([GST], [gstreamer-${gstreamer_api_version}], [${gstreamer_minimum_version}])
XDT_CHECK_PACKAGE([GST_BASE], [gstreamer-base-${gstreamer_api_version}], [${gstreamer_minimum_version}])
XDT_CHECK_PACKAGE([GST_VIDEO], [gstreamer-video-${gstreamer_api_version}], [${gstreamer_minimum_version}])
@@ -134,33 +145,14 @@ else
GST_LIBS="$GST_LIBS -lgstbase-$GST_API_VERSION -lgstvideo-$GST_API_VERSION -lgstaudio-$GST_API_VERSION -lgstpbutils-$GST_API_VERSION -lgsttag-$GST_API_VERSION"
fi
-XDT_CHECK_PACKAGE([DBUS], [dbus-1], [dbus_minimum_version])
-XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [dbus_glib_minimum_version])
-
-XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1],[libxfce4ui_minimum_version])
-XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0],[libxfce4util_minimum_version])
-XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.10.0])
XDT_CHECK_LIBX11()
-#=======================================================#
-# Gtkrc files #
-#=======================================================#
-if test "x${prefix}" = "xNONE"; then
- AC_DEFINE_UNQUOTED(GTKRC_DIR, "${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/gtk-2.0", [gtkrc directory])
- gtkrcdir="${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/gtk-2.0"
-else
- AC_DEFINE_UNQUOTED(GTKRC_DIR, "${prefix}/${DATADIRNAME}/${PACKAGE}/gtk-2.0", [pixmaps directory])
- gtkrcdir="${prefix}/${DATADIRNAME}/${PACKAGE}/gtk-2.0"
-fi
-
-AC_SUBST(gtkrcdir)
-
# Taken from Gnome system tools
-#=======================================================#
-# Pixmaps files #
-#=======================================================#
+# ===================================================== #
+# Pixmaps files #
+# ===================================================== #
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [pixmaps directory])
pixmapsdir="${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
@@ -171,9 +163,9 @@ fi
AC_SUBST(pixmapsdir)
-#=======================================================#
-# Check XF86keysysm #
-#=======================================================#
+# ===================================================== #
+# Check XF86keysysm #
+# ===================================================== #
# Check for the AudioPlay sym other should exist
# if this one exists.
AC_CHECK_DECL(XF86XK_AudioPlay,have_XF86XK_AudioPlay=1,have_XF86XK_AudioPlay=0,[#include <X11/XF86keysym.h>])
@@ -181,9 +173,9 @@ if test "x${ac_cv_have_decl_XF86XK_AudioPlay}" != "xno"; then
AC_DEFINE(HAVE_XF86_KEYSYM, 1, [Define if XF86keysysm.h is available])
fi
-#=======================================================#
-# TagLib support #
-#=======================================================#
+# ===================================================== #
+# TagLib support #
+# ===================================================== #
TAGLIB_FOUND="no"
XDT_CHECK_OPTIONAL_PACKAGE([TAGLIB],
[taglib], [1.4],
@@ -197,17 +189,17 @@ AC_CHECK_LIB([tag_c], [taglib_file_new],
[
AC_CHECK_HEADER([taglib/tag_c.h],
[
- TAGLIBC_LIBS="-ltag_c"
- AC_DEFINE([HAVE_TAGLIBC], [1], [Define to 1 if tag_c is found])
+ TAGLIBC_LIBS="-ltag_c"
+ AC_DEFINE([HAVE_TAGLIBC], [1], [Define to 1 if tag_c is found])
])
], [-lm])
AC_SUBST([TAGLIBC_CFLAGS])
AC_SUBST([TAGLIBC_LIBS])
fi
-#=======================================================#
-# Check plugins to build #
-#=======================================================#
+# ===================================================== #
+# Check plugins to build #
+# ===================================================== #
# Notify plugin.
#--------------------------
@@ -219,8 +211,8 @@ AC_MSG_RESULT([$ac_notify_plugin])
# Depends on Libnotify - if not found cannot build
LIBNOTIFY_FOUND="no"
if test x"$ac_notify_plugin" = x"yes"; then
- XDT_CHECK_PACKAGE([LIBNOTIFY],
- [libnotify], [libnotify_minimum_version])
+ XDT_CHECK_PACKAGE([LIBNOTIFY],
+ [libnotify], [libnotify_minimum_version])
fi
# Tray plugin.
@@ -231,20 +223,19 @@ AC_MSG_CHECKING([whether to build the system tray plugin])
AM_CONDITIONAL([PAROLE_TRAY_PLUGIN], [test x"$ac_tray_plugin" = x"yes"])
AC_MSG_RESULT([$ac_tray_plugin])
-#=======================================================#
-# Check for debugging support #
-#=======================================================#
+# ===================================================== #
+# Check for debugging support #
+# ===================================================== #
XDT_FEATURE_DEBUG()
-#=======================================================#
-# Check for Gtk doc #
-#=======================================================#
+# ===================================================== #
+# Check for Gtk doc #
+# ===================================================== #
GTK_DOC_CHECK(1.9)
AC_OUTPUT([
Makefile
data/Makefile
-data/gtk-2.0/Makefile
data/pixmaps/Makefile
data/interfaces/Makefile
data/icons/Makefile
@@ -283,6 +274,7 @@ echo "
Debug: $enable_debug
Building plugin api docs: ${enable_gtk_doc}
GStreamer API version: ${gstreamer_api_version}
+ GTK+ version: GTK+-3
Optional dependencies:
======================
diff --git a/data/Makefile.am b/data/Makefile.am
index 4a0719d..6b0d93e 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,5 +1,4 @@
SUBDIRS = \
- gtk-2.0 \
interfaces \
pixmaps \
icons \
diff --git a/data/desktop/desktop.sh b/data/desktop/desktop.sh
index 9a1b9b0..eea5f53 100755
--- a/data/desktop/desktop.sh
+++ b/data/desktop/desktop.sh
@@ -17,18 +17,18 @@ echo ""
echo "[Desktop Action Play]"
echo "Exec=parole --play"
echo "_Name=Play/Pause"
-echo "Icon=media-playback-start"
+echo "Icon=media-playback-start-symbolic"
echo "OnlyShowIn=Unity;"
echo ""
echo "[Desktop Action Previous]"
-echo "Exec=parole --previous-track"
+echo "Exec=parole --previous"
echo "_Name=Previous Track"
-echo "Icon=media-skip-backward"
+echo "Icon=media-skip-backward-symbolic"
echo "OnlyShowIn=Unity;"
echo ""
echo "[Desktop Action Next]"
-echo "Exec=parole --next-track"
+echo "Exec=parole --next"
echo "_Name=Next Track"
-echo "Icon=media-skip-forward"
+echo "Icon=media-skip-forward-symbolic"
echo "OnlyShowIn=Unity;"
-echo ""
\ No newline at end of file
+echo ""
diff --git a/data/desktop/parole.desktop.in.in b/data/desktop/parole.desktop.in.in
index a5d70e3..9fba268 100644
--- a/data/desktop/parole.desktop.in.in
+++ b/data/desktop/parole.desktop.in.in
@@ -13,17 +13,17 @@ Actions=Play;Previous;Next;
[Desktop Action Play]
Exec=parole --play
_Name=Play/Pause
-Icon=media-playback-start
+Icon=media-playback-start-symbolic
OnlyShowIn=Unity;
[Desktop Action Previous]
-Exec=parole --previous-track
+Exec=parole --previous
_Name=Previous Track
-Icon=media-skip-backward
+Icon=media-skip-backward-symbolic
OnlyShowIn=Unity;
[Desktop Action Next]
-Exec=parole --next-track
+Exec=parole --next
_Name=Next Track
-Icon=media-skip-forward
+Icon=media-skip-forward-symbolic
OnlyShowIn=Unity;
diff --git a/data/gtk-2.0/Makefile.am b/data/gtk-2.0/Makefile.am
deleted file mode 100644
index ce7ad47..0000000
--- a/data/gtk-2.0/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-EXTRA_DIST = \
- $(gtkrc_DATA)
-
-gtkrcdir = $(datadir)/parole/gtk-2.0
-
-gtkrc_DATA = \
- parole.gtkrc
diff --git a/data/gtk-2.0/parole.gtkrc b/data/gtk-2.0/parole.gtkrc
deleted file mode 100644
index b1eef3d..0000000
--- a/data/gtk-2.0/parole.gtkrc
+++ /dev/null
@@ -1,19 +0,0 @@
-style "parole-fullscreen"
-{
- fg[NORMAL] = "#EEEEEE"
- fg[PRELIGHT] = "#FFFFFF"
-
- bg[NORMAL] = "#000000"
- bg[ACTIVE] = "#6D6D6D"
- bg[PRELIGHT] = "#505050"
- bg[SELECTED] = "#398EE7"
- bg[INSENSITIVE] = "#C4C4C4"
-}
-
-style "parole-scale" = "parole-fullscreen"
-{
- bg[NORMAL] = "#CECECE"
-}
-
-widget "*ParoleFullscreen*" style "parole-fullscreen"
-widget "*ParoleFullscreen*ParoleScale*" style "parole-scale"
diff --git a/data/icons/16x16/Makefile.am b/data/icons/16x16/Makefile.am
index c46d68e..6abbb12 100644
--- a/data/icons/16x16/Makefile.am
+++ b/data/icons/16x16/Makefile.am
@@ -5,4 +5,5 @@ Datadir = $(datadir)/icons/hicolor/16x16/apps
Data_DATA = \
parole.png \
- parole-extension.png
+ parole-extension.png \
+ parole-extension-symbolic.svg
diff --git a/data/icons/16x16/parole-extension-symbolic.svg b/data/icons/16x16/parole-extension-symbolic.svg
new file mode 100644
index 0000000..64de67c
--- /dev/null
+++ b/data/icons/16x16/parole-extension-symbolic.svg
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.0"
+ width="16"
+ height="16"
+ id="svg3783"
+ sodipodi:version="0.32"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="libpeas-plugin.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <metadata
+ id="metadata43">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ inkscape:window-height="789"
+ inkscape:window-width="1280"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ guidetolerance="10.0"
+ gridtolerance="10.0"
+ objecttolerance="10.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ showgrid="true"
+ inkscape:zoom="14.672466"
+ inkscape:cx="-1.2039169"
+ inkscape:cy="5.8880948"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ inkscape:current-layer="svg3783"
+ inkscape:window-maximized="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3037"
+ empspacing="5"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true" />
+ </sodipodi:namedview>
+ <defs
+ id="defs3785">
+ <linearGradient
+ id="linearGradient3702">
+ <stop
+ id="stop3704"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="0" />
+ <stop
+ id="stop3710"
+ style="stop-color:#000000;stop-opacity:1"
+ offset="0.5" />
+ <stop
+ id="stop3706"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3688">
+ <stop
+ id="stop3690"
+ style="stop-color:#000000;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3692"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2490">
+ <stop
+ id="stop2492"
+ style="stop-color:#455f0e;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop2494"
+ style="stop-color:#84a718;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3242">
+ <stop
+ id="stop3244"
+ style="stop-color:#eef87e;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3246"
+ style="stop-color:#cde34f;stop-opacity:1"
+ offset="0.26238" />
+ <stop
+ id="stop3248"
+ style="stop-color:#93b723;stop-opacity:1"
+ offset="0.66093999" />
+ <stop
+ id="stop3250"
+ style="stop-color:#5a7e0d;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4222">
+ <stop
+ id="stop4224"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4226"
+ style="stop-color:#ffffff;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ </defs>
+ <path
+ style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00000012;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
+ d="M 6.5,0 C 5.8744713,0 5.278362,0.22816067 4.8125,0.625 4.346638,1.0218393 4,1.6177 4,2.28125 4,3.0575395 4.5024904,3.60552 5,4 l 0,0.0625 -3.71875,0 C 0.57553015,4.0625 0,4.6380301 0,5.34375 L 0,8.6875 C -0.0183801,9.1144022 0.65759575,9.3474974 0.90625,9 1.1452176,8.7001301 1.4723847,8.5 1.875,8.5 c 0.7099949,0 1.28125,0.5712551 1.28125,1.28125 0,0.709994 -0.5712553,1.28125 -1.28125,1.28125 -0.4026154,0 -0.7297825,-0.20013 -0.96875,-0.5 C 0.65759575,10.215003 -0.0183801,10.448098 0,10.875 l 0,3.84375 C 0,15.42447 0.57553038,16 1.28125,16 L 5,16 C 5.4269022,16.01838 5.6599974,15.342404 5.3125,15.09375 4.9821933,14.830527 4.71875,14.469629 4.71875,14.125 c 0,-0.709994 0.5712554,-1.28125 1.28125,-1.28125 0.7099959,0 1.28125,0.571255 1.28125,1.28125 0,0.34463 -0.2634429,0.705527 -0.59375,0.96875 C 6.3400026,15.342404 6.5730978,16.01838 7,16 l 3.71875,0 C 11.424469,16 12,15.428482 12,14.71875 l 0,-3.6875 c 0.06972,0.158372 0.09506,0.283212 0.3125,0.5 0.326167,0.325182 0.859837,0
.5 1.6875,0.5 0.635699,0 1.198791,-0.304395 1.53125,-0.78125 C 15.863709,10.773145 16,10.165714 16,9.5 16,8.8342862 15.868069,8.2470774 15.53125,7.78125 15.194431,7.3154226 14.626893,7 14,7 13.177986,7 12.675881,7.1585978 12.34375,7.46875 12.110619,7.686453 12.072643,7.8399131 12,8 L 12,5.34375 C 12,4.6340185 11.42447,4.0625 10.71875,4.0625 L 8,4.0625 8,4 C 8.4975103,3.6055197 9,3.057539 9,2.28125 9,1.6177001 8.6533619,1.0218394 8.1875,0.625 7.7216381,0.22816061 7.1255291,0 6.5,0 z"
+ id="rect3558"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="sssccssccsssccssccsssccsscssssssscssccsss" />
+</svg>
diff --git a/data/icons/16x16/parole.png b/data/icons/16x16/parole.png
index afe14c9..7337216 100644
Binary files a/data/icons/16x16/parole.png and b/data/icons/16x16/parole.png differ
diff --git a/data/icons/24x24/parole.png b/data/icons/24x24/parole.png
index 66f78d8..357b186 100644
Binary files a/data/icons/24x24/parole.png and b/data/icons/24x24/parole.png differ
diff --git a/data/icons/32x32/parole.png b/data/icons/32x32/parole.png
index 05713df..f60a5db 100644
Binary files a/data/icons/32x32/parole.png and b/data/icons/32x32/parole.png differ
diff --git a/data/icons/48x48/parole.png b/data/icons/48x48/parole.png
index 9614061..5b20b5f 100644
Binary files a/data/icons/48x48/parole.png and b/data/icons/48x48/parole.png differ
diff --git a/data/icons/scalable/apps/parole.svg b/data/icons/scalable/apps/parole.svg
index faf2190..062ba96 100644
--- a/data/icons/scalable/apps/parole.svg
+++ b/data/icons/scalable/apps/parole.svg
@@ -10,191 +10,723 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="64"
- height="64"
- id="svg2454"
- sodipodi:version="0.32"
- inkscape:version="0.48.3.1 r9886"
- sodipodi:docname="totem.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- version="1.1">
+ width="48px"
+ height="48px"
+ id="svg4405"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="parole-new.svg">
<defs
- id="defs2456">
+ id="defs4407">
<linearGradient
- id="linearGradient5048">
+ id="linearGradient4009">
<stop
- style="stop-color:black;stop-opacity:0;"
- id="stop5050"
- offset="0" />
+ offset="0"
+ style="stop-color:#d4d4d4;stop-opacity:1;"
+ id="stop4011" />
<stop
- style="stop-color:black;stop-opacity:1;"
- id="stop5056"
+ id="stop4013"
+ style="stop-color:#d2d2d2;stop-opacity:1;"
+ offset="0.25" />
+ <stop
+ id="stop4015"
+ style="stop-color:#b2b2b2;stop-opacity:1;"
offset="0.5" />
<stop
- style="stop-color:black;stop-opacity:0;"
- id="stop5052"
+ offset="1"
+ style="stop-color:#929292;stop-opacity:1;"
+ id="stop4017" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4311">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop4313" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop4315" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3707-319-631-407-324-616">
+ <stop
+ id="stop3246"
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0" />
+ <stop
+ id="stop3248"
+ style="stop-color:#1c1c1c;stop-opacity:1;"
offset="1" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5048"
- id="linearGradient17859"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.07721798,0,0,0.0523493,3.4344694,15.690795)"
- x1="302.85715"
- y1="366.64789"
- x2="302.85715"
- y2="609.50507" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="radialGradient17856"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.08726674,0,0,0.0523493,-2.6063103,15.690795)"
- cx="605.71429"
- cy="486.64789"
- fx="605.71429"
- fy="486.64789"
- r="117.14286" />
- <linearGradient
- id="linearGradient5060"
- inkscape:collect="always">
+ id="linearGradient3924-803">
+ <stop
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop3252" />
+ <stop
+ id="stop3254"
+ style="stop-color:#ffffff;stop-opacity:0.23529412;"
+ offset="0.06316455" />
+ <stop
+ offset="0.95056331"
+ style="stop-color:#ffffff;stop-opacity:0.15686275;"
+ id="stop3256" />
<stop
- style="stop-color:black;stop-opacity:1;"
- id="stop5062"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0.39215687;"
+ id="stop3258" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641">
+ <stop
+ id="stop3236"
+ style="stop-color:#404040;stop-opacity:1;"
offset="0" />
<stop
- style="stop-color:black;stop-opacity:0;"
- id="stop5064"
+ offset="0.25"
+ style="stop-color:#303030;stop-opacity:1;"
+ id="stop4001" />
+ <stop
+ offset="0.5"
+ style="stop-color:#202020;stop-opacity:1;"
+ id="stop3999" />
+ <stop
+ id="stop3242"
+ style="stop-color:#000000;stop-opacity:1;"
offset="1" />
</linearGradient>
<radialGradient
inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="radialGradient17853"
+ xlink:href="#linearGradient3688-166-749-2-324"
+ id="radialGradient3013-896"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.08726674,0,0,0.0523493,65.304513,15.690795)"
- cx="605.71429"
- cy="486.64789"
- fx="605.71429"
- fy="486.64789"
- r="117.14286" />
- <linearGradient
- id="linearGradient2601">
- <stop
- id="stop2603"
- offset="0.0000000"
- style="stop-color:#5d5d5d;stop-opacity:1.0000000;" />
- <stop
- id="stop2605"
- offset="1.0000000"
- style="stop-color:#444444;stop-opacity:1.0000000;" />
+ gradientTransform="matrix(2.003784,0,0,1.4,27.98813,-17.4)"
+ cx="4.9929786"
+ cy="43.5"
+ fx="4.9929786"
+ fy="43.5"
+ r="2.5" />
+ <linearGradient
+ id="linearGradient3688-166-749-2-324">
+ <stop
+ offset="0"
+ style="stop-color:#181818;stop-opacity:1"
+ id="stop3216" />
+ <stop
+ offset="1"
+ style="stop-color:#181818;stop-opacity:0"
+ id="stop3218" />
</linearGradient>
<radialGradient
inkscape:collect="always"
- xlink:href="#linearGradient2601"
- id="radialGradient17850"
+ xlink:href="#linearGradient3688-464-309-8-331"
+ id="radialGradient3015-826"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(3.8250359,0,0,2.8270732,-86.687743,-84.165398)"
- cx="27.216267"
- cy="35.673447"
- fx="27.216267"
- fy="35.673447"
- r="19.57143" />
- <linearGradient
- id="linearGradient2613"
+ gradientTransform="matrix(2.003784,0,0,1.4,-20.01187,-104.4)"
+ cx="4.9929786"
+ cy="43.5"
+ fx="4.9929786"
+ fy="43.5"
+ r="2.5" />
+ <linearGradient
+ id="linearGradient3688-464-309-8-331">
+ <stop
+ offset="0"
+ style="stop-color:#181818;stop-opacity:1"
+ id="stop3222" />
+ <stop
+ offset="1"
+ style="stop-color:#181818;stop-opacity:0"
+ id="stop3224" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3702-501-757-6-946">
+ <stop
+ offset="0"
+ style="stop-color:#181818;stop-opacity:0"
+ id="stop3228" />
+ <stop
+ offset="0.5"
+ style="stop-color:#181818;stop-opacity:1"
+ id="stop3230" />
+ <stop
+ offset="1"
+ style="stop-color:#181818;stop-opacity:0"
+ id="stop3232" />
+ </linearGradient>
+ <linearGradient
+ y2="39.999443"
+ x2="25.058096"
+ y1="47.027729"
+ x1="25.058096"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4395"
+ xlink:href="#linearGradient3702-501-757-6-946"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3702-501-757-6-946-2">
+ <stop
+ id="stop3228-0"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="0" />
+ <stop
+ id="stop3230-6"
+ style="stop-color:#181818;stop-opacity:1"
+ offset="0.5" />
+ <stop
+ id="stop3232-6"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3688-464-309-8-331-3">
+ <stop
+ id="stop3222-9"
+ style="stop-color:#181818;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3224-8"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3688-166-749-2-324-7">
+ <stop
+ id="stop3216-9"
+ style="stop-color:#181818;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3218-7"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-671-944">
+ <stop
+ offset="0"
+ style="stop-color:#202020;stop-opacity:1;"
+ id="stop4455" />
+ <stop
+ offset="1"
+ style="stop-color:#383838;stop-opacity:1;"
+ id="stop4457" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-921-551">
+ <stop
+ offset="0"
+ style="stop-color:#4d4d4d;stop-opacity:1;"
+ id="stop4445" />
+ <stop
+ offset="0.26238"
+ style="stop-color:#404040;stop-opacity:1;"
+ id="stop4447" />
+ <stop
+ offset="0.704952"
+ style="stop-color:#303030;stop-opacity:1;"
+ id="stop4449" />
+ <stop
+ offset="1"
+ style="stop-color:#232323;stop-opacity:1;"
+ id="stop4451" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4640">
+ <stop
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop4642" />
+ <stop
+ id="stop4644"
+ style="stop-color:#ffffff;stop-opacity:0.23529412;"
+ offset="0.0310698" />
+ <stop
+ offset="0.97119564"
+ style="stop-color:#ffffff;stop-opacity:0.15686275;"
+ id="stop4646" />
+ <stop
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0.39215687;"
+ id="stop4648" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7-3-5">
+ <stop
+ offset="0"
+ style="stop-color:#272727;stop-opacity:1;"
+ id="stop5440-9-8-4" />
+ <stop
+ offset="1"
+ style="stop-color:#454545;stop-opacity:1;"
+ id="stop5442-0-9-2" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient8265-821-176-38-919-66-249-7-7-7">
+ <stop
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1"
+ id="stop2687-1-9-8" />
+ <stop
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0"
+ id="stop2689-5-4-6" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5048">
+ <stop
+ offset="0"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop5050" />
+ <stop
+ offset="0.5"
+ style="stop-color:#000000;stop-opacity:1"
+ id="stop5056" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop5052" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5060">
+ <stop
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1"
+ id="stop5062" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop5064" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3104">
+ <stop
+ offset="0"
+ style="stop-color:#a0a0a0;stop-opacity:1;"
+ id="stop3106" />
+ <stop
+ offset="1"
+ style="stop-color:#bebebe;stop-opacity:1;"
+ id="stop3108" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3600">
+ <stop
+ offset="0"
+ style="stop-color:#f4f4f4;stop-opacity:1"
+ id="stop3602" />
+ <stop
+ offset="1"
+ style="stop-color:#dbdbdb;stop-opacity:1"
+ id="stop3604" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3977">
+ <stop
+ id="stop3979"
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0" />
+ <stop
+ offset="0.03626217"
+ style="stop-color:#ffffff;stop-opacity:0.23529412;"
+ id="stop3981" />
+ <stop
+ id="stop3983"
+ style="stop-color:#ffffff;stop-opacity:0.15686275;"
+ offset="0.95056331" />
+ <stop
+ id="stop3985"
+ style="stop-color:#ffffff;stop-opacity:0.39215687;"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3798-44-1-9"
inkscape:collect="always">
<stop
- id="stop2615"
+ id="stop3800-9-4-2"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- id="stop2617"
+ id="stop3802-93-6-8"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient2613"
- id="linearGradient17848"
+ xlink:href="#linearGradient3798-44-1-9"
+ id="linearGradient3889-9-8"
gradientUnits="userSpaceOnUse"
- x1="5.463501"
- y1="13.142847"
- x2="21.536488"
- y2="49.142849"
- gradientTransform="matrix(1.3289582,0,0,1.3234709,-0.45548041,-14.669884)" />
+ gradientTransform="translate(35,30)"
+ x1="6.1911855"
+ y1="13.900338"
+ x2="6.1911855"
+ y2="12.118899" />
<linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient2502"
- id="linearGradient17846"
+ xlink:href="#linearGradient3798-44-1"
+ id="linearGradient3889-9"
gradientUnits="userSpaceOnUse"
- x1="2.7612331"
- y1="6.1102505"
- x2="18.772917"
- y2="18.693317" />
+ gradientTransform="translate(35,0)"
+ x1="6.1911855"
+ y1="13.900338"
+ x2="6.1911855"
+ y2="12.118899" />
<linearGradient
- id="linearGradient2502">
+ id="linearGradient3798-44-1"
+ inkscape:collect="always">
<stop
- id="stop2504"
+ id="stop3800-9-4"
offset="0"
- style="stop-color:#fdfdfd;stop-opacity:1;" />
+ style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- id="stop2506"
- offset="1.0000000"
- style="stop-color:#d4d4d4;stop-opacity:1.0000000;" />
+ id="stop3802-93-6"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient2502"
- id="linearGradient12952"
+ xlink:href="#linearGradient3702-501-757-6-946-7"
+ id="linearGradient3229"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-42.841472,-1.0133135)"
- x1="2.7612331"
- y1="6.1102505"
- x2="18.772917"
- y2="18.693317" />
+ gradientTransform="matrix(1.3571428,0,0,0.57142859,-8.571428,19.142856)"
+ x1="25.058096"
+ y1="47.027729"
+ x2="25.058096"
+ y2="39.999443" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient10935">
+ id="linearGradient3702-501-757-6-946-7">
<stop
+ id="stop3228-4"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="0" />
+ <stop
+ id="stop3230-67"
+ style="stop-color:#181818;stop-opacity:1"
+ offset="0.5" />
+ <stop
+ id="stop3232-9"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3688-464-309-8-331-9">
+ <stop
+ id="stop3222-2"
+ style="stop-color:#181818;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3224-1"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ r="2.5"
+ fy="43.5"
+ fx="4.9929786"
+ cy="43.5"
+ cx="4.9929786"
+ gradientTransform="matrix(2.003784,0,0,0.80000003,-15.011861,-78.800001)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient3206"
+ xlink:href="#linearGradient3688-464-309-8-331-9"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3688-166-749-2-324-8">
+ <stop
+ id="stop3216-7"
+ style="stop-color:#181818;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3218-2"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ r="2.5"
+ fy="43.5"
+ fx="4.9929786"
+ cy="43.5"
+ cx="4.9929786"
+ gradientTransform="matrix(2.003784,0,0,0.80000003,32.98813,9.1999985)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient3209"
+ xlink:href="#linearGradient3688-166-749-2-324-8"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-671-944-8">
+ <stop
+ offset="0"
+ style="stop-color:#202020;stop-opacity:1;"
+ id="stop4455-4" />
+ <stop
+ offset="1"
+ style="stop-color:#383838;stop-opacity:1;"
+ id="stop4457-8" />
+ </linearGradient>
+ <linearGradient
+ y2="3.8990016"
+ x2="24"
+ y1="44"
+ x1="24"
+ gradientTransform="matrix(1.1025641,0,0,1,-2.461538,1)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4154-375-947"
+ xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-671-944-8"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-921-551-0">
+ <stop
+ offset="0"
+ style="stop-color:#4d4d4d;stop-opacity:1;"
+ id="stop4445-9" />
+ <stop
+ offset="0.26238"
+ style="stop-color:#404040;stop-opacity:1;"
+ id="stop4447-3" />
+ <stop
+ offset="0.704952"
+ style="stop-color:#303030;stop-opacity:1;"
+ id="stop4449-8" />
+ <stop
+ offset="1"
+ style="stop-color:#232323;stop-opacity:1;"
+ id="stop4451-6" />
+ </linearGradient>
+ <radialGradient
+ r="19.99999"
+ fy="8.4497671"
+ fx="7.4956832"
+ cy="8.4497671"
+ cx="7.4956832"
+ gradientTransform="matrix(2.142113e-8,2.33699,-2.7258215,-4.3056275e-8,47.032678,-11.434799)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient4152-74-497"
+ xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-921-551-0"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient4640-1">
+ <stop
+ offset="0"
style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop4642-2" />
+ <stop
+ id="stop4644-4"
+ style="stop-color:#ffffff;stop-opacity:0.23529412;"
+ offset="0.0310698" />
+ <stop
+ offset="0.97119564"
+ style="stop-color:#ffffff;stop-opacity:0.15686275;"
+ id="stop4646-4" />
+ <stop
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0.39215687;"
+ id="stop4648-4" />
+ </linearGradient>
+ <linearGradient
+ y2="43"
+ x2="23.99999"
+ y1="4.999989"
+ x1="23.99999"
+ gradientTransform="matrix(1.1081081,0,0,1,-2.5945913,1.00001)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3185"
+ xlink:href="#linearGradient4640-1"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7-3-5-4">
+ <stop
offset="0"
- id="stop10937" />
+ style="stop-color:#272727;stop-opacity:1;"
+ id="stop5440-9-8-4-5" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
- id="stop10939" />
+ style="stop-color:#454545;stop-opacity:1;"
+ id="stop5442-0-9-2-3" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10935"
- id="linearGradient10941"
- x1="13.303192"
- y1="11.104468"
- x2="8.6929884"
- y2="18.145662"
- gradientUnits="userSpaceOnUse" />
+ y2="-174.9679"
+ x2="149.98465"
+ y1="-104.23534"
+ x1="149.98465"
+ gradientTransform="matrix(0.42132707,0,0,0.42413289,-33.192592,77.209636)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient5104-88"
+ xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7-3-5-4"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient10150">
+ id="linearGradient8265-821-176-38-919-66-249-7-7-7-8">
<stop
- style="stop-color:#7c7f82;stop-opacity:1"
offset="0"
- id="stop10156" />
+ style="stop-color:#ffffff;stop-opacity:1"
+ id="stop2687-1-9-8-1" />
<stop
- style="stop-color:#3a3c3e;stop-opacity:1"
offset="1"
- id="stop10159" />
+ style="stop-color:#ffffff;stop-opacity:0"
+ id="stop2689-5-4-6-8" />
</linearGradient>
<linearGradient
+ y2="24.627615"
+ x2="20.054544"
+ y1="15.298182"
+ x1="16.626165"
+ gradientTransform="matrix(0.9095936,0,0,1.3012336,2.1271914,-1.4329212)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3182"
+ xlink:href="#linearGradient8265-821-176-38-919-66-249-7-7-7-8"
+ inkscape:collect="always" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8265-821-176-38-919-66-249-7-7-7-8"
+ id="linearGradient4459"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.82498026,0,0,1.3012336,4.16188,-1.4329208)"
+ x1="16.626165"
+ y1="15.298182"
+ x2="20.054544"
+ y2="24.627615" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3798-44-1-9"
+ id="linearGradient4462"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-11.324367,31.539334)"
+ x1="6.1911855"
+ y1="13.900338"
+ x2="6.1911855"
+ y2="12.118899" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3798-44-1"
+ id="linearGradient4465"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-11.324367,1.5393344)"
+ x1="6.1911855"
+ y1="13.900338"
+ x2="6.1911855"
+ y2="12.118899" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7-3-5-4"
+ id="linearGradient4469"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.42132707,0,0,0.42413289,-79.516959,78.74897)"
+ x1="149.98465"
+ y1="-104.23534"
+ x2="149.98465"
+ y2="-174.9679" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4640-1"
+ id="linearGradient4472"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.1081081,0,0,1,-48.918958,2.5393444)"
+ x1="23.99999"
+ y1="4.999989"
+ x2="23.99999"
+ y2="43" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-921-551-0"
+ id="radialGradient4475"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.142113e-8,2.33699,-2.7258215,-4.3056275e-8,0.708311,-9.8954646)"
+ cx="7.4956832"
+ cy="8.4497671"
+ fx="7.4956832"
+ fy="8.4497671"
+ r="19.99999" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-671-944-8"
+ id="linearGradient4477"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.1025641,0,0,1,-48.785905,2.5393344)"
+ x1="24"
+ y1="44"
+ x2="24"
+ y2="3.8990016" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7-3-5-4"
+ id="linearGradient4487"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.42132707,0,0,0.42413289,-79.516959,78.74897)"
+ x1="149.98465"
+ y1="-104.23534"
+ x2="149.98465"
+ y2="-174.9679" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7-3-5-4"
+ id="linearGradient4491"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.42132707,0,0,0.42413289,-75.192592,80.209636)"
+ x1="149.98465"
+ y1="-104.23534"
+ x2="149.98465"
+ y2="-174.9679" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3924-803"
+ id="linearGradient3150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.24324325,1.17e-5,33.162164)"
+ x1="23.99999"
+ y1="8.4357691"
+ x2="23.99999"
+ y2="41.078793" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3924-803"
+ id="linearGradient3157"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(1.17e-5,1.00001)"
+ x1="23.99999"
+ y1="4.999989"
+ x2="23.99999"
+ y2="43" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641"
+ id="radialGradient3162"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0,2.3179275,-2.4722567,-8.5237477e-8,44.890112,-11.471154)"
+ cx="7.4956832"
+ cy="8.4497671"
+ fx="7.4956832"
+ fy="8.4497671"
+ r="19.99999" />
+ <linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient10150"
- id="linearGradient10161"
- x1="10.66092"
- y1="10.732934"
- x2="10.66092"
- y2="19.655537"
- gradientUnits="userSpaceOnUse" />
+ xlink:href="#linearGradient3707-319-631-407-324-616"
+ id="linearGradient3164"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.69230769,9.2e-6,2.384616)"
+ x1="24"
+ y1="44"
+ x2="24"
+ y2="3.8990016" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3600"
+ id="linearGradient3167"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.84615385,0,6.8461538)"
+ x1="32.455086"
+ y1="32.134663"
+ x2="32.455086"
+ y2="44.698959" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3104"
+ id="linearGradient3169"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.84615385,0,6.8461538)"
+ x1="13.96882"
+ y1="43.669865"
+ x2="13.96882"
+ y2="32.646023" />
</defs>
<sodipodi:namedview
id="base"
@@ -204,301 +736,176 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7"
- inkscape:cx="28.706294"
- inkscape:cy="34.735312"
+ inkscape:cx="5.7188271"
+ inkscape:cy="19.310735"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
- inkscape:window-width="1228"
- inkscape:window-height="800"
+ inkscape:window-width="1280"
+ inkscape:window-height="751"
inkscape:window-x="0"
- inkscape:window-y="88"
- inkscape:window-maximized="0">
+ inkscape:window-y="25"
+ inkscape:window-maximized="1"
+ inkscape:snap-global="false"
+ showguides="true"
+ inkscape:guide-bbox="true">
<inkscape:grid
type="xygrid"
- id="grid3055"
- empspacing="5"
- visible="true"
- enabled="true"
- snapvisiblegridlinesonly="true" />
+ id="grid4022" />
</sodipodi:namedview>
<metadata
- id="metadata2459">
+ id="metadata4410">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
+ <dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- transform="translate(0,16)">
- <rect
- id="rect4173"
- x="12.700627"
- y="34.884556"
- width="37.285255"
- height="12.713403"
- style="opacity:0.40206185;fill:url(#linearGradient17859);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
- <path
- d="m 49.985883,34.884993 c 0,0 0,12.712702 0,12.712702 4.494022,0.02393 10.864356,-2.848271 10.864353,-6.357169 0,-3.508898 -5.014988,-6.355532 -10.864353,-6.355533 z"
- id="path5058"
- style="opacity:0.40206185;fill:url(#radialGradient17856);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
- sodipodi:nodetypes="cccc"
- inkscape:connector-curvature="0" />
- <path
- id="path5018"
- d="m 12.712308,34.884993 c 0,0 0,12.712702 0,12.712702 -4.4940214,0.02393 -10.864354,-2.848271 -10.864354,-6.357169 0,-3.508898 5.0149879,-6.355532 10.864354,-6.355533 z"
- style="opacity:0.40206185;fill:url(#radialGradient17853);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
- sodipodi:nodetypes="cccc"
- inkscape:connector-curvature="0" />
- <rect
- ry="1.5125798"
- rx="1.5162199"
- y="7.2324128"
- x="6.7071433"
- height="37.058197"
- width="50.603844"
- id="rect1440"
- style="fill:url(#radialGradient17850);fill-opacity:1;fill-rule:nonzero;stroke:#1b1b1b;stroke-width:1.32509875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block" />
- <rect
- style="opacity:0.31155778;fill:none;stroke:url(#linearGradient17848);stroke-width:1.32621133;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block"
- id="rect2609"
- width="47.939491"
- height="34.489948"
- x="8.0393181"
- y="8.4766865"
- rx="0.36376503"
- ry="0.36226305" />
+ inkscape:groupmode="layer">
<g
- transform="matrix(1.2952764,0.30706417,-0.30896562,1.2873049,3.0767524,-7.9338475)"
- id="g4376">
+ transform="matrix(1.1578952,0,0,0.57142859,-3.789476,19.142856)"
+ id="g3712-0"
+ style="opacity:0.4">
<rect
- transform="matrix(0.974407,-0.22479,0.22479,0.974407,0,0)"
- ry="1.1428572"
- rx="1.1428572"
- y="10.35317"
- x="1.7052064"
- height="6.50879"
- width="39.805996"
- id="rect4362"
- style="fill:url(#linearGradient17846);fill-opacity:1;fill-rule:nonzero;stroke:#2b2b2b;stroke-width:1.00000024;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block" />
- <path
- sodipodi:nodetypes="ccccc"
- id="path4364"
- d="M 9.1896391,8.9691823 6.7610675,15.540611 11.475352,14.254897 13.903923,7.9691824 9.1896391,8.9691823 z"
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m 18.332496,6.8977538 -2.285715,6.5000002 4.714286,-1.142857 2.285714,-6.3571431 -4.714285,0.9999999 z"
- id="path4366"
- sodipodi:nodetypes="ccccc"
- inkscape:connector-curvature="0" />
- <path
- sodipodi:nodetypes="ccccc"
- id="path4368"
- d="M 27.903923,4.6834682 25.618208,11.11204 30.332494,9.9691828 32.618208,3.6834683 27.903923,4.6834682 z"
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
- inkscape:connector-curvature="0" />
- <path
- sodipodi:nodetypes="ccccc"
- id="path4370"
- d="m 41.863296,1.4337789 -1.972765,6.3166535 -4.6875,1.0848214 2.28125,-6.3571428 4.379015,-1.0443321 z"
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block"
- inkscape:connector-curvature="0" />
+ width="5"
+ height="7"
+ x="38"
+ y="40"
+ id="rect2801-4"
+ style="fill:url(#radialGradient3013-896);fill-opacity:1;stroke:none" />
<rect
- style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.57512949;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block"
- id="rect4372"
- width="37.842842"
- height="4.6068902"
- x="2.6716552"
- y="11.327118"
- rx="0.26506385"
- ry="0.26506385"
- transform="matrix(0.974407,-0.22479,0.22479,0.974407,0,0)" />
- </g>
- <g
- transform="matrix(1.3316162,0,0,1.3234211,-0.61553617,-9.4036802)"
- style="opacity:0.26130652"
- id="g3629">
- <path
- style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="m 10,28.428571 28,0"
- id="path3601"
- inkscape:connector-curvature="0" />
- <path
- style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="m 10,32.571424 28,0"
- id="path3603"
- inkscape:connector-curvature="0" />
- <path
- style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="m 32.5,28 0,-4"
- id="path3607"
- inkscape:connector-curvature="0" />
- <path
- style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="m 10,32.571424 28,0"
- id="path3605"
- inkscape:connector-curvature="0" />
- <path
- style="fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="m 22.5,28 0,-4"
- id="path3611"
- inkscape:connector-curvature="0" />
- <path
- id="path3615"
- d="m 9.7429344,36.571424 13.2998316,0"
- style="fill:none;stroke:#ffffff;stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- inkscape:connector-curvature="0" />
- </g>
- <g
- transform="matrix(0.91622659,0,0,0.91058789,15.339744,4.8010102)"
- style="fill:#ffffff;fill-opacity:1"
- id="g3680">
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3674"
- d="m 13.817087,27.83871 c 0.113601,0.965157 0.244861,1.927714 0.394926,2.887925 l -2.107716,1.115321 C 11.971325,30.898587 11.859805,29.948673 11.653276,29.01819 l 2.163811,-1.17948 z"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3676"
- d="m 17.665061,28.673198 c -0.02417,2.079247 0.678,1.192783 -1.910963,2.589105 0.815412,-1.303562 2.191632,-2.618366 3.548625,-1.445006 2.591189,0.421672 -1.433848,2.481989 0.355171,0.314327 2.600013,-2.269865 2.222306,-0.997521 4.404319,-0.868565 1.780222,0.430207 1.796194,0.05633 -0.570253,1.416663 0.03203,-0.02793 0.06406,-0.05585 0.09609,-0.08377 l 2.238621,-0.946961 c -0.02529,0.03869 -0.05058,0.07738 -0.07587,0.116068 -2.811349,1.677475 -1.668398,1.183753 -3.647289,0.92631 -1.86635,-0.327685 -2.87539,-0.553295 -0.220839,-1.484714 -1.139443,1.293919 -2.981215,3.299891 -4.618598,1.882935 -1.588509,-1.170545 2.132535,-2.413333 0.764613,-0.73098 -2.682553,1.478611 -2.400461,1.55186 -2.560742,-0.565921 l 2.197119,-1.119488 z"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3678"
- d="m 29.174994,26.230789 c 0.14593,1.507956 0.225786,3.019542 0.405142,4.524683 1.423472,1.850746 -1.826977,4.633968 -1.347225,1.808834 0.342081,-3.243811 0.650319,-3.84417 3.528747,-4.879984 0.547689,0.983343 0.847731,2.137946 1.704024,2.727959 -4.840075,2.551671 1.693745,-1.481215 2.420946,-1.867341 0.464921,-0.109143 0.939853,-0.165325 1.412287,-0.230751 l -1.920756,1.437314 c -0.464844,0.06807 -0.935057,0.1189 -1.384984,0.261165 2.998581,-1.911568 -0.568404,0.841891 -2.506019,1.817551 -0.923746,-0.724224 -1.143464,-1.894425 -1.783232,-2.880314 3.14599,-2.218804 0.63263,-0.141231 0.637903,2.577332 -0.28354,2.350093 -3.320174,3.549885 -2.814981,0.306459 -0.172764,-1.481806 -0.250004,-2.982368 -0.530099,-4.447333 l 2.178247,-1.155574 z"
- inkscape:connector-curvature="0" />
- </g>
- <g
- transform="matrix(1.3502096,0,0,1.3419001,1.8859796,-7.4594646)"
- id="g3755">
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3693"
- d="m 11.316278,22.373912 c 1.820856,-1.333208 1.127169,-0.281091 1.128436,1.146858 -0.01466,1.286348 0.175884,2.556881 0.462421,3.806594 l -1.262911,0.682145 c -0.287161,-1.259893 -0.47939,-2.540337 -0.475327,-3.836434 -0.01981,-1.552781 -0.288652,-1.952637 1.347165,-2.670858 l -1.199784,0.871695 z"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3695"
- d="m 15.610946,22.413179 c -0.02437,0.790304 -0.02398,1.581273 -0.02699,2.3719 -0.0011,0.331934 -0.001,0.663869 -0.0013,0.995804 l -1.264717,0.644405 c -3.07e-4,-0.33148 -2.58e-4,-0.66296 -0.0013,-0.994439 -0.003,-0.781455 -0.0024,-1.563275 -0.02699,-2.344395 l 1.321376,-0.673275 z"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3697"
- d="m 17.833281,21.200996 c 0.09877,0.796352 0.117107,1.655155 0.145148,2.472831 0.008,0.24117 0.0132,0.482416 0.01979,0.723625 l -1.257551,0.645191 c -0.0078,-0.240127 -0.0132,-0.480333 -0.02347,-0.72038 -0.03579,-0.815108 -0.04172,-1.648209 -0.205301,-2.447992 l 1.321376,-0.673275 z"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3699"
- d="m 20.257647,20.594904 c -0.196164,0.682214 -0.268848,1.395879 -0.337656,2.103621 -0.0674,0.761239 -0.09762,1.524887 -0.128658,2.288229 l -1.257113,0.634694 c 0.02996,-0.763385 0.05957,-1.526914 0.115545,-2.288959 0.05537,-0.688124 0.083,-1.405566 0.286506,-2.06431 l 1.321376,-0.673275 z"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3701"
- d="m 9.8969255,22.310339 c 0.9067235,0.190928 1.8267775,0.348564 2.7421905,0.503737 2.149945,0.332152 4.306576,0.626935 6.468095,0.873614 0.903938,0.09251 1.807226,0.19028 2.709599,0.296728 l -1.16802,0.826398 C 19.754597,24.700327 18.859587,24.597014 17.963955,24.498588 15.801624,24.238152 13.642863,23.943889 11.488982,23.62143 10.560864,23.472229 9.6271038,23.290017 8.6971411,23.182034 l 1.1997844,-0.871695 z"
- inkscape:connector-curvature="0" />
+ width="5"
+ height="7"
+ x="-10"
+ y="-47"
+ transform="scale(-1,-1)"
+ id="rect3696-8"
+ style="fill:url(#radialGradient3015-826);fill-opacity:1;stroke:none" />
+ <rect
+ width="28"
+ height="7.0000005"
+ x="10"
+ y="40"
+ id="rect3700-7"
+ style="fill:url(#linearGradient4395);fill-opacity:1;stroke:none" />
</g>
+ <path
+ style="color:#000000;fill:url(#linearGradient3167);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3169);stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 43.500008,33.5 0,9.5 c 0,0.312514 -0.892,1.5 -2,1.5 l -34.9999999,0 c -1.108,0 -2,-1.187486 -2,-1.5 l 0,-9.5 z"
+ id="rect4003"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="csssscc" />
+ <path
+ style="color:#000000;fill:url(#radialGradient3162);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3164);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 6.5000081,5.5 34.9999999,0 c 1.108,0 2,0.8086814 2,1.8131869 l 0,26.1868131 -38.9999999,0 0,-26.1868131 c 0,-1.0045055 0.892,-1.8131869 2,-1.8131869 z"
+ id="rect5505-21"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="sssccss" />
<g
- id="g12943"
- inkscape:transform-center-x="-21.562802"
- inkscape:transform-center-y="-4.9203087"
- transform="matrix(1.3311063,-0.03662581,0.0368526,1.3229142,-1.0436713,-15.654808)">
- <rect
- style="fill:url(#linearGradient12952);fill-opacity:1;fill-rule:nonzero;stroke:#2e2e2e;stroke-width:0.99999809;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block"
- id="rect2200"
- width="40.077328"
- height="6.9415712"
- x="-41.571377"
- y="9.2500038"
- rx="1.142855"
- ry="1.142855"
- transform="matrix(-0.9821987,0.1878449,0.1878449,0.9821987,0,0)" />
- <path
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="M 35.417355,3.1830195 40.292814,8.2140778 35.460811,8.9416119 30.700732,4.1719347 35.417355,3.1830195 z"
- id="path2202"
- sodipodi:nodetypes="ccccc"
- inkscape:connector-curvature="0" />
- <path
- sodipodi:nodetypes="ccccc"
- id="path2204"
- d="m 25.970575,4.7764341 5.244563,5.3365969 -4.774313,0.858225 -5.186873,-5.2059068 4.716623,-0.9889151 z"
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m 16.283604,6.7101077 4.882517,5.1749343 -4.568318,0.915825 -5.030822,-5.1018441 4.716623,-0.9889152 z"
- id="path2206"
- sodipodi:nodetypes="ccccc"
- inkscape:connector-curvature="0" />
+ style="opacity:0.8;fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1"
+ id="g3156"
+ transform="matrix(0.48529717,0,0,0.42046716,12.218226,8.3776648)">
<path
- style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block"
- d="M 4.0251015,9.2079586 C 3.878555,9.4432283 3.8048705,9.7026439 3.861283,9.997613 l 0.4646124,2.688678 2.1132922,2.112195 5.1761334,-0.942878 -4.8637172,-5.1923964 -2.7265023,0.544747 z"
- id="rect2210"
- sodipodi:nodetypes="ccccccc"
- inkscape:connector-curvature="0" />
- <path
- id="path10135"
- d="m 41.920754,1.7105385 -2.466831,0.5396192 3.468981,3.4946769 -0.6681,-3.4946769 C 42.21104,2.0213214 42.089655,1.8450116 41.920754,1.7105385 z"
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
- inkscape:connector-curvature="0" />
- <rect
- transform="matrix(-0.9821987,0.1878449,0.1878449,0.9821987,0,0)"
- ry="0.26506332"
- rx="0.26506332"
- y="10.22395"
- x="-40.604931"
- height="4.9147048"
- width="38.199299"
- id="rect2510"
- style="fill:none;stroke:#ffffff;stroke-width:0.99999785;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.57512949;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block" />
+ style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1"
+ id="path3158"
+ transform="matrix(0.99984261,-0.01774122,0.01774122,0.99984261,5.4919568,2.3986116)"
+ inkscape:connector-curvature="0"
+ d="M 28.678,23.3898 12.0273,32.5963 12.3796,13.5731 28.678,23.3898 z" />
</g>
+ <rect
+ width="37"
+ height="37"
+ rx="1"
+ ry="1"
+ x="5.5000081"
+ y="6.5"
+ id="rect6741-1"
+ style="opacity:0.3;fill:none;stroke:url(#linearGradient3157);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ y="37"
+ x="9"
+ height="4"
+ width="30"
+ id="rect4024"
+ style="fill:#7d7d7d;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <rect
+ style="fill:#e20000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="rect4020"
+ width="13"
+ height="4"
+ x="9"
+ y="37" />
+ <rect
+ style="opacity:0.3;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="rect4026"
+ width="30"
+ height="1"
+ x="9"
+ y="37" />
+ <rect
+ y="41"
+ x="9"
+ height="1"
+ width="30"
+ id="rect4028"
+ style="opacity:0.5;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <rect
+ style="opacity:0.5;fill:none;stroke:url(#linearGradient3150);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect4282"
+ y="34.5"
+ x="5.5000081"
+ ry="1.3861014"
+ rx="1"
+ height="9"
+ width="37" />
+ <path
+ transform="matrix(0.90629651,0,0,0.91732204,4.5456728,-0.54512277)"
+ d="m 31.971329,21.306719 a 10.505587,10.379317 0 1 1 -21.011174,0 10.505587,10.379317 0 1 1 21.011174,0 z"
+ sodipodi:ry="10.379317"
+ sodipodi:rx="10.505587"
+ sodipodi:cy="21.306719"
+ sodipodi:cx="21.465742"
+ id="path3160"
+ style="opacity:0.8;fill:none;stroke:#000000;stroke-width:1.05029035;stroke-opacity:1"
+ sodipodi:type="arc" />
<g
- id="g12937"
- transform="matrix(1.3316162,0,0,1.3234211,-0.61553617,-15.926258)">
+ id="g3149">
+ <g
+ style="fill:#ffffff"
+ id="g2851"
+ transform="matrix(0.48529717,0,0,0.42046716,12.218226,9.3776649)">
+ <path
+ style="stroke:none"
+ id="path2847"
+ transform="matrix(0.99984261,-0.01774122,0.01774122,0.99984261,5.4919568,2.3986116)"
+ inkscape:connector-curvature="0"
+ d="M 28.678,23.3898 12.0273,32.5963 12.3796,13.5731 28.678,23.3898 z" />
+ </g>
<path
- style="fill:url(#linearGradient10161);fill-opacity:1;fill-rule:evenodd;stroke:#1b1b1b;stroke-width:1.01495492;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="m 9.530039,20.318017 5.032098,-4.247694 c 0.300079,-0.253302 0.268226,-0.674472 -0.0737,-0.915372 L 8.283363,11.390892 C 7.604382,10.979016 6.4663323,11.47183 6.5595663,12.15353 l 0.1765087,6.938464 c -0.1421506,1.219771 2.009141,1.888508 2.793964,1.226023 z"
- id="path3583"
- sodipodi:nodetypes="ccccccc"
- inkscape:connector-curvature="0" />
- <path
- sodipodi:type="arc"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block"
- id="path3587"
- sodipodi:cx="8.5535717"
- sodipodi:cy="17.196428"
- sodipodi:rx="0.48214287"
- sodipodi:ry="0.48214287"
- d="m 9.0357146,17.196428 c 0,0.26628 -0.2158627,0.482143 -0.4821429,0.482143 -0.2662802,0 -0.4821429,-0.215863 -0.4821429,-0.482143 0,-0.26628 0.2158627,-0.482143 0.4821429,-0.482143 0.2662802,0 0.4821429,0.215863 0.4821429,0.482143 z"
- transform="translate(-0.07142886,-3.3612994)" />
- <path
- transform="translate(-0.07142884,1.2500026)"
- d="m 9.0357146,17.196428 c 0,0.26628 -0.2158627,0.482143 -0.4821429,0.482143 -0.2662802,0 -0.4821429,-0.215863 -0.4821429,-0.482143 0,-0.26628 0.2158627,-0.482143 0.4821429,-0.482143 0.2662802,0 0.4821429,0.215863 0.4821429,0.482143 z"
- sodipodi:ry="0.48214287"
- sodipodi:rx="0.48214287"
- sodipodi:cy="17.196428"
- sodipodi:cx="8.5535717"
- id="path3589"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block"
+ transform="matrix(0.90629651,0,0,0.91732204,4.5456728,0.45487733)"
+ d="m 31.971329,21.306719 a 10.505587,10.379317 0 1 1 -21.011174,0 10.505587,10.379317 0 1 1 21.011174,0 z"
+ sodipodi:ry="10.379317"
+ sodipodi:rx="10.505587"
+ sodipodi:cy="21.306719"
+ sodipodi:cx="21.465742"
+ id="path4333"
+ style="fill:none;stroke:#ffffff;stroke-width:1.05029035;stroke-opacity:1"
sodipodi:type="arc" />
- <path
- style="opacity:0.4;fill:none;stroke:url(#linearGradient10941);stroke-width:1.01499999;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="m 9.3078629,19.288733 4.1704191,-3.660425 -5.8591197,-3.452052 0.1305163,6.694346 c -0.096701,0.818679 1.0242902,0.862775 1.5581843,0.418131 z"
- id="path10163"
- sodipodi:nodetypes="ccccc"
- inkscape:connector-curvature="0" />
</g>
+ <rect
+ y="37"
+ x="22"
+ height="4"
+ width="5"
+ id="rect3419"
+ style="opacity:0.2;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
</g>
</svg>
diff --git a/data/icons/scalable/parole.svg b/data/icons/scalable/parole.svg
index fd5fabc..61158ce 100644
--- a/data/icons/scalable/parole.svg
+++ b/data/icons/scalable/parole.svg
@@ -12,200 +12,721 @@
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
- id="svg2454"
- sodipodi:version="0.32"
- inkscape:version="0.48.3.1 r9886"
- sodipodi:docname="parole.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- version="1.1">
+ id="svg4405"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="parole-64.svg">
<defs
- id="defs2456">
+ id="defs4407">
<linearGradient
- id="linearGradient5048">
+ id="linearGradient4009">
<stop
- style="stop-color:black;stop-opacity:0;"
- id="stop5050"
- offset="0" />
+ offset="0"
+ style="stop-color:#d4d4d4;stop-opacity:1;"
+ id="stop4011" />
<stop
- style="stop-color:black;stop-opacity:1;"
- id="stop5056"
+ id="stop4013"
+ style="stop-color:#d2d2d2;stop-opacity:1;"
+ offset="0.25" />
+ <stop
+ id="stop4015"
+ style="stop-color:#b2b2b2;stop-opacity:1;"
offset="0.5" />
<stop
- style="stop-color:black;stop-opacity:0;"
- id="stop5052"
+ offset="1"
+ style="stop-color:#929292;stop-opacity:1;"
+ id="stop4017" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4311">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop4313" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop4315" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3707-319-631-407-324-616">
+ <stop
+ id="stop3246"
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0" />
+ <stop
+ id="stop3248"
+ style="stop-color:#1c1c1c;stop-opacity:1;"
offset="1" />
</linearGradient>
<linearGradient
+ id="linearGradient3924-803">
+ <stop
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop3252" />
+ <stop
+ id="stop3254"
+ style="stop-color:#ffffff;stop-opacity:0.23529412;"
+ offset="0.06316455" />
+ <stop
+ offset="0.95056331"
+ style="stop-color:#ffffff;stop-opacity:0.15686275;"
+ id="stop3256" />
+ <stop
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0.39215687;"
+ id="stop3258" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641">
+ <stop
+ id="stop3236"
+ style="stop-color:#404040;stop-opacity:1;"
+ offset="0" />
+ <stop
+ offset="0.25"
+ style="stop-color:#303030;stop-opacity:1;"
+ id="stop4001" />
+ <stop
+ offset="0.5"
+ style="stop-color:#202020;stop-opacity:1;"
+ id="stop3999" />
+ <stop
+ id="stop3242"
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
inkscape:collect="always"
- xlink:href="#linearGradient5048"
- id="linearGradient17859"
+ xlink:href="#linearGradient3688-166-749-2-324"
+ id="radialGradient3013-896"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.07721798,0,0,0.0523493,3.4344694,15.690795)"
- x1="302.85715"
- y1="366.64789"
- x2="302.85715"
- y2="609.50507" />
+ gradientTransform="matrix(2.003784,0,0,1.4,27.98813,-17.4)"
+ cx="4.9929786"
+ cy="43.5"
+ fx="4.9929786"
+ fy="43.5"
+ r="2.5" />
+ <linearGradient
+ id="linearGradient3688-166-749-2-324">
+ <stop
+ offset="0"
+ style="stop-color:#181818;stop-opacity:1"
+ id="stop3216" />
+ <stop
+ offset="1"
+ style="stop-color:#181818;stop-opacity:0"
+ id="stop3218" />
+ </linearGradient>
<radialGradient
inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="radialGradient17856"
+ xlink:href="#linearGradient3688-464-309-8-331"
+ id="radialGradient3015-826"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0.08726674,0,0,0.0523493,-2.6063103,15.690795)"
- cx="605.71429"
- cy="486.64789"
- fx="605.71429"
- fy="486.64789"
- r="117.14286" />
- <linearGradient
- id="linearGradient5060"
- inkscape:collect="always">
+ gradientTransform="matrix(2.003784,0,0,1.4,-20.01187,-104.4)"
+ cx="4.9929786"
+ cy="43.5"
+ fx="4.9929786"
+ fy="43.5"
+ r="2.5" />
+ <linearGradient
+ id="linearGradient3688-464-309-8-331">
+ <stop
+ offset="0"
+ style="stop-color:#181818;stop-opacity:1"
+ id="stop3222" />
+ <stop
+ offset="1"
+ style="stop-color:#181818;stop-opacity:0"
+ id="stop3224" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3702-501-757-6-946">
+ <stop
+ offset="0"
+ style="stop-color:#181818;stop-opacity:0"
+ id="stop3228" />
+ <stop
+ offset="0.5"
+ style="stop-color:#181818;stop-opacity:1"
+ id="stop3230" />
+ <stop
+ offset="1"
+ style="stop-color:#181818;stop-opacity:0"
+ id="stop3232" />
+ </linearGradient>
+ <linearGradient
+ y2="39.999443"
+ x2="25.058096"
+ y1="47.027729"
+ x1="25.058096"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient4395"
+ xlink:href="#linearGradient3702-501-757-6-946"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3702-501-757-6-946-2">
<stop
- style="stop-color:black;stop-opacity:1;"
- id="stop5062"
+ id="stop3228-0"
+ style="stop-color:#181818;stop-opacity:0"
offset="0" />
<stop
- style="stop-color:black;stop-opacity:0;"
- id="stop5064"
+ id="stop3230-6"
+ style="stop-color:#181818;stop-opacity:1"
+ offset="0.5" />
+ <stop
+ id="stop3232-6"
+ style="stop-color:#181818;stop-opacity:0"
offset="1" />
</linearGradient>
- <radialGradient
+ <linearGradient
+ id="linearGradient3688-464-309-8-331-3">
+ <stop
+ id="stop3222-9"
+ style="stop-color:#181818;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3224-8"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3688-166-749-2-324-7">
+ <stop
+ id="stop3216-9"
+ style="stop-color:#181818;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3218-7"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-671-944">
+ <stop
+ offset="0"
+ style="stop-color:#202020;stop-opacity:1;"
+ id="stop4455" />
+ <stop
+ offset="1"
+ style="stop-color:#383838;stop-opacity:1;"
+ id="stop4457" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-921-551">
+ <stop
+ offset="0"
+ style="stop-color:#4d4d4d;stop-opacity:1;"
+ id="stop4445" />
+ <stop
+ offset="0.26238"
+ style="stop-color:#404040;stop-opacity:1;"
+ id="stop4447" />
+ <stop
+ offset="0.704952"
+ style="stop-color:#303030;stop-opacity:1;"
+ id="stop4449" />
+ <stop
+ offset="1"
+ style="stop-color:#232323;stop-opacity:1;"
+ id="stop4451" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4640">
+ <stop
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop4642" />
+ <stop
+ id="stop4644"
+ style="stop-color:#ffffff;stop-opacity:0.23529412;"
+ offset="0.0310698" />
+ <stop
+ offset="0.97119564"
+ style="stop-color:#ffffff;stop-opacity:0.15686275;"
+ id="stop4646" />
+ <stop
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0.39215687;"
+ id="stop4648" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7-3-5">
+ <stop
+ offset="0"
+ style="stop-color:#272727;stop-opacity:1;"
+ id="stop5440-9-8-4" />
+ <stop
+ offset="1"
+ style="stop-color:#454545;stop-opacity:1;"
+ id="stop5442-0-9-2" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient8265-821-176-38-919-66-249-7-7-7">
+ <stop
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1"
+ id="stop2687-1-9-8" />
+ <stop
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0"
+ id="stop2689-5-4-6" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5048">
+ <stop
+ offset="0"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop5050" />
+ <stop
+ offset="0.5"
+ style="stop-color:#000000;stop-opacity:1"
+ id="stop5056" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop5052" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5060">
+ <stop
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1"
+ id="stop5062" />
+ <stop
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0"
+ id="stop5064" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3104">
+ <stop
+ offset="0"
+ style="stop-color:#a0a0a0;stop-opacity:1;"
+ id="stop3106" />
+ <stop
+ offset="1"
+ style="stop-color:#bebebe;stop-opacity:1;"
+ id="stop3108" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3600">
+ <stop
+ offset="0"
+ style="stop-color:#f4f4f4;stop-opacity:1"
+ id="stop3602" />
+ <stop
+ offset="1"
+ style="stop-color:#dbdbdb;stop-opacity:1"
+ id="stop3604" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3977">
+ <stop
+ id="stop3979"
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0" />
+ <stop
+ offset="0.03626217"
+ style="stop-color:#ffffff;stop-opacity:0.23529412;"
+ id="stop3981" />
+ <stop
+ id="stop3983"
+ style="stop-color:#ffffff;stop-opacity:0.15686275;"
+ offset="0.95056331" />
+ <stop
+ id="stop3985"
+ style="stop-color:#ffffff;stop-opacity:0.39215687;"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3798-44-1-9"
+ inkscape:collect="always">
+ <stop
+ id="stop3800-9-4-2"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop3802-93-6-8"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient5060"
- id="radialGradient17853"
+ xlink:href="#linearGradient3798-44-1-9"
+ id="linearGradient3889-9-8"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.08726674,0,0,0.0523493,65.304513,15.690795)"
- cx="605.71429"
- cy="486.64789"
- fx="605.71429"
- fy="486.64789"
- r="117.14286" />
- <linearGradient
- id="linearGradient2601">
- <stop
- id="stop2603"
- offset="0.0000000"
- style="stop-color:#5d5d5d;stop-opacity:1.0000000;" />
- <stop
- id="stop2605"
- offset="1.0000000"
- style="stop-color:#444444;stop-opacity:1.0000000;" />
- </linearGradient>
- <radialGradient
+ gradientTransform="translate(35,30)"
+ x1="6.1911855"
+ y1="13.900338"
+ x2="6.1911855"
+ y2="12.118899" />
+ <linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient2601"
- id="radialGradient17850"
+ xlink:href="#linearGradient3798-44-1"
+ id="linearGradient3889-9"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(3.8549806,0,0,2.8270732,-87.626037,-83.956008)"
- cx="27.216267"
- cy="35.673447"
- fx="27.216267"
- fy="35.673447"
- r="19.57143" />
- <linearGradient
- id="linearGradient2613"
+ gradientTransform="translate(35,0)"
+ x1="6.1911855"
+ y1="13.900338"
+ x2="6.1911855"
+ y2="12.118899" />
+ <linearGradient
+ id="linearGradient3798-44-1"
inkscape:collect="always">
<stop
- id="stop2615"
+ id="stop3800-9-4"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
- id="stop2617"
+ id="stop3802-93-6"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient2613"
- id="linearGradient17848"
+ xlink:href="#linearGradient3702-501-757-6-946-7"
+ id="linearGradient3229"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.3571428,0,0,0.57142859,-8.571428,19.142856)"
+ x1="25.058096"
+ y1="47.027729"
+ x2="25.058096"
+ y2="39.999443" />
+ <linearGradient
+ id="linearGradient3702-501-757-6-946-7">
+ <stop
+ id="stop3228-4"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="0" />
+ <stop
+ id="stop3230-67"
+ style="stop-color:#181818;stop-opacity:1"
+ offset="0.5" />
+ <stop
+ id="stop3232-9"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3688-464-309-8-331-9">
+ <stop
+ id="stop3222-2"
+ style="stop-color:#181818;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3224-1"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ r="2.5"
+ fy="43.5"
+ fx="4.9929786"
+ cy="43.5"
+ cx="4.9929786"
+ gradientTransform="matrix(2.003784,0,0,0.80000003,-15.011861,-78.800001)"
gradientUnits="userSpaceOnUse"
- x1="5.463501"
- y1="13.142847"
- x2="21.536488"
- y2="49.142849"
- gradientTransform="matrix(1.3583572,0,0,1.3234709,-1.182719,-14.136519)" />
+ id="radialGradient3206"
+ xlink:href="#linearGradient3688-464-309-8-331-9"
+ inkscape:collect="always" />
<linearGradient
- id="linearGradient2502">
+ id="linearGradient3688-166-749-2-324-8">
+ <stop
+ id="stop3216-7"
+ style="stop-color:#181818;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3218-2"
+ style="stop-color:#181818;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ r="2.5"
+ fy="43.5"
+ fx="4.9929786"
+ cy="43.5"
+ cx="4.9929786"
+ gradientTransform="matrix(2.003784,0,0,0.80000003,32.98813,9.1999985)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient3209"
+ xlink:href="#linearGradient3688-166-749-2-324-8"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-671-944-8">
<stop
- id="stop2504"
offset="0"
- style="stop-color:#fdfdfd;stop-opacity:1;" />
+ style="stop-color:#202020;stop-opacity:1;"
+ id="stop4455-4" />
<stop
- id="stop2506"
- offset="1.0000000"
- style="stop-color:#d4d4d4;stop-opacity:1.0000000;" />
+ offset="1"
+ style="stop-color:#383838;stop-opacity:1;"
+ id="stop4457-8" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient2502"
- id="linearGradient12952"
+ y2="3.8990016"
+ x2="24"
+ y1="44"
+ x1="24"
+ gradientTransform="matrix(1.1025641,0,0,1,-2.461538,1)"
gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-42.841472,-1.0133135)"
- x1="2.7612331"
- y1="6.1102505"
- x2="18.772917"
- y2="18.693317" />
+ id="linearGradient4154-375-947"
+ xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-671-944-8"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient10935">
+ id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-921-551-0">
<stop
+ offset="0"
+ style="stop-color:#4d4d4d;stop-opacity:1;"
+ id="stop4445-9" />
+ <stop
+ offset="0.26238"
+ style="stop-color:#404040;stop-opacity:1;"
+ id="stop4447-3" />
+ <stop
+ offset="0.704952"
+ style="stop-color:#303030;stop-opacity:1;"
+ id="stop4449-8" />
+ <stop
+ offset="1"
+ style="stop-color:#232323;stop-opacity:1;"
+ id="stop4451-6" />
+ </linearGradient>
+ <radialGradient
+ r="19.99999"
+ fy="8.4497671"
+ fx="7.4956832"
+ cy="8.4497671"
+ cx="7.4956832"
+ gradientTransform="matrix(2.142113e-8,2.33699,-2.7258215,-4.3056275e-8,47.032678,-11.434799)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient4152-74-497"
+ xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-921-551-0"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient4640-1">
+ <stop
+ offset="0"
style="stop-color:#ffffff;stop-opacity:1;"
+ id="stop4642-2" />
+ <stop
+ id="stop4644-4"
+ style="stop-color:#ffffff;stop-opacity:0.23529412;"
+ offset="0.0310698" />
+ <stop
+ offset="0.97119564"
+ style="stop-color:#ffffff;stop-opacity:0.15686275;"
+ id="stop4646-4" />
+ <stop
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0.39215687;"
+ id="stop4648-4" />
+ </linearGradient>
+ <linearGradient
+ y2="43"
+ x2="23.99999"
+ y1="4.999989"
+ x1="23.99999"
+ gradientTransform="matrix(1.1081081,0,0,1,-2.5945913,1.00001)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3185"
+ xlink:href="#linearGradient4640-1"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7-3-5-4">
+ <stop
offset="0"
- id="stop10937" />
+ style="stop-color:#272727;stop-opacity:1;"
+ id="stop5440-9-8-4-5" />
<stop
- style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
- id="stop10939" />
+ style="stop-color:#454545;stop-opacity:1;"
+ id="stop5442-0-9-2-3" />
</linearGradient>
<linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient10935"
- id="linearGradient10941"
- x1="13.303192"
- y1="11.104468"
- x2="8.6929884"
- y2="18.145662"
- gradientUnits="userSpaceOnUse" />
+ y2="-174.9679"
+ x2="149.98465"
+ y1="-104.23534"
+ x1="149.98465"
+ gradientTransform="matrix(0.42132707,0,0,0.42413289,-33.192592,77.209636)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient5104-88"
+ xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7-3-5-4"
+ inkscape:collect="always" />
<linearGradient
- inkscape:collect="always"
- id="linearGradient10150">
+ id="linearGradient8265-821-176-38-919-66-249-7-7-7-8">
<stop
- style="stop-color:#7c7f82;stop-opacity:1"
offset="0"
- id="stop10156" />
+ style="stop-color:#ffffff;stop-opacity:1"
+ id="stop2687-1-9-8-1" />
<stop
- style="stop-color:#3a3c3e;stop-opacity:1"
offset="1"
- id="stop10159" />
+ style="stop-color:#ffffff;stop-opacity:0"
+ id="stop2689-5-4-6-8" />
</linearGradient>
<linearGradient
+ y2="24.627615"
+ x2="20.054544"
+ y1="15.298182"
+ x1="16.626165"
+ gradientTransform="matrix(0.9095936,0,0,1.3012336,2.1271914,-1.4329212)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3182"
+ xlink:href="#linearGradient8265-821-176-38-919-66-249-7-7-7-8"
+ inkscape:collect="always" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8265-821-176-38-919-66-249-7-7-7-8"
+ id="linearGradient4459"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.82498026,0,0,1.3012336,4.16188,-1.4329208)"
+ x1="16.626165"
+ y1="15.298182"
+ x2="20.054544"
+ y2="24.627615" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3798-44-1-9"
+ id="linearGradient4462"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-11.324367,31.539334)"
+ x1="6.1911855"
+ y1="13.900338"
+ x2="6.1911855"
+ y2="12.118899" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3798-44-1"
+ id="linearGradient4465"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-11.324367,1.5393344)"
+ x1="6.1911855"
+ y1="13.900338"
+ x2="6.1911855"
+ y2="12.118899" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7-3-5-4"
+ id="linearGradient4469"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.42132707,0,0,0.42413289,-79.516959,78.74897)"
+ x1="149.98465"
+ y1="-104.23534"
+ x2="149.98465"
+ y2="-174.9679" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4640-1"
+ id="linearGradient4472"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.1081081,0,0,1,-48.918958,2.5393444)"
+ x1="23.99999"
+ y1="4.999989"
+ x2="23.99999"
+ y2="43" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-921-551-0"
+ id="radialGradient4475"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.142113e-8,2.33699,-2.7258215,-4.3056275e-8,0.708311,-9.8954646)"
+ cx="7.4956832"
+ cy="8.4497671"
+ fx="7.4956832"
+ fy="8.4497671"
+ r="19.99999" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-671-944-8"
+ id="linearGradient4477"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.1025641,0,0,1,-48.785905,2.5393344)"
+ x1="24"
+ y1="44"
+ x2="24"
+ y2="3.8990016" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7-3-5-4"
+ id="linearGradient4487"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.42132707,0,0,0.42413289,-79.516959,78.74897)"
+ x1="149.98465"
+ y1="-104.23534"
+ x2="149.98465"
+ y2="-174.9679" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7-3-5-4"
+ id="linearGradient4491"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.42132707,0,0,0.42413289,-75.192592,80.209636)"
+ x1="149.98465"
+ y1="-104.23534"
+ x2="149.98465"
+ y2="-174.9679" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3924-803"
+ id="linearGradient3150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.4864865,0,0,0.35135136,-3.6756703,27.567571)"
+ x1="23.99999"
+ y1="8.4357691"
+ x2="23.99999"
+ y2="41.078793" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3924-803"
+ id="linearGradient3157"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.4864865,0,0,1.1621622,-3.6756704,-17.89188)"
+ x1="23.99999"
+ y1="4.999989"
+ x2="23.99999"
+ y2="43" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641"
+ id="radialGradient3162"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0,3.3941081,-3.6132983,-1.2481202e-7,62.531692,-37.350618)"
+ cx="7.4956832"
+ cy="8.4497671"
+ fx="7.4956832"
+ fy="8.4497671"
+ r="19.99999" />
+ <linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient10150"
- id="linearGradient10161"
- x1="10.66092"
- y1="10.732934"
- x2="10.66092"
- y2="19.655537"
- gradientUnits="userSpaceOnUse" />
+ xlink:href="#linearGradient3707-319-631-407-324-616"
+ id="linearGradient3164"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.4615385,0,0,1.0137363,-3.0769217,-17.061813)"
+ x1="24"
+ y1="44"
+ x2="24"
+ y2="3.8990016" />
<linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient2502"
- id="linearGradient3830"
+ xlink:href="#linearGradient3600"
+ id="linearGradient3167"
gradientUnits="userSpaceOnUse"
- x1="2.7612331"
- y1="6.1102505"
- x2="18.772917"
- y2="18.693317"
- gradientTransform="matrix(1.3304434,0,0,1.3259839,3.3251627,-8.2806313)" />
+ gradientTransform="matrix(1.4615385,0,0,1.1538462,-3.0769351,-7.8461555)"
+ x1="32.455086"
+ y1="32.134663"
+ x2="32.455086"
+ y2="44.698959" />
<linearGradient
inkscape:collect="always"
- xlink:href="#linearGradient2502"
- id="linearGradient3852"
+ xlink:href="#linearGradient3104"
+ id="linearGradient3169"
gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2876241,-0.33481908,0.3336328,1.2833248,-44.647445,-36.935703)"
- x1="2.7612331"
- y1="6.1102505"
- x2="18.772917"
- y2="18.693317" />
+ gradientTransform="matrix(1.4615385,0,0,1.1538462,-3.0769351,-7.8461555)"
+ x1="13.96882"
+ y1="43.669865"
+ x2="13.96882"
+ y2="32.646023" />
</defs>
<sodipodi:namedview
id="base"
@@ -214,36 +735,38 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="14"
- inkscape:cx="30.035073"
- inkscape:cy="16.220805"
+ inkscape:zoom="7"
+ inkscape:cx="22.234484"
+ inkscape:cy="35.473176"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
- inkscape:window-width="1228"
- inkscape:window-height="800"
+ inkscape:window-width="1920"
+ inkscape:window-height="1151"
inkscape:window-x="0"
- inkscape:window-y="88"
- inkscape:window-maximized="0"
- inkscape:snap-global="false">
+ inkscape:window-y="25"
+ inkscape:window-maximized="1"
+ inkscape:snap-global="false"
+ showguides="true"
+ inkscape:guide-bbox="true">
<inkscape:grid
type="xygrid"
- id="grid3055"
+ id="grid4022"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
- id="metadata2459">
+ id="metadata4410">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
+ <dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
@@ -252,230 +775,139 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(0,16)">
- <rect
- id="rect4173"
- x="12.700627"
- y="34.884556"
- width="37.285255"
- height="12.713403"
- style="opacity:0.40206185;fill:url(#linearGradient17859);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
- <path
- d="m 49.985883,34.884993 c 0,0 0,12.712702 0,12.712702 4.494022,0.02393 10.864356,-2.848271 10.864353,-6.357169 0,-3.508898 -5.014988,-6.355532 -10.864353,-6.355533 z"
- id="path5058"
- style="opacity:0.40206185;fill:url(#radialGradient17856);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
- sodipodi:nodetypes="cccc"
- inkscape:connector-curvature="0" />
- <path
- id="path5018"
- d="m 12.712308,34.884993 c 0,0 0,12.712702 0,12.712702 -4.4940214,0.02393 -10.864354,-2.848271 -10.864354,-6.357169 0,-3.508898 5.0149879,-6.355532 10.864354,-6.355533 z"
- style="opacity:0.40206185;fill:url(#radialGradient17853);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
- sodipodi:nodetypes="cccc"
- inkscape:connector-curvature="0" />
- <rect
- ry="1.5125798"
- rx="1.5162199"
- y="7.441803"
- x="6.5"
- height="37.058197"
- width="51"
- id="rect1440"
- style="fill:url(#radialGradient17850);fill-opacity:1;fill-rule:nonzero;stroke:#1b1b1b;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block" />
- <rect
- style="opacity:0.31155778;fill:none;stroke:url(#linearGradient17848);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:block"
- id="rect2609"
- width="49"
- height="34.489948"
- x="7.5"
- y="9.0100517"
- rx="0.36376506"
- ry="0.36226305" />
- <path
- transform="matrix(0.99997259,0.00740448,-0.00745436,0.99997222,0,0)"
- style="fill:url(#linearGradient3830);fill-opacity:1;fill-rule:nonzero;stroke:#2b2b2b;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:block"
- d="M 7.0408048,5.4480609 57.039415,5.0777939 c 0.84308,-0.00624 1.510707,0.6509379 1.511117,1.4888523 l 0.0029,5.9989308 c 4.1e-4,0.837914 -0.60388,1.505683 -1.44696,1.511926 L 7.1184444,14.447693 C 6.2753652,14.453936 5.6030243,13.79681 5.5967752,12.958919 L 5.5520277,6.9590834 C 5.5457786,6.1211919 6.1977256,5.4543044 7.0408048,5.4480609 z"
- id="rect4362"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="sssssssss" />
- <path
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m 9,6 -3.0042857,4.005714 c 0,0 -0.3312127,3.159799 0.2185714,3.744286 C 6.7640698,14.334487 10,14 10,14 l 6,-8 z"
- id="path3837"
- sodipodi:nodetypes="cczccc"
- inkscape:connector-curvature="0" />
- <path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccccc"
- id="path4366"
- d="m 23,6 -6,8 7,0 6,-8 z"
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
- <path
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m 37,6 -6,8 7,0 6,-8 z"
- id="path3833"
- sodipodi:nodetypes="ccccc"
- inkscape:connector-curvature="0" />
<g
- id="g3854"
- transform="translate(43.330471,22.105011)">
- <path
- style="fill:url(#linearGradient3852);fill-opacity:1;fill-rule:nonzero;stroke:#2b2b2b;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:block"
- d="m -37.597091,-24.583764 48.29628,-12.940993 c 0.814376,-0.218209 1.62587,0.249812 1.837095,1.060666 l 1.512205,5.805206 c 0.211261,0.810844 -0.205598,1.609214 -1.019973,1.827426 l -48.286055,12.938256 c -0.814375,0.218211 -1.630418,-0.248573 -1.847289,-1.057935 l -1.552934,-5.79555 c -0.216872,-0.809363 0.246297,-1.618864 1.060671,-1.837076 z"
- id="path3840"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="sssssssss" />
- <path
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m -35.535841,-24.61848 -1.865163,4.646789 c 0,0 0.49789,3.137855 1.180217,3.560132 0.682327,0.422276 3.721424,-0.738334 3.721424,-0.738334 l 3.725003,-9.280321 z"
- id="path3842"
- sodipodi:nodetypes="cczccc"
- inkscape:connector-curvature="0" />
- <path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccccc"
- id="path3844"
- d="m -22.01288,-28.241947 -3.725002,9.280321 6.761481,-1.811733 3.725002,-9.280321 z"
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
- <path
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
- d="m -8.4899182,-31.865414 -3.7250018,9.280321 6.7614798,-1.811733 3.725003,-9.280321 z"
- id="path3846"
- sodipodi:nodetypes="ccccc"
- inkscape:connector-curvature="0" />
- <path
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccccc"
- id="path3848"
- d="m 5.0330438,-35.48888 -3.725003,9.280321 6.761481,-1.811734 3.7250032,-9.280321 z"
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
- <path
- style="fill:none;stroke:#ffffff;stroke-width:0.99999988;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.57512949;stroke-dashoffset:0;marker:none;visibility:visible;display:block"
- d="m -37.438357,-23.591086 48.396365,-12.967746 c 0.188878,-0.05061 0.561864,0.165894 0.612169,0.353608 l 1.553115,5.795502 c 0.05034,0.187706 -0.164669,0.561782 -0.353548,0.612392 l -48.296294,12.940932 c -0.188878,0.05061 -0.563326,-0.165505 -0.612372,-0.353554 l -1.552658,-5.953016 c -0.04904,-0.188048 0.06435,-0.377509 0.253224,-0.428119 z"
- id="path3850"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="sssssssss" />
+ transform="matrix(1.6315789,0,0,0.5904762,-7.1578945,18.247618)"
+ id="g3712-0"
+ style="opacity:0.4">
+ <rect
+ width="5"
+ height="7"
+ x="38"
+ y="40"
+ id="rect2801-4"
+ style="fill:url(#radialGradient3013-896);fill-opacity:1;stroke:none" />
+ <rect
+ width="5"
+ height="7"
+ x="-10"
+ y="-47"
+ transform="scale(-1,-1)"
+ id="rect3696-8"
+ style="fill:url(#radialGradient3015-826);fill-opacity:1;stroke:none" />
+ <rect
+ width="28"
+ height="7.0000005"
+ x="10"
+ y="40"
+ id="rect3700-7"
+ style="fill:url(#linearGradient4395);fill-opacity:1;stroke:none" />
</g>
<path
+ style="color:#000000;fill:url(#linearGradient3167);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3169);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 60.500002,28.499999 0,12.954546 c 0,0.426156 -1.303693,2.045455 -2.923077,2.045455 l -51.153848,0 C 4.8036923,43.5 3.5,41.880701 3.5,41.454545 l 0,-12.954546 z"
+ id="rect4003"
inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccccc"
- id="path3835"
- d="m 51,6 -6,8 7,0 6,-8 z"
- style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
- <path
- transform="matrix(0.99996874,0.00790729,-0.00698036,0.99997564,0,0)"
- style="fill:none;stroke:#ffffff;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.57512949;stroke-dashoffset:0;marker:none;visibility:visible;display:block"
- d="M 6.9416091,6.4452472 57.044008,6.0490838 c 0.195537,-0.00155 0.501904,0.3017006 0.503267,0.4960326 l 0.04209,5.9998136 c 0.0014,0.194333 -0.30096,0.502413 -0.496497,0.503959 L 7.0940673,13.444233 C 6.8985307,13.445779 6.5906505,13.142541 6.5905891,12.948202 L 6.5886464,6.796038 C 6.588585,6.6017 6.7460725,6.4467933 6.9416091,6.4452472 z"
- id="rect4372"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="sssssssss" />
- <path
- inkscape:connector-curvature="0"
- id="path3601"
- d="m 12.5,27.5 38.023907,0"
- style="opacity:0.26130651999999999;fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
- <path
- inkscape:connector-curvature="0"
- id="path3607"
- d="m 42.5,27 0,-5.293685"
- style="opacity:0.26130652;fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ sodipodi:nodetypes="csssscc" />
<path
+ style="color:#000000;fill:url(#radialGradient3162);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3164);stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 6.423077,-12.5 51.153848,0 c 1.619384,0 2.923077,1.184141 2.923077,2.655024 l 0,38.344976 L 3.5,28.5 3.5,-9.844976 C 3.5,-11.315859 4.8036923,-12.5 6.423077,-12.5 z"
+ id="rect5505-21"
inkscape:connector-curvature="0"
- id="path3605"
- d="m 12.509335,33.5 37.981331,0"
- style="opacity:0.26130652;fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
- <path
- inkscape:connector-curvature="0"
- id="path3611"
- d="m 29.5,27 0,-5.293685"
- style="opacity:0.26130652;fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
- <path
- inkscape:connector-curvature="0"
- style="opacity:0.26130651999999999;fill:none;stroke:#ffffff;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="m 12.507742,39.5 17.984515,0"
- id="path3615" />
- <g
- transform="matrix(0.91622659,0,0,0.91058789,15.339744,4.8010102)"
- style="fill:#ffffff;fill-opacity:1"
- id="g3680">
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3674"
- d="m 13.817087,27.83871 c 0.113601,0.965157 0.244861,1.927714 0.394926,2.887925 l -2.107716,1.115321 C 11.971325,30.898587 11.859805,29.948673 11.653276,29.01819 l 2.163811,-1.17948 z"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3676"
- d="m 17.665061,28.673198 c -0.02417,2.079247 0.678,1.192783 -1.910963,2.589105 0.815412,-1.303562 2.191632,-2.618366 3.548625,-1.445006 2.591189,0.421672 -1.433848,2.481989 0.355171,0.314327 2.600013,-2.269865 2.222306,-0.997521 4.404319,-0.868565 1.780222,0.430207 1.796194,0.05633 -0.570253,1.416663 0.03203,-0.02793 0.06406,-0.05585 0.09609,-0.08377 l 2.238621,-0.946961 c -0.02529,0.03869 -0.05058,0.07738 -0.07587,0.116068 -2.811349,1.677475 -1.668398,1.183753 -3.647289,0.92631 -1.86635,-0.327685 -2.87539,-0.553295 -0.220839,-1.484714 -1.139443,1.293919 -2.981215,3.299891 -4.618598,1.882935 -1.588509,-1.170545 2.132535,-2.413333 0.764613,-0.73098 -2.682553,1.478611 -2.400461,1.55186 -2.560742,-0.565921 l 2.197119,-1.119488 z"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3678"
- d="m 29.174994,26.230789 c 0.14593,1.507956 0.225786,3.019542 0.405142,4.524683 1.423472,1.850746 -1.826977,4.633968 -1.347225,1.808834 0.342081,-3.243811 0.650319,-3.84417 3.528747,-4.879984 0.547689,0.983343 0.847731,2.137946 1.704024,2.727959 -4.840075,2.551671 1.693745,-1.481215 2.420946,-1.867341 0.464921,-0.109143 0.939853,-0.165325 1.412287,-0.230751 l -1.920756,1.437314 c -0.464844,0.06807 -0.935057,0.1189 -1.384984,0.261165 2.998581,-1.911568 -0.568404,0.841891 -2.506019,1.817551 -0.923746,-0.724224 -1.143464,-1.894425 -1.783232,-2.880314 3.14599,-2.218804 0.63263,-0.141231 0.637903,2.577332 -0.28354,2.350093 -3.320174,3.549885 -2.814981,0.306459 -0.172764,-1.481806 -0.250004,-2.982368 -0.530099,-4.447333 l 2.178247,-1.155574 z"
- inkscape:connector-curvature="0" />
- </g>
+ sodipodi:nodetypes="sssccss" />
+ <rect
+ width="55"
+ height="43"
+ rx="1.4864866"
+ ry="1.1621622"
+ x="4.5"
+ y="-11.5"
+ id="rect6741-1"
+ style="opacity:0.3;fill:none;stroke:url(#linearGradient3157);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+ <rect
+ y="34"
+ x="8"
+ height="4"
+ width="48"
+ id="rect4024"
+ style="fill:#7d7d7d;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <rect
+ style="fill:#e20000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="rect4020"
+ width="18"
+ height="4"
+ x="8"
+ y="34" />
+ <rect
+ style="opacity:0.3;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="rect4026"
+ width="48"
+ height="1"
+ x="8"
+ y="34" />
+ <rect
+ y="38"
+ x="8"
+ height="1"
+ width="48"
+ id="rect4028"
+ style="opacity:0.5;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <rect
+ style="opacity:0.5;fill:none;stroke:url(#linearGradient3150);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect4282"
+ y="29.5"
+ x="4.5"
+ ry="2.0021465"
+ rx="1.4864866"
+ height="13"
+ width="55" />
<g
- transform="matrix(1.3502096,0,0,1.3419001,1.8859796,-7.4594646)"
- id="g3755">
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3693"
- d="m 11.316278,22.373912 c 1.820856,-1.333208 1.127169,-0.281091 1.128436,1.146858 -0.01466,1.286348 0.175884,2.556881 0.462421,3.806594 l -1.262911,0.682145 c -0.287161,-1.259893 -0.47939,-2.540337 -0.475327,-3.836434 -0.01981,-1.552781 -0.288652,-1.952637 1.347165,-2.670858 l -1.199784,0.871695 z"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3695"
- d="m 15.610946,22.413179 c -0.02437,0.790304 -0.02398,1.581273 -0.02699,2.3719 -0.0011,0.331934 -0.001,0.663869 -0.0013,0.995804 l -1.264717,0.644405 c -3.07e-4,-0.33148 -2.58e-4,-0.66296 -0.0013,-0.994439 -0.003,-0.781455 -0.0024,-1.563275 -0.02699,-2.344395 l 1.321376,-0.673275 z"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3697"
- d="m 17.833281,21.200996 c 0.09877,0.796352 0.117107,1.655155 0.145148,2.472831 0.008,0.24117 0.0132,0.482416 0.01979,0.723625 l -1.257551,0.645191 c -0.0078,-0.240127 -0.0132,-0.480333 -0.02347,-0.72038 -0.03579,-0.815108 -0.04172,-1.648209 -0.205301,-2.447992 l 1.321376,-0.673275 z"
- inkscape:connector-curvature="0" />
+ style="opacity:0.8;fill:#000000;fill-opacity:1"
+ id="g3957"
+ transform="matrix(0.79111854,0,0,0.68543438,12.793666,-9.3159417)">
<path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3699"
- d="m 20.257647,20.594904 c -0.196164,0.682214 -0.268848,1.395879 -0.337656,2.103621 -0.0674,0.761239 -0.09762,1.524887 -0.128658,2.288229 l -1.257113,0.634694 c 0.02996,-0.763385 0.05957,-1.526914 0.115545,-2.288959 0.05537,-0.688124 0.083,-1.405566 0.286506,-2.06431 l 1.321376,-0.673275 z"
- inkscape:connector-curvature="0" />
- <path
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
- id="path3701"
- d="m 9.8969255,22.310339 c 0.9067235,0.190928 1.8267775,0.348564 2.7421905,0.503737 2.149945,0.332152 4.306576,0.626935 6.468095,0.873614 0.903938,0.09251 1.807226,0.19028 2.709599,0.296728 l -1.16802,0.826398 C 19.754597,24.700327 18.859587,24.597014 17.963955,24.498588 15.801624,24.238152 13.642863,23.943889 11.488982,23.62143 10.560864,23.472229 9.6271038,23.290017 8.6971411,23.182034 l 1.1997844,-0.871695 z"
- inkscape:connector-curvature="0" />
+ style="fill:#000000;fill-opacity:1;stroke:none"
+ id="path3959"
+ transform="matrix(0.99984261,-0.01774122,0.01774122,0.99984261,5.4919568,2.3986116)"
+ inkscape:connector-curvature="0"
+ d="M 28.678,23.3898 12.0273,32.5963 12.3796,13.5731 28.678,23.3898 z" />
</g>
<g
- id="g12937"
- transform="matrix(1.3316162,0,0,1.3234211,-0.61553617,-15.926258)">
- <path
- style="fill:url(#linearGradient10161);fill-opacity:1;fill-rule:evenodd;stroke:#1b1b1b;stroke-width:0.75328867;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="m 9.530039,20.318017 5.032098,-4.247694 c 0.300079,-0.253302 0.268226,-0.674472 -0.0737,-0.915372 L 8.283363,11.390892 C 7.604382,10.979016 6.4663323,11.47183 6.5595663,12.15353 l 0.1765087,6.938464 c -0.1421506,1.219771 2.009141,1.888508 2.793964,1.226023 z"
- id="path3583"
- sodipodi:nodetypes="ccccccc"
- inkscape:connector-curvature="0" />
- <path
- sodipodi:type="arc"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block"
- id="path3587"
- sodipodi:cx="8.5535717"
- sodipodi:cy="17.196428"
- sodipodi:rx="0.48214287"
- sodipodi:ry="0.48214287"
- d="m 9.0357146,17.196428 a 0.48214287,0.48214287 0 1 1 -0.9642858,0 0.48214287,0.48214287 0 1 1 0.9642858,0 z"
- transform="matrix(0.77878072,0,0,0.78360321,1.6860456,0.4480246)" />
- <path
- transform="matrix(0.77878072,0,0,0.78360321,1.6860456,4.9817289)"
- d="m 9.0357146,17.196428 a 0.48214287,0.48214287 0 1 1 -0.9642858,0 0.48214287,0.48214287 0 1 1 0.9642858,0 z"
- sodipodi:ry="0.48214287"
- sodipodi:rx="0.48214287"
- sodipodi:cy="17.196428"
- sodipodi:cx="8.5535717"
- id="path3589"
- style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:block"
- sodipodi:type="arc" />
+ transform="matrix(0.79111854,0,0,0.68543438,12.793666,-8.3162401)"
+ id="g2851"
+ style="fill:#ffffff">
<path
- style="opacity:0.4;fill:none;stroke:url(#linearGradient10941);stroke-width:0.75328869;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="m 9.3883237,19.423665 4.5995433,-3.741384 c 0,0 -6.1937613,-3.922042 -6.5255331,-3.702096 -0.3317717,0.219946 0.045962,6.971376 0.045962,6.971376 -0.096701,0.818679 1.3461333,0.916748 1.8800274,0.472104 z"
- id="path10163"
- sodipodi:nodetypes="cczcc"
- inkscape:connector-curvature="0" />
+ d="M 28.678,23.3898 12.0273,32.5963 12.3796,13.5731 28.678,23.3898 z"
+ inkscape:connector-curvature="0"
+ transform="matrix(0.99984261,-0.01774122,0.01774122,0.99984261,5.4919568,2.3986116)"
+ id="path2847"
+ style="stroke:none" />
</g>
+ <path
+ transform="matrix(1.2564743,0,0,1.2717599,5.0288467,-19.09703)"
+ d="m 31.971329,21.306719 a 10.505587,10.379317 0 1 1 -21.011174,0 10.505587,10.379317 0 1 1 21.011174,0 z"
+ sodipodi:ry="10.379317"
+ sodipodi:rx="10.505587"
+ sodipodi:cy="21.306719"
+ sodipodi:cx="21.465742"
+ id="path3961"
+ style="opacity:0.8;fill:none;stroke:#000000;stroke-width:1.26572859;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:type="arc"
+ style="fill:none;stroke:#ffffff;stroke-width:1.26572859;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="path4333"
+ sodipodi:cx="21.465742"
+ sodipodi:cy="21.306719"
+ sodipodi:rx="10.505587"
+ sodipodi:ry="10.379317"
+ d="m 31.971329,21.306719 a 10.505587,10.379317 0 1 1 -21.011174,0 10.505587,10.379317 0 1 1 21.011174,0 z"
+ transform="matrix(1.2564743,0,0,1.2717599,5.0288467,-18.09703)" />
+ <rect
+ y="34"
+ x="26"
+ height="4"
+ width="8"
+ id="rect3419"
+ style="opacity:0.2;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
</g>
</svg>
diff --git a/data/interfaces/Makefile.am b/data/interfaces/Makefile.am
index f17d0ed..6292efc 100644
--- a/data/interfaces/Makefile.am
+++ b/data/interfaces/Makefile.am
@@ -6,7 +6,7 @@ interfaces = \
save-playlist.ui \
plugins.ui \
open-location.ui
-
+
interfaces_h = \
$(interfaces:.ui=_ui.h)
@@ -33,12 +33,12 @@ open-location_ui.h: open-location.ui
plugins_ui.h: plugins.ui
xdt-csource --static --strip-comments --strip-content --name=plugins_ui $< > $@
+
+endif
DISTCLEANFILES = \
$(interfaces_h)
-endif
-
EXTRA_DIST = \
$(interfaces) \
- $(interfaces_h)
+ $(interfaces_h)
\ No newline at end of file
diff --git a/data/interfaces/mediachooser.ui b/data/interfaces/mediachooser.ui
index 4b44dc5..d6a5288 100644
--- a/data/interfaces/mediachooser.ui
+++ b/data/interfaces/mediachooser.ui
@@ -1,98 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <requires lib="gtk+" version="2.24"/>
- <!-- interface-naming-policy project-wide -->
+ <!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="chooser">
<property name="can_focus">False</property>
+ <property name="border_width">5</property>
<property name="title" translatable="yes">Open Media Files</property>
+ <property name="icon_name">parole</property>
<property name="modal">True</property>
- <property name="default_width">680</property>
+ <property name="default_width">640</property>
<property name="default_height">480</property>
- <property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
<signal name="destroy" handler="parole_media_chooser_destroy_cb" swapped="no"/>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox">
- <property name="visible">True</property>
+ <object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
+ <object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
+ <object class="GtkSpinner" id="spinner">
<property name="can_focus">False</property>
- <child>
- <object class="GtkSpinner" id="spinner">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="active">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="no_show_all">True</property>
+ <property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
<property name="secondary">True</property>
+ <property name="non_homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkHButtonBox" id="hbuttonbox1">
+ <object class="GtkButton" id="close">
+ <property name="label">gtk-cancel</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkButton" id="close">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="parole_media_chooser_close_clicked" swapped="no"/>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="open">
- <property name="label" translatable="yes">_Open</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image4</property>
- <property name="use_underline">True</property>
- <signal name="clicked" handler="parole_media_chooser_add_clicked" swapped="no"/>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="parole_media_chooser_close_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkButton" id="open">
+ <property name="label">gtk-open</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="parole_media_chooser_add_clicked" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
@@ -103,10 +80,6 @@
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="orientation">vertical</property>
- <property name="spacing">1</property>
- <property name="create_folders">False</property>
- <property name="local_only">False</property>
- <property name="select_multiple">True</property>
<signal name="file-activated" handler="media_chooser_file_activate_cb" swapped="no"/>
<signal name="current-folder-changed" handler="media_chooser_folder_changed_cb" swapped="no"/>
</object>
@@ -118,10 +91,9 @@
</child>
</object>
</child>
- </object>
- <object class="GtkImage" id="image4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-open</property>
+ <action-widgets>
+ <action-widget response="0">close</action-widget>
+ <action-widget response="0">open</action-widget>
+ </action-widgets>
</object>
</interface>
diff --git a/data/interfaces/open-location.ui b/data/interfaces/open-location.ui
index 98eb497..9033a67 100644
--- a/data/interfaces/open-location.ui
+++ b/data/interfaces/open-location.ui
@@ -1,75 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <requires lib="gtk+" version="2.24"/>
- <!-- interface-naming-policy project-wide -->
+ <!-- interface-requires gtk+ 3.0 -->
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-clear</property>
+ <property name="icon_name">gtk-clear</property>
</object>
<object class="GtkDialog" id="open-location">
<property name="can_focus">False</property>
+ <property name="border_width">5</property>
<property name="title" translatable="yes">Open Network Location</property>
- <property name="modal">True</property>
<property name="default_width">450</property>
<property name="icon_name">parole</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
+ <object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
+ <object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="cancel">
- <property name="label">gtk-cancel</property>
+ <object class="GtkButton" id="clear-history">
+ <property name="label" translatable="yes">Clear History</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="image">image1</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
+ <property name="secondary">True</property>
+ <property name="non_homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="open">
- <property name="label">gtk-open</property>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="clear-history">
- <property name="label" translatable="yes">Clear History</property>
+ <object class="GtkButton" id="open">
+ <property name="label">gtk-open</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image1</property>
+ <property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">2</property>
- <property name="secondary">True</property>
</packing>
</child>
</object>
@@ -81,13 +77,13 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">12</property>
+ <property name="border_width">5</property>
<property name="spacing">12</property>
<child>
- <object class="GtkImage" id="image4">
+ <object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="yalign">0</property>
@@ -101,9 +97,10 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label1">
@@ -124,11 +121,20 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
+ <property name="is_focus">True</property>
<property name="has_entry">True</property>
<property name="entry_text_column">0</property>
+ <child internal-child="entry">
+ <object class="GtkEntry" id="comboboxtext-entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_focus">True</property>
+ <property name="input_purpose">url</property>
+ </object>
+ </child>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
@@ -147,15 +153,12 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
</object>
</child>
<action-widgets>
+ <action-widget response="0">clear-history</action-widget>
<action-widget response="-6">cancel</action-widget>
<action-widget response="-5">open</action-widget>
- <action-widget response="0">clear-history</action-widget>
</action-widgets>
</object>
</interface>
diff --git a/data/interfaces/parole-settings.ui b/data/interfaces/parole-settings.ui
index 1253ea9..0621bb2 100644
--- a/data/interfaces/parole-settings.ui
+++ b/data/interfaces/parole-settings.ui
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <requires lib="gtk+" version="2.24"/>
- <!-- interface-requires libxfce4ui 4.5 -->
- <!-- interface-naming-policy project-wide -->
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires libxfce4ui 4.11 -->
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-revert-to-saved</property>
+ <property name="icon_name">document-revert</property>
</object>
<object class="GtkListStore" id="liststore1">
<columns>
@@ -23,93 +22,144 @@
<property name="subtitle" translatable="yes">Configure your media player</property>
<signal name="response" handler="parole_conf_dialog_response_cb" swapped="no"/>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
+ <object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="margin_left">1</property>
+ <property name="margin_right">1</property>
+ <property name="margin_top">5</property>
+ <property name="margin_bottom">1</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="close">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
<object class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="border_width">6</property>
+ <property name="margin_left">6</property>
+ <property name="margin_right">6</property>
+ <property name="margin_top">6</property>
<child>
- <object class="GtkAlignment" id="alignment1">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="top_padding">9</property>
- <property name="bottom_padding">6</property>
- <property name="left_padding">6</property>
- <property name="right_padding">6</property>
+ <property name="margin_left">6</property>
+ <property name="margin_right">12</property>
+ <property name="margin_top">9</property>
+ <property name="margin_bottom">12</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">12</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkFrame" id="frame1">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkAlignment" id="alignment7">
+ <object class="GtkBox" id="box7">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <property name="right_padding">12</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="reset-saver-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Disable screensaver when playing movies</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
- <object class="GtkCheckButton" id="reset-saver">
- <property name="label" translatable="yes">Disable screensaver while playing movies</property>
+ <object class="GtkSwitch" id="reset-saver">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="parole_conf_dialog_reset_saver_changed_cb" swapped="no"/>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
</child>
- <child type="label">
- <object class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes"><b>Video</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
+ <child type="label">
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b>Screensaver</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkFrame" id="frame2">
+ <object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkAlignment" id="alignment8">
+ <object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="left_padding">12</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">4</property>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkBox" id="box8">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">4</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkCheckButton" id="enable-vis">
- <property name="label" translatable="yes">Enable visualization when playing audio file</property>
+ <object class="GtkLabel" id="enable-vis-label">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="parole_conf_dialog_enable_vis_changed_cb" swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Show visual effects when an audio file is played</property>
</object>
<packing>
<property name="expand">True</property>
@@ -118,374 +168,493 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkSwitch" id="enable-vis">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Visualization type:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="label" translatable="yes">Visualization type:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="vis-combobox">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="model">liststore1</property>
+ <signal name="changed" handler="parole_conf_dialog_vis_plugin_changed_cb" swapped="no"/>
<child>
- <object class="GtkComboBox" id="vis-combobox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">liststore1</property>
- <signal name="changed" handler="parole_conf_dialog_vis_plugin_changed_cb" swapped="no"/>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext1"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
</child>
</object>
<packing>
<property name="expand">True</property>
- <property name="fill">False</property>
+ <property name="fill">True</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>
</object>
</child>
- <child type="label">
- <object class="GtkLabel" id="label14">
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b>Audio Visualization</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </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="frame3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box9">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><b>Audio</b></property>
- <property name="use_markup">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="multimedia-keys-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Enable keyboard multimedia keys</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="multimedia-keys">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
+ <child type="label">
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b>Keyboard</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">General</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">6</property>
+ <property name="margin_right">12</property>
+ <property name="margin_top">9</property>
+ <property name="margin_bottom">12</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkFrame" id="frame3">
+ <object class="GtkBox" id="box10">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkAlignment" id="alignment9">
+ <object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <property name="right_padding">12</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
<child>
- <object class="GtkCheckButton" id="multimedia-keys">
- <property name="label" translatable="yes">Enable keyboard multimedia keys</property>
+ <object class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Brightness:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Contrast:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Hue:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Saturation:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScale" id="brightness">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="multimedia_keys_toggled_cb" swapped="no"/>
+ <property name="hexpand">True</property>
+ <property name="draw_value">False</property>
+ <signal name="value-changed" handler="brightness_value_changed_cb" swapped="no"/>
</object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScale" id="contrast">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="draw_value">False</property>
+ <signal name="value-changed" handler="contrast_value_changed_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScale" id="hue">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="draw_value">False</property>
+ <signal name="value-changed" handler="hue_value_changed_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScale" id="saturation">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="draw_value">False</property>
+ <signal name="value-changed" handler="saturation_value_changed_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
</object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
- <child type="label">
- <object class="GtkLabel" id="label15">
+ <child>
+ <object class="GtkButtonBox" id="buttonbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><b>Keyboard</b></property>
- <property name="use_markup">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="reset-color">
+ <property name="label" translatable="yes">Reset to defaults</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="image">image2</property>
+ <signal name="clicked" handler="reset_color_clicked_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
</child>
</object>
</child>
+ <child type="label">
+ <object class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b>Color Balance</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
<child type="tab">
- <object class="GtkLabel" id="label1">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_General</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes">Display</property>
</object>
<packing>
+ <property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkAlignment" id="frame-display">
+ <object class="GtkFrame" id="frame5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="top_padding">9</property>
- <property name="bottom_padding">12</property>
- <property name="left_padding">12</property>
- <property name="right_padding">12</property>
+ <property name="margin_left">6</property>
+ <property name="margin_right">12</property>
+ <property name="margin_top">9</property>
+ <property name="margin_bottom">12</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkVBox" id="vbox7">
+ <object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkTable" id="table1">
+ <object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">6</property>
<property name="row_spacing">3</property>
+ <property name="column_spacing">12</property>
<child>
- <object class="GtkLabel" id="label10">
+ <object class="GtkLabel" id="replace-playlist-label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Brightness:</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Always replace playlist with opened files</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label11">
+ <object class="GtkLabel" id="remove-duplicated-label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Contrast:</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Check and remove duplicate media entries</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label12">
+ <object class="GtkLabel" id="start-playing-opened-label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Hue:</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Start playing opened files</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label13">
+ <object class="GtkLabel" id="remember-playlist-label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Saturation:</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Remember playlist</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkHScale" id="brightness">
+ <object class="GtkSwitch" id="replace-playlist">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <signal name="value-changed" handler="brightness_value_changed_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkHScale" id="contrast">
+ <object class="GtkSwitch" id="remove-duplicated">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <signal name="value-changed" handler="contrast_value_changed_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkHScale" id="hue">
+ <object class="GtkSwitch" id="start-playing-opened">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <signal name="value-changed" handler="hue_value_changed_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkHScale" id="saturation">
+ <object class="GtkSwitch" id="remember-playlist">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <signal name="value-changed" handler="saturation_value_changed_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="reset-color">
- <property name="label" translatable="yes">Reset to defaults</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image2</property>
- <signal name="clicked" handler="reset_color_clicked_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
</child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Display</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">9</property>
- <property name="bottom_padding">12</property>
- <property name="left_padding">12</property>
- <property name="right_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox8">
+ <child type="label">
+ <object class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkCheckButton" id="replace-playlist">
- <property name="label" translatable="yes">Always replace playlist with opened files</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="replace_playlist_toggled_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="remove-duplicated">
- <property name="label" translatable="yes">Check and remove duplicate media entries</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="remove_duplicated_toggled_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="start-playing-opened">
- <property name="label" translatable="yes">Start playing opened files</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="start_playing_opened_toggled_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="remember-playlist">
- <property name="label" translatable="yes">Remember playlist</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="remember_playlist_toggled_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
+ <property name="label" translatable="yes"><b>Playlist Settings</b></property>
+ <property name="use_markup">True</property>
</object>
</child>
</object>
@@ -497,8 +666,7 @@
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Playlist</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes">Playlist</property>
</object>
<packing>
<property name="position">2</property>
@@ -506,101 +674,150 @@
</packing>
</child>
<child>
- <object class="GtkAlignment" id="alignment6">
+ <object class="GtkFrame" id="frame6">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="top_padding">9</property>
- <property name="bottom_padding">12</property>
- <property name="left_padding">12</property>
- <property name="right_padding">12</property>
+ <property name="margin_left">6</property>
+ <property name="margin_right">12</property>
+ <property name="margin_top">9</property>
+ <property name="margin_bottom">12</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkVBox" id="vbox6">
+ <object class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <object class="GtkCheckButton" id="enable-subtitle">
- <property name="label" translatable="yes">Automatically show subtitles when playing movie file</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="parole_conf_dialog_enable_subtitle_changed_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="margin_left">12</property>
<child>
- <object class="GtkTable" id="table2">
+ <object class="GtkBox" id="box6">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">6</property>
- <property name="row_spacing">2</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">4</property>
<child>
- <object class="GtkLabel" id="label16">
+ <object class="GtkBox" id="box5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Font:</property>
- </object>
- <packing>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label17">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Encoding:</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkFontButton" id="fontbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="font_name">Sans Bold 20</property>
- <signal name="font-set" handler="parole_conf_dialog_font_set_cb" swapped="no"/>
+ <property name="margin_bottom">6</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="enable-subtitle-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Automatically show subtitles when playing movie file</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="enable-subtitle">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkComboBox" id="encoding">
+ <object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <signal name="changed" handler="parole_conf_dialog_subtitle_encoding_changed_cb" swapped="no"/>
+ <property name="row_spacing">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Font:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Encoding:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFontButton" id="fontbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="hexpand">True</property>
+ <property name="font"/>
+ <property name="preview_text"/>
+ <property name="show_preview_entry">False</property>
+ <property name="font_name">Sans Bold 20</property>
+ <property name="use_font">True</property>
+ <signal name="font-set" handler="parole_conf_dialog_font_set_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="encoding">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <signal name="changed" handler="parole_conf_dialog_subtitle_encoding_changed_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="expand">False</property>
+ <property name="fill">True</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>
</object>
</child>
+ <child type="label">
+ <object class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b>Subtitle Settings</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
</object>
<packing>
<property name="position">3</property>
@@ -610,8 +827,7 @@
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Subtitles</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes">Subtitles</property>
</object>
<packing>
<property name="position">3</property>
@@ -622,34 +838,6 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="close">
- <property name="label">gtk-close</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui
index c77dd9a..bb4964b 100644
--- a/data/interfaces/parole.ui
+++ b/data/interfaces/parole.ui
@@ -1,75 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <requires lib="gtk+" version="2.24"/>
- <!-- interface-naming-policy project-wide -->
- <object class="GtkImage" id="image1">
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkImage" id="image_about">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">gtk-about-symbolic</property>
+ <property name="use_fallback">True</property>
+ </object>
+ <object class="GtkImage" id="image_disc">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">media-optical-symbolic</property>
+ <property name="use_fallback">True</property>
+ </object>
+ <object class="GtkImage" id="image_help_reportbug">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">face-sick-symbolic</property>
+ <property name="use_fallback">True</property>
+ </object>
+ <object class="GtkImage" id="image_media_fullscreen">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">24</property>
+ <property name="icon_name">view-fullscreen-symbolic</property>
+ <property name="use_fallback">True</property>
+ </object>
+ <object class="GtkImage" id="image_media_next">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">24</property>
+ <property name="icon_name">media-skip-forward-symbolic</property>
+ <property name="use_fallback">True</property>
+ </object>
+ <object class="GtkImage" id="image_media_playpause">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">24</property>
+ <property name="icon_name">media-playback-start-symbolic</property>
+ <property name="use_fallback">True</property>
+ </object>
+ <object class="GtkImage" id="image_media_previous">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="icon_name">parole-extension</property>
+ <property name="pixel_size">24</property>
+ <property name="icon_name">media-skip-backward-symbolic</property>
+ <property name="use_fallback">True</property>
</object>
- <object class="GtkImage" id="image_cd_rom">
+ <object class="GtkImage" id="image_menu_fullscreen">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="icon_name">media-optical</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">view-fullscreen-symbolic</property>
+ <property name="use_fallback">True</property>
</object>
- <object class="GtkImage" id="image_fullscreen">
+ <object class="GtkImage" id="image_open">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-fullscreen</property>
- <property name="icon-size">3</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">document-open-symbolic</property>
+ <property name="use_fallback">True</property>
</object>
- <object class="GtkImage" id="image_network">
+ <object class="GtkImage" id="image_open_location">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-network</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">folder-remote-symbolic</property>
+ <property name="use_fallback">True</property>
+ <property name="icon-size">1</property>
</object>
- <object class="GtkImage" id="image_play_next">
+ <object class="GtkImage" id="image_plugins">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-media-next</property>
- <property name="icon-size">3</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">parole-extension-symbolic</property>
+ <property name="use_fallback">True</property>
</object>
- <object class="GtkImage" id="image_play_pause">
+ <object class="GtkImage" id="image_preferences">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-media-play</property>
- <property name="icon-size">3</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">document-properties-symbolic</property>
+ <property name="use_fallback">True</property>
</object>
- <object class="GtkImage" id="image_play_prev">
+ <object class="GtkImage" id="image_quit">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-media-previous</property>
- <property name="icon-size">3</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">system-shutdown-symbolic</property>
+ <property name="use_fallback">True</property>
+ </object>
+ <object class="GtkImage" id="image_saveplaylist">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">document-save-as-symbolic</property>
+ <property name="use_fallback">True</property>
+ </object>
+ <object class="GtkImage" id="image_toggleplaylist">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">24</property>
+ <property name="icon_name">view-list-symbolic</property>
+ <property name="use_fallback">True</property>
</object>
<object class="GtkImage" id="image_volume_down">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="icon_name">audio-volume-low</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">audio-volume-low-symbolic</property>
+ <property name="use_fallback">True</property>
</object>
<object class="GtkImage" id="image_volume_mute">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="icon_name">audio-volume-muted</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">audio-volume-muted-symbolic</property>
+ <property name="use_fallback">True</property>
</object>
<object class="GtkImage" id="image_volume_up">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="icon_name">audio-volume-high</property>
- </object>
- <object class="GtkListStore" id="liststore_audiotrack">
- <columns>
- <!-- column-name track_title -->
- <column type="gchararray"/>
- </columns>
- </object>
- <object class="GtkListStore" id="liststore_subtitles">
- <columns>
- <!-- column-name subtitle_name -->
- <column type="gchararray"/>
- </columns>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">audio-volume-high-symbolic</property>
+ <property name="use_fallback">True</property>
</object>
<object class="GtkWindow" id="main-window">
- <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Parole Media Player</property>
<property name="window_position">center</property>
@@ -79,44 +143,43 @@
<signal name="key-press-event" handler="parole_player_key_press" swapped="no"/>
<signal name="delete-event" handler="parole_player_delete_event_cb" after="yes" swapped="no"/>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<child>
<object class="GtkMenuBar" id="menubar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkMenuItem" id="media-menu-item">
+ <object class="GtkMenuItem" id="media-menu">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Media</property>
<property name="use_underline">True</property>
<child type="submenu">
- <object class="GtkMenu" id="media-menu">
+ <object class="GtkMenu" id="menu1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImageMenuItem" id="menu-add">
- <property name="label">gtk-open</property>
+ <property name="label">_Open…</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="use_stock">True</property>
+ <property name="image">image_open</property>
+ <property name="use_stock">False</property>
<accelerator key="o" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<signal name="activate" handler="parole_player_menu_add_cb" swapped="no"/>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menu-open-location">
- <property name="label" translatable="yes">Open _Location</property>
+ <property name="label" translatable="yes">Open _Location…</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="image">image_network</property>
+ <property name="image">image_open_location</property>
<property name="use_stock">False</property>
<accelerator key="l" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<signal name="activate" handler="parole_player_menu_open_location_cb" swapped="no"/>
@@ -126,8 +189,7 @@
<object class="GtkMenuItem" id="recent_menu">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Open Recent</property>
+ <property name="label" translatable="yes">Open _Recent</property>
<property name="use_underline">True</property>
</object>
</child>
@@ -138,30 +200,45 @@
</object>
</child>
<child>
+ <object class="GtkImageMenuItem" id="menu-save-playlist">
+ <property name="label" translatable="yes">_Save Playlist…</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="image">image_saveplaylist</property>
+ <property name="use_stock">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="menuitem4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
<object class="GtkImageMenuItem" id="menu-open-disc">
- <property name="label" translatable="yes">Insert Disc</property>
+ <property name="label">Insert Disk</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image_cd_rom</property>
+ <property name="image">image_disc</property>
<property name="use_stock">False</property>
</object>
</child>
<child>
- <object class="GtkSeparatorMenuItem" id="separatormenuitem4">
+ <object class="GtkSeparatorMenuItem" id="separatormenuitem2">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menu-exit">
- <property name="label">gtk-quit</property>
+ <property name="label">_Quit</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="use_stock">True</property>
+ <property name="image">image_quit</property>
+ <property name="use_stock">False</property>
<accelerator key="q" signal="activate" modifiers="GDK_CONTROL_MASK"/>
<signal name="activate" handler="parole_player_menu_exit_cb" swapped="no"/>
</object>
@@ -171,61 +248,207 @@
</object>
</child>
<child>
- <object class="GtkMenuItem" id="edit-menu">
+ <object class="GtkMenuItem" id="playback-menu">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">_Edit</property>
+ <property name="label" translatable="yes">_Playback</property>
<property name="use_underline">True</property>
<child type="submenu">
- <object class="GtkMenu" id="menu4">
+ <object class="GtkMenu" id="menu2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkCheckMenuItem" id="repeat">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Repeat</property>
<property name="use_underline">True</property>
- <signal name="toggled" handler="parole_player_repeat_toggled_cb" swapped="no"/>
</object>
</child>
<child>
<object class="GtkCheckMenuItem" id="shuffle">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Shuffle</property>
<property name="use_underline">True</property>
- <signal name="toggled" handler="parole_player_shuffle_toggled_cb" swapped="no"/>
</object>
</child>
<child>
- <object class="GtkSeparatorMenuItem" id="separatormenuitem2">
+ <object class="GtkSeparatorMenuItem" id="separatormenuitem3">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
- <object class="GtkImageMenuItem" id="plugins-menu-item">
- <property name="label" translatable="yes">Plugins</property>
+ <object class="GtkCheckMenuItem" id="show-hide-list">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <accelerator key="F9" signal="activate"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="dvd-menu">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">_DVD</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="menu8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuItem" id="dvd_dvd-menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_DVD Menu</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="parole_player_dvd_menu_activated" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="dvd_title-menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Title Menu</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="parole_player_dvd_title_activated" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="dvd_audio-menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Audio Menu</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="parole_player_dvd_audio_activated" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="dvd_angle-menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">A_ngle Menu</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="parole_player_dvd_angle_activated" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="menuitem5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="dvd_chapters">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Chapters</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="chapters-menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuItem" id="dvd_chapter-menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Chapter Menu</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="parole_player_dvd_chapter_activated" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="separatormenuitem6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkMenuItem" id="audio-menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Audio</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="menu5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuItem" id="menuitem3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Audio Track</property>
+ <property name="use_underline">True</property>
+ <child type="submenu">
+ <object class="GtkMenu" id="languages-menu">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkMenuItem" id="menuitem11">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Empty</property>
+ <property name="use_underline">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparatorMenuItem" id="separatormenuitem9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="volume-up-menu">
+ <property name="label" translatable="yes">Volume _Up</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image1</property>
+ <property name="use_underline">True</property>
+ <property name="image">image_volume_up</property>
<property name="use_stock">False</property>
+ <accelerator key="plus" signal="activate"/>
+ <accelerator key="equal" signal="activate"/>
+ <signal name="activate" handler="parole_player_volume_up" swapped="no"/>
</object>
</child>
<child>
- <object class="GtkImageMenuItem" id="preferences">
- <property name="label">gtk-preferences</property>
+ <object class="GtkImageMenuItem" id="volume-down-menu">
+ <property name="label" translatable="yes">Volume _Down</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="use_stock">True</property>
- <signal name="activate" handler="parole_player_open_preferences_cb" swapped="no"/>
+ <property name="image">image_volume_down</property>
+ <property name="use_stock">False</property>
+ <accelerator key="minus" signal="activate"/>
+ <signal name="activate" handler="parole_player_volume_down" swapped="no"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImageMenuItem" id="volume-mute-menu">
+ <property name="label" translatable="yes">_Mute</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="image">image_volume_mute</property>
+ <property name="use_stock">False</property>
+ <accelerator key="0" signal="activate"/>
+ <signal name="activate" handler="parole_player_volume_mute" swapped="no"/>
</object>
</child>
</object>
@@ -233,30 +456,28 @@
</object>
</child>
<child>
- <object class="GtkMenuItem" id="view-menu">
+ <object class="GtkMenuItem" id="video-menu">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">_View</property>
+ <property name="label" translatable="yes">_Video</property>
<property name="use_underline">True</property>
<child type="submenu">
- <object class="GtkMenu" id="menu2">
+ <object class="GtkMenu" id="menu3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImageMenuItem" id="fullscreen-menu">
- <property name="label">gtk-fullscreen</property>
+ <property name="label">_Fullscreen</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="use_stock">True</property>
+ <property name="image">image_menu_fullscreen</property>
+ <property name="use_stock">False</property>
<accelerator key="F11" signal="activate"/>
- <signal name="activate" handler="parole_player_full_screen_activated_cb" swapped="no"/>
</object>
</child>
<child>
- <object class="GtkSeparatorMenuItem" id="separatormenuitem3">
+ <object class="GtkSeparatorMenuItem" id="separatormenuitem4">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -265,18 +486,16 @@
<object class="GtkMenuItem" id="menuitem1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Aspect Ratio</property>
<property name="use_underline">True</property>
<child type="submenu">
- <object class="GtkMenu" id="menu5">
+ <object class="GtkMenu" id="menu4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkRadioMenuItem" id="ratio_none">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">None</property>
<property name="use_underline">True</property>
<property name="draw_as_radio">True</property>
@@ -287,7 +506,6 @@
<object class="GtkRadioMenuItem" id="ratio_auto">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Auto</property>
<property name="use_underline">True</property>
<property name="draw_as_radio">True</property>
@@ -299,7 +517,6 @@
<object class="GtkRadioMenuItem" id="ratio_square">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Square</property>
<property name="use_underline">True</property>
<property name="draw_as_radio">True</property>
@@ -311,7 +528,6 @@
<object class="GtkRadioMenuItem" id="ratio_4_3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">4:3 (TV)</property>
<property name="use_underline">True</property>
<property name="draw_as_radio">True</property>
@@ -323,7 +539,6 @@
<object class="GtkRadioMenuItem" id="ratio_16_9">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">16:9 (Widescreen)</property>
<property name="use_underline">True</property>
<property name="draw_as_radio">True</property>
@@ -335,7 +550,6 @@
<object class="GtkRadioMenuItem" id="ratio_20_9">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">20:9 (DVB)</property>
<property name="use_underline">True</property>
<property name="draw_as_radio">True</property>
@@ -348,18 +562,16 @@
</object>
</child>
<child>
- <object class="GtkSeparatorMenuItem" id="menuitem3">
+ <object class="GtkSeparatorMenuItem" id="separatormenuitem5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
</object>
</child>
<child>
- <object class="GtkMenuItem" id="menuitem4">
+ <object class="GtkMenuItem" id="menuitem2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Subtitles</property>
+ <property name="label" translatable="yes">_Subtitles</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="subtitles-menu">
@@ -369,17 +581,15 @@
<object class="GtkRadioMenuItem" id="subtitles-menu-none">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">None</property>
<property name="use_underline">True</property>
<property name="draw_as_radio">True</property>
</object>
</child>
<child>
- <object class="GtkSeparatorMenuItem" id="menuitem7">
+ <object class="GtkSeparatorMenuItem" id="separatormenuitem7">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
</object>
</child>
<child>
@@ -387,127 +597,53 @@
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Select Text Subtitles...</property>
+ <property name="label" translatable="yes">Select Text Subtitles…</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
- <object class="GtkSeparatorMenuItem" id="menuitem9">
+ <object class="GtkSeparatorMenuItem" id="separatormenuitem8">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
</object>
</child>
</object>
</child>
</object>
</child>
- <child>
- <object class="GtkSeparatorMenuItem" id="menuitem5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="show-hide-list">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Show _playlist</property>
- <property name="use_underline">True</property>
- <accelerator key="F9" signal="activate"/>
- <signal name="activate" handler="parole_player_show_hide_playlist" swapped="no"/>
- </object>
- </child>
</object>
</child>
</object>
</child>
<child>
- <object class="GtkMenuItem" id="sound">
+ <object class="GtkMenuItem" id="tools-menu">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">_Audio</property>
+ <property name="label" translatable="yes">_Tools</property>
<property name="use_underline">True</property>
<child type="submenu">
- <object class="GtkMenu" id="menu1">
+ <object class="GtkMenu" id="menu7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkMenuItem" id="menuitem10">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Languages</property>
- <property name="use_underline">True</property>
- <child type="submenu">
- <object class="GtkMenu" id="languages-menu">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuItem" id="menuitem11">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Empty</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkSeparatorMenuItem" id="menuitem12">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- </object>
- </child>
- <child>
- <object class="GtkImageMenuItem" id="volume-up-menu">
- <property name="label" translatable="yes">Volume _Up</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="image">image_volume_up</property>
- <property name="use_stock">False</property>
- <accelerator key="plus" signal="activate"/>
- <accelerator key="equal" signal="activate"/>
- <accelerator key="KP_Add" signal="activate"/>
- <signal name="activate" handler="parole_player_volume_up" swapped="no"/>
- </object>
- </child>
- <child>
- <object class="GtkImageMenuItem" id="volume-down-menu">
- <property name="label" translatable="yes">Volume _Down</property>
+ <object class="GtkImageMenuItem" id="plugins-menu-item">
+ <property name="label" translatable="yes">P_lugins</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="image">image_volume_down</property>
+ <property name="image">image_plugins</property>
<property name="use_stock">False</property>
- <accelerator key="KP_Subtract" signal="activate"/>
- <accelerator key="minus" signal="activate"/>
- <signal name="activate" handler="parole_player_volume_down" swapped="no"/>
</object>
</child>
<child>
- <object class="GtkImageMenuItem" id="volume-mute-menu">
- <property name="label" translatable="yes">_Mute</property>
+ <object class="GtkImageMenuItem" id="preferences">
+ <property name="label">_Preferences</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="image">image_volume_mute</property>
+ <property name="image">image_preferences</property>
<property name="use_stock">False</property>
- <accelerator key="0" signal="activate"/>
- <signal name="activate" handler="parole_player_volume_mute" swapped="no"/>
+ <signal name="activate" handler="parole_player_open_preferences_cb" swapped="no"/>
</object>
</child>
</object>
@@ -518,21 +654,30 @@
<object class="GtkMenuItem" id="help-menu">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">_Help</property>
<property name="use_underline">True</property>
<child type="submenu">
- <object class="GtkMenu" id="menu3">
+ <object class="GtkMenu" id="menu6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
+ <object class="GtkImageMenuItem" id="bug-report">
+ <property name="label" translatable="yes">_Report a Bug…</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="image">image_help_reportbug</property>
+ <property name="use_stock">False</property>
+ </object>
+ </child>
+ <child>
<object class="GtkImageMenuItem" id="about">
- <property name="label">gtk-about</property>
+ <property name="label">_About</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="use_stock">True</property>
+ <property name="image">image_about</property>
+ <property name="use_stock">False</property>
<signal name="activate" handler="parole_show_about" swapped="no"/>
</object>
</child>
@@ -548,165 +693,95 @@
</packing>
</child>
<child>
- <object class="GtkNotebook" id="main-notebook">
+ <object class="GtkPaned" id="hpaned">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="scrollable">True</property>
- <property name="group_id">0</property>
+ <property name="can_focus">False</property>
<child>
- <object class="GtkVBox" id="main-box">
+ <object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">5</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkBox" id="infobar_placeholder">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
- <object class="GtkHPaned" id="hpaned">
+ <object class="GtkEventBox" id="content_area">
+ <property name="width_request">380</property>
+ <property name="height_request">256</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
+ <signal name="button-press-event" handler="parole_player_gst_widget_button_press" swapped="no"/>
+ <signal name="button-release-event" handler="parole_player_gst_widget_button_release" swapped="no"/>
+ <signal name="motion-notify-event" handler="parole_player_gst_widget_motion_notify_event" swapped="no"/>
<child>
- <object class="GtkVBox" id="vbox_player">
+ <object class="GtkBox" id="box4">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
<child>
- <object class="GtkHBox" id="hbox_infobar">
- <property name="visible">True</property>
+ <object class="GtkBox" id="video_output">
<property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkHBox" id="infobar_contents">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Audio Track:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_audiotrack">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">liststore_audiotrack</property>
- <signal name="changed" handler="parole_player_combo_box_audiotrack_changed_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Subtitles:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_subtitles">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">liststore_subtitles</property>
- <signal name="changed" handler="parole_player_combo_box_subtitles_changed_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
+ <placeholder/>
</child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkEventBox" id="eventbox_output">
- <property name="visible">True</property>
+ <object class="GtkBox" id="audio_output">
<property name="can_focus">False</property>
- <signal name="button-press-event" handler="parole_player_gst_widget_button_press" swapped="no"/>
+ <property name="no_show_all">True</property>
+ <property name="spacing">24</property>
+ <property name="homogeneous">True</property>
<child>
- <object class="GtkHBox" id="output">
+ <object class="GtkImage" id="audio_cover">
+ <property name="width_request">256</property>
+ <property name="height_request">256</property>
<property name="visible">True</property>
- <property name="app_paintable">True</property>
<property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
+ <property name="xalign">1</property>
+ <property name="pixel_size">256</property>
+ <property name="icon_name">audio-x-generic-symbolic</property>
+ <property name="use_fallback">True</property>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkEventBox" id="audiobox">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <signal name="button-press-event" handler="parole_player_gst_widget_button_press" swapped="no"/>
<child>
- <object class="GtkHBox" id="hbox_audiobox">
+ <object class="GtkBox" id="box5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">24</property>
- <property name="homogeneous">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkImage" id="audiobox_cover">
+ <object class="GtkLabel" id="audio_title">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="pixel_size">128</property>
- <property name="icon_name">audio-x-generic</property>
+ <property name="xalign">0</property>
+ <property name="yalign">1</property>
+ <property name="label" translatable="yes"><span color='#F4F4F4'><b><big>Unknown Song</big></b></span></property>
+ <property name="use_markup">True</property>
+ <property name="ellipsize">end</property>
</object>
<packing>
<property name="expand">True</property>
@@ -715,380 +790,272 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox3">
+ <object class="GtkLabel" id="audio_album">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="audiobox_title">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">1</property>
- <property name="label" translatable="yes"><span color='#F4F4F4'><b><big>Unknown Song</big></b></span></property>
- <property name="use_markup">True</property>
- <property name="ellipsize">end</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="audiobox_album">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><big><span color='#BBBBBB'><i>on</i></span> <span color='#F4F4F4'>Unknown Album</span></big></property>
- <property name="use_markup">True</property>
- <property name="ellipsize">end</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="audiobox_artist">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes"><big><span color='#BBBBBB'><i>by</i></span> <span color='#F4F4F4'>Unknown Artist</span></big></property>
- <property name="use_markup">True</property>
- <property name="ellipsize">end</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><big><span color='#BBBBBB'><i>on</i></span> <span color='#F4F4F4'>Unknown Album</span></big></property>
+ <property name="use_markup">True</property>
+ <property name="ellipsize">end</property>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="audio_artist">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><big><span color='#BBBBBB'><i>by</i></span> <span color='#F4F4F4'>Unknown Artist</span></big></property>
+ <property name="use_markup">True</property>
+ <property name="ellipsize">end</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="logo">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">image-missing</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="control">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkBox" id="media_controls">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
<child>
- <object class="GtkVBox" id="control">
+ <object class="GtkBox" id="ltrbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkVBox" id="play-box">
+ <object class="GtkButton" id="media_previous">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <object class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="playback_buttons">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkButton" id="back">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Previous</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image_play_prev</property>
- <property name="relief">none</property>
- <property name="focus_on_click">False</property>
- <signal name="clicked" handler="parole_player_back_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="play-pause">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Play</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image_play_pause</property>
- <property name="relief">none</property>
- <property name="focus_on_click">False</property>
- <signal name="clicked" handler="parole_player_play_pause_clicked" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="forward">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Next</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image_play_next</property>
- <property name="relief">none</property>
- <property name="focus_on_click">False</property>
- <signal name="clicked" handler="parole_player_forward_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="playing_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkLabel" id="label_elapsed">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">00:00</property>
- <property name="single_line_mode">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="padding">6</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkHScale" id="scale">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <signal name="button-press-event" handler="parole_player_range_button_press" swapped="no"/>
- <signal name="button-release-event" handler="parole_player_range_button_release" swapped="no"/>
- <signal name="value-changed" handler="parole_player_range_value_changed" swapped="no"/>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_duration">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">00:00</property>
- <property name="single_line_mode">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="padding">6</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkProgressBar" id="progressbar_buffering">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="show_text">True</property>
- <property name="text" translatable="yes">Buffering (0%)</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="extra_controls">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkVolumeButton" id="volume">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="relief">none</property>
- <property name="focus_on_click">False</property>
- <property name="orientation">vertical</property>
- <property name="size">large-toolbar</property>
- <property name="icons">audio-volume-muted
-audio-volume-high
-audio-volume-low
-audio-volume-medium</property>
- <signal name="value-changed" handler="parole_player_volume_value_changed_cb" swapped="no"/>
- <signal name="scroll-event" handler="parole_player_volume_scroll_event_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="go_fs">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="no_show_all">True</property>
- <property name="tooltip_text" translatable="yes">Fullscreen</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image_fullscreen</property>
- <property name="relief">none</property>
- <signal name="clicked" handler="parole_player_full_screen_activated_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="leave_fs">
- <property name="label">gtk-leave-fullscreen</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="no_show_all">True</property>
- <property name="use_action_appearance">False</property>
- <property name="relief">none</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="parole_player_leave_fs_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="show-hide-list-button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="no_show_all">True</property>
- <property name="use_action_appearance">False</property>
- <property name="image">show-hide-list-image</property>
- <property name="relief">none</property>
- <property name="focus_on_click">False</property>
- <signal name="clicked" handler="parole_player_show_hide_playlist" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="receives_default">True</property>
+ <property name="image">image_media_previous</property>
+ <property name="relief">none</property>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkButton" id="media_playpause">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">True</property>
+ <property name="image">image_media_playpause</property>
+ <property name="relief">none</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="media_next">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">True</property>
+ <property name="image">image_media_next</property>
+ <property name="relief">none</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="media_time_elapsed">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">12</property>
+ <property name="label" translatable="yes">0:00</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkProgressBar" id="media_buffering_progressbar">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="margin_left">6</property>
+ <property name="margin_right">6</property>
+ <property name="text" translatable="yes">Buffering (0%)</property>
+ <property name="show_text">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScale" id="media_progress_slider">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="margin_left">6</property>
+ <property name="margin_right">6</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="draw_value">False</property>
+ <signal name="value-changed" handler="parole_player_range_value_changed" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="media_time_duration">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_right">12</property>
+ <property name="label" translatable="yes">0:00</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVolumeButton" id="media_volumebutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="relief">none</property>
+ <property name="focus_on_click">False</property>
+ <property name="orientation">vertical</property>
+ <property name="size">large-toolbar</property>
+ <property name="icons">audio-volume-muted-symbolic
+audio-volume-high-symbolic
+audio-volume-low-symbolic
+audio-volume-medium-symbolic</property>
+ <property name="use_symbolic">True</property>
+ <signal name="value-changed" handler="parole_player_volume_value_changed_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="media_fullscreen">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">True</property>
+ <property name="image">image_media_fullscreen</property>
+ <property name="relief">none</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="media_toggleplaylist">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
+ <property name="image">image_toggleplaylist</property>
+ <property name="relief">none</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">9</property>
</packing>
</child>
</object>
<packing>
- <property name="resize">True</property>
- <property name="shrink">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkNotebook" id="notebook-playlist">
- <property name="can_focus">True</property>
- <property name="no_show_all">True</property>
- <property name="show_border">False</property>
- <property name="scrollable">True</property>
- <property name="enable_popup">True</property>
- </object>
- <packing>
- <property name="resize">False</property>
- <property name="shrink">False</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
+ <packing>
+ <property name="resize">True</property>
+ <property name="shrink">False</property>
+ </packing>
</child>
- <child type="tab">
- <object class="GtkLabel" id="Player">
- <property name="visible">True</property>
+ <child>
+ <object class="GtkNotebook" id="notebook-playlist">
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Media player</property>
+ <property name="no_show_all">True</property>
</object>
<packing>
- <property name="tab_fill">False</property>
+ <property name="resize">False</property>
+ <property name="shrink">False</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child type="tab">
- <placeholder/>
- </child>
</object>
<packing>
<property name="expand">True</property>
@@ -1099,10 +1066,4 @@ audio-volume-medium</property>
</object>
</child>
</object>
- <object class="GtkImage" id="show-hide-list-image">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-go-back</property>
- <property name="icon-size">3</property>
- </object>
</interface>
diff --git a/data/interfaces/playlist.ui b/data/interfaces/playlist.ui
index 957c9fe..18c0716 100644
--- a/data/interfaces/playlist.ui
+++ b/data/interfaces/playlist.ui
@@ -1,122 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <requires lib="gtk+" version="2.24"/>
- <!-- interface-naming-policy project-wide -->
- <object class="GtkMenu" id="dvd-menu">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkMenuItem" id="dvd-menu-menu">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">DVD Menu</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="dvd-menu-title">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Title Menu</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="dvd-menu-audio">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Audio Menu</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="dvd-menu-angle">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Angle Menu</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkMenuItem" id="dvd-menu-chapter">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Chapter Menu</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- </object>
- <object class="GtkImage" id="image_add">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-add</property>
- <property name="icon-size">3</property>
- </object>
- <object class="GtkImage" id="image_clear">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-clear</property>
- <property name="icon-size">3</property>
- </object>
- <object class="GtkImage" id="image_remove">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-remove</property>
- <property name="icon-size">3</property>
- </object>
- <object class="GtkImage" id="image_repeat">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixel_size">24</property>
- <property name="icon_name">media-playlist-repeat</property>
- </object>
- <object class="GtkImage" id="image_settings">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-properties</property>
- <property name="icon-size">3</property>
- </object>
- <object class="GtkImage" id="image_shuffle">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pixel_size">24</property>
- <property name="icon_name">media-playlist-shuffle</property>
- </object>
- <object class="GtkVBox" id="playlist-box">
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkBox" id="playlist-box">
<property name="width_request">220</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<child>
<object class="GtkNotebook" id="playlist_notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tab_pos">bottom</property>
<property name="show_tabs">False</property>
- <property name="show_border">False</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">automatic</property>
<property name="window_placement_set">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="media-list">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="headers_visible">False</property>
<property name="rules_hint">True</property>
<signal name="drag-data-received" handler="parole_media_list_drag_data_received_cb" swapped="no"/>
- <signal name="key-press-event" handler="parole_media_list_key_press" swapped="no"/>
<signal name="row-activated" handler="parole_media_list_row_activated_cb" swapped="no"/>
<signal name="button-release-event" handler="parole_media_list_button_release_event" swapped="no"/>
+ <signal name="key-press-event" handler="parole_media_list_key_press" swapped="no"/>
<signal name="query-tooltip" handler="parole_media_list_query_tooltip" swapped="no"/>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
</object>
</child>
</object>
@@ -132,91 +47,20 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkToggleButton" id="dvd_menu_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <child>
- <object class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkImage" id="image_disc">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon_name">drive-optical</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="dvd_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">DVD Name</property>
- <property name="ellipsize">end</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkArrow" id="arrow1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="arrow_type">down</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow2">
+ <object class="GtkTreeView" id="disc-list">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="window_placement_set">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="disc-list">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">True</property>
- <signal name="row-activated" handler="parole_media_list_row_activated_cb" swapped="no"/>
- </object>
+ <property name="rules_hint">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection2"/>
</child>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
<packing>
@@ -242,133 +86,124 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="n_items">
+ <object class="GtkToolbar" id="playlist_controls">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Playlist empty</property>
- <property name="ellipsize">end</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="playlist_controls">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">2</property>
- <property name="homogeneous">True</property>
+ <property name="show_arrow">False</property>
+ <property name="icon_size">1</property>
+ <style>
+ <class name="inline-toolbar"/>
+ </style>
<child>
- <object class="GtkButton" id="add-media">
+ <object class="GtkToolButton" id="add-media">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Add…</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image_add</property>
- <property name="focus_on_click">False</property>
+ <property name="tooltip_text" translatable="yes">Add to playlist…</property>
+ <property name="label" translatable="yes">Add</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">list-add-symbolic</property>
<signal name="clicked" handler="parole_media_list_add_clicked_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="remove-media">
+ <object class="GtkToolButton" id="remove-media">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Remove</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image_remove</property>
- <property name="focus_on_click">False</property>
+ <property name="tooltip_text" translatable="yes">Remove selected media</property>
+ <property name="label" translatable="yes">Remove</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">list-remove-symbolic</property>
<signal name="clicked" handler="parole_media_list_remove_clicked_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="clear-media">
+ <object class="GtkToolButton" id="clear-media">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Clear</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image_clear</property>
- <property name="focus_on_click">False</property>
+ <property name="tooltip_text" translatable="yes">Clear playlist</property>
+ <property name="label" translatable="yes">Clear</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">list-remove-all-symbolic</property>
<signal name="clicked" handler="parole_media_list_clear_clicked_cb" swapped="no"/>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkToggleButton" id="repeat-media">
+ <object class="GtkToggleToolButton" id="repeat-media">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Repeat</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image_repeat</property>
- <property name="focus_on_click">False</property>
- <signal name="toggled" handler="parole_media_list_repeat_toggled_cb" swapped="no"/>
+ <property name="label" translatable="yes">Repeat</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">media-playlist-repeat-symbolic</property>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">3</property>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkToggleButton" id="shuffle-media">
+ <object class="GtkToggleToolButton" id="shuffle-media">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Shuffle</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image_shuffle</property>
- <property name="focus_on_click">False</property>
- <signal name="toggled" handler="parole_media_list_shuffle_toggled_cb" swapped="no"/>
+ <property name="label" translatable="yes">Shuffle</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">media-playlist-shuffle-symbolic</property>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">4</property>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkToggleButton" id="settings">
+ <object class="GtkToolButton" id="move-media-up">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Playlist options</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image_settings</property>
- <property name="focus_on_click">False</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Move Up</property>
+ <property name="label" translatable="yes">Move Up</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">go-up-symbolic</property>
+ <signal name="clicked" handler="parole_media_list_move_up_clicked_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolButton" id="move-media-down">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Move Down</property>
+ <property name="label" translatable="yes">Move Down</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">go-down-symbolic</property>
+ <signal name="clicked" handler="parole_media_list_move_down_clicked_cb" swapped="no"/>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">5</property>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="padding">2</property>
- <property name="position">2</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
@@ -376,35 +211,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkCheckMenuItem" id="menu-repeat">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Repeat</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkCheckMenuItem" id="menu-shuffle">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="label" translatable="yes">Shuffle</property>
- <property name="use_underline">True</property>
- </object>
- </child>
- <child>
- <object class="GtkSeparatorMenuItem" id="menuitem1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- </object>
- </child>
- <child>
<object class="GtkCheckMenuItem" id="menu-replace">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Replace playlist when opening files</property>
<property name="use_underline">True</property>
</object>
@@ -413,7 +222,6 @@
<object class="GtkCheckMenuItem" id="menu-play-opened">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Play opened files</property>
<property name="use_underline">True</property>
</object>
@@ -422,7 +230,6 @@
<object class="GtkCheckMenuItem" id="menu-remember">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Remember playlist</property>
<property name="use_underline">True</property>
</object>
@@ -431,14 +238,12 @@
<object class="GtkSeparatorMenuItem" id="menuitem2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="menu-clear">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="label" translatable="yes">Clear</property>
<property name="use_underline">True</property>
</object>
diff --git a/data/interfaces/plugins.ui b/data/interfaces/plugins.ui
index e900d09..7aaf5db 100644
--- a/data/interfaces/plugins.ui
+++ b/data/interfaces/plugins.ui
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <requires lib="gtk+" version="2.24"/>
+ <!-- interface-requires gtk+ 3.0 -->
<!-- interface-requires libxfce4ui 4.5 -->
- <!-- interface-naming-policy project-wide -->
<object class="XfceTitledDialog" id="dialog">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Parole Plugins</property>
@@ -16,12 +15,12 @@
<property name="subtitle" translatable="yes">Extend your media player</property>
<signal name="response" handler="parole_plugins_manager_pref_response_cb" swapped="no"/>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
+ <object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
+ <object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
@@ -33,12 +32,11 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -51,55 +49,48 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="border_width">5</property>
<property name="spacing">10</property>
<child>
- <object class="GtkViewport" id="viewport1">
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="resize_mode">queue</property>
- <property name="shadow_type">none</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <object class="GtkTreeView" id="treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">automatic</property>
+ <property name="model">liststore</property>
+ <property name="headers_clickable">False</property>
+ <property name="search_column">0</property>
+ <signal name="cursor-changed" handler="parole_plugins_manager_tree_cursor_changed_cb" swapped="no"/>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
<child>
- <object class="GtkTreeView" id="treeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="model">liststore</property>
- <property name="headers_clickable">False</property>
- <property name="search_column">0</property>
- <signal name="cursor-changed" handler="parole_plugins_manager_tree_cursor_changed_cb" swapped="no"/>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn1">
<child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn1">
- <property name="resizable">True</property>
- <property name="title" translatable="yes">Enabled</property>
- <property name="clickable">True</property>
- <child>
- <object class="GtkCellRendererToggle" id="cellrenderertoggle">
- <signal name="toggled" handler="parole_plugins_manager_cell_toggled_cb" swapped="no"/>
- </object>
- <attributes>
- <attribute name="active">0</attribute>
- </attributes>
- </child>
+ <object class="GtkCellRendererToggle" id="cellrenderertoggle">
+ <signal name="toggled" handler="parole_plugins_manager_cell_toggled_cb" swapped="no"/>
</object>
+ <attributes>
+ <attribute name="active">0</attribute>
+ </attributes>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn2">
+ <property name="title" translatable="yes">Plugin</property>
<child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn2">
- <property name="title" translatable="yes">Plugin</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext1"/>
- <attributes>
- <attribute name="text">1</attribute>
- </attributes>
- </child>
- </object>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
</child>
</object>
</child>
@@ -113,115 +104,103 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">10</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">12</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkFrame" id="frame1">
+ <object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkLabel" id="description">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="wrap">True</property>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label1">
+ <object class="GtkLabel" id="description">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><b>Description</b></property>
- <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="wrap">True</property>
</object>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b>Description</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkFrame" id="frame2">
+ <object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="left_padding">12</property>
<child>
- <object class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkLabel" id="author">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="wrap">True</property>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label2">
+ <object class="GtkLabel" id="author">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes"><b>Author</b></property>
- <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="wrap">True</property>
</object>
</child>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
- <child>
- <object class="GtkLinkButton" id="sitebutton">
- <property name="label" translatable="yes">Visit Website</property>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="use_action_appearance">False</property>
- <property name="relief">none</property>
- <property name="uri">http://goodies.xfce.org</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b>Author</b></property>
+ <property name="use_markup">True</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
</child>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkHButtonBox" id="hbuttonbox1">
+ <object class="GtkLinkButton" id="sitebutton">
+ <property name="label" translatable="yes">Visit Website</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="relief">none</property>
+ <property name="uri">http://goodies.xfce.org</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButtonBox" id="buttonbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
@@ -231,7 +210,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="parole_plugins_manager_show_configure" swapped="no"/>
</object>
@@ -245,7 +223,8 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="pack_type">end</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
diff --git a/data/interfaces/save-playlist.ui b/data/interfaces/save-playlist.ui
index 68bb6b8..cd8338b 100644
--- a/data/interfaces/save-playlist.ui
+++ b/data/interfaces/save-playlist.ui
@@ -1,53 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <requires lib="gtk+" version="2.24"/>
- <!-- interface-naming-policy project-wide -->
+ <!-- interface-requires gtk+ 3.0 -->
<object class="GtkFileChooserDialog" id="filechooserdialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
+ <property name="title" translatable="yes">Save Playlist as…</property>
+ <property name="icon_name">parole</property>
+ <property name="role">GtkFileChooserDialog</property>
<property name="window_position">center-on-parent</property>
- <property name="type_hint">normal</property>
+ <property name="type_hint">dialog</property>
<property name="action">save</property>
<property name="do_overwrite_confirmation">True</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
+ <object class="GtkBox" id="filechooserdialog-vbox1">
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
+ <object class="GtkButtonBox" id="filechooserdialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="button2">
+ <object class="GtkButton" id="button1">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
+ <property name="receives_default">False</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="parole_media_list_close_save_dialog_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="button1">
+ <object class="GtkButton" id="button2">
<property name="label">gtk-save</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
- <signal name="clicked" handler="parole_media_list_save_playlist_cb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
@@ -68,10 +67,17 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="model">liststore</property>
+ <property name="rules_hint">True</property>
+ <property name="enable_search">False</property>
+ <property name="enable_grid_lines">vertical</property>
+ <property name="enable_tree_lines">True</property>
<signal name="cursor-changed" handler="parole_media_list_format_cursor_changed_cb" swapped="no"/>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
- <property name="title">File Type</property>
+ <property name="title" translatable="yes">File Type</property>
<property name="expand">True</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext1"/>
@@ -83,7 +89,7 @@
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
- <property name="title">Extension</property>
+ <property name="title" translatable="yes">Extension</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext2"/>
<attributes>
@@ -104,15 +110,15 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<action-widgets>
- <action-widget response="0">button2</action-widget>
- <action-widget response="0">button1</action-widget>
+ <action-widget response="-6">button1</action-widget>
+ <action-widget response="-3">button2</action-widget>
</action-widgets>
</object>
<object class="GtkListStore" id="liststore">
@@ -127,7 +133,7 @@
<data>
<row>
<col id="0" translatable="yes">By Extension</col>
- <col id="1" translatable="yes"></col>
+ <col id="1"> </col>
<col id="2">0</col>
</row>
</data>
diff --git a/data/pixmaps/parole.png b/data/pixmaps/parole.png
index bc7c2d4..b6fb8cc 100644
Binary files a/data/pixmaps/parole.png and b/data/pixmaps/parole.png differ
diff --git a/docs/plugin-api/tmpl/Parole-Plugins-unused.sgml b/docs/plugin-api/tmpl/Parole-Plugins-unused.sgml
index fa8070d..66c12b5 100644
--- a/docs/plugin-api/tmpl/Parole-Plugins-unused.sgml
+++ b/docs/plugin-api/tmpl/Parole-Plugins-unused.sgml
@@ -197,6 +197,22 @@ static void sample_provider_finalize (GObject *object)
@file:
@Returns:
+<!-- ##### FUNCTION parole_provider_player_get_main_window ##### -->
+<para>
+
+</para>
+
+ at player:
+ at Returns:
+
+<!-- ##### FUNCTION parole_provider_player_get_stream ##### -->
+<para>
+
+</para>
+
+ at player:
+ at Returns:
+
<!-- ##### FUNCTION parole_stream_init_properties ##### -->
<para>
diff --git a/docs/plugin-api/tmpl/parole-provider-player.sgml b/docs/plugin-api/tmpl/parole-provider-player.sgml
index 88cf7eb..c9706e5 100644
--- a/docs/plugin-api/tmpl/parole-provider-player.sgml
+++ b/docs/plugin-api/tmpl/parole-provider-player.sgml
@@ -70,15 +70,6 @@ playback status.
@PAROLE_STATE_PAUSED:
@PAROLE_STATE_PLAYING:
-<!-- ##### FUNCTION parole_provider_player_get_main_window ##### -->
-<para>
-
-</para>
-
- at player:
- at Returns:
-
-
<!-- ##### FUNCTION parole_provider_player_pack ##### -->
<para>
@@ -99,15 +90,6 @@ playback status.
@Returns:
-<!-- ##### FUNCTION parole_provider_player_get_stream ##### -->
-<para>
-
-</para>
-
- at player:
- at Returns:
-
-
<!-- ##### FUNCTION parole_provider_player_play_uri ##### -->
<para>
diff --git a/src/common/parole-common.c b/src/common/parole-common.c
index a405c5a..927aa90 100644
--- a/src/common/parole-common.c
+++ b/src/common/parole-common.c
@@ -37,34 +37,35 @@
static void
parole_dialog_show (GtkWindow *parent,
- GtkMessageType type,
- const gchar *window_title,
- const gchar *title,
- const gchar *msg)
+ GtkMessageType type,
+ const gchar *window_title,
+ const gchar *title,
+ const gchar *msg)
{
GtkWidget *dialog;
dialog = gtk_message_dialog_new_with_markup (parent,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- type,
- GTK_BUTTONS_CLOSE,
- "<span size='larger'><b>%s</b></span>",
- title);
-
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ type,
+ GTK_BUTTONS_CLOSE,
+ "<span size='larger'><b>%s</b></span>",
+ title);
+
gtk_window_set_title (GTK_WINDOW (dialog), window_title);
+ gtk_window_set_icon_name (GTK_WINDOW (dialog), "parole");
gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), "%s", msg);
- g_signal_connect_swapped (dialog,
- "response",
- G_CALLBACK (gtk_widget_destroy),
- dialog);
+ g_signal_connect_swapped (dialog,
+ "response",
+ G_CALLBACK (gtk_widget_destroy),
+ dialog);
gtk_widget_show_all (dialog);
}
-void parole_dialog_info (GtkWindow *parent, const gchar *title, const gchar *msg)
+void parole_dialog_info (GtkWindow *parent, const gchar *title, const gchar *msg)
{
parole_dialog_show (parent, GTK_MESSAGE_INFO, _("Message"), title, msg);
}
@@ -75,21 +76,22 @@ void parole_dialog_error (GtkWindow *parent, const gchar *title, const gchar *ms
}
-void parole_window_busy_cursor (GdkWindow *window)
+void parole_window_busy_cursor (GdkWindow *window)
{
GdkCursor *cursor;
if ( G_UNLIKELY (window == NULL) )
- return;
-
+ return;
+
cursor = gdk_cursor_new (GDK_WATCH);
gdk_window_set_cursor (window, cursor);
- gdk_cursor_unref (cursor);
+
+ g_object_unref (cursor);
gdk_flush ();
}
-void parole_window_invisible_cursor (GdkWindow *window)
+void parole_window_invisible_cursor (GdkWindow *window)
{
GdkCursor *cursor = NULL;
@@ -97,11 +99,6 @@ void parole_window_invisible_cursor (GdkWindow *window)
gdk_window_set_cursor (window, cursor);
- if (cursor) {
-#if GTK_CHECK_VERSION(3, 0, 0)
- g_object_unref (cursor);
-#else
- gdk_cursor_unref (cursor);
-#endif
- }
+ if (cursor)
+ g_object_unref (cursor);
}
diff --git a/src/common/parole-common.h b/src/common/parole-common.h
index fba48af..1adf93f 100644
--- a/src/common/parole-common.h
+++ b/src/common/parole-common.h
@@ -27,17 +27,17 @@
#include <gdk/gdk.h>
-void parole_dialog_info (GtkWindow *parent,
- const gchar *title,
- const gchar *msg);
+void parole_dialog_info (GtkWindow *parent,
+ const gchar *title,
+ const gchar *msg);
-void parole_dialog_error (GtkWindow *parent,
- const gchar *title,
- const gchar *msg);
+void parole_dialog_error (GtkWindow *parent,
+ const gchar *title,
+ const gchar *msg);
-void parole_window_busy_cursor (GdkWindow *window);
+void parole_window_busy_cursor (GdkWindow *window);
-void parole_window_invisible_cursor (GdkWindow *window);
+void parole_window_invisible_cursor (GdkWindow *window);
diff --git a/src/common/parole-rc-utils.c b/src/common/parole-rc-utils.c
index 8797d84..df4e99f 100644
--- a/src/common/parole-rc-utils.c
+++ b/src/common/parole-rc-utils.c
@@ -42,14 +42,14 @@ parole_get_resource_file (const gchar *group, gboolean readonly)
rc = xfce_rc_simple_open (file, readonly);
if (rc)
- xfce_rc_set_group (rc, group);
-
+ xfce_rc_set_group (rc, group);
+
g_free (file);
return rc;
}
-gchar **parole_get_history_full (const gchar *relpath)
+gchar **parole_get_history_full (const gchar *relpath)
{
gchar **lines = NULL;
gchar *history = NULL;
@@ -87,14 +87,14 @@ void parole_insert_line_history_full (const gchar *relpath, const gchar *line)
if ( history )
{
- FILE *f;
- f = fopen (history, "a");
- fprintf (f, "%s\n", line);
- fclose (f);
- g_free (history);
+ FILE *f;
+ f = fopen (history, "a");
+ fprintf (f, "%s\n", line);
+ fclose (f);
+ g_free (history);
}
else
- g_warning ("Unable to open cache file");
+ g_warning ("Unable to open cache file");
}
void parole_clear_history_file (void)
@@ -110,9 +110,9 @@ void parole_clear_history_file_full (const gchar *relpath)
if ( history )
{
- FILE *f;
- f = fopen (history, "w");
- fclose (f);
- g_free (history);
+ FILE *f;
+ f = fopen (history, "w");
+ fclose (f);
+ g_free (history);
}
}
diff --git a/src/common/parole-rc-utils.h b/src/common/parole-rc-utils.h
index 4aaea8a..8dadbda 100644
--- a/src/common/parole-rc-utils.h
+++ b/src/common/parole-rc-utils.h
@@ -25,26 +25,26 @@
#include <libxfce4util/libxfce4util.h>
-#define PAROLE_RESOURCE_FILE "xfce4/src/misc/parole-media-player.rc"
-#define PAROLE_HISTORY_FILE "xfce4/parole/history"
+#define PAROLE_RESOURCE_FILE "xfce4/src/misc/parole-media-player.rc"
+#define PAROLE_HISTORY_FILE "xfce4/parole/history"
-#define PAROLE_RC_GROUP_GENERAL "General"
-#define PAROLE_RC_GROUP_PLUGINS "Plugins"
+#define PAROLE_RC_GROUP_GENERAL "General"
+#define PAROLE_RC_GROUP_PLUGINS "Plugins"
-XfceRc *parole_get_resource_file (const gchar *group,
- gboolean readonly);
+XfceRc *parole_get_resource_file (const gchar *group,
+ gboolean readonly);
-gchar **parole_get_history (void);
+gchar **parole_get_history (void);
-gchar **parole_get_history_full (const gchar *relpath);
+gchar **parole_get_history_full (const gchar *relpath);
-void parole_insert_line_history (const gchar *line);
+void parole_insert_line_history (const gchar *line);
-void parole_insert_line_history_full (const gchar *relpath,
- const gchar *line);
+void parole_insert_line_history_full (const gchar *relpath,
+ const gchar *line);
-void parole_clear_history_file (void);
+void parole_clear_history_file (void);
-void parole_clear_history_file_full (const gchar *relpath);
+void parole_clear_history_file_full (const gchar *relpath);
#endif /* __RC_UTILS_ */
diff --git a/src/common/parole-screensaver.c b/src/common/parole-screensaver.c
index 6c291c8..9cc58f6 100644
--- a/src/common/parole-screensaver.c
+++ b/src/common/parole-screensaver.c
@@ -36,7 +36,7 @@
#include "parole-screensaver.h"
-#define RESET_SCREENSAVER_TIMEOUT 6
+#define RESET_SCREENSAVER_TIMEOUT 6
#define PAROLE_SCREEN_SAVER_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), PAROLE_TYPE_SCREENSAVER, ParoleScreenSaverPrivate))
@@ -80,7 +80,7 @@ void parole_screen_saver_inhibit (ParoleScreenSaver *saver, GtkWindow *window)
g_return_if_fail (PAROLE_IS_SCREENSAVER (saver));
- cmd = g_strdup_printf("xdg-screensaver suspend %lu", GDK_DRAWABLE_XID (gtk_widget_get_window (GTK_WIDGET (window))));
+ cmd = g_strdup_printf("xdg-screensaver suspend %i", (int)GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window))));
returncode = system(cmd);
TRACE("\'xdg-screensaver suspend\' returned %i", returncode);
@@ -95,7 +95,7 @@ void parole_screen_saver_uninhibit (ParoleScreenSaver *saver, GtkWindow *window)
g_return_if_fail (PAROLE_IS_SCREENSAVER (saver));
- cmd = g_strdup_printf("xdg-screensaver resume %lu", GDK_DRAWABLE_XID (gtk_widget_get_window (GTK_WIDGET (window))));
+ cmd = g_strdup_printf("xdg-screensaver resume %i", (int)GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window))));
returncode = system(cmd);
TRACE("\'xdg-screensaver resume\' returned %i", returncode);
diff --git a/src/common/parole-screensaver.h b/src/common/parole-screensaver.h
index 54365b9..be12ae1 100644
--- a/src/common/parole-screensaver.h
+++ b/src/common/parole-screensaver.h
@@ -34,22 +34,22 @@ G_BEGIN_DECLS
typedef struct
{
- GObject parent;
+ GObject parent;
} ParoleScreenSaver;
typedef struct
{
- GObjectClass parent_class;
+ GObjectClass parent_class;
} ParoleScreenSaverClass;
-GType parole_screen_saver_get_type (void) G_GNUC_CONST;
-ParoleScreenSaver *parole_screen_saver_new (void);
+GType parole_screen_saver_get_type (void) G_GNUC_CONST;
+ParoleScreenSaver *parole_screen_saver_new (void);
-void parole_screen_saver_inhibit (ParoleScreenSaver *saver, GtkWindow *window);
+void parole_screen_saver_inhibit (ParoleScreenSaver *saver, GtkWindow *window);
-void parole_screen_saver_uninhibit (ParoleScreenSaver *saver, GtkWindow *window);
+void parole_screen_saver_uninhibit (ParoleScreenSaver *saver, GtkWindow *window);
G_END_DECLS
diff --git a/src/dbus/parole-dbus.c b/src/dbus/parole-dbus.c
index adfab1b..124d897 100644
--- a/src/dbus/parole-dbus.c
+++ b/src/dbus/parole-dbus.c
@@ -56,17 +56,17 @@ parole_g_session_bus_get (void)
if ( G_LIKELY (session_bus_connected) )
{
- bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
+ bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
}
else
{
- bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
-
- if ( error )
- {
- g_error ("%s", error->message);
- }
- session_bus_connected = TRUE;
+ bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
+
+ if ( error )
+ {
+ g_error ("%s", error->message);
+ }
+ session_bus_connected = TRUE;
}
return bus;
@@ -81,20 +81,21 @@ parole_get_proxy (const gchar *path, const gchar *iface)
bus = parole_g_session_bus_get ();
proxy = dbus_g_proxy_new_for_name (bus,
- PAROLE_DBUS_NAME,
- path,
- iface);
-
+ PAROLE_DBUS_NAME,
+ path,
+ iface);
+
if ( !proxy )
- g_error ("Unable to create proxy for %s", PAROLE_DBUS_NAME);
-
+ g_error ("Unable to create proxy for %s", PAROLE_DBUS_NAME);
+
g_signal_connect_swapped (proxy, "destroy",
- G_CALLBACK (proxy_destroy_cb), bus);
+ G_CALLBACK (proxy_destroy_cb), bus);
return proxy;
}
-gboolean parole_dbus_name_has_owner (const gchar *name)
+gboolean
+parole_dbus_name_has_owner (const gchar *name)
{
DBusConnection *bus;
DBusError error;
@@ -117,7 +118,7 @@ gboolean parole_dbus_name_has_owner (const gchar *name)
return ret;
}
-gboolean parole_dbus_register_name (const gchar *name)
+gboolean parole_dbus_register_name (const gchar *name)
{
DBusConnection *bus;
DBusError error;
@@ -145,7 +146,7 @@ gboolean parole_dbus_register_name (const gchar *name)
return ret == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER ? TRUE : FALSE;
}
-gboolean parole_dbus_release_name (const gchar *name)
+gboolean parole_dbus_release_name (const gchar *name)
{
DBusConnection *bus;
DBusError error;
diff --git a/src/dbus/parole-dbus.h b/src/dbus/parole-dbus.h
index 4222780..1e6f227 100644
--- a/src/dbus/parole-dbus.h
+++ b/src/dbus/parole-dbus.h
@@ -25,23 +25,23 @@
#include <dbus/dbus-glib.h>
-#define PAROLE_DBUS_NAME "org.Parole.Media.Player"
+#define PAROLE_DBUS_NAME "org.Parole.Media.Player"
-#define PAROLE_DBUS_PATH "/org/Parole/Media/Player"
-#define PAROLE_DBUS_PLAYLIST_PATH "/org/Parole/Media/List"
+#define PAROLE_DBUS_PATH "/org/Parole/Media/Player"
+#define PAROLE_DBUS_PLAYLIST_PATH "/org/Parole/Media/List"
-#define PAROLE_DBUS_INTERFACE "org.Parole.Media.Player"
-#define PAROLE_DBUS_PLAYLIST_INTERFACE "org.Parole.Media.List"
+#define PAROLE_DBUS_INTERFACE "org.Parole.Media.Player"
+#define PAROLE_DBUS_PLAYLIST_INTERFACE "org.Parole.Media.List"
-DBusGConnection *parole_g_session_bus_get (void);
+DBusGConnection *parole_g_session_bus_get (void);
-DBusGProxy *parole_get_proxy (const gchar *path,
- const gchar *iface);
+DBusGProxy *parole_get_proxy (const gchar *path,
+ const gchar *iface);
-gboolean parole_dbus_name_has_owner (const gchar *name);
+gboolean parole_dbus_name_has_owner (const gchar *name);
-gboolean parole_dbus_register_name (const gchar *name);
+gboolean parole_dbus_register_name (const gchar *name);
-gboolean parole_dbus_release_name (const gchar *name);
+gboolean parole_dbus_release_name (const gchar *name);
#endif /* __PAROLE_DBUS_ */
diff --git a/src/gst/parole-gst.c b/src/gst/parole-gst.c
index f828448..878deff 100644
--- a/src/gst/parole-gst.c
+++ b/src/gst/parole-gst.c
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <math.h>
#include <glib.h>
@@ -49,7 +50,6 @@
#include <gst/tag/tag.h>
#include <libxfce4util/libxfce4util.h>
-#include <libxfce4ui/libxfce4ui.h>
#include <gdk/gdkx.h>
@@ -65,18 +65,20 @@
#define PAROLE_GST_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), PAROLE_TYPE_GST, ParoleGstPrivate))
-static void parole_gst_play_file_internal (ParoleGst *gst);
+static void parole_gst_play_file_internal (ParoleGst *gst);
-static void parole_gst_change_state (ParoleGst *gst,
- GstState new);
+static void parole_gst_change_state (ParoleGst *gst,
+ GstState new);
-static void parole_gst_terminate_internal (ParoleGst *gst);
-
-static GdkPixbuf * parole_gst_tag_list_get_cover_external (ParoleGst *gst);
+static void parole_gst_terminate_internal (ParoleGst *gst);
+
+static GdkPixbuf *parole_gst_tag_list_get_cover_external (ParoleGst *gst);
-static GdkPixbuf * parole_gst_tag_list_get_cover_embedded (ParoleGst *gst, GstTagList *tag_list);
-
-static GdkPixbuf * parole_gst_tag_list_get_cover (ParoleGst *gst, GstTagList *tag_list);
+static GdkPixbuf *parole_gst_tag_list_get_cover_embedded (ParoleGst *gst,
+ GstTagList *tag_list);
+
+static GdkPixbuf *parole_gst_tag_list_get_cover (ParoleGst *gst,
+ GstTagList *tag_list);
typedef enum
{
@@ -93,62 +95,51 @@ typedef enum
} GstPlayFlags;
-enum
-{
- GST_DVD_ROOT_MENU,
- GST_DVD_TITLE_MENU,
- GST_DVD_AUDIO_MENU,
- GST_DVD_ANGLE_MENU,
- GST_DVD_CHAPTER_MENU
-};
-
struct ParoleGstPrivate
{
- GstElement *playbin;
- GstElement *video_sink;
- GstElement *audio_sink;
+ GstElement *playbin;
+ GstElement *video_sink;
+ GstElement *audio_sink;
- GstBus *bus;
-
- GMutex lock;
- GstState state;
- GstState target;
- ParoleState media_state;
+ GstBus *bus;
- ParoleStream *stream;
- gulong tick_id;
- GdkPixbuf *logo;
- gchar *device;
- GTimer *hidecursor_timer;
+ GMutex lock;
+ GstState state;
+ GstState target;
+ ParoleState media_state;
- gpointer conf; /* Specific for ParoleMediaPlayer*/
+ ParoleStream *stream;
+ gulong tick_id;
+ GdkPixbuf *logo;
+ gchar *device;
+ GTimer *hidecursor_timer;
- gboolean terminating;
- gboolean enable_tags;
+ gpointer conf; /* Specific for ParoleMediaPlayer*/
- gboolean update_vis;
- gboolean with_vis;
- gboolean vis_loaded;
- gboolean buffering;
- gboolean update_color_balance;
+ gboolean terminating;
+ gboolean enable_tags;
- gdouble volume;
+ gboolean update_vis;
+ gboolean with_vis;
+ gboolean vis_loaded;
+ gboolean buffering;
+ gboolean update_color_balance;
- gboolean use_custom_subtitles;
- gchar* custom_subtitles;
+ gdouble volume;
- ParoleAspectRatio aspect_ratio;
- gulong state_change_id;
+ gboolean use_custom_subtitles;
+ gchar* custom_subtitles;
- gboolean scale_logo;
+ ParoleAspectRatio aspect_ratio;
+ gulong state_change_id;
/*
* xvimage sink has brightness+hue+saturation+contrast.
*/
- gboolean xvimage_sink;
+ gboolean xvimage_sink;
- gulong sig1;
- gulong sig2;
+ gulong sig1;
+ gulong sig2;
};
enum
@@ -187,18 +178,18 @@ parole_gst_finalize (GObject *object)
TRACE ("start");
if ( gst->priv->tick_id != 0)
- g_source_remove (gst->priv->tick_id);
+ g_source_remove (gst->priv->tick_id);
parole_stream_init_properties (gst->priv->stream);
- if ( gst->priv->stream )
- g_object_unref (gst->priv->stream);
+ if ( gst->priv->stream )
+ g_object_unref (gst->priv->stream);
if ( gst->priv->logo )
- g_object_unref (gst->priv->logo);
+ g_object_unref (gst->priv->logo);
if ( gst->priv->device )
- g_free (gst->priv->device);
+ g_free (gst->priv->device);
g_mutex_clear (&gst->priv->lock);
@@ -222,17 +213,22 @@ parole_gst_configure_event_cb (GtkWidget *widget, GdkEventConfigure *ev, ParoleG
static gboolean
parole_gst_parent_expose_event (GtkWidget *w, GdkEventExpose *ev, ParoleGst *gst)
{
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
cairo_t *cr;
- cr = gdk_cairo_create (w->window);
+ gtk_widget_get_allocation(w, allocation);
+
+ cr = gdk_cairo_create ( gtk_widget_get_window(w) );
cairo_set_source_rgb (cr, 0.0f, 0.0f, 0.0f);
- cairo_rectangle (cr, w->allocation.x, w->allocation.y, w->allocation.width, w->allocation.height);
+ cairo_rectangle (cr, allocation->x, allocation->y, allocation->width, allocation->height);
cairo_fill (cr);
cairo_destroy (cr);
+ g_free(allocation);
+
return FALSE;
}
@@ -240,57 +236,57 @@ static void
parole_gst_realize (GtkWidget *widget)
{
ParoleGst *gst;
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
GdkWindowAttr attr;
- GdkColor color;
+ GdkRGBA color;
gint mask;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
gst = PAROLE_GST (widget);
- attr.x = widget->allocation.x;
- attr.y = widget->allocation.y;
- attr.width = widget->allocation.width;
- attr.height = widget->allocation.height;
+ gtk_widget_get_allocation(widget, allocation);
+
+ attr.x = allocation->x;
+ attr.y = allocation->y;
+ attr.width = allocation->width;
+ attr.height = allocation->height;
attr.visual = gtk_widget_get_visual (widget);
- attr.colormap = gtk_widget_get_colormap (widget);
attr.wclass = GDK_INPUT_OUTPUT;
attr.window_type = GDK_WINDOW_CHILD;
attr.event_mask = gtk_widget_get_events (widget) |
- GDK_EXPOSURE_MASK |
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK |
- GDK_POINTER_MOTION_MASK |
- GDK_KEY_PRESS_MASK;
-
- mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
-
- widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
- &attr, mask);
-
- gdk_window_set_user_data (widget->window, widget);
- gdk_color_parse ("black", &color);
- gdk_colormap_alloc_color (gtk_widget_get_colormap (widget), &color,
- TRUE, TRUE);
-
- gdk_window_set_background (widget->window, &color);
- widget->style = gtk_style_attach (widget->style, widget->window);
-
- g_signal_connect (gtk_widget_get_toplevel (widget), "configure_event",
- G_CALLBACK (parole_gst_configure_event_cb), gst);
-
- g_signal_connect (gtk_widget_get_parent (widget), "expose_event",
- G_CALLBACK (parole_gst_parent_expose_event), gst);
-
+ GDK_EXPOSURE_MASK |
+ GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK |
+ GDK_POINTER_MOTION_MASK |
+ GDK_KEY_PRESS_MASK;
+
+ mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
+
+ gtk_widget_set_window(widget, gdk_window_new (gtk_widget_get_parent_window (widget),
+ &attr, mask) );
+
+ gdk_window_set_user_data (gtk_widget_get_window(widget), widget);
+
+ gdk_rgba_parse (&color, "black");
+ gdk_window_set_background_rgba (gtk_widget_get_window(widget), &color);
+
+ g_signal_connect (gtk_widget_get_toplevel (widget), "configure_event",
+ G_CALLBACK (parole_gst_configure_event_cb), gst);
+
+ g_signal_connect (gtk_widget_get_parent(gtk_widget_get_parent (widget)), "draw",
+ G_CALLBACK (parole_gst_parent_expose_event), gst);
+
+ g_free(allocation);
}
static void
parole_gst_show (GtkWidget *widget)
{
- if ( widget->window )
- gdk_window_show (widget->window);
+ if ( gtk_widget_get_window(widget) )
+ gdk_window_show (gtk_widget_get_window(widget));
if ( GTK_WIDGET_CLASS (parole_gst_parent_class)->show )
- GTK_WIDGET_CLASS (parole_gst_parent_class)->show (widget);
+ GTK_WIDGET_CLASS (parole_gst_parent_class)->show (widget);
}
static void
@@ -302,76 +298,79 @@ parole_gst_get_video_output_size (ParoleGst *gst, gint *ret_w, gint *ret_h)
* 2) Playing audio.
* 3) Playing video but we don't have its correct size yet.
*/
- *ret_w = GTK_WIDGET (gst)->allocation.width;
- *ret_h = GTK_WIDGET (gst)->allocation.height;
-
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
+ gtk_widget_get_allocation(GTK_WIDGET(gst), allocation);
+ *ret_w = allocation->width;
+ *ret_h = allocation->height;
+ g_free(allocation);
+
if ( gst->priv->state >= GST_STATE_PAUSED )
{
- gboolean has_video;
- guint video_w, video_h;
- guint video_par_n, video_par_d;
- guint dar_n, dar_d;
- guint disp_par_n, disp_par_d;
-
- g_object_get (G_OBJECT (gst->priv->stream),
- "has-video", &has_video,
- "video-width", &video_w,
- "video-height", &video_h,
- "disp-par-n", &disp_par_n,
- "disp-par-d", &disp_par_d,
- NULL);
-
- if ( has_video )
- {
- if ( video_w != 0 && video_h != 0 )
- {
- switch ( gst->priv->aspect_ratio )
- {
- case PAROLE_ASPECT_RATIO_NONE:
- return;
- case PAROLE_ASPECT_RATIO_AUTO:
- *ret_w = video_w;
- *ret_h = video_h;
- return;
- case PAROLE_ASPECT_RATIO_SQUARE:
- video_par_n = 1;
- video_par_d = 1;
- break;
- case PAROLE_ASPECT_RATIO_16_9:
- video_par_n = 16 * video_h;
- video_par_d = 9 * video_w;
- break;
- case PAROLE_ASPECT_RATIO_4_3:
- video_par_n = 4 * video_h;
- video_par_d = 3 * video_w;
- break;
- case PAROLE_ASPECT_RATIO_DVB:
- video_par_n = 20 * video_h;
- video_par_d = 9 * video_w;
- break;
- default:
- return;
- }
-
- if ( gst_video_calculate_display_ratio (&dar_n, &dar_d,
- video_w, video_h,
- video_par_n, video_par_d,
- disp_par_n, disp_par_d) )
- {
- if (video_w % dar_n == 0)
- {
- *ret_w = video_w;
- *ret_h = (guint) gst_util_uint64_scale (video_w, dar_d, dar_n);
- }
- else
- {
- *ret_w = (guint) gst_util_uint64_scale (video_h, dar_n, dar_d);
- *ret_h = video_h;
- }
- TRACE ("Got best video size %dx%d fraction, %d/%d\n", *ret_w, *ret_h, disp_par_n, disp_par_d);
- }
- }
- }
+ gboolean has_video;
+ guint video_w, video_h;
+ guint video_par_n, video_par_d;
+ guint dar_n, dar_d;
+ guint disp_par_n, disp_par_d;
+
+ g_object_get (G_OBJECT (gst->priv->stream),
+ "has-video", &has_video,
+ "video-width", &video_w,
+ "video-height", &video_h,
+ "disp-par-n", &disp_par_n,
+ "disp-par-d", &disp_par_d,
+ NULL);
+
+ if ( has_video )
+ {
+ if ( video_w != 0 && video_h != 0 )
+ {
+ switch ( gst->priv->aspect_ratio )
+ {
+ case PAROLE_ASPECT_RATIO_NONE:
+ return;
+ case PAROLE_ASPECT_RATIO_AUTO:
+ *ret_w = video_w;
+ *ret_h = video_h;
+ return;
+ case PAROLE_ASPECT_RATIO_SQUARE:
+ video_par_n = 1;
+ video_par_d = 1;
+ break;
+ case PAROLE_ASPECT_RATIO_16_9:
+ video_par_n = 16 * video_h;
+ video_par_d = 9 * video_w;
+ break;
+ case PAROLE_ASPECT_RATIO_4_3:
+ video_par_n = 4 * video_h;
+ video_par_d = 3 * video_w;
+ break;
+ case PAROLE_ASPECT_RATIO_DVB:
+ video_par_n = 20 * video_h;
+ video_par_d = 9 * video_w;
+ break;
+ default:
+ return;
+ }
+
+ if ( gst_video_calculate_display_ratio (&dar_n, &dar_d,
+ video_w, video_h,
+ video_par_n, video_par_d,
+ disp_par_n, disp_par_d) )
+ {
+ if (video_w % dar_n == 0)
+ {
+ *ret_w = video_w;
+ *ret_h = (guint) gst_util_uint64_scale (video_w, dar_d, dar_n);
+ }
+ else
+ {
+ *ret_w = (guint) gst_util_uint64_scale (video_h, dar_n, dar_d);
+ *ret_h = video_h;
+ }
+ TRACE ("Got best video size %dx%d fraction, %d/%d\n", *ret_w, *ret_h, disp_par_n, disp_par_d);
+ }
+ }
+ }
}
}
@@ -380,94 +379,37 @@ parole_gst_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
g_return_if_fail (allocation != NULL);
- widget->allocation = *allocation;
+ gtk_widget_set_allocation(widget, allocation);
- if ( GTK_WIDGET_REALIZED (widget) )
+ if ( gtk_widget_get_realized (widget) )
{
- gint w, h;
- gdouble ratio, width, height;
-
- PAROLE_GST (widget)->priv->scale_logo = TRUE;
-
- w = allocation->width;
- h = allocation->height;
-
- parole_gst_get_video_output_size (PAROLE_GST (widget), &w, &h);
+ gint w, h;
+ gdouble ratio, width, height;
+
+ w = allocation->width;
+ h = allocation->height;
+
+ parole_gst_get_video_output_size (PAROLE_GST (widget), &w, &h);
- width = w;
- height = h;
+ width = w;
+ height = h;
- if ( (gdouble) allocation->width / width > allocation->height / height)
- ratio = (gdouble) allocation->height / height;
- else
- ratio = (gdouble) allocation->width / width;
+ if ( (gdouble) allocation->width / width > allocation->height / height)
+ ratio = (gdouble) allocation->height / height;
+ else
+ ratio = (gdouble) allocation->width / width;
- width *= ratio;
- height *= ratio;
+ width *= ratio;
+ height *= ratio;
- gdk_window_move_resize (widget->window,
+ gdk_window_move_resize (gtk_widget_get_window(widget),
allocation->x + (allocation->width - width)/2,
- allocation->y + (allocation->height - height)/2,
+ allocation->y + (allocation->height - height)/2,
width,
- height);
-
- gtk_widget_queue_draw (widget);
- }
-}
-
-static void
-parole_gst_draw_logo (ParoleGst *gst)
-{
- static GdkPixbuf *pix = NULL;
- GdkRegion *region;
- GdkRectangle rect;
- GtkWidget *widget;
-
- widget = GTK_WIDGET (gst);
-
- if ( !widget->window)
- return;
-
- rect.x = 0;
- rect.y = 0;
-
- rect.width = widget->allocation.width;
- rect.height = widget->allocation.height;
-
- region = gdk_region_rectangle (&rect);
-
- gdk_window_begin_paint_region (widget->window,
- region);
-
- gdk_region_destroy (region);
-
- gdk_window_clear_area (widget->window,
- 0, 0,
- widget->allocation.width,
- widget->allocation.height);
-
- if (gst->priv->scale_logo)
- {
- if (pix)
- g_object_unref (pix);
- pix = gdk_pixbuf_scale_simple (gst->priv->logo,
- widget->allocation.width,
- widget->allocation.height,
- GDK_INTERP_BILINEAR);
- gst->priv->scale_logo = FALSE;
+ height);
+
+ gtk_widget_queue_draw (widget);
}
-
- gdk_draw_pixbuf (GDK_DRAWABLE (widget->window),
- GTK_WIDGET(widget)->style->fg_gc[0],
- pix,
- 0, 0, 0, 0,
- widget->allocation.width,
- widget->allocation.height,
- GDK_RGB_DITHER_NONE,
- 0, 0);
-
-
- gdk_window_end_paint (GTK_WIDGET (gst)->window);
}
static void
@@ -479,32 +421,32 @@ parole_gst_set_video_color_balance (ParoleGst *gst)
gint contrast_value;
gint hue_value;
gint saturation_value;
-
+
if ( !gst->priv->xvimage_sink)
- return;
-
+ return;
+
g_object_get (G_OBJECT (gst->priv->playbin),
- "video-sink", &video_sink,
- NULL);
+ "video-sink", &video_sink,
+ NULL);
if ( !video_sink )
- return;
-
+ return;
+
g_object_get (G_OBJECT (gst->priv->conf),
- "brightness", &brightness_value,
- "contrast", &contrast_value,
- "hue", &hue_value,
- "saturation", &saturation_value,
- NULL);
+ "brightness", &brightness_value,
+ "contrast", &contrast_value,
+ "hue", &hue_value,
+ "saturation", &saturation_value,
+ NULL);
TRACE ("Setting video color balance");
g_object_set (G_OBJECT (video_sink),
- "brightness", brightness_value,
- "contrast", contrast_value,
- "hue", hue_value,
- "saturation", saturation_value,
- NULL);
+ "brightness", brightness_value,
+ "contrast", contrast_value,
+ "hue", hue_value,
+ "saturation", saturation_value,
+ NULL);
g_object_unref (G_OBJECT (video_sink));
@@ -515,96 +457,39 @@ static void
parole_gst_set_video_overlay (ParoleGst *gst)
{
GstElement *video_sink;
+#if GTK_CHECK_VERSION(3,8,0)
+#else
+ gboolean enable_xv;
+#endif
g_object_get (G_OBJECT (gst->priv->playbin),
- "video-sink", &video_sink,
- NULL);
-
+ "video-sink", &video_sink,
+ NULL);
+
g_assert (video_sink != NULL);
- if ( GDK_IS_WINDOW (GTK_WIDGET (gst)->window) )
+ if ( GDK_IS_WINDOW (gtk_widget_get_window(GTK_WIDGET (gst))) )
#if GST_CHECK_VERSION(1, 0, 0)
- gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (video_sink),
- GDK_WINDOW_XWINDOW (GTK_WIDGET (gst)->window));
+ gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (video_sink),
+ GDK_WINDOW_XID ( gtk_widget_get_window(GTK_WIDGET (gst)) ));
#else
- gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (video_sink),
- GDK_WINDOW_XWINDOW (GTK_WIDGET (gst)->window));
+ gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (video_sink),
+ GDK_WINDOW_XID ( gtk_widget_get_window(GTK_WIDGET (gst)) ));
#endif
-
- gst_object_unref (video_sink);
-}
-
-static gboolean
-parole_gst_expose_event (GtkWidget *widget, GdkEventExpose *ev)
-{
- ParoleGst *gst;
-
- gboolean playing_video;
-
- if ( ev && ev->count > 0 )
- return TRUE;
-
- gst = PAROLE_GST (widget);
- g_object_get (G_OBJECT (gst->priv->stream),
- "has-video", &playing_video,
- NULL);
-
- parole_gst_set_video_overlay (gst);
-
- TRACE ("EXPOSE event state=%d target=%d", gst->priv->state, gst->priv->target);
-
- switch ( gst->priv->state )
- {
- case GST_STATE_PLAYING:
- if ( playing_video || gst->priv->vis_loaded)
- {
-#if GST_CHECK_VERSION(1, 0, 0)
- gst_video_overlay_expose (GST_VIDEO_OVERLAY (gst->priv->video_sink));
-#else
- gst_x_overlay_expose (GST_X_OVERLAY (gst->priv->video_sink));
-#endif
- }
- else
- parole_gst_draw_logo (gst);
- break;
- case GST_STATE_PAUSED:
- if ( playing_video || gst->priv->vis_loaded || gst->priv->target == GST_STATE_PLAYING )
-#if GST_CHECK_VERSION(1, 0, 0)
- gst_video_overlay_expose (GST_VIDEO_OVERLAY (gst->priv->video_sink));
+#if GTK_CHECK_VERSION(3,8,0)
#else
- gst_x_overlay_expose (GST_X_OVERLAY (gst->priv->video_sink));
-#endif
- else
- parole_gst_draw_logo (gst);
- break;
- case GST_STATE_READY:
- if (gst->priv->target != GST_STATE_PLAYING)
- parole_gst_draw_logo (gst);
- else
-#if GST_CHECK_VERSION(1, 0, 0)
- gst_video_overlay_expose (GST_VIDEO_OVERLAY (gst->priv->video_sink));
-#else
- gst_x_overlay_expose (GST_X_OVERLAY (gst->priv->video_sink));
-#endif
- break;
- case GST_STATE_NULL:
- case GST_STATE_VOID_PENDING:
- parole_gst_draw_logo (gst);
- break;
+ g_object_get (G_OBJECT (gst->priv->conf),
+ "enable-xv", &enable_xv,
+ NULL);
+ if (enable_xv)
+ {
+ g_object_set(video_sink, "autopaint-colorkey", FALSE,
+ "colorkey", 0x080810, NULL);
}
- return TRUE;
-}
-
-static void
-parole_gst_load_logo (ParoleGst *gst)
-{
- gchar *path;
-
- path = g_strdup_printf ("%s/parole.png", PIXMAPS_DIR);
+#endif
- gst->priv->logo = gdk_pixbuf_new_from_file (path, NULL);
- g_free (path);
+ gst_object_unref (video_sink);
}
static void
@@ -617,17 +502,17 @@ parole_gst_query_capabilities (ParoleGst *gst)
if ( gst_element_query (gst->priv->playbin, query) )
{
-
- gst_query_parse_seeking (query,
- NULL,
- &seekable,
- NULL,
- NULL);
-
- g_object_set (G_OBJECT (gst->priv->stream),
- "seekable", seekable,
- NULL);
-
+
+ gst_query_parse_seeking (query,
+ NULL,
+ &seekable,
+ NULL,
+ NULL);
+
+ g_object_set (G_OBJECT (gst->priv->stream),
+ "seekable", seekable,
+ NULL);
+
}
gst_query_unref (query);
}
@@ -647,10 +532,10 @@ parole_gst_tick_timeout (gpointer data)
gst = PAROLE_GST (data);
g_object_get (G_OBJECT (gst->priv->stream),
- "has-video", &video,
- "seekable", &seekable,
- "duration", &duration,
- NULL);
+ "has-video", &video,
+ "seekable", &seekable,
+ "duration", &duration,
+ NULL);
#if GST_CHECK_VERSION(1, 0, 0)
gst_element_query_position (gst->priv->playbin, format, &pos);
@@ -663,24 +548,26 @@ parole_gst_tick_timeout (gpointer data)
if ( gst->priv->state == GST_STATE_PLAYING )
{
- if (duration != 0 && seekable == FALSE)
- {
- parole_gst_query_capabilities (gst);
- }
-
- value = pos / GST_SECOND;
+ if (duration != 0 && seekable == FALSE)
+ {
+ parole_gst_query_capabilities (gst);
+ }
+
+ value = pos / GST_SECOND;
- if ( G_LIKELY (value > 0) )
- g_signal_emit (G_OBJECT (gst), signals [MEDIA_PROGRESSED], 0, gst->priv->stream, value);
+ if ( G_LIKELY (value > 0) )
+ {
+ g_signal_emit (G_OBJECT (gst), signals [MEDIA_PROGRESSED], 0, gst->priv->stream, value);
+ }
}
#if GST_CHECK_VERSION(1, 0, 0)
#else
out:
if ( g_timer_elapsed (gst->priv->hidecursor_timer, NULL ) > HIDE_WINDOW_CURSOR_TIMEOUT && video)
- parole_gst_set_cursor_visible (gst, FALSE);
+ parole_gst_set_cursor_visible (gst, FALSE);
#endif
-
+
return TRUE;
}
@@ -690,21 +577,21 @@ parole_gst_tick (ParoleGst *gst)
gboolean live;
g_object_get (gst->priv->stream,
- "live", &live,
- NULL);
-
+ "live", &live,
+ NULL);
+
if ( gst->priv->state >= GST_STATE_PAUSED && !live)
{
- if ( gst->priv->tick_id != 0 )
- {
- return;
- }
- gst->priv->tick_id = g_timeout_add (1000, (GSourceFunc) parole_gst_tick_timeout, gst);
+ if ( gst->priv->tick_id != 0 )
+ {
+ return;
+ }
+ gst->priv->tick_id = g_timeout_add (250, (GSourceFunc) parole_gst_tick_timeout, gst);
}
else if ( gst->priv->tick_id != 0)
{
g_source_remove (gst->priv->tick_id);
- gst->priv->tick_id = 0;
+ gst->priv->tick_id = 0;
}
}
@@ -732,10 +619,10 @@ parole_gst_query_duration (ParoleGst *gst)
TRACE ("Duration %" G_GINT64_FORMAT "is_live=%d", duration, live);
g_object_set (G_OBJECT (gst->priv->stream),
- "absolute-duration", absolute_duration,
- "duration", duration,
- "live", live,
- NULL);
+ "absolute-duration", absolute_duration,
+ "duration", duration,
+ "live", live,
+ NULL);
}
}
@@ -745,14 +632,14 @@ parole_gst_set_subtitle_font (ParoleGst *gst)
gchar *font;
g_object_get (G_OBJECT (gst->priv->conf),
- "subtitle-font", &font,
- NULL);
+ "subtitle-font", &font,
+ NULL);
TRACE ("Setting subtitle font %s\n", font);
g_object_set (G_OBJECT (gst->priv->playbin),
- "subtitle-font-desc", font,
- NULL);
+ "subtitle-font-desc", font,
+ NULL);
g_free (font);
}
@@ -762,13 +649,13 @@ parole_gst_set_subtitle_encoding (ParoleGst *gst)
gchar *encoding;
g_object_get (G_OBJECT (gst->priv->conf),
- "subtitle-encoding", &encoding,
- NULL);
+ "subtitle-encoding", &encoding,
+ NULL);
g_object_set (G_OBJECT (gst->priv->playbin),
"subtitle-encoding", encoding,
- NULL);
-
+ NULL);
+
g_free (encoding);
}
@@ -782,33 +669,33 @@ parole_gst_load_subtitle (ParoleGst *gst)
gboolean sub_enabled;
g_object_get (G_OBJECT (gst->priv->stream),
- "media-type", &type,
- NULL);
+ "media-type", &type,
+ NULL);
if ( type != PAROLE_MEDIA_TYPE_LOCAL_FILE)
- return;
+ return;
g_object_get (G_OBJECT (gst->priv->conf),
- "enable-subtitle", &sub_enabled,
- NULL);
-
+ "enable-subtitle", &sub_enabled,
+ NULL);
+
if ( !sub_enabled )
- return;
-
+ return;
+
g_object_get (G_OBJECT (gst->priv->stream),
- "uri", &uri,
- "subtitles", &sub,
- NULL);
-
+ "uri", &uri,
+ "subtitles", &sub,
+ NULL);
+
if ( sub )
{
- TRACE ("Found subtitle with path %s", sub);
- sub_uri = g_filename_to_uri (sub, NULL, NULL);
- g_object_set (G_OBJECT (gst->priv->playbin),
- "suburi", sub_uri,
- NULL);
- g_free (sub);
- g_free (sub_uri);
+ TRACE ("Found subtitle with path %s", sub);
+ sub_uri = g_filename_to_uri (sub, NULL, NULL);
+ g_object_set (G_OBJECT (gst->priv->playbin),
+ "suburi", sub_uri,
+ NULL);
+ g_free (sub);
+ g_free (sub_uri);
}
g_free (uri);
}
@@ -818,6 +705,7 @@ parole_gst_get_pad_capabilities (GObject *object, GParamSpec *pspec, ParoleGst *
{
GstPad *pad;
GstStructure *st;
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
gint width;
gint height;
guint num;
@@ -839,33 +727,35 @@ parole_gst_get_pad_capabilities (GObject *object, GParamSpec *pspec, ParoleGst *
st = gst_caps_get_structure (caps, 0);
#else
if ( !GST_IS_PAD (pad) || !GST_PAD_CAPS (pad) )
- return;
+ return;
st = gst_caps_get_structure (GST_PAD_CAPS (pad), 0);
#endif
-
+
if ( st )
{
- gst_structure_get_int (st, "width", &width);
- gst_structure_get_int (st, "height", &height);
- TRACE ("Caps width=%d height=%d\n", width, height);
-
- g_object_set (G_OBJECT (gst->priv->stream),
- "video-width", width,
- "video-height", height,
- NULL);
-
- if ( ( value = gst_structure_get_value (st, "pixel-aspect-ratio")) )
- {
- num = (guint) gst_value_get_fraction_numerator (value),
- den = (guint) gst_value_get_fraction_denominator (value);
- g_object_set (G_OBJECT (gst->priv->stream),
- "disp-par-n", num,
- "disp-par-d", den,
- NULL);
- }
-
- parole_gst_size_allocate (GTK_WIDGET (gst), >K_WIDGET (gst)->allocation);
+ gst_structure_get_int (st, "width", &width);
+ gst_structure_get_int (st, "height", &height);
+ TRACE ("Caps width=%d height=%d\n", width, height);
+
+ g_object_set (G_OBJECT (gst->priv->stream),
+ "video-width", width,
+ "video-height", height,
+ NULL);
+
+ if ( ( value = gst_structure_get_value (st, "pixel-aspect-ratio")) )
+ {
+ num = (guint) gst_value_get_fraction_numerator (value),
+ den = (guint) gst_value_get_fraction_denominator (value);
+ g_object_set (G_OBJECT (gst->priv->stream),
+ "disp-par-n", num,
+ "disp-par-d", den,
+ NULL);
+ }
+
+ gtk_widget_get_allocation( GTK_WIDGET (gst), allocation );
+ parole_gst_size_allocate (GTK_WIDGET (gst), allocation);
+ g_free(allocation);
}
#if GST_CHECK_VERSION(1, 0, 0)
gst_caps_unref (caps);
@@ -880,43 +770,43 @@ parole_gst_query_info (ParoleGst *gst)
gint n_audio, n_video, i;
g_object_get (G_OBJECT (gst->priv->playbin),
- "n-audio", &n_audio,
- "n-video", &n_video,
- NULL);
+ "n-audio", &n_audio,
+ "n-video", &n_video,
+ NULL);
g_object_set (G_OBJECT (gst->priv->stream),
- "has-video", (n_video > 0),
- "has-audio", (n_audio > 0),
- NULL);
-
+ "has-video", (n_video > 0),
+ "has-audio", (n_audio > 0),
+ NULL);
+
if (n_video > 0)
{
- for (i = 0; i < n_video && videopad == NULL; i++)
- g_signal_emit_by_name (gst->priv->playbin, "get-video-pad", i, &videopad);
-
- if (videopad)
- {
- GstCaps *caps;
-
+ for (i = 0; i < n_video && videopad == NULL; i++)
+ g_signal_emit_by_name (gst->priv->playbin, "get-video-pad", i, &videopad);
+
+ if (videopad)
+ {
+ GstCaps *caps;
+
#if GST_CHECK_VERSION(1, 0, 0)
- if ((caps = gst_pad_get_current_caps (videopad)))
+ if ((caps = gst_pad_get_current_caps (videopad)))
#else
- if ((caps = gst_pad_get_negotiated_caps (videopad)))
+ if ((caps = gst_pad_get_negotiated_caps (videopad)))
#endif
- {
- parole_gst_get_pad_capabilities (G_OBJECT (videopad), NULL, gst);
- gst_caps_unref (caps);
- }
-
- g_signal_connect (videopad, "notify::caps",
- G_CALLBACK (parole_gst_get_pad_capabilities),
- gst);
- g_object_unref (videopad);
- }
+ {
+ parole_gst_get_pad_capabilities (G_OBJECT (videopad), NULL, gst);
+ gst_caps_unref (caps);
+ }
+
+ g_signal_connect (videopad, "notify::caps",
+ G_CALLBACK (parole_gst_get_pad_capabilities),
+ gst);
+ g_object_unref (videopad);
+ }
}
if ( n_video == 0 )
- gtk_widget_queue_draw (GTK_WIDGET (gst));
+ gtk_widget_queue_draw (GTK_WIDGET (gst));
}
static void
@@ -935,45 +825,45 @@ parole_gst_update_vis (ParoleGst *gst)
TRACE ("start");
g_object_get (G_OBJECT (gst->priv->conf),
- "vis-enabled", &gst->priv->with_vis,
- "vis-name", &vis_name,
- NULL);
+ "vis-enabled", &gst->priv->with_vis,
+ "vis-name", &vis_name,
+ NULL);
TRACE ("Vis name %s enabled %d\n", vis_name, gst->priv->with_vis);
g_object_get (G_OBJECT (gst->priv->playbin),
- "flags", &flags,
- NULL);
+ "flags", &flags,
+ NULL);
if ( gst->priv->with_vis )
{
- GstElement *vis_sink;
- flags |= GST_PLAY_FLAG_VIS;
-
- vis_sink = gst_element_factory_make (vis_name, "vis");
-
- if (vis_sink)
- {
- g_object_set (G_OBJECT (gst->priv->playbin),
- "vis-plugin", vis_sink,
- NULL);
-
- gst->priv->vis_loaded = TRUE;
- }
+ GstElement *vis_sink;
+ flags |= GST_PLAY_FLAG_VIS;
+
+ vis_sink = gst_element_factory_make (vis_name, "vis");
+
+ if (vis_sink)
+ {
+ g_object_set (G_OBJECT (gst->priv->playbin),
+ "vis-plugin", vis_sink,
+ NULL);
+
+ gst->priv->vis_loaded = TRUE;
+ }
}
else
{
- flags &= ~GST_PLAY_FLAG_VIS;
- g_object_set (G_OBJECT (gst->priv->playbin),
- "vis-plugin", NULL,
- NULL);
- gtk_widget_queue_draw (GTK_WIDGET (gst));
- gst->priv->vis_loaded = FALSE;
+ flags &= ~GST_PLAY_FLAG_VIS;
+ g_object_set (G_OBJECT (gst->priv->playbin),
+ "vis-plugin", NULL,
+ NULL);
+ gtk_widget_queue_draw (GTK_WIDGET (gst));
+ gst->priv->vis_loaded = FALSE;
}
g_object_set (G_OBJECT (gst->priv->playbin),
- "flags", flags,
- NULL);
+ "flags", flags,
+ NULL);
gst->priv->update_vis = FALSE;
g_free (vis_name);
@@ -984,6 +874,7 @@ parole_gst_update_vis (ParoleGst *gst)
static void
parole_gst_evaluate_state (ParoleGst *gst, GstState old, GstState new, GstState pending)
{
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
TRACE ("State change new %i old %i pending %i", new, old, pending);
gst->priv->state = new;
@@ -992,70 +883,75 @@ parole_gst_evaluate_state (ParoleGst *gst, GstState old, GstState new, GstState
if ( gst->priv->target == new )
{
- gtk_widget_queue_draw (GTK_WIDGET (gst));
- parole_gst_set_window_cursor (GTK_WIDGET (gst)->window, NULL);
- if ( gst->priv->state_change_id != 0 )
- g_source_remove (gst->priv->state_change_id);
+ gtk_widget_queue_draw (GTK_WIDGET (gst));
+ parole_gst_set_window_cursor ( gtk_widget_get_window(GTK_WIDGET (gst)), NULL);
+ if ( gst->priv->state_change_id != 0 )
+ {
+ g_source_remove (gst->priv->state_change_id);
+ }
}
switch (gst->priv->state)
{
- case GST_STATE_PLAYING:
- {
- gst->priv->media_state = PAROLE_STATE_PLAYING;
- TRACE ("Playing");
- parole_gst_query_capabilities (gst);
- parole_gst_query_info (gst);
- parole_gst_query_duration (gst);
- g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0,
- gst->priv->stream, PAROLE_STATE_PLAYING);
- break;
- }
- case GST_STATE_PAUSED:
- {
- if ( gst->priv->target == GST_STATE_PLAYING )
- {
- if ( gst->priv->update_color_balance )
- parole_gst_set_video_color_balance (gst);
- }
-
- gst->priv->media_state = PAROLE_STATE_PAUSED;
- g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0,
- gst->priv->stream, PAROLE_STATE_PAUSED);
- break;
- }
- case GST_STATE_READY:
- {
- gst->priv->buffering = FALSE;
- gst->priv->media_state = PAROLE_STATE_STOPPED;
- g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0,
- gst->priv->stream, PAROLE_STATE_STOPPED);
-
- if ( gst->priv->target == GST_STATE_PLAYING && pending < GST_STATE_PAUSED)
- {
- parole_gst_play_file_internal (gst);
- }
- else if ( gst->priv->target == GST_STATE_PAUSED)
- {
- parole_gst_change_state (gst, GST_STATE_PAUSED);
- }
- else if ( gst->priv->target == GST_STATE_READY)
- {
- parole_gst_size_allocate (GTK_WIDGET (gst), >K_WIDGET (gst)->allocation);
- parole_gst_draw_logo (gst);
- }
- break;
- }
- case GST_STATE_NULL:
- {
- gst->priv->buffering = FALSE;
- gst->priv->media_state = PAROLE_STATE_STOPPED;
- g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0,
- gst->priv->stream, PAROLE_STATE_STOPPED);
- break;
- }
- default:
- break;
+ case GST_STATE_PLAYING:
+ {
+ gst->priv->media_state = PAROLE_STATE_PLAYING;
+ TRACE ("Playing");
+ parole_gst_query_capabilities (gst);
+ parole_gst_query_info (gst);
+ parole_gst_query_duration (gst);
+ g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0,
+ gst->priv->stream, PAROLE_STATE_PLAYING);
+ break;
+ }
+ case GST_STATE_PAUSED:
+ {
+ if ( gst->priv->target == GST_STATE_PLAYING )
+ {
+ if ( gst->priv->update_color_balance )
+ {
+ parole_gst_set_video_color_balance (gst);
+ }
+ }
+
+ gst->priv->media_state = PAROLE_STATE_PAUSED;
+ g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0,
+ gst->priv->stream, PAROLE_STATE_PAUSED);
+ break;
+ }
+ case GST_STATE_READY:
+ {
+ gst->priv->buffering = FALSE;
+ gst->priv->media_state = PAROLE_STATE_STOPPED;
+ g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0,
+ gst->priv->stream, PAROLE_STATE_STOPPED);
+
+ if ( gst->priv->target == GST_STATE_PLAYING && pending < GST_STATE_PAUSED)
+ {
+ parole_gst_play_file_internal (gst);
+ }
+ else if ( gst->priv->target == GST_STATE_PAUSED)
+ {
+ parole_gst_change_state (gst, GST_STATE_PAUSED);
+ }
+ else if ( gst->priv->target == GST_STATE_READY)
+ {
+ gtk_widget_get_allocation( GTK_WIDGET (gst), allocation );
+ parole_gst_size_allocate (GTK_WIDGET (gst), allocation);
+ g_free(allocation);
+ }
+ break;
+ }
+ case GST_STATE_NULL:
+ {
+ gst->priv->buffering = FALSE;
+ gst->priv->media_state = PAROLE_STATE_STOPPED;
+ g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0,
+ gst->priv->stream, PAROLE_STATE_STOPPED);
+ break;
+ }
+ default:
+ break;
}
}
@@ -1063,15 +959,15 @@ static void
parole_gst_element_message_sync (GstBus *bus, GstMessage *message, ParoleGst *gst)
{
#if GST_CHECK_VERSION(1, 0, 0)
- if ( gst_message_has_name (message, "prepare-xwindow-id") )
+ if ( gst_message_has_name (message, "prepare-window-handle") )
#else
if ( !message->structure )
goto out;
if ( gst_structure_has_name (message->structure, "prepare-xwindow-id") )
#endif
- parole_gst_set_video_overlay (gst);
-
+ parole_gst_set_video_overlay (gst);
+
#if GST_CHECK_VERSION (1, 0, 0)
#else
out:
@@ -1082,37 +978,42 @@ out:
static GdkPixbuf *
parole_gst_buffer_to_pixbuf (GstBuffer *buffer)
{
- GdkPixbufLoader *loader;
- GdkPixbuf *pixbuf = NULL;
- GError *err = NULL;
+ GdkPixbufLoader *loader;
+ GdkPixbuf *pixbuf = NULL;
+ GError *err = NULL;
#if GST_CHECK_VERSION (1, 0, 0)
- GstMapInfo map;
+ GstMapInfo map;
- if (!gst_buffer_map (buffer, &map, GST_MAP_READ))
- return NULL;
+ if (!gst_buffer_map (buffer, &map, GST_MAP_READ))
+ return NULL;
#endif
- loader = gdk_pixbuf_loader_new ();
+ loader = gdk_pixbuf_loader_new ();
#if GST_CHECK_VERSION (1, 0, 0)
- if (gdk_pixbuf_loader_write (loader, map.data, map.size, &err) &&
+ if (gdk_pixbuf_loader_write (loader, map.data, map.size, &err) &&
#else
- if (gdk_pixbuf_loader_write (loader, buffer->data, buffer->size, &err) &&
+ if (gdk_pixbuf_loader_write (loader, buffer->data, buffer->size, &err) &&
#endif
- gdk_pixbuf_loader_close (loader, &err)) {
- pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
- if (pixbuf)
- g_object_ref (pixbuf);
- } else {
- GST_WARNING("could not convert tag image to pixbuf: %s", err->message);
- g_error_free (err);
- }
+ gdk_pixbuf_loader_close (loader, &err))
+ {
+ pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
+ if (pixbuf)
+ {
+ g_object_ref (pixbuf);
+ }
+ }
+ else
+ {
+ GST_WARNING("could not convert tag image to pixbuf: %s", err->message);
+ g_error_free (err);
+ }
#if GST_CHECK_VERSION (1, 0, 0)
- gst_buffer_unmap (buffer, &map);
+ gst_buffer_unmap (buffer, &map);
#endif
- g_object_unref (loader);
- return pixbuf;
+ g_object_unref (loader);
+ return pixbuf;
}
GdkPixbuf *
@@ -1131,9 +1032,9 @@ parole_gst_tag_list_get_cover_external (ParoleGst *gst)
gchar *cover_filename = NULL;
g_object_get (G_OBJECT (gst->priv->stream),
- "uri", &uri,
- NULL);
-
+ "uri", &uri,
+ NULL);
+
filename = g_filename_from_uri(uri, NULL, NULL);
directory = g_path_get_dirname(filename);
@@ -1271,7 +1172,7 @@ parole_gst_tag_list_get_cover (ParoleGst *gst, GstTagList *tag_list)
if (gdk_pixbuf_get_width(pixbuf) == gdk_pixbuf_get_height(pixbuf))
{
height = 256;
- width = 256;
+ width = 256;
}
else if (gdk_pixbuf_get_width(pixbuf) < gdk_pixbuf_get_height(pixbuf))
{
@@ -1283,7 +1184,7 @@ parole_gst_tag_list_get_cover (ParoleGst *gst, GstTagList *tag_list)
{
multiplier = gdk_pixbuf_get_width(pixbuf)/256.0;
height = gdk_pixbuf_get_height(pixbuf)/multiplier;
- width = 256;
+ width = 256;
}
scaled = gdk_pixbuf_scale_simple (pixbuf,
@@ -1311,8 +1212,8 @@ parole_gst_get_meta_data_dvd (ParoleGst *gst)
g_object_get ( G_OBJECT (gst->priv->stream),
"num-tracks", ¤t_num_chapters,
- "track", ¤t_chapter,
- NULL);
+ "track", ¤t_chapter,
+ NULL);
/* Get the number of chapters for the current title. */
#if GST_CHECK_VERSION(1, 0, 0)
@@ -1327,12 +1228,12 @@ parole_gst_get_meta_data_dvd (ParoleGst *gst)
if (num_chapters != current_num_chapters)
{
g_object_set (G_OBJECT (gst->priv->stream),
- "num-tracks", num_chapters,
- NULL);
+ "num-tracks", num_chapters,
+ NULL);
TRACE("Updated DVD chapter count: %i", n_chapters);
- g_signal_emit (G_OBJECT (gst), signals [DVD_CHAPTER_COUNT_CHANGE], 0,
- n_chapters);
+ g_signal_emit (G_OBJECT (gst), signals [DVD_CHAPTER_COUNT_CHANGE], 0,
+ n_chapters);
}
}
@@ -1349,13 +1250,13 @@ parole_gst_get_meta_data_dvd (ParoleGst *gst)
if ( chapter != current_chapter || num_chapters != 1 )
{
g_object_set (G_OBJECT (gst->priv->stream),
- "track", chapter,
- NULL);
+ "track", chapter,
+ NULL);
TRACE("Updated current DVD chapter: %i", chapter);
if (current_chapter != 1)
- g_signal_emit (G_OBJECT (gst), signals [DVD_CHAPTER_CHANGE], 0,
- chapter);
+ g_signal_emit (G_OBJECT (gst), signals [DVD_CHAPTER_CHANGE], 0,
+ chapter);
}
}
@@ -1369,25 +1270,25 @@ parole_gst_get_meta_data_cdda (ParoleGst *gst, GstTagList *tag)
guint track;
if (gst_tag_list_get_uint (tag, GST_TAG_TRACK_NUMBER, &track) &&
- gst_tag_list_get_uint (tag, GST_TAG_TRACK_COUNT, &num_tracks))
- {
- g_object_set (G_OBJECT (gst->priv->stream),
- "num-tracks", num_tracks,
- "track", track,
- "title", g_strdup_printf(_("Track %i"), track),
- "artist", NULL,
- "year", NULL,
- "album", _("Audio CD"),
- "comment", NULL,
- NULL);
-
- parole_stream_set_image (G_OBJECT (gst->priv->stream), NULL);
- g_object_set (G_OBJECT (gst->priv->stream),
- "tag-available", FALSE,
- NULL);
-
- TRACE ("num_tracks=%i track=%i", num_tracks, track);
- g_signal_emit (G_OBJECT (gst), signals [MEDIA_TAG], 0, gst->priv->stream);
+ gst_tag_list_get_uint (tag, GST_TAG_TRACK_COUNT, &num_tracks))
+ {
+ g_object_set (G_OBJECT (gst->priv->stream),
+ "num-tracks", num_tracks,
+ "track", track,
+ "title", g_strdup_printf(_("Track %i"), track),
+ "artist", NULL,
+ "year", NULL,
+ "album", _("Audio CD"),
+ "comment", NULL,
+ NULL);
+
+ parole_stream_set_image (G_OBJECT (gst->priv->stream), NULL);
+ g_object_set (G_OBJECT (gst->priv->stream),
+ "tag-available", FALSE,
+ NULL);
+
+ TRACE ("num_tracks=%i track=%i", num_tracks, track);
+ g_signal_emit (G_OBJECT (gst), signals [MEDIA_TAG], 0, gst->priv->stream);
}
}
@@ -1400,85 +1301,83 @@ parole_gst_get_meta_data_local_file (ParoleGst *gst, GstTagList *tag)
if ( gst_tag_list_get_string_index (tag, GST_TAG_TITLE, 0, &str) )
{
- TRACE ("title:%s", str);
- g_object_set (G_OBJECT (gst->priv->stream),
- "title", str,
- NULL);
- g_free (str);
+ TRACE ("title:%s", str);
+ g_object_set (G_OBJECT (gst->priv->stream),
+ "title", str,
+ NULL);
+ g_free (str);
}
if ( gst_tag_list_get_string_index (tag, GST_TAG_ARTIST, 0, &str) )
{
- TRACE ("artist:%s", str);
- g_object_set (G_OBJECT (gst->priv->stream),
- "artist", str,
- NULL);
- g_free (str);
+ TRACE ("artist:%s", str);
+ g_object_set (G_OBJECT (gst->priv->stream),
+ "artist", str,
+ NULL);
+ g_free (str);
}
if ( gst_tag_list_get_date (tag, GST_TAG_DATE, &date) )
{
-
- str = g_strdup_printf ("%d", g_date_get_year (date));
- TRACE ("year:%s", str);
-
- g_object_set (G_OBJECT (gst->priv->stream),
- "year", str,
- NULL);
- g_date_free (date);
- g_free (str);
+ str = g_strdup_printf ("%d", g_date_get_year (date));
+ TRACE ("year:%s", str);
+
+ g_object_set (G_OBJECT (gst->priv->stream),
+ "year", str,
+ NULL);
+ g_date_free (date);
+ g_free (str);
}
if ( gst_tag_list_get_string_index (tag, GST_TAG_ALBUM, 0, &str) )
{
- TRACE ("album:%s", str);
- g_object_set (G_OBJECT (gst->priv->stream),
- "album", str,
- NULL);
- g_free (str);
+ TRACE ("album:%s", str);
+ g_object_set (G_OBJECT (gst->priv->stream),
+ "album", str,
+ NULL);
+ g_free (str);
}
if ( gst_tag_list_get_string_index (tag, GST_TAG_COMMENT, 0, &str) )
{
- TRACE ("comment:%s", str);
- g_object_set (G_OBJECT (gst->priv->stream),
- "comment", str,
- NULL);
- g_free (str);
+ TRACE ("comment:%s", str);
+ g_object_set (G_OBJECT (gst->priv->stream),
+ "comment", str,
+ NULL);
+ g_free (str);
}
pixbuf = parole_gst_tag_list_get_cover (gst, tag);
if (pixbuf)
{
- parole_stream_set_image (G_OBJECT (gst->priv->stream), pixbuf);
- g_object_unref (pixbuf);
+ parole_stream_set_image (G_OBJECT (gst->priv->stream), pixbuf);
+ g_object_unref (pixbuf);
}
g_object_set (G_OBJECT (gst->priv->stream),
- "tag-available", TRUE,
- NULL);
-
+ "tag-available", TRUE,
+ NULL);
+
g_signal_emit (G_OBJECT (gst), signals [MEDIA_TAG], 0, gst->priv->stream);
-
}
static void
parole_gst_get_meta_data_unknown (ParoleGst *gst)
{
- g_object_set (G_OBJECT (gst->priv->stream),
- "title", NULL,
- "artist", NULL,
- "year", NULL,
- "album", NULL,
- "comment", NULL,
- NULL);
+ g_object_set (G_OBJECT (gst->priv->stream),
+ "title", NULL,
+ "artist", NULL,
+ "year", NULL,
+ "album", NULL,
+ "comment", NULL,
+ NULL);
parole_stream_set_image (G_OBJECT (gst->priv->stream), NULL);
g_object_set (G_OBJECT (gst->priv->stream),
- "tag-available", FALSE,
- NULL);
-
+ "tag-available", FALSE,
+ NULL);
+
g_signal_emit (G_OBJECT (gst), signals [MEDIA_TAG], 0, gst->priv->stream);
}
@@ -1488,32 +1387,33 @@ parole_gst_get_meta_data (ParoleGst *gst, GstTagList *tag)
ParoleMediaType media_type;
g_object_get (G_OBJECT (gst->priv->stream),
- "media-type", &media_type,
- NULL);
-
+ "media-type", &media_type,
+ NULL);
+
switch ( media_type )
{
- case PAROLE_MEDIA_TYPE_LOCAL_FILE:
- parole_gst_get_meta_data_local_file (gst, tag);
- break;
- case PAROLE_MEDIA_TYPE_CDDA:
- parole_gst_get_meta_data_cdda (gst, tag);
- break;
- case PAROLE_MEDIA_TYPE_DVD:
- parole_gst_get_meta_data_dvd (gst);
- break;
- case PAROLE_MEDIA_TYPE_REMOTE:
- case PAROLE_MEDIA_TYPE_UNKNOWN:
- parole_gst_get_meta_data_unknown (gst);
- break;
- default:
- break;
+ case PAROLE_MEDIA_TYPE_LOCAL_FILE:
+ parole_gst_get_meta_data_local_file (gst, tag);
+ break;
+ case PAROLE_MEDIA_TYPE_CDDA:
+ parole_gst_get_meta_data_cdda (gst, tag);
+ break;
+ case PAROLE_MEDIA_TYPE_DVD:
+ parole_gst_get_meta_data_dvd (gst);
+ break;
+ case PAROLE_MEDIA_TYPE_REMOTE:
+ case PAROLE_MEDIA_TYPE_UNKNOWN:
+ parole_gst_get_meta_data_unknown (gst);
+ break;
+ default:
+ break;
}
}
static void
parole_gst_application_message (ParoleGst *gst, GstMessage *msg)
{
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
#if GST_CHECK_VERSION(1, 0, 0)
if ( gst_message_has_name (msg, "notify-streaminfo") )
#else
@@ -1526,7 +1426,7 @@ parole_gst_application_message (ParoleGst *gst, GstMessage *msg)
if ( !g_strcmp0 (name, "notify-streaminfo") )
#endif
{
- parole_gst_update_stream_info (gst);
+ parole_gst_update_stream_info (gst);
}
#if GST_CHECK_VERSION(1, 0, 0)
@@ -1535,7 +1435,9 @@ parole_gst_application_message (ParoleGst *gst, GstMessage *msg)
else if ( !g_strcmp0 (name, "video-size") )
#endif
{
- parole_gst_size_allocate (GTK_WIDGET (gst), >K_WIDGET (gst)->allocation);
+ gtk_widget_get_allocation(GTK_WIDGET (gst), allocation);
+ parole_gst_size_allocate (GTK_WIDGET (gst), allocation);
+ g_free(allocation);
}
}
@@ -1598,8 +1500,8 @@ parole_gst_missing_codec_dialog(ParoleGst *gst, GstMessage *msg)
GTK_RESPONSE_ACCEPT,
NULL );
#elif defined(__FreeBSD__)
- gtk_dialog_add_button( GTK_DIALOG(dialog),
- GTK_STOCK_OK,
+ gtk_dialog_add_button( GTK_DIALOG(dialog),
+ _("OK"),
GTK_RESPONSE_ACCEPT);
#endif
@@ -1622,152 +1524,142 @@ parole_gst_bus_event (GstBus *bus, GstMessage *msg, gpointer data)
GtkDialog *dialog;
gchar* details[2];
GstInstallPluginsContext *ctx;
- gint response;
+ gint response;
gst = PAROLE_GST (data);
switch (GST_MESSAGE_TYPE (msg))
{
case GST_MESSAGE_EOS:
- {
- ParoleMediaType media_type;
-
- TRACE ("End of stream");
-
- g_object_get (G_OBJECT (gst->priv->stream),
- "media-type", &media_type,
- NULL);
-
- gst->priv->media_state = PAROLE_STATE_PLAYBACK_FINISHED;
- g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0,
- gst->priv->stream, PAROLE_STATE_PLAYBACK_FINISHED);
- break;
- }
- case GST_MESSAGE_ERROR:
- {
- GError *error = NULL;
- gchar *debug;
- parole_gst_set_window_cursor (GTK_WIDGET (gst)->window, NULL);
- gst->priv->target = GST_STATE_NULL;
- gst->priv->buffering = FALSE;
- parole_gst_change_state (gst, GST_STATE_NULL);
- gst_message_parse_error (msg, &error, &debug);
- TRACE ("*** ERROR %s : %s ***", error->message, debug);
- g_signal_emit (G_OBJECT (gst), signals [ERROR], 0, error->message);
- g_error_free (error);
- g_free (debug);
- gtk_widget_queue_draw (GTK_WIDGET (gst));
- break;
- }
- case GST_MESSAGE_BUFFERING:
- {
- gint per = 0;
- gst_message_parse_buffering (msg, &per);
- TRACE ("Buffering %d %%", per);
- g_signal_emit (G_OBJECT (gst), signals [BUFFERING], 0,
- gst->priv->stream, per);
-
- gst->priv->buffering = per != 100;
- break;
- }
- case GST_MESSAGE_STATE_CHANGED:
- {
- GstState old, new, pending;
- gst_message_parse_state_changed (msg, &old, &new, &pending);
- if ( GST_MESSAGE_SRC (msg) == GST_OBJECT (gst->priv->playbin) )
- {
- parole_gst_evaluate_state (gst, old, new, pending);
- }
- break;
- }
-
- case GST_MESSAGE_TAG:
- {
- if ( gst->priv->enable_tags )
- {
- GstTagList *tag_list;
- TRACE ("Tag message:");
- gst_message_parse_tag (msg, &tag_list);
- parole_gst_get_meta_data (gst, tag_list);
- gst_tag_list_free (tag_list);
- }
- break;
- }
- case GST_MESSAGE_APPLICATION:
- parole_gst_application_message (gst, msg);
- break;
- case GST_MESSAGE_DURATION:
- if (gst->priv->state == GST_STATE_PLAYING)
- {
- TRACE ("Duration message");
- parole_gst_query_duration (gst);
- }
- break;
- case GST_MESSAGE_ELEMENT:
- if (gst_is_missing_plugin_message(msg))
- {
- g_debug("Missing plugin\n");
- parole_gst_stop(gst);
- dialog = parole_gst_missing_codec_dialog(gst, msg);
- response = gtk_dialog_run(dialog);
- if ( response == GTK_RESPONSE_ACCEPT )
- {
- gtk_widget_destroy(GTK_WIDGET(dialog));
- details[0] = gst_missing_plugin_message_get_installer_detail(msg);
- details[1] = NULL;
- ctx = gst_install_plugins_context_new();
-
+ {
+ ParoleMediaType media_type;
+
+ TRACE ("End of stream");
+
+ g_object_get (G_OBJECT (gst->priv->stream),
+ "media-type", &media_type,
+ NULL);
+
+ gst->priv->media_state = PAROLE_STATE_PLAYBACK_FINISHED;
+ g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0,
+ gst->priv->stream, PAROLE_STATE_PLAYBACK_FINISHED);
+ break;
+ }
+ case GST_MESSAGE_ERROR:
+ {
+ GError *error = NULL;
+ gchar *debug;
+ parole_gst_set_window_cursor (gtk_widget_get_window(GTK_WIDGET (gst)), NULL);
+ gst->priv->target = GST_STATE_NULL;
+ gst->priv->buffering = FALSE;
+ parole_gst_change_state (gst, GST_STATE_NULL);
+ gst_message_parse_error (msg, &error, &debug);
+ TRACE ("*** ERROR %s : %s ***", error->message, debug);
+ g_signal_emit (G_OBJECT (gst), signals [ERROR], 0, error->message);
+ g_error_free (error);
+ g_free (debug);
+ gtk_widget_queue_draw (GTK_WIDGET (gst));
+ break;
+ }
+ case GST_MESSAGE_BUFFERING:
+ {
+ gint per = 0;
+ gst_message_parse_buffering (msg, &per);
+ TRACE ("Buffering %d %%", per);
+ g_signal_emit (G_OBJECT (gst), signals [BUFFERING], 0,
+ gst->priv->stream, per);
+
+ gst->priv->buffering = per != 100;
+ break;
+ }
+ case GST_MESSAGE_STATE_CHANGED:
+ {
+ GstState old, new, pending;
+ gst_message_parse_state_changed (msg, &old, &new, &pending);
+ if ( GST_MESSAGE_SRC (msg) == GST_OBJECT (gst->priv->playbin) )
+ {
+ parole_gst_evaluate_state (gst, old, new, pending);
+ }
+ break;
+ }
+
+ case GST_MESSAGE_TAG:
+ {
+ if ( gst->priv->enable_tags )
+ {
+ GstTagList *tag_list;
+ TRACE ("Tag message:");
+ gst_message_parse_tag (msg, &tag_list);
+ parole_gst_get_meta_data (gst, tag_list);
+ gst_tag_list_free (tag_list);
+ }
+ break;
+ }
+ case GST_MESSAGE_APPLICATION:
+ parole_gst_application_message (gst, msg);
+ break;
+ case GST_MESSAGE_DURATION:
+ if (gst->priv->state == GST_STATE_PLAYING)
+ {
+ TRACE ("Duration message");
+ parole_gst_query_duration (gst);
+ }
+ break;
+ case GST_MESSAGE_ELEMENT:
+ if (gst_is_missing_plugin_message(msg))
+ {
+ g_debug("Missing plugin\n");
+ parole_gst_stop(gst);
+ dialog = parole_gst_missing_codec_dialog(gst, msg);
+ response = gtk_dialog_run(dialog);
+ if ( response == GTK_RESPONSE_ACCEPT )
+ {
+ gtk_widget_destroy(GTK_WIDGET(dialog));
+ details[0] = gst_missing_plugin_message_get_installer_detail(msg);
+ details[1] = NULL;
+ ctx = gst_install_plugins_context_new();
+
#ifdef GDK_WINDOWING_X11
if (gtk_widget_get_window (GTK_WIDGET (gst)) != NULL &&
gtk_widget_get_realized (GTK_WIDGET (gst)))
{
gst_install_plugins_context_set_xid (ctx,
- GDK_WINDOW_XID (GTK_WIDGET (gst)->window));
+ gdk_x11_window_get_xid (gtk_widget_get_window(GTK_WIDGET (gst))));
}
#endif /* GDK_WINDOWING_X11 */
#if GST_CHECK_VERSION(1, 0, 0)
- gst_install_plugins_async((const gchar * const *) details, ctx, parole_gst_install_plugins_result_func, gst);
+ gst_install_plugins_async((const gchar * const *) details, ctx, parole_gst_install_plugins_result_func, gst);
#else
gst_install_plugins_async(details, ctx, parole_gst_install_plugins_result_func, gst);
#endif
- gst_install_plugins_context_free(ctx);
- }
- else if ( (response == GTK_RESPONSE_REJECT) || (response == GTK_RESPONSE_OK) )
- gtk_widget_destroy(GTK_WIDGET(dialog));
+ gst_install_plugins_context_free(ctx);
+ }
+ else if ( (response == GTK_RESPONSE_REJECT) || (response == GTK_RESPONSE_OK) )
+ gtk_widget_destroy(GTK_WIDGET(dialog));
}
- break;
- case GST_MESSAGE_WARNING:
- break;
- case GST_MESSAGE_INFO:
- TRACE ("Info message:");
- break;
- case GST_MESSAGE_STATE_DIRTY:
- TRACE ("Stream is dirty");
- break;
- case GST_MESSAGE_STEP_DONE:
- break;
- case GST_MESSAGE_CLOCK_PROVIDE:
- break;
- case GST_MESSAGE_CLOCK_LOST:
- break;
- case GST_MESSAGE_NEW_CLOCK:
- break;
- case GST_MESSAGE_STRUCTURE_CHANGE:
- break;
- case GST_MESSAGE_STREAM_STATUS:
- TRACE ("Stream status");
- break;
- case GST_MESSAGE_SEGMENT_START:
- break;
- case GST_MESSAGE_LATENCY:
- break;
- case GST_MESSAGE_ASYNC_START:
- break;
- case GST_MESSAGE_ASYNC_DONE:
- break;
- default:
- break;
+ break;
+ case GST_MESSAGE_INFO:
+ TRACE ("Info message:");
+ break;
+ case GST_MESSAGE_STATE_DIRTY:
+ TRACE ("Stream is dirty");
+ break;
+ case GST_MESSAGE_STREAM_STATUS:
+ TRACE ("Stream status");
+ break;
+ case GST_MESSAGE_WARNING:
+ case GST_MESSAGE_STEP_DONE:
+ case GST_MESSAGE_CLOCK_PROVIDE:
+ case GST_MESSAGE_CLOCK_LOST:
+ case GST_MESSAGE_NEW_CLOCK:
+ case GST_MESSAGE_STRUCTURE_CHANGE:
+ case GST_MESSAGE_SEGMENT_START:
+ case GST_MESSAGE_LATENCY:
+ case GST_MESSAGE_ASYNC_START:
+ case GST_MESSAGE_ASYNC_DONE:
+ default:
+ break;
}
return TRUE;
}
@@ -1783,24 +1675,23 @@ parole_gst_change_state (ParoleGst *gst, GstState new)
switch (ret)
{
- case GST_STATE_CHANGE_SUCCESS:
- parole_gst_evaluate_state (gst,
- GST_STATE_RETURN (gst->priv->playbin),
- GST_STATE (gst->priv->playbin),
- GST_STATE_PENDING (gst->priv->playbin));
- break;
- case GST_STATE_CHANGE_ASYNC:
- TRACE ("State will change async");
- break;
-
- case GST_STATE_CHANGE_FAILURE:
- TRACE ("Error will be handled async");
- break;
- case GST_STATE_CHANGE_NO_PREROLL:
- TRACE ("State change no_preroll");
- break;
- default:
- break;
+ case GST_STATE_CHANGE_SUCCESS:
+ parole_gst_evaluate_state (gst,
+ GST_STATE_RETURN (gst->priv->playbin),
+ GST_STATE (gst->priv->playbin),
+ GST_STATE_PENDING (gst->priv->playbin));
+ break;
+ case GST_STATE_CHANGE_ASYNC:
+ TRACE ("State will change async");
+ break;
+ case GST_STATE_CHANGE_FAILURE:
+ TRACE ("Error will be handled async");
+ break;
+ case GST_STATE_CHANGE_NO_PREROLL:
+ TRACE ("State change no_preroll");
+ break;
+ default:
+ break;
}
}
@@ -1810,18 +1701,18 @@ parole_gst_source_notify_cb (GObject *obj, GParamSpec *pspec, ParoleGst *gst)
GObject *source;
g_object_get (obj,
- "source", &source,
- NULL);
+ "source", &source,
+ NULL);
if ( source )
{
- if ( G_LIKELY (gst->priv->device) )
- {
- g_object_set (source,
- "device", gst->priv->device,
- NULL);
- }
- g_object_unref (source);
+ if ( G_LIKELY (gst->priv->device) )
+ {
+ g_object_set (source,
+ "device", gst->priv->device,
+ NULL);
+ }
+ g_object_unref (source);
}
}
@@ -1834,24 +1725,24 @@ parole_gst_play_file_internal (ParoleGst *gst)
if ( G_UNLIKELY (GST_STATE (gst->priv->playbin) == GST_STATE_PLAYING ) )
{
- TRACE ("*** Error *** This is a bug, playbin element is already playing");
+ TRACE ("*** Error *** This is a bug, playbin element is already playing");
}
if ( gst->priv->update_vis)
- parole_gst_update_vis (gst);
+ parole_gst_update_vis (gst);
parole_stream_set_image (G_OBJECT (gst->priv->stream), NULL);
g_object_get (G_OBJECT (gst->priv->stream),
- "uri", &uri,
- NULL);
+ "uri", &uri,
+ NULL);
TRACE ("Processing uri : %s", uri);
g_object_set (G_OBJECT (gst->priv->playbin),
- "uri", uri,
- "suburi", NULL,
- NULL);
+ "uri", uri,
+ "suburi", NULL,
+ NULL);
parole_gst_load_subtitle (gst);
parole_gst_change_state (gst, GST_STATE_PLAYING);
@@ -1904,7 +1795,7 @@ parole_gst_motion_notify_event (GtkWidget *widget, GdkEventMotion *ev)
parole_gst_set_cursor_visible (gst, TRUE);
if (GTK_WIDGET_CLASS (parole_gst_parent_class)->motion_notify_event)
- ret |= GTK_WIDGET_CLASS (parole_gst_parent_class)->motion_notify_event (widget, ev);
+ ret |= GTK_WIDGET_CLASS (parole_gst_parent_class)->motion_notify_event (widget, ev);
return ret;
}
@@ -1920,17 +1811,17 @@ parole_gst_button_press_event (GtkWidget *widget, GdkEventButton *ev)
gst = PAROLE_GST (widget);
g_object_get (G_OBJECT (gst->priv->stream),
- "has-video", &playing_video,
- NULL);
+ "has-video", &playing_video,
+ NULL);
if ( gst->priv->state == GST_STATE_PLAYING && playing_video)
{
- nav = GST_NAVIGATION (gst->priv->video_sink);
- gst_navigation_send_mouse_event (nav, "mouse-button-press", ev->button, ev->x, ev->y);
+ nav = GST_NAVIGATION (gst->priv->video_sink);
+ gst_navigation_send_mouse_event (nav, "mouse-button-press", ev->button, ev->x, ev->y);
}
if (GTK_WIDGET_CLASS (parole_gst_parent_class)->button_press_event)
- ret |= GTK_WIDGET_CLASS (parole_gst_parent_class)->button_press_event (widget, ev);
+ ret |= GTK_WIDGET_CLASS (parole_gst_parent_class)->button_press_event (widget, ev);
return ret;
}
@@ -1946,17 +1837,17 @@ parole_gst_button_release_event (GtkWidget *widget, GdkEventButton *ev)
gst = PAROLE_GST (widget);
g_object_get (G_OBJECT (gst->priv->stream),
- "has-video", &playing_video,
- NULL);
+ "has-video", &playing_video,
+ NULL);
if ( gst->priv->state == GST_STATE_PLAYING && playing_video)
{
- nav = GST_NAVIGATION (gst->priv->video_sink);
- gst_navigation_send_mouse_event (nav, "mouse-button-release", ev->button, ev->x, ev->y);
+ nav = GST_NAVIGATION (gst->priv->video_sink);
+ gst_navigation_send_mouse_event (nav, "mouse-button-release", ev->button, ev->x, ev->y);
}
if (GTK_WIDGET_CLASS (parole_gst_parent_class)->button_release_event)
- ret |= GTK_WIDGET_CLASS (parole_gst_parent_class)->button_release_event (widget, ev);
+ ret |= GTK_WIDGET_CLASS (parole_gst_parent_class)->button_release_event (widget, ev);
return ret;
}
@@ -1972,19 +1863,19 @@ parole_gst_seek_by_format (ParoleGst *gst, GstFormat format, gint step)
if ( gst_element_query_position (gst->priv->playbin, &format, &val) )
#endif
{
- val += step;
- if ( !gst_element_seek (gst->priv->playbin, 1.0, format,
- GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET,
- val,
- GST_SEEK_TYPE_NONE,
- 0) )
- {
- g_warning ("Seek failed : %s", gst_format_get_name (format));
- }
+ val += step;
+ if ( !gst_element_seek (gst->priv->playbin, 1.0, format,
+ GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET,
+ val,
+ GST_SEEK_TYPE_NONE,
+ 0) )
+ {
+ g_warning ("Seek failed : %s", gst_format_get_name (format));
+ }
}
else
{
- g_warning ("Failed to query element position: %s", gst_format_get_name (format));
+ g_warning ("Failed to query element position: %s", gst_format_get_name (format));
}
}
@@ -2004,12 +1895,12 @@ parole_gst_change_cdda_track (ParoleGst *gst, gint level)
parole_gst_seek_by_format (gst, format, level);
}
-ParoleMediaType parole_gst_get_current_stream_type (ParoleGst *gst)
+ParoleMediaType parole_gst_get_current_stream_type (ParoleGst *gst)
{
ParoleMediaType type;
g_object_get (G_OBJECT (gst->priv->stream),
- "media-type", &type,
- NULL);
+ "media-type", &type,
+ NULL);
return type;
}
@@ -2017,6 +1908,7 @@ static gboolean
parole_gst_check_state_change_timeout (gpointer data)
{
ParoleGst *gst;
+ GtkWidget *dialog;
gst = PAROLE_GST (data);
@@ -2024,18 +1916,20 @@ parole_gst_check_state_change_timeout (gpointer data)
if ( gst->priv->state != gst->priv->target )
{
- gboolean ret_val = xfce_dialog_confirm (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gst))),
- GTK_STOCK_YES,
- _("Stop"),
- _("The stream is taking too much time to load"),
- NULL);
-
- if ( ret_val )
- {
- parole_gst_terminate_internal (gst);
- gst->priv->state_change_id = 0;
- return FALSE;
- }
+ dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gst))),
+ GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_NONE,
+ _("The stream is taking too much time to load"));
+ gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), _("Do you want to continue loading or stop?"));
+ gtk_dialog_add_button(GTK_DIALOG(dialog), _("Stop"), GTK_RESPONSE_CANCEL);
+ gtk_dialog_add_button(GTK_DIALOG(dialog), _("Continue"), GTK_RESPONSE_CLOSE);
+ if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_CANCEL)
+ {
+ parole_gst_terminate_internal (gst);
+ gst->priv->state_change_id = 0;
+ return FALSE;
+ }
}
return TRUE;
}
@@ -2046,15 +1940,15 @@ parole_gst_terminate_internal (ParoleGst *gst)
gboolean playing_video;
g_object_get (G_OBJECT (gst->priv->stream),
- "has-video", &playing_video,
- NULL);
+ "has-video", &playing_video,
+ NULL);
g_mutex_lock (&gst->priv->lock);
gst->priv->target = GST_STATE_NULL;
parole_stream_init_properties (gst->priv->stream);
g_mutex_unlock (&gst->priv->lock);
- parole_window_busy_cursor (GTK_WIDGET (gst)->window);
+ parole_window_busy_cursor (gtk_widget_get_window(GTK_WIDGET (gst)));
parole_gst_change_state (gst, GST_STATE_NULL);
}
@@ -2066,103 +1960,104 @@ parole_gst_about_to_finish_cb (GstElement *elm, gpointer data)
gst = PAROLE_GST (data);
-
- g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0,
- gst->priv->stream, PAROLE_STATE_ABOUT_TO_FINISH);
-
+ g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0,
+ gst->priv->stream, PAROLE_STATE_ABOUT_TO_FINISH);
}
static void
parole_gst_conf_notify_cb (GObject *object, GParamSpec *spec, ParoleGst *gst)
{
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
if ( !g_strcmp0 ("vis-enabled", spec->name) || !g_strcmp0 ("vis-name", spec->name) )
{
- gst->priv->update_vis = TRUE;
+ gst->priv->update_vis = TRUE;
}
else if ( !g_strcmp0 ("subtitle-font", spec->name) || !g_strcmp0 ("enable-subtitle", spec->name) )
{
- parole_gst_set_subtitle_font (gst);
+ parole_gst_set_subtitle_font (gst);
}
else if (!g_strcmp0 ("subtitle-encoding", spec->name) )
{
- parole_gst_set_subtitle_encoding (gst);
+ parole_gst_set_subtitle_encoding (gst);
}
else if ( !g_strcmp0 ("brightness", spec->name) || !g_strcmp0 ("hue", spec->name) ||
- !g_strcmp0 ("contrast", spec->name) || !g_strcmp0 ("saturation", spec->name) )
+ !g_strcmp0 ("contrast", spec->name) || !g_strcmp0 ("saturation", spec->name) )
{
- gst->priv->update_color_balance = TRUE;
-
- if ( gst->priv->state >= GST_STATE_PAUSED )
- parole_gst_set_video_color_balance (gst);
+ gst->priv->update_color_balance = TRUE;
+
+ if ( gst->priv->state >= GST_STATE_PAUSED )
+ parole_gst_set_video_color_balance (gst);
}
else if ( !g_strcmp0 ("aspect-ratio", spec->name) )
{
- g_object_get (G_OBJECT (gst->priv->conf),
- "aspect-ratio", &gst->priv->aspect_ratio,
- NULL);
-
- parole_gst_size_allocate (GTK_WIDGET (gst), >K_WIDGET (gst)->allocation);
+ g_object_get (G_OBJECT (gst->priv->conf),
+ "aspect-ratio", &gst->priv->aspect_ratio,
+ NULL);
+
+ gtk_widget_get_allocation( GTK_WIDGET (gst), allocation );
+ parole_gst_size_allocate (GTK_WIDGET (gst), allocation);
+ g_free(allocation);
}
}
-static void parole_gst_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+static void parole_gst_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ParoleGst *gst;
gst = PAROLE_GST (object);
switch (prop_id)
{
- case PROP_VOLUME:
- g_value_set_double (value, gst->priv->volume);
- break;
- case PROP_CONF_OBJ:
- g_value_set_pointer (value, gst->priv->conf);
- break;
- case PROP_ENABLE_TAGS:
- g_value_set_boolean (value, gst->priv->enable_tags);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_VOLUME:
+ g_value_set_double (value, gst->priv->volume);
+ break;
+ case PROP_CONF_OBJ:
+ g_value_set_pointer (value, gst->priv->conf);
+ break;
+ case PROP_ENABLE_TAGS:
+ g_value_set_boolean (value, gst->priv->enable_tags);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
-static void parole_gst_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+static void parole_gst_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ParoleGst *gst;
gst = PAROLE_GST (object);
switch (prop_id)
{
- case PROP_ENABLE_TAGS:
- gst->priv->enable_tags = g_value_get_boolean (value);
- break;
- case PROP_VOLUME:
- parole_gst_set_volume (gst, g_value_get_double (value));
- break;
- case PROP_CONF_OBJ:
- gst->priv->conf = g_value_get_pointer (value);
-
- if (gst->priv->conf)
- {
- g_object_get (G_OBJECT (gst->priv->conf),
- "aspect-ratio", &gst->priv->aspect_ratio,
- NULL);
-
- g_signal_connect (G_OBJECT (gst->priv->conf), "notify",
- G_CALLBACK (parole_gst_conf_notify_cb), gst);
- }
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_ENABLE_TAGS:
+ gst->priv->enable_tags = g_value_get_boolean (value);
+ break;
+ case PROP_VOLUME:
+ parole_gst_set_volume (gst, g_value_get_double (value));
+ break;
+ case PROP_CONF_OBJ:
+ gst->priv->conf = g_value_get_pointer (value);
+
+ if (gst->priv->conf)
+ {
+ g_object_get (G_OBJECT (gst->priv->conf),
+ "aspect-ratio", &gst->priv->aspect_ratio,
+ NULL);
+
+ g_signal_connect (G_OBJECT (gst->priv->conf), "notify",
+ G_CALLBACK (parole_gst_conf_notify_cb), gst);
+ }
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -2173,7 +2068,7 @@ parole_notify_volume_idle_cb (ParoleGst *gst)
gdouble vol;
vol = gst_stream_volume_get_volume (GST_STREAM_VOLUME (gst->priv->playbin),
- GST_STREAM_VOLUME_FORMAT_CUBIC);
+ GST_STREAM_VOLUME_FORMAT_CUBIC);
gst->priv->volume = vol;
g_object_notify (G_OBJECT (gst), "volume");
@@ -2182,14 +2077,29 @@ parole_notify_volume_idle_cb (ParoleGst *gst)
}
static void
-parole_notify_volume_cb (GObject *object,
- GParamSpec *pspec,
- ParoleGst *gst)
+parole_notify_volume_cb (GObject *object,
+ GParamSpec *pspec,
+ ParoleGst *gst)
{
g_idle_add ((GSourceFunc) parole_notify_volume_idle_cb, gst);
}
static void
+parole_gst_show_error(GtkWindow *window, GError *error)
+{
+ GtkWidget *dialog;
+ gchar *message;
+ dialog = gtk_message_dialog_new (NULL,
+ GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _("GStreamer Error"));
+ message = g_strdup_printf("%s\n%s", error->message, _("Parole Media Player cannot start."));
+ gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), message, "%s");
+ gtk_dialog_run(GTK_DIALOG(dialog));
+}
+
+static void
parole_gst_constructed (GObject *object)
{
ParoleGst *gst;
@@ -2199,8 +2109,8 @@ parole_gst_constructed (GObject *object)
gst = PAROLE_GST (object);
g_object_get (G_OBJECT (gst->priv->conf),
- "enable-xv", &enable_xv,
- NULL);
+ "enable-xv", &enable_xv,
+ NULL);
#if GST_CHECK_VERSION(1, 0, 0)
gst->priv->playbin = gst_element_factory_make ("playbin", "player");
@@ -2210,56 +2120,63 @@ parole_gst_constructed (GObject *object)
if ( G_UNLIKELY (gst->priv->playbin == NULL) )
{
- GError *error;
- error = g_error_new (0, 0, "%s", _("Unable to load playbin GStreamer plugin"
- ", check your GStreamer installation"));
-
- xfce_dialog_show_error (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gst))),
- error, NULL);
- g_error_free (error);
- g_error ("playbin load failed");
+ GError *error;
+
+ error = g_error_new (1, 0, _("Unable to load \"%s\" plugin"
+ ", check your GStreamer installation."),
+#if GST_CHECK_VERSION(1, 0, 0)
+ "playbin");
+#else
+ "playbin2");
+#endif
+
+ parole_gst_show_error (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gst))),
+ error);
+ g_error_free (error);
+ g_error ("playbin load failed");
}
gst->priv->audio_sink = gst_element_factory_make ("autoaudiosink", "audio");
if ( G_UNLIKELY (gst->priv->audio_sink == NULL) )
- {
- GError *error;
- error = g_error_new (0, 0, "%s", _("Unable to load audio GStreamer plugin"
- ", check your GStreamer installation"));
- xfce_dialog_show_error (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gst))),
- error, NULL);
- g_error_free (error);
- g_error ("autoaudiosink load failed");
- }
+ {
+ GError *error;
+ error = g_error_new (1, 0, _("Unable to load \"%s\" plugin"
+ ", check your GStreamer installation."), "autoaudiosink");
+ parole_gst_show_error (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gst))),
+ error);
+ g_error_free (error);
+ g_error ("autoaudiosink load failed");
+ }
if (enable_xv)
{
- gst->priv->video_sink = gst_element_factory_make ("xvimagesink", "video");
- gst->priv->xvimage_sink = TRUE;
+ gst->priv->video_sink = gst_element_factory_make ("xvimagesink", "video");
+ gst->priv->xvimage_sink = TRUE;
}
if ( G_UNLIKELY (gst->priv->video_sink == NULL) )
{
- gst->priv->xvimage_sink = FALSE;
- g_debug ("%s trying to load ximagesink", enable_xv ? "xvimagesink not found " : "xv disabled ");
- gst->priv->video_sink = gst_element_factory_make ("ximagesink", "video");
-
- if ( G_UNLIKELY (gst->priv->video_sink == NULL) )
- {
- GError *error;
- error = g_error_new (0, 0, "%s", _("Unable to load video GStreamer plugin"
- ", check your GStreamer installation"));
- xfce_dialog_show_error (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gst))),
- error, NULL);
- g_error_free (error);
- g_error ("ximagesink load failed");
- }
+ gst->priv->xvimage_sink = FALSE;
+ g_debug ("%s trying to load ximagesink", enable_xv ? "xvimagesink not found " : "xv disabled ");
+ gst->priv->video_sink = gst_element_factory_make ("ximagesink", "video");
+
+ if ( G_UNLIKELY (gst->priv->video_sink == NULL) )
+ {
+ GError *error;
+ error = g_error_new (1, 0, _("Unable to load \"%s\" plugin"
+ ", check your GStreamer installation."),
+ enable_xv ? "xvimagesink" : "ximagesink");
+ parole_gst_show_error (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gst))),
+ error);
+ g_error_free (error);
+ g_error ("ximagesink load failed");
+ }
}
g_object_set (G_OBJECT (gst->priv->playbin),
- "video-sink", gst->priv->video_sink,
- "audio-sink", gst->priv->audio_sink,
- NULL);
+ "video-sink", gst->priv->video_sink,
+ "audio-sink", gst->priv->audio_sink,
+ NULL);
/*
* Listen to the bus events.
@@ -2268,9 +2185,9 @@ parole_gst_constructed (GObject *object)
gst_bus_add_signal_watch (gst->priv->bus);
gst->priv->sig1 =
- g_signal_connect (gst->priv->bus, "message",
- G_CALLBACK (parole_gst_bus_event), gst);
-
+ g_signal_connect (gst->priv->bus, "message",
+ G_CALLBACK (parole_gst_bus_event), gst);
+
/*
* Handling 'prepare-xwindow-id' message async causes XSync
* error in some occasions So we handle this message synchronously
@@ -2281,22 +2198,20 @@ parole_gst_constructed (GObject *object)
gst_bus_set_sync_handler (gst->priv->bus, gst_bus_sync_signal_handler, gst);
#endif
gst->priv->sig2 =
- g_signal_connect (gst->priv->bus, "sync-message::element",
- G_CALLBACK (parole_gst_element_message_sync), gst);
+ g_signal_connect (gst->priv->bus, "sync-message::element",
+ G_CALLBACK (parole_gst_element_message_sync), gst);
g_signal_connect (gst->priv->playbin, "notify::source",
- G_CALLBACK (parole_gst_source_notify_cb), gst);
+ G_CALLBACK (parole_gst_source_notify_cb), gst);
g_signal_connect (gst->priv->playbin, "notify::volume",
- G_CALLBACK (parole_notify_volume_cb), gst);
+ G_CALLBACK (parole_notify_volume_cb), gst);
g_signal_connect (gst->priv->playbin, "about-to-finish",
- G_CALLBACK (parole_gst_about_to_finish_cb), gst);
-
+ G_CALLBACK (parole_gst_about_to_finish_cb), gst);
parole_gst_update_vis (gst);
- parole_gst_load_logo (gst);
parole_gst_set_subtitle_encoding (gst);
parole_gst_set_subtitle_font (gst);
@@ -2311,9 +2226,8 @@ parole_gst_style_set (GtkWidget *widget, GtkStyle *prev_style)
gst = PAROLE_GST (widget);
if ( gst->priv->logo )
- g_object_unref (gst->priv->logo);
-
- parole_gst_load_logo (gst);
+ g_object_unref (gst->priv->logo);
+
gtk_widget_queue_draw (widget);
}
@@ -2331,100 +2245,100 @@ parole_gst_class_init (ParoleGstClass *klass)
widget_class->realize = parole_gst_realize;
widget_class->show = parole_gst_show;
widget_class->size_allocate = parole_gst_size_allocate;
- widget_class->expose_event = parole_gst_expose_event;
+
widget_class->motion_notify_event = parole_gst_motion_notify_event;
widget_class->button_press_event = parole_gst_button_press_event;
widget_class->button_release_event = parole_gst_button_release_event;
widget_class->style_set = parole_gst_style_set;
signals[MEDIA_STATE] =
- g_signal_new ("media-state",
- PAROLE_TYPE_GST,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleGstClass, media_state),
- NULL, NULL,
- _gmarshal_VOID__OBJECT_ENUM,
- G_TYPE_NONE, 2,
- PAROLE_TYPE_STREAM, PAROLE_ENUM_TYPE_STATE);
+ g_signal_new ("media-state",
+ PAROLE_TYPE_GST,
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ParoleGstClass, media_state),
+ NULL, NULL,
+ _gmarshal_VOID__OBJECT_ENUM,
+ G_TYPE_NONE, 2,
+ PAROLE_TYPE_STREAM, PAROLE_ENUM_TYPE_STATE);
signals[MEDIA_PROGRESSED] =
- g_signal_new ("media-progressed",
- PAROLE_TYPE_GST,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleGstClass, media_progressed),
- NULL, NULL,
- _gmarshal_VOID__OBJECT_INT64,
- G_TYPE_NONE, 2,
- G_TYPE_OBJECT, G_TYPE_INT64);
+ g_signal_new ("media-progressed",
+ PAROLE_TYPE_GST,
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ParoleGstClass, media_progressed),
+ NULL, NULL,
+ _gmarshal_VOID__OBJECT_INT64,
+ G_TYPE_NONE, 2,
+ G_TYPE_OBJECT, G_TYPE_INT64);
signals [MEDIA_TAG] =
- g_signal_new ("media-tag",
- PAROLE_TYPE_GST,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleGstClass, media_tag),
- NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1,
- G_TYPE_OBJECT);
+ g_signal_new ("media-tag",
+ PAROLE_TYPE_GST,
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ParoleGstClass, media_tag),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ G_TYPE_OBJECT);
signals[BUFFERING] =
- g_signal_new ("buffering",
- PAROLE_TYPE_GST,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleGstClass, buffering),
- NULL, NULL,
- _gmarshal_VOID__OBJECT_INT,
- G_TYPE_NONE, 2,
- G_TYPE_OBJECT, G_TYPE_INT);
+ g_signal_new ("buffering",
+ PAROLE_TYPE_GST,
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ParoleGstClass, buffering),
+ NULL, NULL,
+ _gmarshal_VOID__OBJECT_INT,
+ G_TYPE_NONE, 2,
+ G_TYPE_OBJECT, G_TYPE_INT);
signals[ERROR] =
- g_signal_new ("error",
- PAROLE_TYPE_GST,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleGstClass, error),
- NULL, NULL,
- g_cclosure_marshal_VOID__STRING,
- G_TYPE_NONE, 1,
- G_TYPE_STRING);
-
+ g_signal_new ("error",
+ PAROLE_TYPE_GST,
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ParoleGstClass, error),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1,
+ G_TYPE_STRING);
+
signals[DVD_CHAPTER_CHANGE] =
- g_signal_new ("dvd-chapter-change",
- PAROLE_TYPE_GST,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleGstClass, dvd_chapter_change),
- NULL, NULL,
- g_cclosure_marshal_VOID__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
+ g_signal_new ("dvd-chapter-change",
+ PAROLE_TYPE_GST,
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ParoleGstClass, dvd_chapter_change),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1, G_TYPE_INT);
signals[DVD_CHAPTER_COUNT_CHANGE] =
- g_signal_new ("dvd-chapter-count-change",
- PAROLE_TYPE_GST,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleGstClass, dvd_chapter_count_change),
- NULL, NULL,
- g_cclosure_marshal_VOID__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
-
- g_object_class_install_property (object_class,
- PROP_CONF_OBJ,
- g_param_spec_pointer ("conf-object",
- NULL, NULL,
- G_PARAM_CONSTRUCT_ONLY|
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class,
- PROP_VOLUME,
- g_param_spec_double ("volume", NULL, NULL,
- 0.0, 1.0, 0.0,
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS));
-
- g_object_class_install_property (object_class,
- PROP_ENABLE_TAGS,
- g_param_spec_boolean ("tags",
- NULL, NULL,
- TRUE,
- G_PARAM_READWRITE));
+ g_signal_new ("dvd-chapter-count-change",
+ PAROLE_TYPE_GST,
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ParoleGstClass, dvd_chapter_count_change),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1, G_TYPE_INT);
+
+ g_object_class_install_property (object_class,
+ PROP_CONF_OBJ,
+ g_param_spec_pointer ("conf-object",
+ NULL, NULL,
+ G_PARAM_CONSTRUCT_ONLY|
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
+ PROP_VOLUME,
+ g_param_spec_double ("volume", NULL, NULL,
+ 0.0, 1.0, 0.0,
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_property (object_class,
+ PROP_ENABLE_TAGS,
+ g_param_spec_boolean ("tags",
+ NULL, NULL,
+ TRUE,
+ G_PARAM_READWRITE));
g_type_class_add_private (klass, sizeof (ParoleGstPrivate));
}
@@ -2451,28 +2365,27 @@ parole_gst_init (ParoleGst *gst)
gst->priv->terminating = FALSE;
gst->priv->with_vis = FALSE;
gst->priv->vis_loaded = FALSE;
- gst->priv->scale_logo = TRUE;
gst->priv->use_custom_subtitles = FALSE;
gst->priv->custom_subtitles = NULL;
gst->priv->volume = -1.0;
gst->priv->conf = NULL;
- GTK_WIDGET_SET_FLAGS (GTK_WIDGET (gst), GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (GTK_WIDGET (gst), TRUE);
/*
* Disable double buffering on the video output to avoid
* flickering when resizing the window.
*/
- GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (gst), GTK_DOUBLE_BUFFERED);
+ gtk_widget_set_double_buffered (GTK_WIDGET (gst), FALSE);
}
GtkWidget *
parole_gst_new (gpointer conf_obj)
{
parole_gst_object = g_object_new (PAROLE_TYPE_GST,
- "conf-object", conf_obj,
- NULL);
-
+ "conf-object", conf_obj,
+ NULL);
+
g_object_add_weak_pointer (parole_gst_object, &parole_gst_object);
return GTK_WIDGET (parole_gst_object);
@@ -2482,18 +2395,17 @@ GtkWidget *parole_gst_get (void)
{
if ( G_LIKELY (parole_gst_object != NULL ) )
{
- /*
- * Don't increase the reference count of this object as
- * we need it to be destroyed immediately when the main
- * window is destroyed.
- */
- //g_object_ref (parole_gst_object);
+ /*
+ * Don't increase the reference count of this object as
+ * we need it to be destroyed immediately when the main
+ * window is destroyed.
+ */
+ //g_object_ref (parole_gst_object);
}
else
{
- parole_gst_object = g_object_new (PAROLE_TYPE_GST,
- NULL);
- g_object_add_weak_pointer (parole_gst_object, &parole_gst_object);
+ parole_gst_object = g_object_new (PAROLE_TYPE_GST, NULL);
+ g_object_add_weak_pointer (parole_gst_object, &parole_gst_object);
}
return GTK_WIDGET (parole_gst_object);
@@ -2508,9 +2420,9 @@ parole_gst_play_idle (gpointer data)
gst = PAROLE_GST (data);
if ( gst->priv->state < GST_STATE_PAUSED )
- parole_gst_play_file_internal (gst);
+ parole_gst_play_file_internal (gst);
else
- parole_gst_change_state (gst, GST_STATE_READY);
+ parole_gst_change_state (gst, GST_STATE_READY);
return FALSE;
}
@@ -2534,8 +2446,8 @@ gchar * parole_gst_get_file_uri (ParoleGst *gst)
gchar* uri;
g_object_get (G_OBJECT (gst->priv->stream),
- "uri", &uri,
- NULL);
+ "uri", &uri,
+ NULL);
return uri;
}
@@ -2548,18 +2460,18 @@ void parole_gst_play_uri (ParoleGst *gst, const gchar *uri, const gchar *subtitl
parole_stream_init_properties (gst->priv->stream);
g_object_set (G_OBJECT (gst->priv->stream),
- "uri", uri,
- "subtitles", subtitles,
- NULL);
-
+ "uri", uri,
+ "subtitles", subtitles,
+ NULL);
+
g_mutex_unlock (&gst->priv->lock);
if ( gst->priv->state_change_id == 0 )
- gst->priv->state_change_id = g_timeout_add_seconds (20,
- (GSourceFunc) parole_gst_check_state_change_timeout,
- gst);
+ gst->priv->state_change_id = g_timeout_add_seconds (20,
+ (GSourceFunc) parole_gst_check_state_change_timeout,
+ gst);
- parole_window_busy_cursor (GTK_WIDGET (gst)->window);
+ parole_window_busy_cursor (gtk_widget_get_window(GTK_WIDGET (gst)));
g_idle_add ((GSourceFunc) parole_gst_play_idle, gst);
@@ -2574,8 +2486,8 @@ void parole_gst_play_device_uri (ParoleGst *gst, const gchar *uri, const gchar *
if ( gst->priv->device )
{
- g_free (gst->priv->device);
- gst->priv->device = NULL;
+ g_free (gst->priv->device);
+ gst->priv->device = NULL;
}
gst->priv->device = g_strdup (device);
@@ -2585,9 +2497,10 @@ void parole_gst_play_device_uri (ParoleGst *gst, const gchar *uri, const gchar *
* but cdda:// works.
*/
if ( G_UNLIKELY (!g_strcmp0 (uri, "cdda:/") ) )
- local_uri = "cdda://";
+ local_uri = "cdda://";
else
- local_uri = uri;
+ local_uri = uri;
+
parole_gst_play_uri (gst, local_uri, NULL);
}
@@ -2599,7 +2512,7 @@ void parole_gst_pause (ParoleGst *gst)
g_mutex_unlock (&gst->priv->lock);
- parole_window_busy_cursor (GTK_WIDGET (gst)->window);
+ parole_window_busy_cursor (gtk_widget_get_window(GTK_WIDGET (gst)));
parole_gst_change_state (gst, GST_STATE_PAUSED);
}
@@ -2611,7 +2524,7 @@ void parole_gst_resume (ParoleGst *gst)
g_mutex_unlock (&gst->priv->lock);
- parole_window_busy_cursor (GTK_WIDGET (gst)->window);
+ parole_window_busy_cursor (gtk_widget_get_window(GTK_WIDGET (gst)));
parole_gst_change_state (gst, GST_STATE_PLAYING);
}
@@ -2633,10 +2546,10 @@ void parole_gst_stop (ParoleGst *gst)
parole_stream_init_properties (gst->priv->stream);
gst->priv->target = GST_STATE_NULL;
-
+
g_mutex_unlock (&gst->priv->lock);
- parole_window_busy_cursor (GTK_WIDGET (gst)->window);
+ parole_window_busy_cursor (gtk_widget_get_window(GTK_WIDGET (gst)));
g_idle_add ((GSourceFunc) parole_gst_stop_idle, gst);
}
@@ -2655,38 +2568,38 @@ void parole_gst_shutdown (ParoleGst *gst)
if ( g_signal_handler_is_connected (gst->priv->playbin, gst->priv->sig2) )
g_signal_handler_disconnect (gst->priv->playbin, gst->priv->sig2);
- if ( gst->priv->bus )
- g_object_unref (gst->priv->bus);
+ if ( gst->priv->bus )
+ g_object_unref (gst->priv->bus);
gst_element_set_state (gst->priv->playbin, GST_STATE_VOID_PENDING);
- if ( gst->priv->playbin )
- g_object_unref (gst->priv->playbin);
+ if ( gst->priv->playbin )
+ g_object_unref (gst->priv->playbin);
}
void parole_gst_seek (ParoleGst *gst, gdouble seek)
{
TRACE ("Seeking");
g_warn_if_fail ( gst_element_seek (gst->priv->playbin,
- 1.0,
- GST_FORMAT_TIME,
- GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_FLUSH,
- GST_SEEK_TYPE_SET, (int) seek * GST_SECOND,
- GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE));
+ 1.0,
+ GST_FORMAT_TIME,
+ GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_FLUSH,
+ GST_SEEK_TYPE_SET, (int) seek * GST_SECOND,
+ GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE));
}
void parole_gst_set_volume (ParoleGst *gst, gdouble volume)
{
- gst_stream_volume_set_volume (GST_STREAM_VOLUME (gst->priv->playbin),
- GST_STREAM_VOLUME_FORMAT_CUBIC,
- volume);
+ gst_stream_volume_set_volume (GST_STREAM_VOLUME (gst->priv->playbin),
+ GST_STREAM_VOLUME_FORMAT_CUBIC,
+ volume);
volume = CLAMP (volume, 0.0, 1.0);
gst->priv->volume = volume;
g_object_notify (G_OBJECT (gst), "volume");
}
-
-gdouble parole_gst_get_volume (ParoleGst *gst)
+
+gdouble parole_gst_get_volume (ParoleGst *gst)
{
return gst->priv->volume;
}
@@ -2721,11 +2634,11 @@ void parole_gst_set_dvd_chapter (ParoleGst *gst, gint chapter)
GstFormat format = gst_format_get_by_nick ("chapter");
guint64 val = (guint64) chapter;
- gst_element_seek (gst->priv->playbin, 1.0, format,
- GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET,
- val,
- GST_SEEK_TYPE_NONE,
- 0);
+ gst_element_seek (gst->priv->playbin, 1.0, format,
+ GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET,
+ val,
+ GST_SEEK_TYPE_NONE,
+ 0);
}
gint parole_gst_get_num_tracks (ParoleGst *gst)
@@ -2733,13 +2646,13 @@ gint parole_gst_get_num_tracks (ParoleGst *gst)
gint num_tracks;
g_object_get (G_OBJECT (gst->priv->stream),
- "num-tracks", &num_tracks,
- NULL);
-
+ "num-tracks", &num_tracks,
+ NULL);
+
return num_tracks;
}
-void parole_gst_seek_cdda (ParoleGst *gst, guint track_num)
+void parole_gst_seek_cdda (ParoleGst *gst, guint track_num)
{
gint current_track;
@@ -2760,20 +2673,20 @@ gint parole_gst_get_current_cdda_track (ParoleGst *gst)
if ( gst_element_query_position (gst->priv->playbin, &format, &pos) )
#endif
{
- TRACE ("Pos %" G_GINT64_FORMAT, pos);
- ret_val = (gint) pos;
+ TRACE ("Pos %" G_GINT64_FORMAT, pos);
+ ret_val = (gint) pos;
}
-
+
return ret_val;
}
-gint64 parole_gst_get_stream_duration (ParoleGst *gst)
+gint64 parole_gst_get_stream_duration (ParoleGst *gst)
{
gint64 dur;
g_object_get (G_OBJECT (gst->priv->stream),
- "duration", &dur,
- NULL);
+ "duration", &dur,
+ NULL);
return dur;
}
@@ -2801,11 +2714,13 @@ parole_gst_set_cursor_visible (ParoleGst *gst, gboolean visible)
{
if ( visible )
{
- gst->priv->target == gst->priv->state ? gdk_window_set_cursor (GTK_WIDGET (gst)->window, NULL):
- parole_window_busy_cursor (GTK_WIDGET (gst)->window);
+ if (gst->priv->target == gst->priv->state)
+ gdk_window_set_cursor (gtk_widget_get_window(GTK_WIDGET (gst)), NULL);
+ else
+ parole_window_busy_cursor (gtk_widget_get_window(GTK_WIDGET (gst)));
}
else
- parole_window_invisible_cursor (GTK_WIDGET (gst)->window);
+ parole_window_invisible_cursor (gtk_widget_get_window(GTK_WIDGET (gst)));
}
GList *
@@ -2814,7 +2729,8 @@ gst_get_lang_list_for_type (ParoleGst * gst, const gchar * type_name)
GList *ret = NULL;
gint num = 1;
- if (g_str_equal (type_name, "AUDIO")) {
+ if (g_str_equal (type_name, "AUDIO"))
+ {
gint i, n;
g_object_get (G_OBJECT (gst->priv->playbin), "n-audio", &n, NULL);
@@ -2824,16 +2740,18 @@ gst_get_lang_list_for_type (ParoleGst * gst, const gchar * type_name)
for (i = 0; i < n; i++) {
GstTagList *tags = NULL;
- g_signal_emit_by_name (G_OBJECT (gst->priv->playbin), "get-audio-tags",
- i, &tags);
+ g_signal_emit_by_name (G_OBJECT (gst->priv->playbin), "get-audio-tags",
+ i, &tags);
- if (tags) {
+ if (tags)
+ {
gchar *lc = NULL, *cd = NULL, *language_name = NULL;
gst_tag_list_get_string (tags, GST_TAG_LANGUAGE_CODE, &lc);
gst_tag_list_get_string (tags, GST_TAG_CODEC, &cd);
- if (lc) {
+ if (lc)
+ {
language_name = g_strdup(gst_tag_get_language_name(lc));
if (language_name)
{
@@ -2842,17 +2760,25 @@ gst_get_lang_list_for_type (ParoleGst * gst, const gchar * type_name)
else
ret = g_list_prepend (ret, lc);
g_free (cd);
- } else if (cd) {
+ }
+ else if (cd)
+ {
ret = g_list_prepend (ret, cd);
- } else {
+ }
+ else
+ {
ret = g_list_prepend (ret, g_strdup_printf (_("Audio Track #%d"), num++));
}
gst_tag_list_free (tags);
- } else {
+ }
+ else
+ {
ret = g_list_prepend (ret, g_strdup_printf (_("Audio Track #%d"), num++));
}
}
- } else if (g_str_equal (type_name, "TEXT")) {
+ }
+ else if (g_str_equal (type_name, "TEXT"))
+ {
gint i, n = 0;
g_object_get (G_OBJECT (gst->priv->playbin), "n-text", &n, NULL);
@@ -2865,34 +2791,38 @@ gst_get_lang_list_for_type (ParoleGst * gst, const gchar * type_name)
if (n != 0)
{
- for (i = 0; i < n; i++) {
+ for (i = 0; i < n; i++)
+ {
GstTagList *tags = NULL;
g_signal_emit_by_name (G_OBJECT (gst->priv->playbin), "get-text-tags",
i, &tags);
- if (tags) {
+ if (tags)
+ {
gchar *lc = NULL, *cd = NULL, *language_name = NULL;
- gst_tag_list_get_string (tags, GST_TAG_LANGUAGE_CODE, &lc);
- gst_tag_list_get_string (tags, GST_TAG_CODEC, &lc);
-
- if (lc) {
- language_name = g_strdup(gst_tag_get_language_name(lc));
- if (language_name)
+ gst_tag_list_get_string (tags, GST_TAG_LANGUAGE_CODE, &lc);
+ gst_tag_list_get_string (tags, GST_TAG_CODEC, &lc);
+
+ if (lc) {
+ language_name = g_strdup(gst_tag_get_language_name(lc));
+ if (language_name)
+ {
+ ret = g_list_prepend (ret, language_name);
+ }
+ else
+ ret = g_list_prepend (ret, lc);
+ g_free (cd);
+ }
+ else
{
- ret = g_list_prepend (ret, language_name);
+ ret = g_list_prepend (ret, g_strdup_printf (_("Subtitle #%d"), num++));
}
- else
- ret = g_list_prepend (ret, lc);
- g_free (cd);
- } else if (cd) {
- ret = g_list_prepend (ret, cd);
- } else {
- ret = g_list_prepend (ret, g_strdup_printf (_("Subtitle #%d"), num++));
- }
- gst_tag_list_free (tags);
- } else {
+ gst_tag_list_free (tags);
+ }
+ else
+ {
ret = g_list_prepend (ret, g_strdup_printf (_("Subtitle #%d"), num++));
}
}
@@ -2904,7 +2834,9 @@ gst_get_lang_list_for_type (ParoleGst * gst, const gchar * type_name)
{
ret = g_list_prepend (ret, g_strdup_printf("%s",gst->priv->custom_subtitles));
}
- } else {
+ }
+ else
+ {
g_critical ("Invalid stream type '%s'", type_name);
return NULL;
}
@@ -2918,70 +2850,73 @@ gst_get_has_vis( ParoleGst *gst )
gboolean has_vis;
g_object_get (G_OBJECT (gst->priv->conf),
- "vis-enabled", &has_vis,
- NULL);
-
+ "vis-enabled", &has_vis,
+ NULL);
+
return has_vis;
}
gboolean
gst_get_has_video( ParoleGst *gst )
{
- gboolean playing_video;
+ gboolean playing_video;
- g_object_get (G_OBJECT (gst->priv->stream),
- "has-video", &playing_video,
- NULL);
-
- return playing_video;
+ g_object_get (G_OBJECT (gst->priv->stream),
+ "has-video", &playing_video,
+ NULL);
+
+ return playing_video;
}
void
gst_set_current_audio_track( ParoleGst *gst, gint track_no )
{
- g_object_set (G_OBJECT (gst->priv->playbin), "current-audio", (track_no), NULL);
+ g_object_set (G_OBJECT (gst->priv->playbin), "current-audio", (track_no), NULL);
}
void
gst_set_current_subtitle_track( ParoleGst *gst, gint track_no )
{
-
- gchar *uri, *sub;
- gint flags;
-
- g_object_get (G_OBJECT (gst->priv->stream),
- "uri", &uri,
- NULL);
-
+
+ gchar *uri, *sub;
+ gint flags;
+
+ g_object_get (G_OBJECT (gst->priv->stream),
+ "uri", &uri,
+ NULL);
+
if ( gst->priv->use_custom_subtitles == TRUE )
sub = gst->priv->custom_subtitles;
else
- sub = (gchar*) parole_get_subtitle_path(uri);
+ sub = (gchar*) parole_get_subtitle_path(uri);
- g_object_get (gst->priv->playbin, "flags", &flags, NULL);
-
- track_no = track_no -1;
+ g_object_get (gst->priv->playbin, "flags", &flags, NULL);
+
+ track_no = track_no -1;
- if (track_no <= -1) {
- flags &= ~GST_PLAY_FLAG_TEXT;
- track_no = -1;
- } else {
- flags |= GST_PLAY_FLAG_TEXT;
- }
-
- if (track_no == -1)
- sub = NULL;
+ if (track_no <= -1)
+ {
+ flags &= ~GST_PLAY_FLAG_TEXT;
+ track_no = -1;
+ }
+ else
+ {
+ flags |= GST_PLAY_FLAG_TEXT;
+ }
+
+ if (track_no == -1)
+ sub = NULL;
- g_object_set (gst->priv->playbin, "flags", flags, "suburi", sub, "current-text", track_no, NULL);
+ g_object_set (gst->priv->playbin, "flags", flags, "suburi", sub, "current-text", track_no, NULL);
- if (flags & GST_PLAY_FLAG_TEXT) {
- g_object_get (gst->priv->playbin, "current-text", &track_no, NULL);
- }
-
- parole_gst_load_subtitle( gst );
+ if (flags & GST_PLAY_FLAG_TEXT) {
+ g_object_get (gst->priv->playbin, "current-text", &track_no, NULL);
+ }
+
+ parole_gst_load_subtitle( gst );
}
-const ParoleStream *parole_gst_get_stream (ParoleGst *gst)
+const ParoleStream *parole_gst_get_stream (ParoleGst *gst)
{
g_return_val_if_fail (PAROLE_IS_GST (gst), NULL);
diff --git a/src/gst/parole-gst.h b/src/gst/parole-gst.h
index ab533ba..1584339 100644
--- a/src/gst/parole-gst.h
+++ b/src/gst/parole-gst.h
@@ -44,131 +44,138 @@ typedef enum
PAROLE_ASPECT_RATIO_4_3,
PAROLE_ASPECT_RATIO_16_9,
PAROLE_ASPECT_RATIO_DVB
-
+
} ParoleAspectRatio;
+enum
+{
+ GST_DVD_ROOT_MENU,
+ GST_DVD_TITLE_MENU,
+ GST_DVD_AUDIO_MENU,
+ GST_DVD_ANGLE_MENU,
+ GST_DVD_CHAPTER_MENU
+};
+
typedef struct ParoleGstPrivate ParoleGstPrivate;
typedef struct
{
- GtkWidget parent;
+ GtkWidget parent;
ParoleGstPrivate *priv;
} ParoleGst;
typedef struct
{
- GtkWidgetClass parent_class;
+ GtkWidgetClass parent_class;
- void (*media_state) (ParoleGst *gst,
- const ParoleStream *stream,
- ParoleState state);
-
- void (*media_progressed) (ParoleGst *gst,
- const ParoleStream *stream,
- gint64 value);
+ void (*media_state) (ParoleGst *gst,
+ const ParoleStream *stream,
+ ParoleState state);
+
+ void (*media_progressed) (ParoleGst *gst,
+ const ParoleStream *stream,
+ gint64 value);
- void (*buffering) (ParoleGst *gst,
- const ParoleStream *stream,
- gint percentage);
+ void (*buffering) (ParoleGst *gst,
+ const ParoleStream *stream,
+ gint percentage);
- void (*media_tag) (ParoleGst *gst,
- const ParoleStream *stream);
+ void (*media_tag) (ParoleGst *gst,
+ const ParoleStream *stream);
- void (*error) (ParoleGst *gst,
- const gchar *error);
-
- void (*dvd_chapter_change) (ParoleGst *gst,
- gint dvd_chapter_change);
-
- void (*dvd_chapter_count_change) (ParoleGst *gst,
- gint dvd_chapter_change);
+ void (*error) (ParoleGst *gst,
+ const gchar *error);
+
+ void (*dvd_chapter_change) (ParoleGst *gst,
+ gint dvd_chapter_change);
+
+ void (*dvd_chapter_count_change) (ParoleGst *gst,
+ gint dvd_chapter_change);
} ParoleGstClass;
-GType parole_gst_get_type (void) G_GNUC_CONST;
-
-GtkWidget *parole_gst_new (gpointer conf_obj);
-
-GtkWidget *parole_gst_get (void);
-
-void parole_gst_set_custom_subtitles (ParoleGst *gst, const gchar* sub_file);
-
-gchar* parole_gst_get_file_uri (ParoleGst *gst);
-
-void parole_gst_play_uri (ParoleGst *gst,
- const gchar *uri,
- const gchar *subtitles);
+GType parole_gst_get_type (void) G_GNUC_CONST;
+GtkWidget *parole_gst_new (gpointer conf_obj);
+GtkWidget *parole_gst_get (void);
-void parole_gst_play_device_uri (ParoleGst *gst,
- const gchar *uri,
- const gchar *device);
+void parole_gst_set_custom_subtitles (ParoleGst *gst,
+ const gchar* sub_file);
-void parole_gst_pause (ParoleGst *gst);
+gchar* parole_gst_get_file_uri (ParoleGst *gst);
-void parole_gst_resume (ParoleGst *gst);
+void parole_gst_play_uri (ParoleGst *gst,
+ const gchar *uri,
+ const gchar *subtitles);
-void parole_gst_stop (ParoleGst *gst);
+void parole_gst_play_device_uri (ParoleGst *gst,
+ const gchar *uri,
+ const gchar *device);
-void parole_gst_terminate (ParoleGst *gst);
+void parole_gst_pause (ParoleGst *gst);
+void parole_gst_resume (ParoleGst *gst);
+void parole_gst_stop (ParoleGst *gst);
+void parole_gst_terminate (ParoleGst *gst);
+void parole_gst_shutdown (ParoleGst *gst);
-void parole_gst_shutdown (ParoleGst *gst);
+void parole_gst_seek (ParoleGst *gst,
+ gdouble pos);
-void parole_gst_seek (ParoleGst *gst,
- gdouble pos);
+void parole_gst_set_volume (ParoleGst *gst,
+ gdouble value);
+
+gdouble parole_gst_get_volume (ParoleGst *gst);
-void parole_gst_set_volume (ParoleGst *gst,
- gdouble value);
-
-gdouble parole_gst_get_volume (ParoleGst *gst);
-
-ParoleState parole_gst_get_state (ParoleGst *gst);
-
-GstState parole_gst_get_gst_state (ParoleGst *gst);
-
-GstState parole_gst_get_gst_target_state (ParoleGst *gst);
+ParoleState parole_gst_get_state (ParoleGst *gst);
+GstState parole_gst_get_gst_state (ParoleGst *gst);
+GstState parole_gst_get_gst_target_state (ParoleGst *gst);
void
-parole_gst_send_navigation_command(ParoleGst *gst, gint command);
-
-void parole_gst_next_dvd_chapter (ParoleGst *gst);
-
-void parole_gst_prev_dvd_chapter (ParoleGst *gst);
-
-void parole_gst_set_dvd_chapter (ParoleGst *gst, gint chapter);
-
-void parole_gst_next_cdda_track (ParoleGst *gst);
+parole_gst_send_navigation_command (ParoleGst *gst,
+ gint command);
-void parole_gst_prev_cdda_track (ParoleGst *gst);
+void parole_gst_next_dvd_chapter (ParoleGst *gst);
+void parole_gst_prev_dvd_chapter (ParoleGst *gst);
-gint parole_gst_get_num_tracks (ParoleGst *gst);
+void parole_gst_set_dvd_chapter (ParoleGst *gst,
+ gint chapter);
-void parole_gst_seek_cdda (ParoleGst *gst,
- guint track_num);
+void parole_gst_next_cdda_track (ParoleGst *gst);
+void parole_gst_prev_cdda_track (ParoleGst *gst);
+gint parole_gst_get_num_tracks (ParoleGst *gst);
-gint parole_gst_get_current_cdda_track (ParoleGst *gst);
+void parole_gst_seek_cdda (ParoleGst *gst,
+ guint track_num);
-ParoleMediaType parole_gst_get_current_stream_type (ParoleGst *gst);
+gint
+parole_gst_get_current_cdda_track (ParoleGst *gst);
-gint64 parole_gst_get_stream_duration (ParoleGst *gst);
+ParoleMediaType
+parole_gst_get_current_stream_type (ParoleGst *gst);
-gint64 parole_gst_get_stream_position (ParoleGst *gst);
+gint64 parole_gst_get_stream_duration (ParoleGst *gst);
+gint64 parole_gst_get_stream_position (ParoleGst *gst);
-gboolean parole_gst_get_is_xvimage_sink (ParoleGst *gst);
+gboolean parole_gst_get_is_xvimage_sink (ParoleGst *gst);
-void parole_gst_set_cursor_visible (ParoleGst *gst,
- gboolean visible);
-
-GList * gst_get_lang_list_for_type (ParoleGst * gst, const gchar * type_name);
+void parole_gst_set_cursor_visible (ParoleGst *gst,
+ gboolean visible);
+
+GList * gst_get_lang_list_for_type (ParoleGst * gst,
+ const gchar * type_name);
-gboolean gst_get_has_vis( ParoleGst *gst );
-gboolean gst_get_has_video( ParoleGst *gst );
+gboolean gst_get_has_vis (ParoleGst *gst);
+gboolean gst_get_has_video (ParoleGst *gst);
-void gst_set_current_audio_track( ParoleGst *gst, gint track_no );
-void gst_set_current_subtitle_track( ParoleGst *gst, gint track_no );
+void gst_set_current_audio_track (ParoleGst *gst,
+ gint track_no);
+
+void gst_set_current_subtitle_track (ParoleGst *gst,
+ gint track_no);
-const ParoleStream *parole_gst_get_stream (ParoleGst *gst);
-
+const ParoleStream
+*parole_gst_get_stream (ParoleGst *gst);
+
G_END_DECLS
#endif /* __PAROLE_GST_H */
diff --git a/src/main.c b/src/main.c
index 7d07606..f12d85b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -60,7 +60,8 @@ show_version (void)
"Parole Media Player %s\n\n"
"Part of the Xfce Goodies Project\n"
"http://goodies.xfce.org\n\n"
- "Licensed under the GNU GPL.\n\n"), VERSION);
+ "Licensed under the GNU GPL.\n\n"
+ "Please report bugs to <http://bugzilla.xfce.org/>.\n\n"), VERSION);
exit (EXIT_SUCCESS);
}
@@ -88,27 +89,27 @@ parole_send_play_disc (const gchar *uri, const gchar *device)
if ( uri )
{
- uri_local = g_strdup (uri);
+ uri_local = g_strdup (uri);
}
else
{
- uri_local = parole_get_uri_from_unix_device (device);
+ uri_local = parole_get_uri_from_unix_device (device);
}
proxy = parole_get_proxy (PAROLE_DBUS_PATH, PAROLE_DBUS_INTERFACE);
dbus_g_proxy_call (proxy, "PlayDisc", &error,
- G_TYPE_STRING, uri_local,
- G_TYPE_STRING, device,
- G_TYPE_INVALID,
- G_TYPE_INVALID);
+ G_TYPE_STRING, uri_local,
+ G_TYPE_STRING, device,
+ G_TYPE_INVALID,
+ G_TYPE_INVALID);
g_free (uri_local);
-
+
if ( error )
{
- g_critical ("Unable to send uri to Parole: %s", error->message);
- g_error_free (error);
+ g_critical ("Unable to send uri to Parole: %s", error->message);
+ g_error_free (error);
}
g_object_unref (proxy);
@@ -132,30 +133,30 @@ parole_send_files (gchar **filenames, gboolean enqueue)
guint i;
proxy = parole_get_proxy (PAROLE_DBUS_PLAYLIST_PATH, PAROLE_DBUS_PLAYLIST_INTERFACE);
-
+
if ( !proxy )
- g_error ("Unable to create proxy for %s", PAROLE_DBUS_NAME);
+ g_error ("Unable to create proxy for %s", PAROLE_DBUS_NAME);
out_paths = g_new0 (gchar *, g_strv_length (filenames));
for ( i = 0; filenames && filenames[i]; i++)
{
- file = g_file_new_for_commandline_arg (filenames[i]);
- out_paths[i] = g_file_get_path (file);
- g_object_unref (file);
+ file = g_file_new_for_commandline_arg (filenames[i]);
+ out_paths[i] = g_file_get_path (file);
+ g_object_unref (file);
}
dbus_g_proxy_call (proxy, "AddFiles", &error,
- G_TYPE_STRV, out_paths,
- G_TYPE_BOOLEAN, enqueue,
- G_TYPE_INVALID,
- G_TYPE_INVALID);
-
-
+ G_TYPE_STRV, out_paths,
+ G_TYPE_BOOLEAN, enqueue,
+ G_TYPE_INVALID,
+ G_TYPE_INVALID);
+
+
if ( error )
{
- g_critical ("Unable to send media files to Parole: %s", error->message);
- g_error_free (error);
+ g_critical ("Unable to send media files to Parole: %s", error->message);
+ g_error_free (error);
}
g_strfreev (out_paths);
@@ -175,9 +176,9 @@ static void
parole_send (gchar **filenames, gchar *device, gboolean enqueue)
{
if ( g_strv_length (filenames) == 1 && parole_is_uri_disc (filenames[0]))
- parole_send_play_disc (filenames[0], device);
+ parole_send_play_disc (filenames[0], device);
else
- parole_send_files (filenames, enqueue);
+ parole_send_files (filenames, enqueue);
}
/**
@@ -195,13 +196,13 @@ parole_send_message (const gchar *message)
proxy = parole_get_proxy (PAROLE_DBUS_PATH, PAROLE_DBUS_INTERFACE);
dbus_g_proxy_call (proxy, message, &error,
- G_TYPE_INVALID,
- G_TYPE_INVALID);
-
+ G_TYPE_INVALID,
+ G_TYPE_INVALID);
+
if ( error )
{
- g_critical ("Failed to send message : %s : %s", message, error->message);
- g_error_free (error);
+ g_critical ("Failed to send message : %s : %s", message, error->message);
+ g_error_free (error);
}
g_object_unref (proxy);
@@ -225,19 +226,19 @@ xv_option_given (const gchar *name, const gchar *value, gpointer data, GError **
ParoleConf *conf;
if ( !g_strcmp0 (value, "TRUE") || !g_strcmp0 (value, "true"))
- enabled = TRUE;
+ enabled = TRUE;
else if (!g_strcmp0 (value, "FALSE") || !g_strcmp0 (value, "false"))
- enabled = FALSE;
+ enabled = FALSE;
else
{
- g_set_error (error, 0, 0, "%s %s : %s", name, _("Unknown argument "), value);
- return FALSE;
+ g_set_error (error, 0, 0, "%s %s : %s", name, _("Unknown argument "), value);
+ return FALSE;
}
conf = parole_conf_new ();
g_object_set (G_OBJECT (conf),
- "enable-xv", enabled,
- NULL);
+ "enable-xv", enabled,
+ NULL);
g_object_unref(conf);
exit (0);
@@ -257,42 +258,38 @@ int main (int argc, char **argv)
gboolean new_instance = FALSE;
gboolean version = FALSE;
gboolean play = FALSE;
- gboolean stop = FALSE;
gboolean next_track = FALSE;
gboolean prev_track = FALSE;
- gboolean seek_f = FALSE;
- gboolean seek_b = FALSE;
gboolean raise_volume = FALSE;
gboolean lower_volume = FALSE;
gboolean mute = FALSE;
+ gboolean unmute = FALSE;
gboolean no_plugins = FALSE;
gboolean embedded = FALSE;
gboolean fullscreen = FALSE;
- gboolean enqueue = FALSE;
+ gboolean enqueue = FALSE;
gchar *client_id = NULL;
/* Command-line options */
GOptionEntry option_entries[] =
{
- { "new-instance", 'i', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &new_instance, N_("Open a new instance"), NULL },
- { "no-plugins", 'n', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &no_plugins, N_("Do not load plugins"), NULL },
- { "device", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING, &device, N_("Set Audio-CD/VCD/DVD device path"), NULL },
- { "play", 'p', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &play, N_("Play or pause if already playing"), NULL },
- { "stop", 's', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &stop, N_("Stop playing"), NULL },
- { "next-track", 'N', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &next_track, N_("Next track"), NULL },
- { "previous-track", 'P', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &prev_track, N_("Previous track"), NULL },
- { "seek-f", 'f', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &seek_f, N_("Seek forward"), NULL },
- { "seek-b", 'b', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &seek_b, N_("Seek Backward"), NULL },
- { "raise-volume", 'r', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &raise_volume, N_("Raise volume"), NULL },
- { "lower-volume", 'l', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &lower_volume, N_("Lower volume"), NULL },
- { "mute", 'm', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &mute, N_("Mute volume"), NULL },
- { "version", 'V', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &version, N_("Version information"), NULL },
- { "embedded", 'E', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &embedded, N_("Use embedded mode"), NULL },
- { "fullscreen", 'F', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &fullscreen, N_("Start in fullscreen mode"), NULL },
- { "xv", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, (GOptionArgFunc) xv_option_given, N_("Enabled/Disable XV support"), NULL},
- { "add", 'a', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &enqueue, N_("Add files to playlist"), NULL},
- { "sm-client-id", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &client_id, NULL, NULL },
- {G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, N_("Media to play"), NULL},
+ { "new-instance", 'i', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &new_instance, N_("Open a new instance"), NULL },
+ { "no-plugins", 'n', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &no_plugins, N_("Do not load plugins"), NULL },
+ { "device", 'd', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING, &device, N_("Set Audio-CD/VCD/DVD device path"), NULL },
+ { "xv", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, (GOptionArgFunc) xv_option_given, N_("Enable/Disable XV support (true or false, default=true)"), NULL},
+ { "embedded", 'E', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &embedded, N_("Start in embedded mode"), NULL },
+ { "fullscreen", 'F', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &fullscreen, N_("Start in fullscreen mode"), NULL },
+ { "play", 'p', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &play, N_("Play or pause if already playing"), NULL },
+ { "next", 'N', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &next_track, N_("Next track"), NULL },
+ { "previous", 'P', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &prev_track, N_("Previous track"), NULL },
+ { "volume-up", 'r', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &raise_volume, N_("Raise volume"), NULL },
+ { "volume-down", 'l', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &lower_volume, N_("Lower volume"), NULL },
+ { "mute", 'm', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &mute, N_("Mute volume"), NULL },
+ { "unmute", 'u', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &unmute, N_("Unmute (restore) volume"), NULL },
+ { "add", 'a', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &enqueue, N_("Add files to playlist"), NULL},
+ { "version", 'V', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &version, N_("Print version information and exit"), NULL },
+ { "sm-client-id", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &client_id, NULL, NULL },
+ {G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, N_("Media to play"), NULL},
{ NULL, },
};
@@ -307,7 +304,7 @@ int main (int argc, char **argv)
return EXIT_FAILURE;
}
- XInitThreads();
+ XInitThreads();
xfce_textdomain (GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
@@ -315,7 +312,7 @@ int main (int argc, char **argv)
gtk_init (&argc, &argv);
- ctx = g_option_context_new (NULL);
+ ctx = g_option_context_new (_("[FILES...] - Play movies and songs"));
gst_option_group = gst_init_get_option_group ();
g_option_context_add_main_entries (ctx, option_entries, GETTEXT_PACKAGE);
@@ -326,119 +323,114 @@ int main (int argc, char **argv)
if ( !g_option_context_parse (ctx, &argc, &argv, &error) )
{
- g_print ("%s\n", error->message);
- g_print ("Type %s --help to list all available command line options", argv[0]);
- g_error_free (error);
- g_option_context_free (ctx);
- return EXIT_FAILURE;
+ g_print ("%s\n", error->message);
+ g_print (_("Type %s --help to list all available command line options\n"), argv[0]);
+ g_error_free (error);
+ g_option_context_free (ctx);
+ return EXIT_FAILURE;
}
g_option_context_free (ctx);
if ( version )
- show_version ();
-
- /* Check for cli options if there is an instance of Parole already */
+ show_version ();
+
+ /* Check for cli options if there is an instance of Parole already */
if ( !new_instance && parole_dbus_name_has_owner (PAROLE_DBUS_NAME) )
{
- if (!enqueue)
- g_print (_("Parole is already running, use -i to open a new instance\n"));
-
- if ( filenames && filenames[0] != NULL )
- parole_send (filenames, device, enqueue);
- else if (device != NULL)
- parole_send_play_disc (NULL, device);
-
- if ( play )
- parole_send_message ("Play");
-
- if ( stop )
- parole_send_message ("Stop");
-
- if ( next_track )
- parole_send_message ("NextTrack");
-
- if ( prev_track )
- parole_send_message ("PrevTrack");
-
- if ( seek_f )
- parole_send_message ("SeekForward");
-
- if ( seek_b )
- parole_send_message ("SeekBackward");
-
- if ( raise_volume )
- parole_send_message ("RaiseVolume");
-
- if ( lower_volume )
- parole_send_message ("LowerVolume");
-
- if ( mute )
- parole_send_message ("Mute");
+ if (!enqueue && !play && !next_track && !prev_track &&
+ !raise_volume && !lower_volume && !mute && !unmute)
+ g_print (_("Parole is already running, use -i to open a new instance\n"));
+
+ if ( filenames && filenames[0] != NULL )
+ parole_send (filenames, device, enqueue);
+ else if (device != NULL)
+ parole_send_play_disc (NULL, device);
+
+ if ( play )
+ parole_send_message ("Play");
+
+ if ( next_track )
+ parole_send_message ("NextTrack");
+
+ if ( prev_track )
+ parole_send_message ("PrevTrack");
+
+ if ( raise_volume )
+ parole_send_message ("RaiseVolume");
+
+ if ( lower_volume )
+ parole_send_message ("LowerVolume");
+
+ if ( mute )
+ parole_send_message ("Mute");
+
+ if ( unmute )
+ parole_send_message ("Unmute");
}
-
- /* Create a new instance because Parole isn't running */
+
+ /* Create a new instance because Parole isn't running */
else
{
- builder = parole_builder_get_main_interface ();
- parole_dbus_register_name (PAROLE_DBUS_NAME);
-
- player = parole_player_new (client_id);
- g_free (client_id);
-
- if (embedded)
- parole_player_embedded (player);
- else if (fullscreen)
- parole_player_full_screen (player, TRUE);
-
- if ( filenames && filenames[0] != NULL )
- {
- if ( g_strv_length (filenames) == 1 && parole_is_uri_disc (filenames[0]))
- {
- parole_player_play_uri_disc (player, filenames[0], device);
- }
- else
- {
- ParoleMediaList *list;
- list = parole_player_get_media_list (player);
- parole_media_list_add_files (list, filenames, enqueue);
- }
- }
- else if ( device != NULL )
- {
- parole_player_play_uri_disc (player, NULL, device);
- }
-
- if ( xfce_posix_signal_handler_init (&error))
- {
- xfce_posix_signal_handler_set_handler(SIGHUP,
- parole_sig_handler,
- player, NULL);
-
- xfce_posix_signal_handler_set_handler(SIGINT,
- parole_sig_handler,
- player, NULL);
-
- xfce_posix_signal_handler_set_handler(SIGTERM,
- parole_sig_handler,
- player, NULL);
- }
- else
- {
- g_warning ("Unable to set up POSIX signal handlers: %s", error->message);
- g_error_free (error);
- }
-
- /* Initialize the plugin-manager and load the plugins */
- plugins = parole_plugins_manager_new (!no_plugins);
- parole_plugins_manager_load (plugins);
- g_object_unref (builder);
-
- /* Start main process */
- gdk_notify_startup_complete ();
- gtk_main ();
-
- parole_dbus_release_name (PAROLE_DBUS_NAME);
- g_object_unref (plugins);
+ builder = parole_builder_get_main_interface ();
+ parole_dbus_register_name (PAROLE_DBUS_NAME);
+
+ player = parole_player_new (client_id);
+ g_free (client_id);
+
+ if (embedded)
+ parole_player_embedded (player);
+ else if (fullscreen)
+ parole_player_full_screen (player, TRUE);
+
+ if ( filenames && filenames[0] != NULL )
+ {
+ if ( g_strv_length (filenames) == 1 && parole_is_uri_disc (filenames[0]))
+ {
+ parole_player_play_uri_disc (player, filenames[0], device);
+ }
+ else
+ {
+ ParoleMediaList *list;
+ list = parole_player_get_media_list (player);
+ parole_media_list_add_files (list, filenames, enqueue);
+ }
+ }
+ else if ( device != NULL )
+ {
+ parole_player_play_uri_disc (player, NULL, device);
+ }
+
+ if ( xfce_posix_signal_handler_init (&error))
+ {
+ xfce_posix_signal_handler_set_handler(SIGHUP,
+ parole_sig_handler,
+ player, NULL);
+
+ xfce_posix_signal_handler_set_handler(SIGINT,
+ parole_sig_handler,
+ player, NULL);
+
+ xfce_posix_signal_handler_set_handler(SIGTERM,
+ parole_sig_handler,
+ player, NULL);
+ }
+ else
+ {
+ g_warning ("Unable to set up POSIX signal handlers: %s", error->message);
+ g_error_free (error);
+ }
+
+ /* Initialize the plugin-manager and load the plugins */
+ plugins = parole_plugins_manager_new (!no_plugins);
+ parole_plugins_manager_load (plugins);
+ g_object_unref (builder);
+
+ /* Start main process */
+ gdk_notify_startup_complete ();
+ gtk_main ();
+
+ parole_dbus_release_name (PAROLE_DBUS_NAME);
+ g_object_unref (plugins);
}
gst_deinit ();
diff --git a/src/misc/parole-debug.c b/src/misc/parole-debug.c
index 79ca9c8..dde26a3 100644
--- a/src/misc/parole-debug.c
+++ b/src/misc/parole-debug.c
@@ -36,7 +36,7 @@
#if defined(DEBUG) && defined(G_HAVE_ISO_VARARGS)
void parole_debug_enum (const gchar *func, const gchar *file, gint line,
- const gchar *text, gint v_enum, GType type)
+ const gchar *text, gint v_enum, GType type)
{
gchar *content = NULL;
GValue __value__ = { 0, };
@@ -49,12 +49,12 @@ void parole_debug_enum (const gchar *func, const gchar *file, gint line,
fprintf(stdout, "TRACE[%s:%d] %s(): %s : %s", file, line , func, text, content);
fprintf(stdout, "\n");
- g_value_unset (&__value__);
+ g_value_unset (&__value__);
g_free (content);
}
void parole_debug_enum_full (const gchar *func, const gchar *file, gint line,
- gint v_enum, GType type, const gchar *format, ...)
+ gint v_enum, GType type, const gchar *format, ...)
{
va_list args;
gchar *buffer;
@@ -70,12 +70,12 @@ void parole_debug_enum_full (const gchar *func, const gchar *file, gint line,
va_start (args, format);
g_vasprintf (&buffer, format, args);
va_end (args);
-
+
fprintf(stdout, "TRACE[%s:%d] %s(): ", file, line, func);
fprintf(stdout, "%s: %s", buffer, content);
fprintf(stdout, "\n");
- g_value_unset (&__value__);
+ g_value_unset (&__value__);
g_free (content);
g_free (buffer);
}
diff --git a/src/misc/parole-debug.h b/src/misc/parole-debug.h
index 54eeb1e..36503d2 100644
--- a/src/misc/parole-debug.h
+++ b/src/misc/parole-debug.h
@@ -40,20 +40,20 @@ G_BEGIN_DECLS
#define PAROLE_DEBUG_ENUM_FULL(_value, _type, ...)\
parole_debug_enum_full (__func__, __FILE__, __LINE__, _value, _type, __VA_ARGS__)
-void parole_debug_enum (const gchar *func,
- const gchar *file,
- gint line,
- const gchar *text,
- gint v_enum,
- GType type);
-
-void parole_debug_enum_full (const gchar *func,
- const gchar *file,
- gint line,
- gint v_enum,
- GType type,
- const gchar *format,
- ...) G_GNUC_PRINTF (6, 7);
+void parole_debug_enum (const gchar *func,
+ const gchar *file,
+ gint line,
+ const gchar *text,
+ gint v_enum,
+ GType type);
+
+void parole_debug_enum_full (const gchar *func,
+ const gchar *file,
+ gint line,
+ gint v_enum,
+ GType type,
+ const gchar *format,
+ ...) G_GNUC_PRINTF (6, 7);
#else
diff --git a/src/misc/parole-file.c b/src/misc/parole-file.c
index ceac529..f816416 100644
--- a/src/misc/parole-file.c
+++ b/src/misc/parole-file.c
@@ -44,13 +44,13 @@ typedef struct _ParoleFilePrivate ParoleFilePrivate;
struct _ParoleFilePrivate
{
- gchar *filename;
- gchar *display_name;
- gchar *uri;
+ gchar *filename;
+ gchar *display_name;
+ gchar *uri;
gchar *content_type;
- gchar *directory;
- gchar *custom_subtitles;
- gint dvd_chapter;
+ gchar *directory;
+ gchar *custom_subtitles;
+ gint dvd_chapter;
};
@@ -61,9 +61,9 @@ enum
PROP_DISPLAY_NAME,
PROP_URI,
PROP_CONTENT_TYPE,
- PROP_DIRECTORY,
- PROP_CUSTOM_SUBTITLES,
- PROP_DVD_CHAPTER
+ PROP_DIRECTORY,
+ PROP_CUSTOM_SUBTITLES,
+ PROP_DVD_CHAPTER
};
G_DEFINE_TYPE (ParoleFile, parole_file, G_TYPE_OBJECT)
@@ -78,59 +78,59 @@ parole_file_finalize (GObject *object)
priv = PAROLE_FILE_GET_PRIVATE (file);
if ( priv->filename )
- g_free (priv->filename);
+ g_free (priv->filename);
if ( priv->uri )
- g_free (priv->uri);
-
+ g_free (priv->uri);
+
if ( priv->display_name )
- g_free (priv->display_name);
-
+ g_free (priv->display_name);
+
if ( priv->content_type )
- g_free (priv->content_type);
-
- if ( priv->directory )
- g_free (priv->directory);
-
- if ( priv->custom_subtitles )
- g_free (priv->custom_subtitles);
+ g_free (priv->content_type);
+
+ if ( priv->directory )
+ g_free (priv->directory);
+
+ if ( priv->custom_subtitles )
+ g_free (priv->custom_subtitles);
G_OBJECT_CLASS (parole_file_parent_class)->finalize (object);
}
static void
parole_file_set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
+ const GValue *value, GParamSpec *pspec)
{
ParoleFile *file;
file = PAROLE_FILE (object);
switch (prop_id)
{
- case PROP_PATH:
- PAROLE_FILE_GET_PRIVATE (file)->filename = g_value_dup_string (value);
- break;
- case PROP_DISPLAY_NAME:
- PAROLE_FILE_GET_PRIVATE (file)->display_name = g_value_dup_string (value);
- break;
- case PROP_DIRECTORY:
- PAROLE_FILE_GET_PRIVATE (file)->directory = g_value_dup_string (value);
- break;
- case PROP_CUSTOM_SUBTITLES:
- PAROLE_FILE_GET_PRIVATE (file)->custom_subtitles = g_value_dup_string (value);
- break;
- case PROP_DVD_CHAPTER:
- PAROLE_FILE_GET_PRIVATE (file)->dvd_chapter = g_value_get_int (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_PATH:
+ PAROLE_FILE_GET_PRIVATE (file)->filename = g_value_dup_string (value);
+ break;
+ case PROP_DISPLAY_NAME:
+ PAROLE_FILE_GET_PRIVATE (file)->display_name = g_value_dup_string (value);
+ break;
+ case PROP_DIRECTORY:
+ PAROLE_FILE_GET_PRIVATE (file)->directory = g_value_dup_string (value);
+ break;
+ case PROP_CUSTOM_SUBTITLES:
+ PAROLE_FILE_GET_PRIVATE (file)->custom_subtitles = g_value_dup_string (value);
+ break;
+ case PROP_DVD_CHAPTER:
+ PAROLE_FILE_GET_PRIVATE (file)->dvd_chapter = g_value_get_int (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
static void
parole_file_get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
+ GValue *value, GParamSpec *pspec)
{
ParoleFile *file;
@@ -138,30 +138,30 @@ parole_file_get_property (GObject *object, guint prop_id,
switch (prop_id)
{
- case PROP_PATH:
- g_value_set_string (value, PAROLE_FILE_GET_PRIVATE (file)->filename);
- break;
- case PROP_URI:
- g_value_set_string (value, PAROLE_FILE_GET_PRIVATE (file)->filename);
- break;
- case PROP_CONTENT_TYPE:
- g_value_set_string (value, PAROLE_FILE_GET_PRIVATE (file)->content_type);
- break;
- case PROP_DISPLAY_NAME:
- g_value_set_string (value, PAROLE_FILE_GET_PRIVATE (file)->display_name);
- break;
- case PROP_DIRECTORY:
- g_value_set_string (value, PAROLE_FILE_GET_PRIVATE (file)->directory);
- break;
- case PROP_CUSTOM_SUBTITLES:
- g_value_set_string (value, PAROLE_FILE_GET_PRIVATE (file)->custom_subtitles);
- break;
- case PROP_DVD_CHAPTER:
- g_value_set_int (value, PAROLE_FILE_GET_PRIVATE (file)->dvd_chapter);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_PATH:
+ g_value_set_string (value, PAROLE_FILE_GET_PRIVATE (file)->filename);
+ break;
+ case PROP_URI:
+ g_value_set_string (value, PAROLE_FILE_GET_PRIVATE (file)->filename);
+ break;
+ case PROP_CONTENT_TYPE:
+ g_value_set_string (value, PAROLE_FILE_GET_PRIVATE (file)->content_type);
+ break;
+ case PROP_DISPLAY_NAME:
+ g_value_set_string (value, PAROLE_FILE_GET_PRIVATE (file)->display_name);
+ break;
+ case PROP_DIRECTORY:
+ g_value_set_string (value, PAROLE_FILE_GET_PRIVATE (file)->directory);
+ break;
+ case PROP_CUSTOM_SUBTITLES:
+ g_value_set_string (value, PAROLE_FILE_GET_PRIVATE (file)->custom_subtitles);
+ break;
+ case PROP_DVD_CHAPTER:
+ g_value_set_int (value, PAROLE_FILE_GET_PRIVATE (file)->dvd_chapter);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -204,65 +204,65 @@ parole_file_constructed (GObject *object)
gfile = g_file_new_for_commandline_arg (priv->filename);
info = g_file_query_info (gfile,
- "standard::*,",
- 0,
- NULL,
- &error);
-
-
- priv->directory = g_file_get_path (g_file_get_parent( gfile ));
+ "standard::*,",
+ 0,
+ NULL,
+ &error);
+
+
+ priv->directory = g_file_get_path (g_file_get_parent( gfile ));
if ( error )
{
- if ( G_LIKELY (error->code == G_IO_ERROR_NOT_SUPPORTED) )
- {
- g_error_free (error);
- if ( !priv->display_name )
- priv->display_name = g_file_get_basename (gfile);
- }
- else
- {
- if ( !priv->display_name )
- priv->display_name = g_strdup (priv->filename);
- g_warning ("Unable to read file info %s", error->message);
- }
- goto out;
+ if ( G_LIKELY (error->code == G_IO_ERROR_NOT_SUPPORTED) )
+ {
+ g_error_free (error);
+ if ( !priv->display_name )
+ priv->display_name = g_file_get_basename (gfile);
+ }
+ else
+ {
+ if ( !priv->display_name )
+ priv->display_name = g_strdup (priv->filename);
+ g_warning ("Unable to read file info %s", error->message);
+ }
+ goto out;
}
#ifdef HAVE_TAGLIBC
else
{
- TagLib_File *tag_file;
- TagLib_Tag *tag;
- gchar *title;
- gchar *title_s;
-
- tag_file = taglib_file_new (priv->filename);
-
- if ( tag_file )
- {
- tag = taglib_file_tag (tag_file);
- if ( tag )
- {
- title = taglib_tag_title (tag);
-
- if ( title )
- {
- title_s = g_strstrip (title);
- if ( strlen (title_s ) )
- {
- priv->display_name = g_strdup (title_s);
- }
- }
-
- taglib_tag_free_strings ();
- }
- taglib_file_free (tag_file);
- }
+ TagLib_File *tag_file;
+ TagLib_Tag *tag;
+ gchar *title;
+ gchar *title_s;
+
+ tag_file = taglib_file_new (priv->filename);
+
+ if ( tag_file )
+ {
+ tag = taglib_file_tag (tag_file);
+ if ( tag )
+ {
+ title = taglib_tag_title (tag);
+
+ if ( title )
+ {
+ title_s = g_strstrip (title);
+ if ( strlen (title_s ) )
+ {
+ priv->display_name = g_strdup (title_s);
+ }
+ }
+
+ taglib_tag_free_strings ();
+ }
+ taglib_file_free (tag_file);
+ }
}
#endif
if (!priv->display_name)
- priv->display_name = g_strdup (g_file_info_get_display_name (info));
+ priv->display_name = g_strdup (g_file_info_get_display_name (info));
priv->content_type = g_strdup (g_file_info_get_content_type (info));
@@ -292,13 +292,13 @@ parole_file_class_init (ParoleFileClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_PATH,
- g_param_spec_string ("filename",
- "File name",
- "The file name",
- NULL,
- G_PARAM_CONSTRUCT_ONLY|
- G_PARAM_READWRITE));
+ PROP_PATH,
+ g_param_spec_string ("filename",
+ "File name",
+ "The file name",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY|
+ G_PARAM_READWRITE));
/**
* ParoleFile:display-name:
@@ -308,13 +308,13 @@ parole_file_class_init (ParoleFileClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_DISPLAY_NAME,
- g_param_spec_string ("display-name",
- "Display name",
- "A UTF-8 name that can be displayed in the UI",
- NULL,
- G_PARAM_CONSTRUCT_ONLY|
- G_PARAM_READWRITE));
+ PROP_DISPLAY_NAME,
+ g_param_spec_string ("display-name",
+ "Display name",
+ "A UTF-8 name that can be displayed in the UI",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY|
+ G_PARAM_READWRITE));
/**
* ParoleFile:uri:
@@ -324,12 +324,12 @@ parole_file_class_init (ParoleFileClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_URI,
- g_param_spec_string ("uri",
- "Uri",
- "The uri of the file",
- NULL,
- G_PARAM_READABLE));
+ PROP_URI,
+ g_param_spec_string ("uri",
+ "Uri",
+ "The uri of the file",
+ NULL,
+ G_PARAM_READABLE));
/**
* ParoleFile:content-type:
@@ -339,14 +339,14 @@ parole_file_class_init (ParoleFileClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_CONTENT_TYPE,
- g_param_spec_string ("content-type",
- "Content type",
- "The content type of the file",
- NULL,
- G_PARAM_READABLE));
-
- /**
+ PROP_CONTENT_TYPE,
+ g_param_spec_string ("content-type",
+ "Content type",
+ "The content type of the file",
+ NULL,
+ G_PARAM_READABLE));
+
+ /**
* ParoleFile:directory:
*
* The parent directory of the file.
@@ -354,14 +354,14 @@ parole_file_class_init (ParoleFileClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_DIRECTORY,
- g_param_spec_string ("directory",
- "Parent directory",
- "The parent directory of the file",
- NULL,
- G_PARAM_CONSTRUCT_ONLY|
- G_PARAM_READWRITE));
-
+ PROP_DIRECTORY,
+ g_param_spec_string ("directory",
+ "Parent directory",
+ "The parent directory of the file",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY|
+ G_PARAM_READWRITE));
+
/**
* ParoleFile:custom_subtitles:
*
@@ -370,14 +370,14 @@ parole_file_class_init (ParoleFileClass *klass)
* Since: 0.4
**/
g_object_class_install_property (object_class,
- PROP_CUSTOM_SUBTITLES,
- g_param_spec_string ("custom_subtitles",
- "Custom Subtitles",
- "The custom subtitles set by the user",
- NULL,
- G_PARAM_CONSTRUCT_ONLY|
- G_PARAM_READWRITE));
-
+ PROP_CUSTOM_SUBTITLES,
+ g_param_spec_string ("custom_subtitles",
+ "Custom Subtitles",
+ "The custom subtitles set by the user",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY|
+ G_PARAM_READWRITE));
+
/**
* ParoleFile:dvd_chapter:
*
@@ -386,15 +386,15 @@ parole_file_class_init (ParoleFileClass *klass)
* Since: 0.4
**/
g_object_class_install_property (object_class,
- PROP_DVD_CHAPTER,
- g_param_spec_int ("dvd-chapter",
- "DVD Chapter",
- "DVD Chapter, used for seeking a DVD using the playlist.",
- -1,
- 1000,
- -1,
- G_PARAM_CONSTRUCT_ONLY|
- G_PARAM_READWRITE));
+ PROP_DVD_CHAPTER,
+ g_param_spec_int ("dvd-chapter",
+ "DVD Chapter",
+ "DVD Chapter, used for seeking a DVD using the playlist.",
+ -1,
+ 1000,
+ -1,
+ G_PARAM_CONSTRUCT_ONLY|
+ G_PARAM_READWRITE));
g_type_class_add_private (klass, sizeof (ParoleFilePrivate));
}
@@ -410,9 +410,9 @@ parole_file_init (ParoleFile *file)
priv->display_name = NULL;
priv->uri = NULL;
priv->content_type = NULL;
- priv->directory = NULL;
- priv->custom_subtitles = NULL;
- priv->dvd_chapter = 0;
+ priv->directory = NULL;
+ priv->custom_subtitles = NULL;
+ priv->dvd_chapter = 0;
}
/**
@@ -449,9 +449,9 @@ parole_file_new_with_display_name (const gchar *filename, const gchar *display_n
ParoleFile *file = NULL;
file = g_object_new (PAROLE_TYPE_FILE,
- "filename", filename,
- "display-name", display_name,
- NULL);
+ "filename", filename,
+ "display-name", display_name,
+ NULL);
return file;
}
@@ -473,9 +473,9 @@ parole_file_new_cdda_track (const gint track_num, const gchar *display_name)
gchar *uri = g_strdup_printf("cdda://%i", track_num);
file = g_object_new (PAROLE_TYPE_FILE,
- "filename", uri,
- "display-name", display_name,
- NULL);
+ "filename", uri,
+ "display-name", display_name,
+ NULL);
g_free(uri);
return file;
@@ -498,10 +498,10 @@ parole_file_new_dvd_chapter (gint chapter_num, const gchar *display_name)
gchar *uri = "dvd:/";
file = g_object_new (PAROLE_TYPE_FILE,
- "filename", uri,
- "display-name", display_name,
- "dvd-chapter", chapter_num,
- NULL);
+ "filename", uri,
+ "display-name", display_name,
+ "dvd-chapter", chapter_num,
+ NULL);
//g_free(uri); FIXME This should probably be freed.
return file;
@@ -617,12 +617,12 @@ parole_file_set_custom_subtitles (const ParoleFile *file, gchar *suburi)
g_value_set_static_string (&value, suburi);
parole_file_set_property (G_OBJECT(file), PROP_CUSTOM_SUBTITLES,
- &value, g_param_spec_string ("custom_subtitles",
- "Custom Subtitles",
- "The custom subtitles set by the user",
- NULL,
- G_PARAM_CONSTRUCT_ONLY|
- G_PARAM_READWRITE));
+ &value, g_param_spec_string ("custom_subtitles",
+ "Custom Subtitles",
+ "The custom subtitles set by the user",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY|
+ G_PARAM_READWRITE));
}
/**
@@ -650,13 +650,13 @@ parole_file_set_dvd_chapter (const ParoleFile *file, gint dvd_chapter)
g_value_set_int (&value, dvd_chapter);
parole_file_set_property (G_OBJECT(file), PROP_DVD_CHAPTER,
- &value, g_param_spec_int ("dvd-chapter",
- "DVD Chapter",
- "DVD Chapter, used for seeking a DVD using the playlist.",
- -1,
- 1000,
- -1,
- G_PARAM_CONSTRUCT_ONLY|
- G_PARAM_READWRITE));
+ &value, g_param_spec_int ("dvd-chapter",
+ "DVD Chapter",
+ "DVD Chapter, used for seeking a DVD using the playlist.",
+ -1,
+ 1000,
+ -1,
+ G_PARAM_CONSTRUCT_ONLY|
+ G_PARAM_READWRITE));
}
diff --git a/src/misc/parole-file.h b/src/misc/parole-file.h
index 8347834..4f70bed 100644
--- a/src/misc/parole-file.h
+++ b/src/misc/parole-file.h
@@ -40,43 +40,51 @@ typedef struct _ParoleFileClass ParoleFileClass;
struct _ParoleFile
{
- GObject parent;
+ GObject parent;
};
struct _ParoleFileClass
{
- GObjectClass parent_class;
+ GObjectClass parent_class;
};
-GType parole_file_get_type (void) G_GNUC_CONST;
+GType parole_file_get_type (void) G_GNUC_CONST;
-ParoleFile *parole_file_new (const gchar *filename);
+ParoleFile *parole_file_new (const gchar *filename);
-ParoleFile *parole_file_new_with_display_name (const gchar *filename,
- const gchar *display_name);
-
-ParoleFile *parole_file_new_cdda_track (const gint track_num, const gchar *display_name);
+ParoleFile *parole_file_new_with_display_name (const gchar *filename,
+ const gchar *display_name);
+
+ParoleFile *parole_file_new_cdda_track (const gint track_num,
+ const gchar *display_name);
-ParoleFile *parole_file_new_dvd_chapter (gint chapter_num, const gchar *display_name);
-
+ParoleFile *parole_file_new_dvd_chapter (gint chapter_num,
+ const gchar *display_name);
+
+void parole_file_set_custom_subtitles (const ParoleFile *file, gchar *suburi);
-void parole_file_set_custom_subtitles (const ParoleFile *file, gchar *suburi);
+void parole_file_set_dvd_chapter (const ParoleFile *file, gint dvd_chapter);
-void parole_file_set_dvd_chapter (const ParoleFile *file, gint dvd_chapter);
+gint parole_file_get_dvd_chapter (const ParoleFile *file);
-const gchar G_CONST_RETURN *parole_file_get_directory (const ParoleFile *file) G_GNUC_PURE;
+const gchar
+G_CONST_RETURN *parole_file_get_directory (const ParoleFile *file) G_GNUC_PURE;
-const gchar G_CONST_RETURN *parole_file_get_file_name (const ParoleFile *file) G_GNUC_PURE;
+const gchar
+G_CONST_RETURN *parole_file_get_file_name (const ParoleFile *file) G_GNUC_PURE;
-const gchar G_CONST_RETURN *parole_file_get_display_name (const ParoleFile *file) G_GNUC_PURE;
+const gchar
+G_CONST_RETURN *parole_file_get_display_name (const ParoleFile *file) G_GNUC_PURE;
-const gchar G_CONST_RETURN *parole_file_get_uri (const ParoleFile *file) G_GNUC_PURE;
+const gchar
+G_CONST_RETURN *parole_file_get_uri (const ParoleFile *file) G_GNUC_PURE;
-const gchar G_CONST_RETURN *parole_file_get_content_type (const ParoleFile *file) G_GNUC_PURE;
+const gchar
+G_CONST_RETURN *parole_file_get_content_type (const ParoleFile *file) G_GNUC_PURE;
-const gchar G_CONST_RETURN *parole_file_get_custom_subtitles (const ParoleFile *file) G_GNUC_PURE;
+const gchar
+G_CONST_RETURN *parole_file_get_custom_subtitles (const ParoleFile *file) G_GNUC_PURE;
-gint parole_file_get_dvd_chapter (const ParoleFile *file);
G_END_DECLS
diff --git a/src/misc/parole-filters.c b/src/misc/parole-filters.c
index 5585c27..8352827 100644
--- a/src/misc/parole-filters.c
+++ b/src/misc/parole-filters.c
@@ -36,7 +36,6 @@
#include "data/mime/parole-mime-types.h"
static char *playlist_mime_types[] = {
- //"text/plain",
"audio/x-mpegurl",
"audio/playlist",
"audio/x-scpls",
@@ -56,7 +55,7 @@ static char *playlist_mime_types[] = {
*
* Since: 0.2
*/
-GtkFileFilter *parole_get_supported_audio_filter (void)
+GtkFileFilter *parole_get_supported_audio_filter (void)
{
GtkFileFilter *filter;
guint i;
@@ -66,7 +65,7 @@ GtkFileFilter *parole_get_supported_audio_filter (void)
gtk_file_filter_set_name (filter, _("Audio"));
for ( i = 0; i < G_N_ELEMENTS (audio_mime_types); i++)
- gtk_file_filter_add_mime_type (filter, audio_mime_types[i]);
+ gtk_file_filter_add_mime_type (filter, audio_mime_types[i]);
return filter;
}
@@ -82,7 +81,7 @@ GtkFileFilter *parole_get_supported_audio_filter (void)
*
* Since: 0.2
*/
-GtkFileFilter *parole_get_supported_video_filter (void)
+GtkFileFilter *parole_get_supported_video_filter (void)
{
GtkFileFilter *filter;
guint i;
@@ -92,7 +91,7 @@ GtkFileFilter *parole_get_supported_video_filter (void)
gtk_file_filter_set_name (filter, _("Video"));
for ( i = 0; i < G_N_ELEMENTS (video_mime_types); i++)
- gtk_file_filter_add_mime_type (filter, video_mime_types[i]);
+ gtk_file_filter_add_mime_type (filter, video_mime_types[i]);
return filter;
}
@@ -107,7 +106,7 @@ GtkFileFilter *parole_get_supported_video_filter (void)
*
* Since: 0.2
*/
-GtkFileFilter *parole_get_supported_media_filter (void)
+GtkFileFilter *parole_get_supported_media_filter (void)
{
GtkFileFilter *filter;
guint i;
@@ -117,15 +116,15 @@ GtkFileFilter *parole_get_supported_media_filter (void)
gtk_file_filter_set_name (filter, _("Audio and video"));
for ( i = 0; i < G_N_ELEMENTS (audio_mime_types); i++)
- gtk_file_filter_add_mime_type (filter, audio_mime_types[i]);
-
+ gtk_file_filter_add_mime_type (filter, audio_mime_types[i]);
+
for ( i = 0; i < G_N_ELEMENTS (video_mime_types); i++)
- gtk_file_filter_add_mime_type (filter, video_mime_types[i]);
+ gtk_file_filter_add_mime_type (filter, video_mime_types[i]);
return filter;
}
-GtkRecentFilter *parole_get_supported_recent_media_filter (void)
+GtkRecentFilter *parole_get_supported_recent_media_filter (void)
{
GtkRecentFilter *filter;
guint i;
@@ -135,10 +134,10 @@ GtkRecentFilter *parole_get_supported_recent_media_filter (void)
gtk_recent_filter_set_name (filter, _("Audio and video"));
for ( i = 0; i < G_N_ELEMENTS (audio_mime_types); i++)
- gtk_recent_filter_add_mime_type (filter, audio_mime_types[i]);
-
+ gtk_recent_filter_add_mime_type (filter, audio_mime_types[i]);
+
for ( i = 0; i < G_N_ELEMENTS (video_mime_types); i++)
- gtk_recent_filter_add_mime_type (filter, video_mime_types[i]);
+ gtk_recent_filter_add_mime_type (filter, video_mime_types[i]);
return filter;
}
@@ -164,7 +163,7 @@ GtkFileFilter *parole_get_supported_files_filter (void)
gtk_file_filter_set_name (filter, _("All supported files"));
for ( i = 0; i < G_N_ELEMENTS (playlist_mime_types); i++)
- gtk_file_filter_add_mime_type (filter, playlist_mime_types[i]);
+ gtk_file_filter_add_mime_type (filter, playlist_mime_types[i]);
return filter;
@@ -180,7 +179,7 @@ GtkRecentFilter *parole_get_supported_recent_files_filter (void)
gtk_recent_filter_set_name (filter, _("All supported files"));
for ( i = 0; i < G_N_ELEMENTS (playlist_mime_types); i++)
- gtk_recent_filter_add_mime_type (filter, playlist_mime_types[i]);
+ gtk_recent_filter_add_mime_type (filter, playlist_mime_types[i]);
return filter;
@@ -197,7 +196,7 @@ GtkRecentFilter *parole_get_supported_recent_files_filter (void)
*
* Since: 0.2
*/
-GtkFileFilter *parole_get_supported_playlist_filter (void)
+GtkFileFilter *parole_get_supported_playlist_filter (void)
{
GtkFileFilter *filter;
guint i;
@@ -207,7 +206,7 @@ GtkFileFilter *parole_get_supported_playlist_filter (void)
gtk_file_filter_set_name (filter, _("Playlist files"));
for ( i = 0; i < G_N_ELEMENTS (playlist_mime_types); i++)
- gtk_file_filter_add_mime_type (filter, playlist_mime_types[i]);
+ gtk_file_filter_add_mime_type (filter, playlist_mime_types[i]);
return filter;
}
diff --git a/src/misc/parole-filters.h b/src/misc/parole-filters.h
index 305e592..2820c68 100644
--- a/src/misc/parole-filters.h
+++ b/src/misc/parole-filters.h
@@ -33,22 +33,17 @@
G_BEGIN_DECLS
-GtkFileFilter *parole_get_supported_audio_filter (void);
+GtkFileFilter *parole_get_supported_audio_filter (void);
+GtkFileFilter *parole_get_supported_video_filter (void);
+GtkFileFilter *parole_get_supported_media_filter (void);
+GtkFileFilter *parole_get_supported_files_filter (void);
+GtkFileFilter *parole_get_supported_playlist_filter (void);
-GtkFileFilter *parole_get_supported_video_filter (void);
+GtkRecentFilter *parole_get_supported_recent_media_filter (void);
+GtkRecentFilter *parole_get_supported_recent_files_filter (void);
-GtkFileFilter *parole_get_supported_media_filter (void);
-
-GtkRecentFilter *parole_get_supported_recent_media_filter (void);
-
-GtkFileFilter *parole_get_supported_files_filter (void);
-
-GtkRecentFilter *parole_get_supported_recent_files_filter (void);
-
-GtkFileFilter *parole_get_supported_playlist_filter (void);
-
-gboolean parole_file_filter (GtkFileFilter *filter,
- ParoleFile *file);
+gboolean parole_file_filter (GtkFileFilter *filter,
+ ParoleFile *file);
G_END_DECLS
diff --git a/src/misc/parole-pl-parser.c b/src/misc/parole-pl-parser.c
index 9f9e98a..5de12e2 100644
--- a/src/misc/parole-pl-parser.c
+++ b/src/misc/parole-pl-parser.c
@@ -23,10 +23,10 @@
/*
* Based on code from:
*
- * Totem pl parser: Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Bastien Nocera
- * Copyright (C) 2003, 2004 Colin Walters <walters at rhythmbox.org>
+ * Totem pl parser: Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Bastien Nocera
+ * Copyright (C) 2003, 2004 Colin Walters <walters at rhythmbox.org>
*
- * xfmedia: Copyright (c) 2004-2005 Brian Tarricone, <bjt23 at cornell.edu>
+ * xfmedia: Copyright (c) 2004-2005 Brian Tarricone, <bjt23 at cornell.edu>
*
* Thanks :).
*/
@@ -76,21 +76,21 @@ parole_filename_to_utf8(const gchar* filename)
static void
parole_xspf_xml_start (GMarkupParseContext *context, const gchar *element_name,
- const gchar **attribute_names, const gchar **attribute_values,
- gpointer user_data, GError **error)
+ const gchar **attribute_names, const gchar **attribute_values,
+ gpointer user_data, GError **error)
{
ParoleParserData *data = user_data;
if ( !data->started )
{
- if (!g_ascii_strcasecmp (element_name, "playlist") )
- data->started = TRUE;
+ if (!g_ascii_strcasecmp (element_name, "playlist") )
+ data->started = TRUE;
}
}
static void
parole_xspf_xml_text (GMarkupParseContext *context, const gchar *text, gsize text_len,
- gpointer user_data, GError **error)
+ gpointer user_data, GError **error)
{
ParoleParserData *data = user_data;
const gchar *element_name;
@@ -103,22 +103,22 @@ parole_xspf_xml_text (GMarkupParseContext *context, const gchar *text, gsize tex
if (!g_ascii_strcasecmp (element_name, "location") )
{
if (data->uri)
- {
+ {
g_free (data->uri);
data->uri = NULL;
}
-
+
if (text_len > 0)
data->uri = g_strdup (text);
}
else if (!g_ascii_strcasecmp (element_name, "title") )
{
if (data->title)
- {
+ {
g_free (data->title);
data->title = NULL;
}
-
+
if (text_len > 0)
data->title = g_strdup (text);
}
@@ -126,64 +126,64 @@ parole_xspf_xml_text (GMarkupParseContext *context, const gchar *text, gsize tex
static void
parole_xspf_xml_end (GMarkupParseContext *context, const gchar *element_name,
- gpointer user_data, GError **error)
+ gpointer user_data, GError **error)
{
ParoleParserData *data = user_data;
ParoleFile *file;
if (! g_ascii_strcasecmp (element_name, "playlist"))
data->started = FALSE;
-
+
if (!data->started)
return;
-
+
if (!g_ascii_strcasecmp (element_name, "track"))
{
if (data->uri)
- {
- file = parole_file_new_with_display_name (data->uri, data->title);
- data->list = g_slist_append (data->list, file);
-
- g_free (data->uri);
- data->uri = NULL;
- }
-
- if ( data->title)
- {
- g_free (data->title);
- data->title = NULL;
- }
+ {
+ file = parole_file_new_with_display_name (data->uri, data->title);
+ data->list = g_slist_append (data->list, file);
+
+ g_free (data->uri);
+ data->uri = NULL;
+ }
+
+ if ( data->title)
+ {
+ g_free (data->title);
+ data->title = NULL;
+ }
}
}
static void
parole_asx_xml_start (GMarkupParseContext *context, const gchar *element_name,
- const gchar **attribute_names, const gchar **attribute_values,
- gpointer user_data, GError **error)
+ const gchar **attribute_names, const gchar **attribute_values,
+ gpointer user_data, GError **error)
{
guint i;
ParoleParserData *data = user_data;
if ( !data->started )
{
- if (!g_ascii_strcasecmp (element_name, "asx") )
- data->started = TRUE;
- else
- return;
+ if (!g_ascii_strcasecmp (element_name, "asx") )
+ data->started = TRUE;
+ else
+ return;
}
if (!g_ascii_strcasecmp (element_name, "ref") )
{
if (data->uri)
- {
+ {
g_free (data->uri);
data->uri = NULL;
}
-
+
for ( i = 0; attribute_names[i]; i++)
- {
+ {
if ( !g_ascii_strcasecmp (attribute_names[i], "href"))
- {
+ {
data->uri = g_strdup (attribute_values[i]);
break;
}
@@ -193,7 +193,7 @@ parole_asx_xml_start (GMarkupParseContext *context, const gchar *element_name,
static void
parole_asx_xml_text (GMarkupParseContext *context, const gchar *text, gsize text_len,
- gpointer user_data, GError **error)
+ gpointer user_data, GError **error)
{
ParoleParserData *data = user_data;
const gchar *element_name;
@@ -206,11 +206,11 @@ parole_asx_xml_text (GMarkupParseContext *context, const gchar *text, gsize text
if (!g_ascii_strcasecmp (element_name, "title") )
{
if (data->title)
- {
+ {
g_free (data->title);
data->title = NULL;
}
-
+
if (text_len > 0)
data->title = g_strdup (text);
}
@@ -218,33 +218,33 @@ parole_asx_xml_text (GMarkupParseContext *context, const gchar *text, gsize text
static void
parole_asx_xml_end (GMarkupParseContext *context, const gchar *element_name,
- gpointer user_data, GError **error)
+ gpointer user_data, GError **error)
{
ParoleParserData *data = user_data;
ParoleFile *file;
if (!g_ascii_strcasecmp (element_name, "ASX"))
data->started = FALSE;
-
+
if (!data->started)
return;
-
+
if (!g_ascii_strcasecmp (element_name, "entry"))
{
if (data->uri)
- {
- file = parole_file_new_with_display_name (data->uri, data->title);
- data->list = g_slist_append (data->list, file);
-
- g_free (data->uri);
- data->uri = NULL;
- }
-
- if ( data->title)
- {
- g_free (data->title);
- data->title = NULL;
- }
+ {
+ file = parole_file_new_with_display_name (data->uri, data->title);
+ data->list = g_slist_append (data->list, file);
+
+ g_free (data->uri);
+ data->uri = NULL;
+ }
+
+ if ( data->title)
+ {
+ g_free (data->title);
+ data->title = NULL;
+ }
}
}
@@ -271,33 +271,33 @@ parole_pl_parser_parse_asx (const gchar *filename)
file = g_file_new_for_path (filename);
if ( !g_file_load_contents (file, NULL, &contents, &size, NULL, NULL) )
- goto out;
+ goto out;
if ( g_utf8_validate (contents, -1, NULL) == FALSE)
{
- gchar *fixed;
- fixed = g_convert (contents, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
- if (fixed != NULL)
- {
- g_free (contents);
- contents = fixed;
- }
+ gchar *fixed;
+ fixed = g_convert (contents, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
+ if (fixed != NULL)
+ {
+ g_free (contents);
+ contents = fixed;
+ }
}
pctx = g_markup_parse_context_new (&parser, 0, &data, NULL);
if ( !g_markup_parse_context_parse (pctx, contents, size, &error) )
{
- if ( error )
- {
- g_critical ("Unable to parse asx file : %s : %s\n", filename, error->message);
- g_error_free (error);
- }
+ if ( error )
+ {
+ g_critical ("Unable to parse asx file : %s : %s\n", filename, error->message);
+ g_error_free (error);
+ }
}
else
{
- if ( !g_markup_parse_context_end_parse (pctx, &error) )
- {
+ if ( !g_markup_parse_context_end_parse (pctx, &error) )
+ {
g_critical ("Unable to finish parsing ASX playlist file %s", error->message);
g_error_free (error);
}
@@ -326,7 +326,7 @@ parole_pl_parser_parse_m3u (const gchar *filename)
GFile *file;
gchar **lines;
gchar *contents;
- gchar *path, *pl_filename;
+ gchar *path, *pl_filename = NULL;
GSList *list = NULL;
gsize size;
guint num_lines;
@@ -337,26 +337,26 @@ parole_pl_parser_parse_m3u (const gchar *filename)
path = g_path_get_dirname(filename);
if ( !g_file_load_contents (file, NULL, &contents, &size, NULL, NULL) )
- goto out;
+ goto out;
if ( g_utf8_validate (contents, -1, NULL) == FALSE)
{
- gchar *fixed;
- fixed = g_convert (contents, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
- if (fixed != NULL)
- {
- g_free (contents);
- contents = fixed;
- }
+ gchar *fixed;
+ fixed = g_convert (contents, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
+ if (fixed != NULL)
+ {
+ g_free (contents);
+ contents = fixed;
+ }
}
if ( strstr (contents,"\x0d") == NULL)
{
- split_char = "\n";
+ split_char = "\n";
}
else
{
- split_char = "\x0d\n";
+ split_char = "\x0d\n";
}
lines = g_strsplit (contents, split_char, 0);
@@ -367,18 +367,18 @@ parole_pl_parser_parse_m3u (const gchar *filename)
for ( i = 0; lines[i] != NULL; i++)
{
- if ( lines[i][0] == '\0' || lines[i][0] == '#')
- continue;
-
+ if ( lines[i][0] == '\0' || lines[i][0] == '#')
+ continue;
+
if ( lines[i][0] == '/' ) {
pl_filename = g_strdup(lines[i]);
}
else {
- pl_filename = g_strjoin("", path, lines[i], NULL);
+ pl_filename = g_strjoin("", path, lines[i], NULL);
}
-
- list = g_slist_append (list, parole_file_new (pl_filename));
+
+ list = g_slist_append (list, parole_file_new (pl_filename));
}
if (pl_filename)
@@ -409,21 +409,21 @@ parole_pl_parser_parse_pls (const gchar *filename)
nentries = xfce_rc_read_int_entry (rcfile, "NumberOfEntries", 0);
for (i = 1; i <= nentries; i++)
- {
+ {
g_snprintf (key, 128, "File%d", i);
-
+
file_entry = xfce_rc_read_entry (rcfile, key, NULL);
-
+
if (!file_entry)
continue;
-
- g_snprintf (key, 128, "Title%d", i);
-
+
+ g_snprintf (key, 128, "Title%d", i);
+
title_entry = xfce_rc_read_entry (rcfile, key, NULL);
-
- file = parole_file_new_with_display_name (file_entry, title_entry);
- list = g_slist_append (list, file);
- }
+
+ file = parole_file_new_with_display_name (file_entry, title_entry);
+ list = g_slist_append (list, file);
+ }
}
xfce_rc_close (rcfile);
@@ -454,33 +454,33 @@ parole_pl_parser_parse_xspf (const gchar *filename)
file = g_file_new_for_path (filename);
if ( !g_file_load_contents (file, NULL, &contents, &size, NULL, NULL) )
- goto out;
+ goto out;
if ( g_utf8_validate (contents, -1, NULL) == FALSE)
{
- gchar *fixed;
- fixed = g_convert (contents, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
- if (fixed != NULL)
- {
- g_free (contents);
- contents = fixed;
- }
+ gchar *fixed;
+ fixed = g_convert (contents, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
+ if (fixed != NULL)
+ {
+ g_free (contents);
+ contents = fixed;
+ }
}
pctx = g_markup_parse_context_new (&parser, 0, &data, NULL);
if ( !g_markup_parse_context_parse (pctx, contents, size, &error) )
{
- if ( error )
- {
- g_critical ("Unable to parse xspf file : %s : %s\n", filename, error->message);
- g_error_free (error);
- }
+ if ( error )
+ {
+ g_critical ("Unable to parse xspf file : %s : %s\n", filename, error->message);
+ g_error_free (error);
+ }
}
else
{
- if ( !g_markup_parse_context_end_parse (pctx, &error) )
- {
+ if ( !g_markup_parse_context_end_parse (pctx, &error) )
+ {
g_critical ("Unable to finish parsing xspf playlist file %s", error->message);
g_error_free (error);
}
@@ -500,20 +500,20 @@ parole_pl_parser_parse (ParolePlFormat format, const gchar *filename)
switch (format)
{
- case PAROLE_PL_FORMAT_M3U:
- list = parole_pl_parser_parse_m3u (filename);
- break;
- case PAROLE_PL_FORMAT_PLS:
- list = parole_pl_parser_parse_pls (filename);
- break;
- case PAROLE_PL_FORMAT_ASX:
- list = parole_pl_parser_parse_asx (filename);
- break;
- case PAROLE_PL_FORMAT_XSPF:
- list = parole_pl_parser_parse_xspf (filename);
- break;
- default:
- break;
+ case PAROLE_PL_FORMAT_M3U:
+ list = parole_pl_parser_parse_m3u (filename);
+ break;
+ case PAROLE_PL_FORMAT_PLS:
+ list = parole_pl_parser_parse_pls (filename);
+ break;
+ case PAROLE_PL_FORMAT_ASX:
+ list = parole_pl_parser_parse_asx (filename);
+ break;
+ case PAROLE_PL_FORMAT_XSPF:
+ list = parole_pl_parser_parse_xspf (filename);
+ break;
+ default:
+ break;
}
return list;
@@ -534,16 +534,16 @@ parole_pl_parser_save_m3u (FILE *f, GSList *files)
for ( i = 0; i < len; i++)
{
- ParoleFile *file;
- file = g_slist_nth_data (files, i);
- display_name = g_strdup(parole_file_get_display_name (file));
- file_name = parole_filename_to_utf8(parole_file_get_file_name (file));
-
- if (display_name && file_name)
- {
- fprintf (f, "#EXTINF:-1,%s\n", display_name);
- fprintf (f, "%s\n\n", file_name);
- }
+ ParoleFile *file;
+ file = g_slist_nth_data (files, i);
+ display_name = g_strdup(parole_file_get_display_name (file));
+ file_name = parole_filename_to_utf8(parole_file_get_file_name (file));
+
+ if (display_name && file_name)
+ {
+ fprintf (f, "#EXTINF:-1,%s\n", display_name);
+ fprintf (f, "%s\n\n", file_name);
+ }
}
if (display_name)
@@ -568,12 +568,12 @@ parole_pl_parser_save_pls (FILE *f, GSList *files)
for ( i = 1; i <= len; i++)
{
- ParoleFile *file;
- file = g_slist_nth_data (files, i - 1);
- g_snprintf (key, 128, "File%d", i);
- fprintf (f, "%s=%s\n", key, parole_filename_to_utf8(parole_file_get_file_name (file)));
- g_snprintf (key, 128, "Title%d", i);
- fprintf (f, "%s=%s\n\n", key, parole_file_get_display_name (file));
+ ParoleFile *file;
+ file = g_slist_nth_data (files, i - 1);
+ g_snprintf (key, 128, "File%d", i);
+ fprintf (f, "%s=%s\n", key, parole_filename_to_utf8(parole_file_get_file_name (file)));
+ g_snprintf (key, 128, "Title%d", i);
+ fprintf (f, "%s=%s\n\n", key, parole_file_get_display_name (file));
}
return TRUE;
@@ -591,11 +591,11 @@ parole_pl_parser_save_asx (FILE *f, GSList *files)
for ( i = 0; i < len; i++)
{
- ParoleFile *file;
- file = g_slist_nth_data (files, i);
- fprintf (f, " <ENTRY>\n <TITLE>%s</TITLE>\n <REF HREF=\"%s\"/>\n </ENTRY>\n",
- parole_file_get_display_name (file),
- parole_file_get_uri (file));
+ ParoleFile *file;
+ file = g_slist_nth_data (files, i);
+ fprintf (f, " <ENTRY>\n <TITLE>%s</TITLE>\n <REF HREF=\"%s\"/>\n </ENTRY>\n",
+ parole_file_get_display_name (file),
+ parole_file_get_uri (file));
}
fputs ("</ASX>\n", f);
@@ -612,17 +612,17 @@ parole_pl_parser_save_xspf (FILE *f, GSList *files)
len = g_slist_length (files);
fputs ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- "<playlist version=\"1\" xmlns=\"http://xspf.org/ns/0/\">\n", f);
-
+ "<playlist version=\"1\" xmlns=\"http://xspf.org/ns/0/\">\n", f);
+
fputs (" <trackList>\n", f);
for ( i = 0; i < len; i++)
{
- ParoleFile *file;
-
- file = g_slist_nth_data (files, i);
- fprintf (f, " <track>\n <title>%s</title>\n <location>%s</location>\n </track>\n",
- parole_file_get_display_name (file), parole_file_get_uri (file));
+ ParoleFile *file;
+
+ file = g_slist_nth_data (files, i);
+ fprintf (f, " <track>\n <title>%s</title>\n <location>%s</location>\n </track>\n",
+ parole_file_get_display_name (file), parole_file_get_uri (file));
}
fputs (" </trackList>\n<playlist>", f);
@@ -645,20 +645,20 @@ ParolePlFormat
parole_pl_parser_guess_format_from_extension (const gchar *filename)
{
if ( g_str_has_suffix (filename, ".m3u") || g_str_has_suffix (filename, ".M3U") )
- return PAROLE_PL_FORMAT_M3U;
-
+ return PAROLE_PL_FORMAT_M3U;
+
if ( g_str_has_suffix (filename, ".pls") || g_str_has_suffix (filename, ".PLS") )
- return PAROLE_PL_FORMAT_PLS;
-
+ return PAROLE_PL_FORMAT_PLS;
+
if ( g_str_has_suffix (filename, ".xspf") || g_str_has_suffix (filename, ".XSPF") )
- return PAROLE_PL_FORMAT_XSPF;
-
+ return PAROLE_PL_FORMAT_XSPF;
+
if ( g_str_has_suffix (filename, ".asx") || g_str_has_suffix (filename, ".ASX") )
- return PAROLE_PL_FORMAT_ASX;
-
+ return PAROLE_PL_FORMAT_ASX;
+
if ( g_str_has_suffix (filename, ".wax") || g_str_has_suffix (filename, ".WAX") )
- return PAROLE_PL_FORMAT_XSPF;
-
+ return PAROLE_PL_FORMAT_XSPF;
+
return PAROLE_PL_FORMAT_UNKNOWN;
}
@@ -686,19 +686,19 @@ parole_pl_parser_guess_format_from_data (const gchar *filename)
if ( !g_file_load_contents (file, NULL, &contents, &size, NULL, NULL ) )
{
- g_debug ("Unable to load content of file=%s", filename);
- goto out;
+ g_debug ("Unable to load content of file=%s", filename);
+ goto out;
}
if ( strstr (contents, "<ASX VERSION") )
- format = PAROLE_PL_FORMAT_ASX;
+ format = PAROLE_PL_FORMAT_ASX;
else if ( strstr (contents, "<trackList>") || strstr (contents, "<tracklist>") )
- format = PAROLE_PL_FORMAT_XSPF;
+ format = PAROLE_PL_FORMAT_XSPF;
else if ( strstr (contents, "NumberOfEntries") )
- format = PAROLE_PL_FORMAT_PLS;
+ format = PAROLE_PL_FORMAT_PLS;
else
- /* try to load the file as M3U*/
- format = PAROLE_PL_FORMAT_M3U;
+ /* try to load the file as M3U*/
+ format = PAROLE_PL_FORMAT_M3U;
g_free (contents);
out:
@@ -722,7 +722,7 @@ out:
gboolean parole_pl_parser_save_from_files (GSList *files, const gchar *filename, ParolePlFormat format)
{
FILE *f;
- gboolean ret_val;
+ gboolean ret_val = FALSE;
PAROLE_DEBUG_ENUM_FULL (format, PAROLE_ENUM_TYPE_PL_FORMAT, "Saving playlist %s ", filename);
@@ -730,20 +730,20 @@ gboolean parole_pl_parser_save_from_files (GSList *files, const gchar *filename,
switch (format)
{
- case PAROLE_PL_FORMAT_M3U:
- ret_val = parole_pl_parser_save_m3u (f, files);
- break;
- case PAROLE_PL_FORMAT_PLS:
- ret_val = parole_pl_parser_save_pls (f, files);
- break;
- case PAROLE_PL_FORMAT_ASX:
- ret_val = parole_pl_parser_save_asx (f, files);
- break;
- case PAROLE_PL_FORMAT_XSPF:
- ret_val = parole_pl_parser_save_xspf (f, files);
- break;
- default:
- break;
+ case PAROLE_PL_FORMAT_M3U:
+ ret_val = parole_pl_parser_save_m3u (f, files);
+ break;
+ case PAROLE_PL_FORMAT_PLS:
+ ret_val = parole_pl_parser_save_pls (f, files);
+ break;
+ case PAROLE_PL_FORMAT_ASX:
+ ret_val = parole_pl_parser_save_asx (f, files);
+ break;
+ case PAROLE_PL_FORMAT_XSPF:
+ ret_val = parole_pl_parser_save_xspf (f, files);
+ break;
+ default:
+ break;
}
fclose (f);
@@ -767,15 +767,15 @@ GSList *parole_pl_parser_parse_from_file_by_extension (const gchar *filename)
GSList *list = NULL;
if ( (format = parole_pl_parser_guess_format_from_extension (filename)) == PAROLE_PL_FORMAT_UNKNOWN &&
- (format = parole_pl_parser_guess_format_from_data (filename)) == PAROLE_PL_FORMAT_UNKNOWN )
+ (format = parole_pl_parser_guess_format_from_data (filename)) == PAROLE_PL_FORMAT_UNKNOWN )
{
- g_debug ("Unable to guess playlist format : %s", filename);
- goto out;
+ g_debug ("Unable to guess playlist format : %s", filename);
+ goto out;
}
PAROLE_DEBUG_ENUM_FULL (format, PAROLE_ENUM_TYPE_PL_FORMAT, "playlist %s ", filename);
list = parole_pl_parser_parse (format, filename);
-
+
out:
return list;
}
@@ -825,16 +825,16 @@ gboolean parole_pl_parser_can_parse_data (const guchar *data, gint len)
if ( mime_type && result_uncertain == FALSE )
{
- GtkFileFilter *filter = g_object_ref_sink (parole_get_supported_playlist_filter ());
- GtkFileFilterInfo filter_info;
- g_debug ("Mime_type=%s", mime_type);
- filter_info.mime_type = mime_type;
-
- filter_info.contains = GTK_FILE_FILTER_MIME_TYPE;
-
- result = gtk_file_filter_filter (filter, &filter_info);
- g_object_unref (filter);
- g_free (mime_type);
+ GtkFileFilter *filter = g_object_ref_sink (parole_get_supported_playlist_filter ());
+ GtkFileFilterInfo filter_info;
+ g_debug ("Mime_type=%s", mime_type);
+ filter_info.mime_type = mime_type;
+
+ filter_info.contains = GTK_FILE_FILTER_MIME_TYPE;
+
+ result = gtk_file_filter_filter (filter, &filter_info);
+ g_object_unref (filter);
+ g_free (mime_type);
}
return result;
diff --git a/src/misc/parole-pl-parser.h b/src/misc/parole-pl-parser.h
index bdd69f3..3ea18c2 100644
--- a/src/misc/parole-pl-parser.h
+++ b/src/misc/parole-pl-parser.h
@@ -41,19 +41,19 @@ typedef enum
} ParolePlFormat;
-ParolePlFormat parole_pl_parser_guess_format_from_extension (const gchar *filename);
+ParolePlFormat parole_pl_parser_guess_format_from_extension (const gchar *filename);
-ParolePlFormat parole_pl_parser_guess_format_from_data (const gchar *filename);
+ParolePlFormat parole_pl_parser_guess_format_from_data (const gchar *filename);
-gboolean parole_pl_parser_can_parse_data (const guchar *data, gint len);
+gboolean parole_pl_parser_can_parse_data (const guchar *data, gint len);
-GSList *parole_pl_parser_parse_from_file_by_extension (const gchar *filename);
+GSList *parole_pl_parser_parse_from_file_by_extension (const gchar *filename);
-GSList *parole_pl_parser_parse_all_from_file (const gchar *filename);
+GSList *parole_pl_parser_parse_all_from_file (const gchar *filename);
-gboolean parole_pl_parser_save_from_files (GSList *files,
- const gchar *filename,
- ParolePlFormat format);
+gboolean parole_pl_parser_save_from_files (GSList *files,
+ const gchar *filename,
+ ParolePlFormat format);
G_END_DECLS
diff --git a/src/misc/parole-provider-player.c b/src/misc/parole-provider-player.c
index e9913ce..0dff22d 100644
--- a/src/misc/parole-provider-player.c
+++ b/src/misc/parole-provider-player.c
@@ -28,8 +28,8 @@
#include "parole-marshal.h"
#include "parole-enum-types.h"
-static void parole_provider_player_base_init (gpointer klass);
-static void parole_provider_player_class_init (gpointer klass);
+static void parole_provider_player_base_init (gpointer klass);
+static void parole_provider_player_class_init (gpointer klass);
GType
parole_provider_player_get_type (void)
@@ -38,23 +38,23 @@ parole_provider_player_get_type (void)
if (G_UNLIKELY (type == G_TYPE_INVALID))
{
- static const GTypeInfo info =
- {
- sizeof (ParoleProviderPlayerIface),
- (GBaseInitFunc) parole_provider_player_base_init,
- NULL,
- (GClassInitFunc) parole_provider_player_class_init,
- NULL,
- NULL,
- 0,
- 0,
- NULL,
- NULL,
- };
+ static const GTypeInfo info =
+ {
+ sizeof (ParoleProviderPlayerIface),
+ (GBaseInitFunc) parole_provider_player_base_init,
+ NULL,
+ (GClassInitFunc) parole_provider_player_class_init,
+ NULL,
+ NULL,
+ 0,
+ 0,
+ NULL,
+ NULL,
+ };
- type = g_type_register_static (G_TYPE_INTERFACE, "ParoleProviderPlayerIface", &info, 0);
+ type = g_type_register_static (G_TYPE_INTERFACE, "ParoleProviderPlayerIface", &info, 0);
- g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
+ g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
}
return type;
@@ -66,43 +66,43 @@ static void parole_provider_player_base_init (gpointer klass)
if (G_UNLIKELY (!initialized))
{
- /**
- * ParoleProviderPlayerIface::state-changed:
- * @player: the object which received the signal.
- * @stream: a #ParoleStream.
- * @state: the new state.
- *
- * Issued when the Parole state changed.
- *
- * Since: 0.2
- **/
- g_signal_new ("state-changed",
- G_TYPE_FROM_INTERFACE (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleProviderPlayerIface, state_changed),
- NULL, NULL,
- parole_marshal_VOID__OBJECT_ENUM,
- G_TYPE_NONE, 2,
- PAROLE_TYPE_STREAM, PAROLE_ENUM_TYPE_STATE);
+ /**
+ * ParoleProviderPlayerIface::state-changed:
+ * @player: the object which received the signal.
+ * @stream: a #ParoleStream.
+ * @state: the new state.
+ *
+ * Issued when the Parole state changed.
+ *
+ * Since: 0.2
+ **/
+ g_signal_new ("state-changed",
+ G_TYPE_FROM_INTERFACE (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ParoleProviderPlayerIface, state_changed),
+ NULL, NULL,
+ parole_marshal_VOID__OBJECT_ENUM,
+ G_TYPE_NONE, 2,
+ PAROLE_TYPE_STREAM, PAROLE_ENUM_TYPE_STATE);
- /**
- * ParoleProviderPlayerIface::tag-message:
- * @player: the object which received the signal.
- * @stream: a #ParoleStream.
- *
- * Indicated that the stream tags were found and ready to be read.
- *
- * Since: 0.2
- **/
- g_signal_new ("tag-message",
- G_TYPE_FROM_INTERFACE (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleProviderPlayerIface, tag_message),
- NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1, PAROLE_TYPE_STREAM);
-
- initialized = TRUE;
+ /**
+ * ParoleProviderPlayerIface::tag-message:
+ * @player: the object which received the signal.
+ * @stream: a #ParoleStream.
+ *
+ * Indicated that the stream tags were found and ready to be read.
+ *
+ * Since: 0.2
+ **/
+ g_signal_new ("tag-message",
+ G_TYPE_FROM_INTERFACE (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ParoleProviderPlayerIface, tag_message),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1, PAROLE_TYPE_STREAM);
+
+ initialized = TRUE;
}
}
@@ -128,7 +128,7 @@ GtkWidget *parole_provider_player_get_main_window (ParoleProviderPlayer *player)
if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_main_window )
{
- window = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_main_window) (player);
+ window = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_main_window) (player);
}
return window;
}
@@ -150,7 +150,7 @@ GtkWidget *parole_provider_player_get_main_window (ParoleProviderPlayer *player)
* Since: 0.2
**/
void parole_provider_player_pack (ParoleProviderPlayer *player, GtkWidget *widget,
- const gchar *title, ParolePluginContainer container)
+ const gchar *title, ParolePluginContainer container)
{
g_return_if_fail (PAROLE_IS_PROVIDER_PLAYER (player));
@@ -159,7 +159,7 @@ void parole_provider_player_pack (ParoleProviderPlayer *player, GtkWidget *widge
(*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->pack) (player, widget, title, container);
}
}
-
+
/**
* parole_provider_player_get_state:
* @player: a #ParoleProviderPlayer
@@ -179,7 +179,7 @@ ParoleState parole_provider_player_get_state (ParoleProviderPlayer *player)
if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_state )
{
- state = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_state) (player);
+ state = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_state) (player);
}
return state;
@@ -201,7 +201,7 @@ const ParoleStream *parole_provider_player_get_stream (ParoleProviderPlayer *p
if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_stream )
{
- return (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_stream) (player);
+ return (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->get_stream) (player);
}
return NULL;
@@ -230,7 +230,7 @@ gboolean parole_provider_player_play_uri (ParoleProviderPlayer *player, const gc
if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->play_uri )
{
- ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->play_uri) (player, uri);
+ ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->play_uri) (player, uri);
}
return ret;
}
@@ -259,7 +259,7 @@ gboolean parole_provider_player_pause (ParoleProviderPlayer *player)
if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->pause )
{
- ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->pause) (player);
+ ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->pause) (player);
}
return ret;
@@ -290,7 +290,7 @@ gboolean parole_provider_player_resume (ParoleProviderPlayer *player)
if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->resume )
{
- ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->resume) (player);
+ ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->resume) (player);
}
return ret;
@@ -318,7 +318,57 @@ gboolean parole_provider_player_stop (ParoleProviderPlayer *player)
if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->stop )
{
- ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->stop) (player);
+ ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->stop) (player);
+ }
+
+ return ret;
+}
+
+
+/**
+ * parole_provider_player_play_previous:
+ * @player: a #ParoleProviderPlayer
+ *
+ * Issue a play previous command to the player.
+ *
+ * Returns: TRUE if the command is processed, FALSE otherwise.
+ *
+ * Since: 0.6
+ **/
+gboolean parole_provider_player_play_previous (ParoleProviderPlayer *player)
+{
+ gboolean ret = FALSE;
+
+ g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), FALSE);
+
+ if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->play_previous )
+ {
+ ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->play_previous) (player);
+ }
+
+ return ret;
+}
+
+
+/**
+ * parole_provider_player_play_next:
+ * @player: a #ParoleProviderPlayer
+ *
+ * Issue a play next command to the player.
+ *
+ * Returns: TRUE if the command is processed, FALSE otherwise.
+ *
+ * Since: 0.6
+ **/
+gboolean parole_provider_player_play_next (ParoleProviderPlayer *player)
+{
+ gboolean ret = FALSE;
+
+ g_return_val_if_fail (PAROLE_IS_PROVIDER_PLAYER (player), FALSE);
+
+ if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->play_next )
+ {
+ ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->play_next) (player);
}
return ret;
@@ -346,7 +396,7 @@ gboolean parole_provider_player_seek (ParoleProviderPlayer *player, gdouble pos)
if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->seek )
{
- ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->seek) (player, pos);
+ ret = (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->seek) (player, pos);
}
return ret;
@@ -367,6 +417,20 @@ void parole_provider_player_open_media_chooser (ParoleProviderPlayer *player)
if ( PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->open_media_chooser )
{
- (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->open_media_chooser) (player);
+ (*PAROLE_PROVIDER_PLAYER_GET_INTERFACE (player)->open_media_chooser) (player);
}
}
+
+/**
+ * parole_provider_player_get_action:
+ * @player: a #ParoleProviderPlayer
+ * @action: the #ParolePlayerAction to retrieve
+ *
+ * Get GtkAction from Parole.
+ *
+ * Since: 0.6
+ **/
+GtkAction *parole_provider_player_get_action(ParoleProviderPlayer *player, ParolePlayerAction action)
+{
+ return parole_player_get_action(action);
+}
diff --git a/src/misc/parole-provider-player.h b/src/misc/parole-provider-player.h
index ec24830..98bee2d 100644
--- a/src/misc/parole-provider-player.h
+++ b/src/misc/parole-provider-player.h
@@ -29,16 +29,17 @@
#include <gtk/gtk.h>
#include "parole-stream.h"
+#include "parole-player.h"
G_BEGIN_DECLS
-#define PAROLE_TYPE_PROVIDER_PLAYER (parole_provider_player_get_type ())
-#define PAROLE_PROVIDER_PLAYER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PAROLE_TYPE_PROVIDER_PLAYER, ParoleProviderPlayer))
-#define PAROLE_IS_PROVIDER_PLAYER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PAROLE_TYPE_PROVIDER_PLAYER))
-#define PAROLE_PROVIDER_PLAYER_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), PAROLE_TYPE_PROVIDER_PLAYER, ParoleProviderPlayerIface))
+#define PAROLE_TYPE_PROVIDER_PLAYER (parole_provider_player_get_type ())
+#define PAROLE_PROVIDER_PLAYER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PAROLE_TYPE_PROVIDER_PLAYER, ParoleProviderPlayer))
+#define PAROLE_IS_PROVIDER_PLAYER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PAROLE_TYPE_PROVIDER_PLAYER))
+#define PAROLE_PROVIDER_PLAYER_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), PAROLE_TYPE_PROVIDER_PLAYER, ParoleProviderPlayerIface))
typedef struct _ParoleProviderPlayerIface ParoleProviderPlayerIface;
-typedef struct _ParoleProviderPlayer ParoleProviderPlayer;
+typedef struct _ParoleProviderPlayer ParoleProviderPlayer;
typedef enum
{
@@ -53,67 +54,80 @@ struct _ParoleProviderPlayerIface
GTypeInterface __parent__;
/*< private >*/
- GtkWidget *(*get_main_window) (ParoleProviderPlayer *player);
+ GtkWidget *(*get_main_window) (ParoleProviderPlayer *player);
- void (*pack) (ParoleProviderPlayer *player,
- GtkWidget *widget,
- const gchar *title,
- ParolePluginContainer container);
-
- ParoleState (*get_state) (ParoleProviderPlayer *player);
+ void (*pack) (ParoleProviderPlayer *player,
+ GtkWidget *widget,
+ const gchar *title,
+ ParolePluginContainer container);
+
+ ParoleState (*get_state) (ParoleProviderPlayer *player);
- const ParoleStream *(*get_stream) (ParoleProviderPlayer *player);
+ const ParoleStream *(*get_stream) (ParoleProviderPlayer *player);
- gboolean (*play_uri) (ParoleProviderPlayer *player,
- const gchar *uri);
-
- gboolean (*pause) (ParoleProviderPlayer *player);
+ gboolean (*play_uri) (ParoleProviderPlayer *player,
+ const gchar *uri);
+
+ gboolean (*pause) (ParoleProviderPlayer *player);
- gboolean (*resume) (ParoleProviderPlayer *player);
+ gboolean (*resume) (ParoleProviderPlayer *player);
- gboolean (*stop) (ParoleProviderPlayer *player);
+ gboolean (*stop) (ParoleProviderPlayer *player);
- gboolean (*seek) (ParoleProviderPlayer *player,
- gdouble pos);
-
- void (*open_media_chooser) (ParoleProviderPlayer *player);
-
+ gboolean (*play_previous) (ParoleProviderPlayer *player);
+
+ gboolean (*play_next) (ParoleProviderPlayer *player);
+
+ gboolean (*seek) (ParoleProviderPlayer *player,
+ gdouble pos);
+
+ void (*open_media_chooser) (ParoleProviderPlayer *player);
+
/*< signals >*/
- void (*tag_message) (ParoleProviderPlayer *player,
- const ParoleStream *stream);
-
- void (*state_changed) (ParoleProviderPlayer *player,
- const ParoleStream *stream,
- ParoleState state);
+ void (*tag_message) (ParoleProviderPlayer *player,
+ const ParoleStream *stream);
+
+ void (*state_changed) (ParoleProviderPlayer *player,
+ const ParoleStream *stream,
+ ParoleState state);
};
-GType parole_provider_player_get_type (void) G_GNUC_CONST;
+GType parole_provider_player_get_type (void) G_GNUC_CONST;
+
+GtkWidget
+*parole_provider_player_get_main_window (ParoleProviderPlayer *player);
+
+void parole_provider_player_pack (ParoleProviderPlayer *player,
+ GtkWidget *widget,
+ const gchar *title,
+ ParolePluginContainer container);
+
+ParoleState parole_provider_player_get_state (ParoleProviderPlayer *player);
+
+const ParoleStream
+*parole_provider_player_get_stream (ParoleProviderPlayer *player);
-GtkWidget *parole_provider_player_get_main_window (ParoleProviderPlayer *player);
+gboolean parole_provider_player_play_uri (ParoleProviderPlayer *player,
+ const gchar *uri);
-void parole_provider_player_pack (ParoleProviderPlayer *player,
- GtkWidget *widget,
- const gchar *title,
- ParolePluginContainer container);
-
-ParoleState parole_provider_player_get_state (ParoleProviderPlayer *player);
+gboolean parole_provider_player_pause (ParoleProviderPlayer *player);
-const ParoleStream *parole_provider_player_get_stream (ParoleProviderPlayer *player);
+gboolean parole_provider_player_resume (ParoleProviderPlayer *player);
-gboolean parole_provider_player_play_uri (ParoleProviderPlayer *player,
- const gchar *uri);
+gboolean parole_provider_player_stop (ParoleProviderPlayer *player);
-gboolean parole_provider_player_pause (ParoleProviderPlayer *player);
+gboolean parole_provider_player_play_previous(ParoleProviderPlayer *player);
-gboolean parole_provider_player_resume (ParoleProviderPlayer *player);
+gboolean parole_provider_player_play_next (ParoleProviderPlayer *player);
-gboolean parole_provider_player_stop (ParoleProviderPlayer *player);
+gboolean parole_provider_player_seek (ParoleProviderPlayer *player,
+ gdouble pos);
-gboolean parole_provider_player_seek (ParoleProviderPlayer *player,
- gdouble pos);
+void
+parole_provider_player_open_media_chooser (ParoleProviderPlayer *player);
-void parole_provider_player_open_media_chooser (ParoleProviderPlayer *player);
+GtkAction *parole_provider_player_get_action(ParoleProviderPlayer *player, ParolePlayerAction action);
G_END_DECLS
diff --git a/src/misc/parole-provider-plugin.c b/src/misc/parole-provider-plugin.c
index cc303ed..f2ce523 100644
--- a/src/misc/parole-provider-plugin.c
+++ b/src/misc/parole-provider-plugin.c
@@ -33,21 +33,21 @@ parole_provider_plugin_get_type (void)
if (G_UNLIKELY (type == G_TYPE_INVALID))
{
- static const GTypeInfo info =
- {
- sizeof (ParoleProviderPluginIface),
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- 0,
- 0,
- NULL,
- NULL,
- };
+ static const GTypeInfo info =
+ {
+ sizeof (ParoleProviderPluginIface),
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ 0,
+ 0,
+ NULL,
+ NULL,
+ };
- type = g_type_register_static (G_TYPE_INTERFACE, "ParoleProviderPlugin", &info, 0);
+ type = g_type_register_static (G_TYPE_INTERFACE, "ParoleProviderPlugin", &info, 0);
}
return type;
@@ -72,7 +72,7 @@ gboolean parole_provider_plugin_get_is_configurable (ParoleProviderPlugin *provi
if ( PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->get_is_configurable )
{
- configurable = (*PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->get_is_configurable) (provider);
+ configurable = (*PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->get_is_configurable) (provider);
}
return configurable;
@@ -94,7 +94,7 @@ void parole_provider_plugin_configure (ParoleProviderPlugin *provider, GtkWidget
if ( PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->configure )
{
- (*PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->configure) (provider, parent);
+ (*PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->configure) (provider, parent);
}
}
@@ -110,10 +110,8 @@ void parole_provider_plugin_configure (ParoleProviderPlugin *provider, GtkWidget
**/
void parole_provider_plugin_set_player (ParoleProviderPlugin *provider, ParoleProviderPlayer *player)
{
- g_return_if_fail (PAROLE_IS_PROVIDER_PLUGIN (provider));
-
if ( PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->set_player )
{
- (*PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->set_player) (provider, player);
+ (*PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->set_player) (provider, player);
}
}
diff --git a/src/misc/parole-provider-plugin.h b/src/misc/parole-provider-plugin.h
index 9d99063..d6c1b04 100644
--- a/src/misc/parole-provider-plugin.h
+++ b/src/misc/parole-provider-plugin.h
@@ -33,37 +33,39 @@
G_BEGIN_DECLS
-#define PAROLE_TYPE_PROVIDER_PLUGIN (parole_provider_plugin_get_type ())
-#define PAROLE_PROVIDER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PAROLE_TYPE_PROVIDER_PLUGIN, ParoleProviderPlugin))
-#define PAROLE_IS_PROVIDER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PAROLE_TYPE_PROVIDER_PLUGIN))
-#define PAROLE_PROVIDER_PLUGIN_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), PAROLE_TYPE_PROVIDER_PLUGIN, ParoleProviderPluginIface))
+#define PAROLE_TYPE_PROVIDER_PLUGIN (parole_provider_plugin_get_type ())
+#define PAROLE_PROVIDER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PAROLE_TYPE_PROVIDER_PLUGIN, ParoleProviderPlugin))
+#define PAROLE_IS_PROVIDER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PAROLE_TYPE_PROVIDER_PLUGIN))
+#define PAROLE_PROVIDER_PLUGIN_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE((o), PAROLE_TYPE_PROVIDER_PLUGIN, ParoleProviderPluginIface))
typedef struct _ParoleProviderPluginIface ParoleProviderPluginIface;
-typedef struct _ParoleProviderPlugin ParoleProviderPlugin;
+typedef struct _ParoleProviderPlugin ParoleProviderPlugin;
struct _ParoleProviderPluginIface
{
- GTypeInterface __parent__;
+ GTypeInterface __parent__;
/*< public >*/
- gboolean (*get_is_configurable) (ParoleProviderPlugin *provider);
+ gboolean (*get_is_configurable) (ParoleProviderPlugin *provider);
- void (*configure) (ParoleProviderPlugin *provider,
- GtkWidget *parent);
-
- void (*set_player) (ParoleProviderPlugin *provider,
- ParoleProviderPlayer *player);
+ void (*configure) (ParoleProviderPlugin *provider,
+ GtkWidget *parent);
+
+ void (*set_player) (ParoleProviderPlugin *provider,
+ ParoleProviderPlayer *player);
};
-GType parole_provider_plugin_get_type (void) G_GNUC_CONST;
+GType parole_provider_plugin_get_type (void) G_GNUC_CONST;
-gboolean parole_provider_plugin_get_is_configurable (ParoleProviderPlugin *provider);
+gboolean
+parole_provider_plugin_get_is_configurable (ParoleProviderPlugin *provider);
-void parole_provider_plugin_configure (ParoleProviderPlugin *provider,
- GtkWidget *parent);
-
-void parole_provider_plugin_set_player (ParoleProviderPlugin *provider,
- ParoleProviderPlayer *player);
+void parole_provider_plugin_configure (ParoleProviderPlugin *provider,
+ GtkWidget *parent);
+
+void parole_provider_plugin_set_player (ParoleProviderPlugin *provider,
+ ParoleProviderPlayer *player);
+
G_END_DECLS
#endif /* __PAROLE_PLUGIN_IFACE_H__ */
diff --git a/src/misc/parole-stream.c b/src/misc/parole-stream.c
index 5a1aa9a..dc403f9 100644
--- a/src/misc/parole-stream.c
+++ b/src/misc/parole-stream.c
@@ -36,14 +36,14 @@
#define PAROLE_STREAM_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), PAROLE_TYPE_STREAM, ParoleStreamPrivate))
-#define PAROLE_STREAM_FREE_STR_PROP(str) \
- if ( str ) \
- g_free (str); \
- str = NULL; \
+#define PAROLE_STREAM_FREE_STR_PROP(str) \
+ if ( str ) \
+ g_free (str); \
+ str = NULL; \
#define PAROLE_STREAM_DUP_GVALUE_STRING(str, value) \
- PAROLE_STREAM_FREE_STR_PROP (str); \
- str = g_value_dup_string (value); \
+ PAROLE_STREAM_FREE_STR_PROP (str); \
+ str = g_value_dup_string (value); \
typedef struct _ParoleStreamPrivate ParoleStreamPrivate;
@@ -52,19 +52,19 @@ struct _ParoleStreamPrivate
/*Properties*/
gchar *uri;
gchar *subtitles;
- gboolean has_audio;
+ gboolean has_audio;
gboolean has_video;
- gboolean live;
- gboolean seekable;
- gboolean tag_available;
+ gboolean live;
+ gboolean seekable;
+ gboolean tag_available;
gint video_w;
gint video_h;
- gint64 absolute_duration;
- gint duration;
- guint tracks;
+ gint64 absolute_duration;
+ gint duration;
+ guint tracks;
guint track;
- guint disp_par_n;
- guint disp_par_d;
+ guint disp_par_n;
+ guint disp_par_d;
gchar *title;
gchar *artist;
gchar *year;
@@ -111,19 +111,19 @@ parole_stream_get_media_type_from_uri (ParoleStream *stream, const gchar *uri)
ParoleMediaType type = PAROLE_MEDIA_TYPE_UNKNOWN;
if ( g_str_has_prefix (uri, "file:/") )
- type = PAROLE_MEDIA_TYPE_LOCAL_FILE;
+ type = PAROLE_MEDIA_TYPE_LOCAL_FILE;
else if ( g_str_has_prefix (uri, "dvd:/") )
- type = PAROLE_MEDIA_TYPE_DVD;
+ type = PAROLE_MEDIA_TYPE_DVD;
else if ( g_str_has_prefix (uri, "vcd:") )
- type = PAROLE_MEDIA_TYPE_VCD;
+ type = PAROLE_MEDIA_TYPE_VCD;
else if ( g_str_has_prefix (uri, "svcd:/") )
- type = PAROLE_MEDIA_TYPE_SVCD;
+ type = PAROLE_MEDIA_TYPE_SVCD;
else if ( g_str_has_prefix (uri, "cdda:/") )
- type = PAROLE_MEDIA_TYPE_CDDA;
+ type = PAROLE_MEDIA_TYPE_CDDA;
else if ( g_str_has_prefix (uri, "dvb:/") )
- type = PAROLE_MEDIA_TYPE_DVB;
+ type = PAROLE_MEDIA_TYPE_DVB;
else
- type = PAROLE_MEDIA_TYPE_UNKNOWN;
+ type = PAROLE_MEDIA_TYPE_UNKNOWN;
g_value_init (&val, PAROLE_ENUM_TYPE_MEDIA_TYPE);
g_value_set_enum (&val, type);
@@ -132,173 +132,173 @@ parole_stream_get_media_type_from_uri (ParoleStream *stream, const gchar *uri)
}
static void parole_stream_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ParoleStream *stream;
stream = PAROLE_STREAM (object);
switch (prop_id)
{
- case PROP_URI:
- {
- ParoleStreamPrivate *priv;
- priv = PAROLE_STREAM_GET_PRIVATE (stream);
- priv->uri = g_value_dup_string (value);
- parole_stream_get_media_type_from_uri (stream, priv->uri);
- break;
- }
- case PROP_SUBTITLES:
- PAROLE_STREAM_DUP_GVALUE_STRING (PAROLE_STREAM_GET_PRIVATE (stream)->subtitles, value);
- break;
- case PROP_LIVE:
- {
- ParoleStreamPrivate *priv;
- gboolean maybe_remote;
-
- priv = PAROLE_STREAM_GET_PRIVATE (stream);
- maybe_remote = priv->media_type == PAROLE_MEDIA_TYPE_REMOTE ||
- priv->media_type == PAROLE_MEDIA_TYPE_UNKNOWN;
- priv->live = g_value_get_boolean (value) && maybe_remote;
- break;
- }
- case PROP_MEDIA_TYPE:
- PAROLE_STREAM_GET_PRIVATE (stream)->media_type = g_value_get_enum (value);
- break;
- case PROP_HAS_AUDIO:
- PAROLE_STREAM_GET_PRIVATE (stream)->has_audio = g_value_get_boolean (value);
- break;
- case PROP_HAS_VIDEO:
- PAROLE_STREAM_GET_PRIVATE (stream)->has_video = g_value_get_boolean (value);
- break;
- case PROP_SEEKABLE:
- PAROLE_STREAM_GET_PRIVATE (stream)->seekable = g_value_get_boolean (value);
- break;
- case PROP_DISP_PAR_D:
- PAROLE_STREAM_GET_PRIVATE (stream)->disp_par_d = g_value_get_uint (value);
- break;
- case PROP_DISP_PAR_N:
- PAROLE_STREAM_GET_PRIVATE (stream)->disp_par_n = g_value_get_uint (value);
- break;
- case PROP_TRACKS:
- PAROLE_STREAM_GET_PRIVATE (stream)->tracks = g_value_get_uint (value);
- break;
- case PROP_TRACK:
- PAROLE_STREAM_GET_PRIVATE (stream)->track = g_value_get_uint (value);
- break;
- case PROP_TAG_AVAILABLE:
- PAROLE_STREAM_GET_PRIVATE (stream)->tag_available = g_value_get_boolean (value);
- break;
- case PROP_DURATION:
- PAROLE_STREAM_GET_PRIVATE (stream)->duration = g_value_get_int64 (value);
- break;
- case PROP_ABSOLUTE_DURATION:
- PAROLE_STREAM_GET_PRIVATE (stream)->absolute_duration = g_value_get_int64 (value);
- break;
- case PROP_VIDEO_HEIGHT:
- PAROLE_STREAM_GET_PRIVATE (stream)->video_h = g_value_get_int (value);
- break;
- case PROP_VIDEO_WIDTH:
- PAROLE_STREAM_GET_PRIVATE (stream)->video_w = g_value_get_int (value);
- break;
- case PROP_TITLE:
- PAROLE_STREAM_DUP_GVALUE_STRING (PAROLE_STREAM_GET_PRIVATE (stream)->title, value);
- break;
- case PROP_ARTIST:
- PAROLE_STREAM_DUP_GVALUE_STRING (PAROLE_STREAM_GET_PRIVATE (stream)->artist, value);
- break;
- case PROP_YEAR:
- PAROLE_STREAM_DUP_GVALUE_STRING (PAROLE_STREAM_GET_PRIVATE (stream)->year, value);
- break;
- case PROP_ALBUM:
- PAROLE_STREAM_DUP_GVALUE_STRING (PAROLE_STREAM_GET_PRIVATE (stream)->album, value);
- break;
- case PROP_COMMENT:
- PAROLE_STREAM_DUP_GVALUE_STRING (PAROLE_STREAM_GET_PRIVATE (stream)->comment, value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_URI:
+ {
+ ParoleStreamPrivate *priv;
+ priv = PAROLE_STREAM_GET_PRIVATE (stream);
+ priv->uri = g_value_dup_string (value);
+ parole_stream_get_media_type_from_uri (stream, priv->uri);
+ break;
+ }
+ case PROP_SUBTITLES:
+ PAROLE_STREAM_DUP_GVALUE_STRING (PAROLE_STREAM_GET_PRIVATE (stream)->subtitles, value);
+ break;
+ case PROP_LIVE:
+ {
+ ParoleStreamPrivate *priv;
+ gboolean maybe_remote;
+
+ priv = PAROLE_STREAM_GET_PRIVATE (stream);
+ maybe_remote = priv->media_type == PAROLE_MEDIA_TYPE_REMOTE ||
+ priv->media_type == PAROLE_MEDIA_TYPE_UNKNOWN;
+ priv->live = g_value_get_boolean (value) && maybe_remote;
+ break;
+ }
+ case PROP_MEDIA_TYPE:
+ PAROLE_STREAM_GET_PRIVATE (stream)->media_type = g_value_get_enum (value);
+ break;
+ case PROP_HAS_AUDIO:
+ PAROLE_STREAM_GET_PRIVATE (stream)->has_audio = g_value_get_boolean (value);
+ break;
+ case PROP_HAS_VIDEO:
+ PAROLE_STREAM_GET_PRIVATE (stream)->has_video = g_value_get_boolean (value);
+ break;
+ case PROP_SEEKABLE:
+ PAROLE_STREAM_GET_PRIVATE (stream)->seekable = g_value_get_boolean (value);
+ break;
+ case PROP_DISP_PAR_D:
+ PAROLE_STREAM_GET_PRIVATE (stream)->disp_par_d = g_value_get_uint (value);
+ break;
+ case PROP_DISP_PAR_N:
+ PAROLE_STREAM_GET_PRIVATE (stream)->disp_par_n = g_value_get_uint (value);
+ break;
+ case PROP_TRACKS:
+ PAROLE_STREAM_GET_PRIVATE (stream)->tracks = g_value_get_uint (value);
+ break;
+ case PROP_TRACK:
+ PAROLE_STREAM_GET_PRIVATE (stream)->track = g_value_get_uint (value);
+ break;
+ case PROP_TAG_AVAILABLE:
+ PAROLE_STREAM_GET_PRIVATE (stream)->tag_available = g_value_get_boolean (value);
+ break;
+ case PROP_DURATION:
+ PAROLE_STREAM_GET_PRIVATE (stream)->duration = g_value_get_int64 (value);
+ break;
+ case PROP_ABSOLUTE_DURATION:
+ PAROLE_STREAM_GET_PRIVATE (stream)->absolute_duration = g_value_get_int64 (value);
+ break;
+ case PROP_VIDEO_HEIGHT:
+ PAROLE_STREAM_GET_PRIVATE (stream)->video_h = g_value_get_int (value);
+ break;
+ case PROP_VIDEO_WIDTH:
+ PAROLE_STREAM_GET_PRIVATE (stream)->video_w = g_value_get_int (value);
+ break;
+ case PROP_TITLE:
+ PAROLE_STREAM_DUP_GVALUE_STRING (PAROLE_STREAM_GET_PRIVATE (stream)->title, value);
+ break;
+ case PROP_ARTIST:
+ PAROLE_STREAM_DUP_GVALUE_STRING (PAROLE_STREAM_GET_PRIVATE (stream)->artist, value);
+ break;
+ case PROP_YEAR:
+ PAROLE_STREAM_DUP_GVALUE_STRING (PAROLE_STREAM_GET_PRIVATE (stream)->year, value);
+ break;
+ case PROP_ALBUM:
+ PAROLE_STREAM_DUP_GVALUE_STRING (PAROLE_STREAM_GET_PRIVATE (stream)->album, value);
+ break;
+ case PROP_COMMENT:
+ PAROLE_STREAM_DUP_GVALUE_STRING (PAROLE_STREAM_GET_PRIVATE (stream)->comment, value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
static void parole_stream_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ParoleStream *stream;
stream = PAROLE_STREAM (object);
switch (prop_id)
{
- case PROP_URI:
- g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->uri);
- break;
- case PROP_SUBTITLES:
- g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->subtitles);
- break;
- case PROP_LIVE:
- g_value_set_boolean (value, PAROLE_STREAM_GET_PRIVATE (stream)->live);
- break;
- case PROP_MEDIA_TYPE:
- g_value_set_enum (value, PAROLE_STREAM_GET_PRIVATE (stream)->media_type);
- break;
- case PROP_HAS_AUDIO:
- g_value_set_boolean (value, PAROLE_STREAM_GET_PRIVATE (stream)->has_audio);
- break;
- case PROP_HAS_VIDEO:
- g_value_set_boolean (value, PAROLE_STREAM_GET_PRIVATE (stream)->has_video);
- break;
- case PROP_SEEKABLE:
- g_value_set_boolean (value, PAROLE_STREAM_GET_PRIVATE (stream)->seekable);
- break;
- case PROP_DISP_PAR_D:
- g_value_set_uint (value, PAROLE_STREAM_GET_PRIVATE (stream)->disp_par_d);
- break;
- case PROP_DISP_PAR_N:
- g_value_set_uint (value, PAROLE_STREAM_GET_PRIVATE (stream)->disp_par_n);
- break;
- case PROP_DURATION:
- g_value_set_int64 (value, PAROLE_STREAM_GET_PRIVATE (stream)->duration);
- break;
- case PROP_TRACKS:
- g_value_set_uint (value, PAROLE_STREAM_GET_PRIVATE (stream)->tracks);
- break;
- case PROP_TRACK:
- g_value_set_uint (value, PAROLE_STREAM_GET_PRIVATE (stream)->track);
- break;
- case PROP_TAG_AVAILABLE:
- g_value_set_double (value, PAROLE_STREAM_GET_PRIVATE (stream)->tag_available);
- break;
- case PROP_ABSOLUTE_DURATION:
- g_value_set_int64 (value, PAROLE_STREAM_GET_PRIVATE (stream)->absolute_duration);
- break;
- case PROP_VIDEO_HEIGHT:
- g_value_set_int (value, PAROLE_STREAM_GET_PRIVATE (stream)->video_h);
- break;
- case PROP_VIDEO_WIDTH:
- g_value_set_int (value, PAROLE_STREAM_GET_PRIVATE (stream)->video_w);
- break;
- case PROP_TITLE:
- g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->title);
- break;
- case PROP_ARTIST:
- g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->artist);
- break;
- case PROP_YEAR:
- g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->year);
- break;
- case PROP_ALBUM:
- g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->album);
- break;
- case PROP_COMMENT:
- g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->comment);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_URI:
+ g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->uri);
+ break;
+ case PROP_SUBTITLES:
+ g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->subtitles);
+ break;
+ case PROP_LIVE:
+ g_value_set_boolean (value, PAROLE_STREAM_GET_PRIVATE (stream)->live);
+ break;
+ case PROP_MEDIA_TYPE:
+ g_value_set_enum (value, PAROLE_STREAM_GET_PRIVATE (stream)->media_type);
+ break;
+ case PROP_HAS_AUDIO:
+ g_value_set_boolean (value, PAROLE_STREAM_GET_PRIVATE (stream)->has_audio);
+ break;
+ case PROP_HAS_VIDEO:
+ g_value_set_boolean (value, PAROLE_STREAM_GET_PRIVATE (stream)->has_video);
+ break;
+ case PROP_SEEKABLE:
+ g_value_set_boolean (value, PAROLE_STREAM_GET_PRIVATE (stream)->seekable);
+ break;
+ case PROP_DISP_PAR_D:
+ g_value_set_uint (value, PAROLE_STREAM_GET_PRIVATE (stream)->disp_par_d);
+ break;
+ case PROP_DISP_PAR_N:
+ g_value_set_uint (value, PAROLE_STREAM_GET_PRIVATE (stream)->disp_par_n);
+ break;
+ case PROP_DURATION:
+ g_value_set_int64 (value, PAROLE_STREAM_GET_PRIVATE (stream)->duration);
+ break;
+ case PROP_TRACKS:
+ g_value_set_uint (value, PAROLE_STREAM_GET_PRIVATE (stream)->tracks);
+ break;
+ case PROP_TRACK:
+ g_value_set_uint (value, PAROLE_STREAM_GET_PRIVATE (stream)->track);
+ break;
+ case PROP_TAG_AVAILABLE:
+ g_value_set_double (value, PAROLE_STREAM_GET_PRIVATE (stream)->tag_available);
+ break;
+ case PROP_ABSOLUTE_DURATION:
+ g_value_set_int64 (value, PAROLE_STREAM_GET_PRIVATE (stream)->absolute_duration);
+ break;
+ case PROP_VIDEO_HEIGHT:
+ g_value_set_int (value, PAROLE_STREAM_GET_PRIVATE (stream)->video_h);
+ break;
+ case PROP_VIDEO_WIDTH:
+ g_value_set_int (value, PAROLE_STREAM_GET_PRIVATE (stream)->video_w);
+ break;
+ case PROP_TITLE:
+ g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->title);
+ break;
+ case PROP_ARTIST:
+ g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->artist);
+ break;
+ case PROP_YEAR:
+ g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->year);
+ break;
+ case PROP_ALBUM:
+ g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->album);
+ break;
+ case PROP_COMMENT:
+ g_value_set_string (value, PAROLE_STREAM_GET_PRIVATE (stream)->comment);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -322,12 +322,12 @@ parole_stream_set_image (GObject *object, GdkPixbuf *pixbuf)
stream = PAROLE_STREAM (object);
if ( PAROLE_STREAM_GET_PRIVATE (stream)->image )
- g_object_unref(G_OBJECT(PAROLE_STREAM_GET_PRIVATE (stream)->image));
+ g_object_unref(G_OBJECT(PAROLE_STREAM_GET_PRIVATE (stream)->image));
if (pixbuf)
- PAROLE_STREAM_GET_PRIVATE (stream)->image = gdk_pixbuf_copy(pixbuf);
+ PAROLE_STREAM_GET_PRIVATE (stream)->image = gdk_pixbuf_copy(pixbuf);
else
- PAROLE_STREAM_GET_PRIVATE (stream)->image = NULL;
+ PAROLE_STREAM_GET_PRIVATE (stream)->image = NULL;
}
GdkPixbuf *
@@ -339,9 +339,9 @@ parole_stream_get_image (GObject *object)
stream = PAROLE_STREAM (object);
if (PAROLE_STREAM_GET_PRIVATE (stream)->image)
- pixbuf = gdk_pixbuf_copy(GDK_PIXBUF(PAROLE_STREAM_GET_PRIVATE (stream)->image));
+ pixbuf = gdk_pixbuf_copy(GDK_PIXBUF(PAROLE_STREAM_GET_PRIVATE (stream)->image));
else
- pixbuf = NULL;
+ pixbuf = NULL;
return pixbuf;
}
@@ -364,12 +364,12 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_URI,
- g_param_spec_string ("uri",
- "Uri",
- "Uri",
- NULL,
- G_PARAM_READWRITE));
+ PROP_URI,
+ g_param_spec_string ("uri",
+ "Uri",
+ "Uri",
+ NULL,
+ G_PARAM_READWRITE));
/**
* ParoleStream:subtitles:
@@ -380,12 +380,12 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_SUBTITLES,
- g_param_spec_string ("subtitles",
- "Subtitles",
- "Subtitle file",
- NULL,
- G_PARAM_READWRITE));
+ PROP_SUBTITLES,
+ g_param_spec_string ("subtitles",
+ "Subtitles",
+ "Subtitle file",
+ NULL,
+ G_PARAM_READWRITE));
/**
* ParoleStream:has-audio:
@@ -395,12 +395,12 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_HAS_AUDIO,
- g_param_spec_boolean ("has-audio",
- "Has audio",
- "Has audio",
- FALSE,
- G_PARAM_READWRITE));
+ PROP_HAS_AUDIO,
+ g_param_spec_boolean ("has-audio",
+ "Has audio",
+ "Has audio",
+ FALSE,
+ G_PARAM_READWRITE));
/**
* ParoleStream:has-video:
*
@@ -409,12 +409,12 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_HAS_VIDEO,
- g_param_spec_boolean ("has-video",
- "Has video",
- "Has video",
- FALSE,
- G_PARAM_READWRITE));
+ PROP_HAS_VIDEO,
+ g_param_spec_boolean ("has-video",
+ "Has video",
+ "Has video",
+ FALSE,
+ G_PARAM_READWRITE));
/**
* ParoleStream:live:
@@ -424,28 +424,28 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_LIVE,
- g_param_spec_boolean ("live",
- "Live",
- "Live",
- FALSE,
- G_PARAM_READWRITE));
+ PROP_LIVE,
+ g_param_spec_boolean ("live",
+ "Live",
+ "Live",
+ FALSE,
+ G_PARAM_READWRITE));
/**
* ParoleStream:media-type:
*
- * The media type.
+ * The media type.
*
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_MEDIA_TYPE,
- g_param_spec_enum ("media-type",
- "Media type",
- "Media type",
- PAROLE_ENUM_TYPE_MEDIA_TYPE,
- PAROLE_MEDIA_TYPE_UNKNOWN,
- G_PARAM_READWRITE));
+ PROP_MEDIA_TYPE,
+ g_param_spec_enum ("media-type",
+ "Media type",
+ "Media type",
+ PAROLE_ENUM_TYPE_MEDIA_TYPE,
+ PAROLE_MEDIA_TYPE_UNKNOWN,
+ G_PARAM_READWRITE));
/**
* ParoleStream:seekable:
@@ -456,12 +456,12 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_SEEKABLE,
- g_param_spec_boolean ("seekable",
- "Seekable",
- "Seekable",
- FALSE,
- G_PARAM_READWRITE));
+ PROP_SEEKABLE,
+ g_param_spec_boolean ("seekable",
+ "Seekable",
+ "Seekable",
+ FALSE,
+ G_PARAM_READWRITE));
/**
* ParoleStream:duration:
@@ -471,13 +471,13 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_DURATION,
- g_param_spec_int64 ("duration",
- "Duration",
- "Duration",
- 0, G_MAXINT64,
- 0,
- G_PARAM_READWRITE));
+ PROP_DURATION,
+ g_param_spec_int64 ("duration",
+ "Duration",
+ "Duration",
+ 0, G_MAXINT64,
+ 0,
+ G_PARAM_READWRITE));
/**
* ParoleStream:tag-available:
@@ -487,12 +487,12 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_TAG_AVAILABLE,
- g_param_spec_boolean ("tag-available",
- "Tag available",
- "Tag available",
- FALSE,
- G_PARAM_READWRITE));
+ PROP_TAG_AVAILABLE,
+ g_param_spec_boolean ("tag-available",
+ "Tag available",
+ "Tag available",
+ FALSE,
+ G_PARAM_READWRITE));
/**
* ParoleStream:absolute-duration:
@@ -502,13 +502,13 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_ABSOLUTE_DURATION,
- g_param_spec_int64 ("absolute-duration",
- "Absolution duration",
- "Absolution duration",
- 0, G_MAXINT64,
- 0,
- G_PARAM_READWRITE));
+ PROP_ABSOLUTE_DURATION,
+ g_param_spec_int64 ("absolute-duration",
+ "Absolution duration",
+ "Absolution duration",
+ 0, G_MAXINT64,
+ 0,
+ G_PARAM_READWRITE));
/**
* ParoleStream:disp-par-n:
@@ -518,14 +518,14 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_DISP_PAR_N,
- g_param_spec_uint ("disp-par-n",
- "Disp par n",
- "Disp par n",
- 1, G_MAXUINT,
- 1,
- G_PARAM_READWRITE));
-
+ PROP_DISP_PAR_N,
+ g_param_spec_uint ("disp-par-n",
+ "Disp par n",
+ "Disp par n",
+ 1, G_MAXUINT,
+ 1,
+ G_PARAM_READWRITE));
+
/**
* ParoleStream:disp-par-n:
*
@@ -534,14 +534,14 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_DISP_PAR_D,
- g_param_spec_uint ("disp-par-d",
- "Disp par d",
- "Disp par d",
- 1, G_MAXUINT,
- 1,
- G_PARAM_READWRITE));
-
+ PROP_DISP_PAR_D,
+ g_param_spec_uint ("disp-par-d",
+ "Disp par d",
+ "Disp par d",
+ 1, G_MAXUINT,
+ 1,
+ G_PARAM_READWRITE));
+
/**
* ParoleStream:video-width:
*
@@ -550,14 +550,14 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_VIDEO_WIDTH,
- g_param_spec_int ("video-width",
- "Video width",
- "Video width",
- 0, G_MAXINT,
- 0,
- G_PARAM_READWRITE));
-
+ PROP_VIDEO_WIDTH,
+ g_param_spec_int ("video-width",
+ "Video width",
+ "Video width",
+ 0, G_MAXINT,
+ 0,
+ G_PARAM_READWRITE));
+
/**
* ParoleStream:video-height:
*
@@ -566,14 +566,14 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_VIDEO_HEIGHT,
- g_param_spec_int ("video-height",
- "Video height",
- "Video height",
- 0, G_MAXINT,
- 0,
- G_PARAM_READWRITE));
-
+ PROP_VIDEO_HEIGHT,
+ g_param_spec_int ("video-height",
+ "Video height",
+ "Video height",
+ 0, G_MAXINT,
+ 0,
+ G_PARAM_READWRITE));
+
/**
* ParoleStream:num-tracks:
*
@@ -583,14 +583,14 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_TRACKS,
- g_param_spec_uint ("num-tracks",
- "Num tracks",
- "Number of tracks in the audio disc",
- 1, 99,
- 1,
- G_PARAM_READWRITE));
-
+ PROP_TRACKS,
+ g_param_spec_uint ("num-tracks",
+ "Num tracks",
+ "Number of tracks in the audio disc",
+ 1, 99,
+ 1,
+ G_PARAM_READWRITE));
+
/**
* ParoleStream:track:
*
@@ -601,13 +601,13 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_TRACK,
- g_param_spec_uint ("track",
- "Track",
- "Track",
- 0, 99,
- 1,
- G_PARAM_READWRITE));
+ PROP_TRACK,
+ g_param_spec_uint ("track",
+ "Track",
+ "Track",
+ 0, 99,
+ 1,
+ G_PARAM_READWRITE));
/**
* ParoleStream:title:
*
@@ -616,12 +616,12 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_TITLE,
- g_param_spec_string ("title",
- "Title",
- "Title",
- NULL,
- G_PARAM_READWRITE));
+ PROP_TITLE,
+ g_param_spec_string ("title",
+ "Title",
+ "Title",
+ NULL,
+ G_PARAM_READWRITE));
/**
@@ -632,13 +632,13 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_ARTIST,
- g_param_spec_string ("artist",
- "Artist",
- "Artist",
- NULL,
- G_PARAM_READWRITE));
-
+ PROP_ARTIST,
+ g_param_spec_string ("artist",
+ "Artist",
+ "Artist",
+ NULL,
+ G_PARAM_READWRITE));
+
/**
* ParoleStream:year:
*
@@ -647,13 +647,13 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_YEAR,
- g_param_spec_string ("year",
- "Year",
- "Year",
- NULL,
- G_PARAM_READWRITE));
-
+ PROP_YEAR,
+ g_param_spec_string ("year",
+ "Year",
+ "Year",
+ NULL,
+ G_PARAM_READWRITE));
+
/**
* ParoleStream:album:
*
@@ -662,13 +662,13 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_ALBUM,
- g_param_spec_string ("album",
- "Album",
- "Album",
- NULL,
- G_PARAM_READWRITE));
-
+ PROP_ALBUM,
+ g_param_spec_string ("album",
+ "Album",
+ "Album",
+ NULL,
+ G_PARAM_READWRITE));
+
/**
* ParoleStream:comment:
*
@@ -677,13 +677,13 @@ parole_stream_class_init (ParoleStreamClass *klass)
* Since: 0.2
**/
g_object_class_install_property (object_class,
- PROP_COMMENT,
- g_param_spec_string ("comment",
- "Comment",
- "Comment",
- NULL,
- G_PARAM_READWRITE));
-
+ PROP_COMMENT,
+ g_param_spec_string ("comment",
+ "Comment",
+ "Comment",
+ NULL,
+ G_PARAM_READWRITE));
+
g_type_class_add_private (klass, sizeof (ParoleStreamPrivate));
}
diff --git a/src/misc/parole-stream.h b/src/misc/parole-stream.h
index 04f0b89..e11a32c 100644
--- a/src/misc/parole-stream.h
+++ b/src/misc/parole-stream.h
@@ -66,24 +66,25 @@ typedef struct _ParoleStreamClass ParoleStreamClass;
struct _ParoleStream
{
- GObject parent;
+ GObject parent;
};
struct _ParoleStreamClass
{
- GObjectClass parent_class;
+ GObjectClass parent_class;
};
-GType parole_stream_get_type (void) G_GNUC_CONST;
+GType parole_stream_get_type (void) G_GNUC_CONST;
-void parole_stream_set_image (GObject *object, GdkPixbuf *pixbuf);
+void parole_stream_set_image (GObject *object,
+ GdkPixbuf *pixbuf);
-GdkPixbuf *parole_stream_get_image (GObject *object);
+GdkPixbuf *parole_stream_get_image (GObject *object);
-ParoleStream *parole_stream_new (void);
+ParoleStream *parole_stream_new (void);
-void parole_stream_init_properties (ParoleStream *stream);
+void parole_stream_init_properties (ParoleStream *stream);
G_END_DECLS
diff --git a/src/org.parole.media.player.xml b/src/org.parole.media.player.xml
index 5be1362..b8342e9 100644
--- a/src/org.parole.media.player.xml
+++ b/src/org.parole.media.player.xml
@@ -10,21 +10,12 @@
<method name="Play">
</method>
- <method name="Stop">
- </method>
-
<method name="NextTrack">
</method>
<method name="PrevTrack">
</method>
- <method name="SeekForward">
- </method>
-
- <method name="SeekBackward">
- </method>
-
<method name="RaiseVolume">
</method>
@@ -34,6 +25,9 @@
<method name="Mute">
</method>
+ <method name="Unmute">
+ </method>
+
<method name="PlayDisc">
<arg type="s" name="uri" direction="in"/>
<arg type="s" name="device" direction="in"/>
diff --git a/src/parole-about.c b/src/parole-about.c
index 4f1ada2..f275b1e 100644
--- a/src/parole-about.c
+++ b/src/parole-about.c
@@ -47,17 +47,17 @@ void parole_about (GtkWindow *parent)
/* List of authors */
static const gchar *authors[] =
{
- "Ali Abdallah <aliov at xfce.org>",
- "Sean Davis <bluesabre at xfce.org>",
- "Simon Steinbeiss <simon at xfce.org>",
- NULL,
+ "Ali Abdallah <aliov at xfce.org>",
+ "Sean Davis <bluesabre at xfce.org>",
+ "Simon Steinbeiss <simon at xfce.org>",
+ NULL,
};
/* List of documentation writers */
static const gchar *documenters[] =
{
- "Ali Abdallah <aliov at xfce.org>",
- NULL,
+ "Ali Abdallah <aliov at xfce.org>",
+ NULL,
};
/* Copyright information */
@@ -65,17 +65,17 @@ void parole_about (GtkWindow *parent)
"Copyright \302\251 2009-2011 Ali Abdallah\n"
"Copyright \302\251 2012-2013 Sean Davis, Simon Steinbeiss";
- gtk_show_about_dialog (parent,
- "authors", authors,
- "comments", _("Parole Media Player"),
- "documenters", documenters,
- "copyright", copyrights,
- "license", XFCE_LICENSE_GPL,
- "logo-icon-name", "parole",
- "program-name", PACKAGE_NAME,
- "translator-credits", _("translator-credits"),
- "version", PACKAGE_VERSION,
- "website", "http://goodies.xfce.org/projects/applications/parole",
- "website-label", _("Visit Parole website"),
- NULL);
+ gtk_show_about_dialog (parent,
+ "authors", authors,
+ "comments", _("Parole Media Player"),
+ "documenters", documenters,
+ "copyright", copyrights,
+ "license", XFCE_LICENSE_GPL,
+ "logo-icon-name", "parole",
+ "program-name", PACKAGE_NAME,
+ "translator-credits", _("translator-credits"),
+ "version", PACKAGE_VERSION,
+ "website", "http://goodies.xfce.org/projects/applications/parole",
+ "website-label", _("Visit Parole website"),
+ NULL);
}
diff --git a/src/parole-about.h b/src/parole-about.h
index 9dcb7f6..0df16c7 100644
--- a/src/parole-about.h
+++ b/src/parole-about.h
@@ -25,6 +25,6 @@
#include <gtk/gtk.h>
-void parole_about (GtkWindow *parent);
+void parole_about (GtkWindow *parent);
#endif /* __PAROLE_ABOUT_H */
diff --git a/src/parole-builder.c b/src/parole-builder.c
index 6eecfb2..8034cfb 100644
--- a/src/parole-builder.c
+++ b/src/parole-builder.c
@@ -46,12 +46,12 @@ parole_builder_get_main_interface (void)
if ( G_LIKELY (parole_builder_object != NULL) )
{
- g_object_ref (parole_builder_object);
+ g_object_ref (parole_builder_object);
}
else
{
- parole_builder_object = parole_builder_new_from_string (parole_ui, parole_ui_length);
- g_object_add_weak_pointer (parole_builder_object, &parole_builder_object);
+ parole_builder_object = parole_builder_new_from_string (parole_ui, parole_ui_length);
+ g_object_add_weak_pointer (parole_builder_object, &parole_builder_object);
}
return GTK_BUILDER (parole_builder_object);
@@ -79,8 +79,8 @@ parole_builder_new_from_string (const gchar *ui, gsize length)
if ( error )
{
- g_critical ("%s", error->message);
- g_error_free (error);
+ g_critical ("%s", error->message);
+ g_error_free (error);
}
return builder;
diff --git a/src/parole-builder.h b/src/parole-builder.h
index 5e755d8..a12794a 100644
--- a/src/parole-builder.h
+++ b/src/parole-builder.h
@@ -28,10 +28,10 @@
G_BEGIN_DECLS
-GtkBuilder *parole_builder_get_main_interface (void);
+GtkBuilder *parole_builder_get_main_interface (void);
-GtkBuilder *parole_builder_new_from_string (const gchar *ui,
- gsize length);
+GtkBuilder *parole_builder_new_from_string (const gchar *ui,
+ gsize length);
G_END_DECLS
diff --git a/src/parole-button.c b/src/parole-button.c
index 2ea6686..720c712 100644
--- a/src/parole-button.c
+++ b/src/parole-button.c
@@ -64,7 +64,7 @@ static struct
struct ParoleButtonPrivate
{
- GdkScreen *screen;
+ GdkScreen *screen;
GdkWindow *window;
};
@@ -96,8 +96,8 @@ parole_button_get_key (unsigned int keycode)
for ( i = 0; i < G_N_ELEMENTS (parole_key_map); i++)
{
- if ( parole_key_map [i].key_code == keycode )
- key = parole_key_map [i].key;
+ if ( parole_key_map [i].key_code == keycode )
+ key = parole_key_map [i].key;
}
return key;
@@ -120,18 +120,18 @@ parole_button_filter_x_events (GdkXEvent *xevent, GdkEvent *ev, gpointer data)
XEvent *xev = (XEvent *) xevent;
if ( xev->type != KeyPress )
- return GDK_FILTER_CONTINUE;
+ return GDK_FILTER_CONTINUE;
key = parole_button_get_key (xev->xkey.keycode);
if ( key != PAROLE_KEY_UNKNOWN )
{
- button = (ParoleButton *) data;
-
- PAROLE_DEBUG_ENUM ("Key press", key, ENUM_GTYPE_BUTTON_KEY);
-
- g_signal_emit (G_OBJECT(button), signals[BUTTON_PRESSED], 0, key);
- return GDK_FILTER_REMOVE;
+ button = (ParoleButton *) data;
+
+ PAROLE_DEBUG_ENUM ("Key press", key, ENUM_GTYPE_BUTTON_KEY);
+
+ g_signal_emit (G_OBJECT(button), signals[BUTTON_PRESSED], 0, key);
+ return GDK_FILTER_REMOVE;
}
return GDK_FILTER_CONTINUE;
@@ -149,38 +149,38 @@ parole_button_filter_x_events (GdkXEvent *xevent, GdkEvent *ev, gpointer data)
static gboolean
parole_button_grab_keystring (ParoleButton *button, guint keycode)
{
- Display *display;
+ GdkDisplay *display;
guint ret;
guint modmask = 0;
- display = GDK_DISPLAY ();
+ display = gdk_display_get_default();
gdk_error_trap_push ();
- ret = XGrabKey (display, keycode, modmask,
- GDK_WINDOW_XID (button->priv->window), True,
- GrabModeAsync, GrabModeAsync);
-
+ ret = XGrabKey (GDK_DISPLAY_XDISPLAY(display), keycode, modmask,
+ gdk_x11_window_get_xid (button->priv->window), True,
+ GrabModeAsync, GrabModeAsync);
+
if ( ret == BadAccess )
{
- g_warning ("Failed to grab modmask=%u, keycode=%li",
- modmask, (long int) keycode);
- return FALSE;
+ g_warning ("Failed to grab modmask=%u, keycode=%li",
+ modmask, (long int) keycode);
+ return FALSE;
}
-
- ret = XGrabKey (display, keycode, LockMask | modmask,
- GDK_WINDOW_XID (button->priv->window), True,
- GrabModeAsync, GrabModeAsync);
-
+
+ ret = XGrabKey (GDK_DISPLAY_XDISPLAY(display), keycode, LockMask | modmask,
+ gdk_x11_window_get_xid (button->priv->window), True,
+ GrabModeAsync, GrabModeAsync);
+
if (ret == BadAccess)
{
- g_warning ("Failed to grab modmask=%u, keycode=%li",
- LockMask | modmask, (long int) keycode);
- return FALSE;
+ g_warning ("Failed to grab modmask=%u, keycode=%li",
+ LockMask | modmask, (long int) keycode);
+ return FALSE;
}
gdk_flush ();
- gdk_error_trap_pop ();
+ gdk_error_trap_pop_ignored ();
return TRUE;
}
@@ -197,18 +197,18 @@ parole_button_grab_keystring (ParoleButton *button, guint keycode)
static gboolean
parole_button_xevent_key (ParoleButton *button, guint keysym , ParoleButtonKey key)
{
- guint keycode = XKeysymToKeycode (GDK_DISPLAY(), keysym);
+ guint keycode = XKeysymToKeycode (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), keysym);
if ( keycode == 0 )
{
- g_warning ("could not map keysym %x to keycode\n", keysym);
- return FALSE;
+ g_warning ("could not map keysym %x to keycode\n", keysym);
+ return FALSE;
}
if ( !parole_button_grab_keystring(button, keycode))
{
- g_warning ("Failed to grab %i\n", keycode);
- return FALSE;
+ g_warning ("Failed to grab %i\n", keycode);
+ return FALSE;
}
PAROLE_DEBUG_ENUM_FULL (key, ENUM_GTYPE_BUTTON_KEY, "Grabbed key %li ", (long int) keycode);
@@ -236,8 +236,8 @@ parole_button_setup (ParoleButton *button)
parole_button_xevent_key (button, XF86XK_AudioPrev, PAROLE_KEY_AUDIO_PREV);
parole_button_xevent_key (button, XF86XK_AudioNext, PAROLE_KEY_AUDIO_NEXT);
- gdk_window_add_filter (button->priv->window,
- parole_button_filter_x_events, button);
+ gdk_window_add_filter (button->priv->window,
+ parole_button_filter_x_events, button);
}
/**
diff --git a/src/parole-button.h b/src/parole-button.h
index 7284699..770473a 100644
--- a/src/parole-button.h
+++ b/src/parole-button.h
@@ -48,23 +48,23 @@ typedef struct ParoleButtonPrivate ParoleButtonPrivate;
typedef struct
{
- GObject parent;
- ParoleButtonPrivate *priv;
+ GObject parent;
+ ParoleButtonPrivate *priv;
} ParoleButton;
typedef struct
{
- GObjectClass parent_class;
+ GObjectClass parent_class;
- void (*button_pressed) (ParoleButton *button,
- ParoleButtonKey type);
+ void (*button_pressed) (ParoleButton *button,
+ ParoleButtonKey type);
} ParoleButtonClass;
-GType parole_button_get_type (void) G_GNUC_CONST;
+GType parole_button_get_type (void) G_GNUC_CONST;
-ParoleButton *parole_button_new (void);
+ParoleButton *parole_button_new (void);
G_END_DECLS
diff --git a/src/parole-conf-dialog.c b/src/parole-conf-dialog.c
index c1c4e59..9074e7e 100644
--- a/src/parole-conf-dialog.c
+++ b/src/parole-conf-dialog.c
@@ -41,58 +41,71 @@
* GtkBuilder Callbacks
*/
-void parole_conf_dialog_response_cb (GtkDialog *dialog,
- gint response_id,
- ParoleConfDialog *self);
-
-void parole_conf_dialog_enable_vis_changed_cb (GtkToggleButton *widget,
- ParoleConfDialog *self);
-
-void parole_conf_dialog_reset_saver_changed_cb (GtkToggleButton *widget,
- ParoleConfDialog *self);
-
-void parole_conf_dialog_vis_plugin_changed_cb (GtkComboBox *widget,
- ParoleConfDialog *self);
-
-void parole_conf_dialog_font_set_cb (GtkFontButton *button,
- ParoleConfDialog *self);
-
-void parole_conf_dialog_enable_subtitle_changed_cb (GtkToggleButton *widget,
- ParoleConfDialog *self);
-
-void parole_conf_dialog_subtitle_encoding_changed_cb (GtkComboBox *widget,
- ParoleConfDialog *self);
-
-void brightness_value_changed_cb (GtkRange *range,
- ParoleConfDialog *self);
-
-void contrast_value_changed_cb (GtkRange *range,
- ParoleConfDialog *self);
-
-void hue_value_changed_cb (GtkRange *range,
- ParoleConfDialog *self);
-
-void saturation_value_changed_cb (GtkRange *range,
- ParoleConfDialog *self);
-
-void reset_color_clicked_cb (GtkButton *button,
- ParoleConfDialog *self);
-
-void replace_playlist_toggled_cb (GtkToggleButton *widget,
- ParoleConfDialog *self);
-
-void remove_duplicated_toggled_cb (GtkToggleButton *widget,
- ParoleConfDialog *self);
-
-void start_playing_opened_toggled_cb (GtkToggleButton *widget,
- ParoleConfDialog *self);
-
-void remember_playlist_toggled_cb (GtkToggleButton *widget,
- ParoleConfDialog *self);
-
-void multimedia_keys_toggled_cb (GtkToggleButton *widget,
- ParoleConfDialog *self);
-
+void parole_conf_dialog_response_cb (GtkDialog *dialog,
+ gint response_id,
+ ParoleConfDialog *self);
+
+void
+parole_conf_dialog_enable_vis_changed_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data);
+
+void
+parole_conf_dialog_reset_saver_changed_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data);
+
+void
+parole_conf_dialog_vis_plugin_changed_cb (GtkComboBox *widget,
+ ParoleConfDialog *self);
+
+void parole_conf_dialog_font_set_cb (GtkFontButton *button,
+ ParoleConfDialog *self);
+
+void
+parole_conf_dialog_enable_subtitle_changed_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data);
+
+void
+parole_conf_dialog_subtitle_encoding_changed_cb (GtkComboBox *widget,
+ ParoleConfDialog *self);
+
+void brightness_value_changed_cb (GtkRange *range,
+ ParoleConfDialog *self);
+
+void contrast_value_changed_cb (GtkRange *range,
+ ParoleConfDialog *self);
+
+void hue_value_changed_cb (GtkRange *range,
+ ParoleConfDialog *self);
+
+void saturation_value_changed_cb (GtkRange *range,
+ ParoleConfDialog *self);
+
+void reset_color_clicked_cb (GtkButton *button,
+ ParoleConfDialog *self);
+
+void replace_playlist_toggled_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data);
+
+void remove_duplicated_toggled_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data);
+
+void start_playing_opened_toggled_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data);
+
+void remember_playlist_toggled_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data);
+
+void multimedia_keys_toggled_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data);
+
/*
* End of GtkBuilder callbacks
*/
@@ -123,47 +136,66 @@ G_DEFINE_TYPE (ParoleConfDialog, parole_conf_dialog, G_TYPE_OBJECT)
static void
parole_conf_dialog_destroy (GtkWidget *widget, ParoleConfDialog *self)
{
- gtk_widget_destroy (widget);
- g_object_unref (self);
+ gtk_widget_hide(widget);
}
/* Replace the playlist with newly opened files */
-void replace_playlist_toggled_cb (GtkToggleButton *widget, ParoleConfDialog *self)
+void replace_playlist_toggled_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data)
{
+ ParoleConfDialog *self;
+ self = PAROLE_CONF_DIALOG(data);
g_object_set (G_OBJECT (self->priv->conf),
- "replace-playlist", gtk_toggle_button_get_active (widget),
- NULL);
+ "replace-playlist", gtk_switch_get_active (GTK_SWITCH(GTK_WIDGET(object))),
+ NULL);
}
-
-/* Remove duplicate entries from the playlist FIXME */
-void remove_duplicated_toggled_cb (GtkToggleButton *widget, ParoleConfDialog *self)
+
+/* Remove duplicate entries from the playlist FIXME */
+void remove_duplicated_toggled_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data)
{
+ ParoleConfDialog *self;
+ self = PAROLE_CONF_DIALOG(data);
g_object_set (G_OBJECT (self->priv->conf),
- "remove-duplicated", gtk_toggle_button_get_active (widget),
- NULL);
+ "remove-duplicated", gtk_switch_get_active (GTK_SWITCH(GTK_WIDGET(object))),
+ NULL);
}
/* Automatically start playing opened files (vs. just adding them to the playlist) */
-void start_playing_opened_toggled_cb (GtkToggleButton *widget, ParoleConfDialog *self)
+void start_playing_opened_toggled_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data)
{
+ ParoleConfDialog *self;
+ self = PAROLE_CONF_DIALOG(data);
g_object_set (G_OBJECT (self->priv->conf),
- "play-opened-files", gtk_toggle_button_get_active (widget),
- NULL);
+ "play-opened-files", gtk_switch_get_active (GTK_SWITCH(GTK_WIDGET(object))),
+ NULL);
}
/* Remember whether the playlist was visible in the previous session */
-void remember_playlist_toggled_cb (GtkToggleButton *widget, ParoleConfDialog *self)
+void remember_playlist_toggled_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data)
{
+ ParoleConfDialog *self;
+ self = PAROLE_CONF_DIALOG(data);
g_object_set (G_OBJECT (self->priv->conf),
- "remember-playlist", gtk_toggle_button_get_active (widget),
- NULL);
+ "remember-playlist", gtk_switch_get_active (GTK_SWITCH(GTK_WIDGET(object))),
+ NULL);
}
-void multimedia_keys_toggled_cb (GtkToggleButton *widget, ParoleConfDialog *self)
+void multimedia_keys_toggled_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data)
{
+ ParoleConfDialog *self;
+ self = PAROLE_CONF_DIALOG(data);
g_object_set (G_OBJECT (self->priv->conf),
- "multimedia-keys", gtk_toggle_button_get_active (widget),
- NULL);
+ "multimedia-keys", gtk_switch_get_active (GTK_SWITCH(GTK_WIDGET(object))),
+ NULL);
}
/* Change the various image properties */
@@ -179,11 +211,11 @@ void parole_conf_dialog_response_cb (GtkDialog *dialog, gint response_id, Parole
{
switch (response_id)
{
- case GTK_RESPONSE_HELP:
- break;
- default:
- parole_conf_dialog_destroy (GTK_WIDGET (dialog), self);
- break;
+ case GTK_RESPONSE_HELP:
+ break;
+ default:
+ parole_conf_dialog_destroy (GTK_WIDGET (dialog), self);
+ break;
}
}
@@ -191,20 +223,24 @@ void parole_conf_dialog_response_cb (GtkDialog *dialog, gint response_id, Parole
void parole_conf_dialog_subtitle_encoding_changed_cb (GtkComboBox *widget, ParoleConfDialog *self)
{
g_object_set (G_OBJECT (self->priv->conf),
- "subtitle-encoding", parole_subtitle_encoding_get_selected (widget),
- NULL);
+ "subtitle-encoding", parole_subtitle_encoding_get_selected (widget),
+ NULL);
}
/* Enable visualisations */
-void parole_conf_dialog_enable_vis_changed_cb (GtkToggleButton *widget, ParoleConfDialog *self)
+void parole_conf_dialog_enable_vis_changed_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data)
{
gboolean active;
+ ParoleConfDialog *self;
+ self = PAROLE_CONF_DIALOG(data);
- active = gtk_toggle_button_get_active (widget);
+ active = gtk_switch_get_active (GTK_SWITCH(GTK_WIDGET(object)));
g_object_set (G_OBJECT (self->priv->conf),
- "vis-enabled", active,
- NULL);
+ "vis-enabled", active,
+ NULL);
gtk_widget_set_sensitive (self->priv->vis_combox, active);
}
@@ -217,9 +253,9 @@ set_effect_value (ParoleConfDialog *self, GtkRange *range, const gchar *name)
value = gtk_range_get_value (range);
- g_object_set (G_OBJECT (self->priv->conf),
- name, value,
- NULL);
+ g_object_set (G_OBJECT (self->priv->conf),
+ name, value,
+ NULL);
}
/* Change brightness */
@@ -248,48 +284,58 @@ void saturation_value_changed_cb (GtkRange *range, ParoleConfDialog *self)
void parole_conf_dialog_vis_plugin_changed_cb (GtkComboBox *widget, ParoleConfDialog *self)
{
- gchar *active;
+ gchar *active = NULL;
GstElementFactory *f;
- active = gtk_combo_box_get_active_text (widget);
+ GtkTreeIter iter;
+ GtkTreeModel *model = gtk_combo_box_get_model(widget);
+
+ if (gtk_combo_box_get_active_iter (widget, &iter))
+ gtk_tree_model_get (model, &iter, 0, &active, -1);
+ else
+ return;
f = g_hash_table_lookup (self->priv->vis_plugins, active);
if ( f )
{
- g_object_set (G_OBJECT (self->priv->conf),
- "vis-name", gst_object_get_name (GST_OBJECT (f)),
- NULL);
+ g_object_set (G_OBJECT (self->priv->conf),
+ "vis-name", gst_object_get_name (GST_OBJECT (f)),
+ NULL);
}
g_free (active);
}
-void parole_conf_dialog_reset_saver_changed_cb (GtkToggleButton *widget, ParoleConfDialog *self)
+void parole_conf_dialog_reset_saver_changed_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data)
{
+ ParoleConfDialog *self;
+ self = PAROLE_CONF_DIALOG(data);
g_object_set (G_OBJECT (self->priv->conf),
- "reset-saver", gtk_toggle_button_get_active (widget),
- NULL);
+ "reset-saver", gtk_switch_get_active (GTK_SWITCH(GTK_WIDGET(object))),
+ NULL);
}
/* Change subtitle font */
void parole_conf_dialog_font_set_cb (GtkFontButton *button, ParoleConfDialog *self)
{
g_object_set (G_OBJECT (self->priv->conf),
- "subtitle-font", gtk_font_button_get_font_name (button),
- NULL);
+ "subtitle-font", gtk_font_button_get_font_name (button),
+ NULL);
}
/* Enable subtitles by default */
-void parole_conf_dialog_enable_subtitle_changed_cb (GtkToggleButton *widget, ParoleConfDialog *self)
+void parole_conf_dialog_enable_subtitle_changed_cb (GObject *object,
+ GParamSpec *pspec,
+ gpointer *data)
{
- gboolean active;
-
- active = gtk_toggle_button_get_active (widget);
-
+ ParoleConfDialog *self;
+ self = PAROLE_CONF_DIALOG(data);
g_object_set (G_OBJECT (self->priv->conf),
- "enable-subtitle", active,
- NULL);
+ "enable-subtitle", gtk_switch_get_active (GTK_SWITCH(GTK_WIDGET(object))),
+ NULL);
}
/* Finalize the dialog */
@@ -331,13 +377,19 @@ parole_conf_dialog_init (ParoleConfDialog *self)
static void
parole_conf_dialog_add_vis_plugins (gpointer key, gpointer value, GtkWidget *combox)
{
- gtk_combo_box_append_text (GTK_COMBO_BOX (combox), (const gchar *) key);
+ GtkListStore *store = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(combox)));
+ GtkTreeIter iter;
+
+ gtk_list_store_append( store, &iter );
+ gtk_list_store_set( store, &iter, 0, (const gchar *) key, -1 );
+
+ g_object_unref (store);
}
/* Set the combobox to the default visualisation plugin */
static gboolean
parole_conf_dialog_set_default_vis_plugin (GtkTreeModel *model, GtkTreePath *path,
- GtkTreeIter *iter, ParoleConfDialog *self)
+ GtkTreeIter *iter, ParoleConfDialog *self)
{
GstElementFactory *f;
gchar *vis_name;
@@ -345,27 +397,27 @@ parole_conf_dialog_set_default_vis_plugin (GtkTreeModel *model, GtkTreePath *pat
gboolean ret = FALSE;
g_object_get (G_OBJECT (self->priv->conf),
- "vis-name", &vis_name,
- NULL);
+ "vis-name", &vis_name,
+ NULL);
gtk_tree_model_get (model, iter,
- 0, &combox_text,
- -1);
+ 0, &combox_text,
+ -1);
f = g_hash_table_lookup (self->priv->vis_plugins, combox_text);
if ( !g_strcmp0 (vis_name, "none") )
{
- if ( !g_strcmp0 (gst_object_get_name (GST_OBJECT (f)), "Goom") )
- ret = TRUE;
+ if ( !g_strcmp0 (gst_object_get_name (GST_OBJECT (f)), "Goom") )
+ ret = TRUE;
}
else if ( !g_strcmp0 (gst_object_get_name (GST_OBJECT (f)), vis_name) )
{
- ret = TRUE;
+ ret = TRUE;
}
if ( ret == TRUE )
- gtk_combo_box_set_active_iter (GTK_COMBO_BOX (self->priv->vis_combox), iter);
+ gtk_combo_box_set_active_iter (GTK_COMBO_BOX (self->priv->vis_combox), iter);
return ret;
}
@@ -383,10 +435,10 @@ parole_conf_dialog_set_defaults_playlist (ParoleConfDialog *self, GtkBuilder *b
widget = GTK_WIDGET (gtk_builder_get_object (builder, "replace-playlist"));
g_object_get (G_OBJECT (self->priv->conf),
- "replace-playlist", &option,
- NULL);
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), option);
+ "replace-playlist", &option,
+ NULL);
+
+ gtk_switch_set_active (GTK_SWITCH (widget), option);
/**
* Start playing opened files
@@ -394,10 +446,10 @@ parole_conf_dialog_set_defaults_playlist (ParoleConfDialog *self, GtkBuilder *b
widget = GTK_WIDGET (gtk_builder_get_object (builder, "start-playing-opened"));
g_object_get (G_OBJECT (self->priv->conf),
- "play-opened-files", &option,
- NULL);
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), option);
+ "play-opened-files", &option,
+ NULL);
+
+ gtk_switch_set_active (GTK_SWITCH (widget), option);
/**
* Remove duplicated playlist entries
@@ -405,10 +457,10 @@ parole_conf_dialog_set_defaults_playlist (ParoleConfDialog *self, GtkBuilder *b
widget = GTK_WIDGET (gtk_builder_get_object (builder, "remove-duplicated"));
g_object_get (G_OBJECT (self->priv->conf),
- "remove-duplicated", &option,
- NULL);
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), option);
+ "remove-duplicated", &option,
+ NULL);
+
+ gtk_switch_set_active (GTK_SWITCH (widget), option);
/**
* Remember playlist
@@ -419,7 +471,7 @@ parole_conf_dialog_set_defaults_playlist (ParoleConfDialog *self, GtkBuilder *b
"remember-playlist", &option,
NULL);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), option);
+ gtk_switch_set_active (GTK_SWITCH (widget), option);
}
/* Load the multimedia-button default settings */
@@ -435,10 +487,10 @@ parole_conf_dialog_set_defaults_general (ParoleConfDialog *self, GtkBuilder *bui
widget = GTK_WIDGET (gtk_builder_get_object (builder, "multimedia-keys"));
g_object_get (G_OBJECT (self->priv->conf),
- "multimedia-keys", &option,
- NULL);
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), option);
+ "multimedia-keys", &option,
+ NULL);
+
+ gtk_switch_set_active (GTK_SWITCH (widget), option);
}
@@ -453,25 +505,24 @@ parole_conf_dialog_set_defaults (ParoleConfDialog *self)
gchar *subtitle_encoding;
g_object_get (G_OBJECT (self->priv->conf),
- "vis-enabled", &vis_enabled,
- "enable-subtitle", &subtitle,
- "subtitle-font", &subtitle_font,
- "subtitle-encoding", &subtitle_encoding,
- NULL);
+ "vis-enabled", &vis_enabled,
+ "enable-subtitle", &subtitle,
+ "subtitle-font", &subtitle_font,
+ "subtitle-encoding", &subtitle_encoding,
+ NULL);
/* Update widget-states according to settings */
gtk_widget_set_sensitive (self->priv->vis_combox, vis_enabled);
- gtk_widget_set_sensitive (self->priv->font_button, subtitle);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->priv->toggle_vis), vis_enabled);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->priv->toggle_subtitle), subtitle);
+ gtk_switch_set_active (GTK_SWITCH (self->priv->toggle_vis), vis_enabled);
+ gtk_switch_set_active (GTK_SWITCH (self->priv->toggle_subtitle), subtitle);
model = gtk_combo_box_get_model (GTK_COMBO_BOX (self->priv->vis_combox));
gtk_tree_model_foreach (model,
- (GtkTreeModelForeachFunc) parole_conf_dialog_set_default_vis_plugin,
- self);
-
+ (GtkTreeModelForeachFunc) parole_conf_dialog_set_default_vis_plugin,
+ self);
+
parole_subtitle_encoding_set (GTK_COMBO_BOX (self->priv->encoding), subtitle_encoding);
gtk_font_button_set_font_name (GTK_FONT_BUTTON (self->priv->font_button), subtitle_font);
@@ -496,6 +547,8 @@ void parole_conf_dialog_open (ParoleConfDialog *self, GtkWidget *parent)
gboolean with_display;
gboolean reset_saver;
+ GtkWidget *switch_widget;
+
builder = parole_builder_new_from_string (parole_settings_ui, parole_settings_ui_length);
dialog = GTK_WIDGET (gtk_builder_get_object (builder, "settings-dialog"));
@@ -519,49 +572,87 @@ void parole_conf_dialog_open (ParoleConfDialog *self, GtkWidget *parent)
parole_conf_dialog_set_defaults_playlist (self, builder);
g_object_get (G_OBJECT (self->priv->conf),
- "reset-saver", &reset_saver,
- NULL);
+ "reset-saver", &reset_saver,
+ NULL);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (builder, "reset-saver")),
- reset_saver);
+ gtk_switch_set_active (GTK_SWITCH (gtk_builder_get_object (builder, "reset-saver")),
+ reset_saver);
with_display = parole_gst_get_is_xvimage_sink (PAROLE_GST (parole_gst_get ()));
if ( !with_display )
{
- gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "frame-display")));
+ gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "frame-display")));
}
else
{
- gint brightness_value;
- gint contrast_value;
- gint hue_value;
- gint saturation_value;
-
- self->priv->brightness = GTK_WIDGET (gtk_builder_get_object (builder, "brightness"));
- self->priv->contrast = GTK_WIDGET (gtk_builder_get_object (builder, "contrast"));
- self->priv->hue = GTK_WIDGET (gtk_builder_get_object (builder, "hue"));
- self->priv->saturation = GTK_WIDGET (gtk_builder_get_object (builder, "saturation"));
-
- gtk_range_set_range (GTK_RANGE (self->priv->brightness), -1000, 1000);
- gtk_range_set_range (GTK_RANGE (self->priv->contrast), -1000, 1000);
- gtk_range_set_range (GTK_RANGE (self->priv->saturation), -1000, 1000);
- gtk_range_set_range (GTK_RANGE (self->priv->hue), -1000, 1000);
-
- g_object_get (G_OBJECT (self->priv->conf),
- "brightness", &brightness_value,
- "contrast", &contrast_value,
- "hue", &hue_value,
- "saturation", &saturation_value,
- NULL);
-
- gtk_range_set_value (GTK_RANGE (self->priv->brightness), brightness_value);
- gtk_range_set_value (GTK_RANGE (self->priv->contrast), contrast_value);
- gtk_range_set_value (GTK_RANGE (self->priv->hue), hue_value);
- gtk_range_set_value (GTK_RANGE (self->priv->saturation), saturation_value);
-
+ gint brightness_value;
+ gint contrast_value;
+ gint hue_value;
+ gint saturation_value;
+
+ self->priv->brightness = GTK_WIDGET (gtk_builder_get_object (builder, "brightness"));
+ self->priv->contrast = GTK_WIDGET (gtk_builder_get_object (builder, "contrast"));
+ self->priv->hue = GTK_WIDGET (gtk_builder_get_object (builder, "hue"));
+ self->priv->saturation = GTK_WIDGET (gtk_builder_get_object (builder, "saturation"));
+
+ gtk_range_set_range (GTK_RANGE (self->priv->brightness), -1000, 1000);
+ gtk_range_set_range (GTK_RANGE (self->priv->contrast), -1000, 1000);
+ gtk_range_set_range (GTK_RANGE (self->priv->saturation), -1000, 1000);
+ gtk_range_set_range (GTK_RANGE (self->priv->hue), -1000, 1000);
+ gtk_scale_add_mark (GTK_SCALE (self->priv->brightness), 0, GTK_POS_BOTTOM, NULL);
+ gtk_scale_add_mark (GTK_SCALE (self->priv->contrast), 0, GTK_POS_BOTTOM, NULL);
+ gtk_scale_add_mark (GTK_SCALE (self->priv->saturation), 0, GTK_POS_BOTTOM, NULL);
+ gtk_scale_add_mark (GTK_SCALE (self->priv->hue), 0, GTK_POS_BOTTOM, NULL);
+
+ g_object_get (G_OBJECT (self->priv->conf),
+ "brightness", &brightness_value,
+ "contrast", &contrast_value,
+ "hue", &hue_value,
+ "saturation", &saturation_value,
+ NULL);
+
+ gtk_range_set_value (GTK_RANGE (self->priv->brightness), brightness_value);
+ gtk_range_set_value (GTK_RANGE (self->priv->contrast), contrast_value);
+ gtk_range_set_value (GTK_RANGE (self->priv->hue), hue_value);
+ gtk_range_set_value (GTK_RANGE (self->priv->saturation), saturation_value);
+
}
+ /* General/Video/Disable screensaver while playing movies */
+ switch_widget = GTK_WIDGET (gtk_builder_get_object (builder, "reset-saver"));
+ g_signal_connect(G_OBJECT(switch_widget), "notify::active", G_CALLBACK(parole_conf_dialog_reset_saver_changed_cb), self);
+
+ /* General/Audio/Enable visualization while playing audio file */
+ switch_widget = GTK_WIDGET (gtk_builder_get_object (builder, "enable-vis"));
+ g_signal_connect(G_OBJECT(switch_widget), "notify::active", G_CALLBACK(parole_conf_dialog_enable_vis_changed_cb), self);
+
+ /* General/Keyboard/Enable keyboard multimedia keys */
+ switch_widget = GTK_WIDGET (gtk_builder_get_object (builder, "multimedia-keys"));
+ g_signal_connect(G_OBJECT(switch_widget), "notify::active", G_CALLBACK(multimedia_keys_toggled_cb), self);
+
+ /* Playlist/Always replace playlist with opened files */
+ switch_widget = GTK_WIDGET (gtk_builder_get_object (builder, "replace-playlist"));
+ g_signal_connect(G_OBJECT(switch_widget), "notify::active", G_CALLBACK(replace_playlist_toggled_cb), self);
+
+ /* Playlist/Check and remove duplicate media entries */
+ switch_widget = GTK_WIDGET (gtk_builder_get_object (builder, "remove-duplicated"));
+ g_signal_connect(G_OBJECT(switch_widget), "notify::active", G_CALLBACK(remove_duplicated_toggled_cb), self);
+
+ /* Playlist/Start playing opened files */
+ switch_widget = GTK_WIDGET (gtk_builder_get_object (builder, "start-playing-opened"));
+ g_signal_connect(G_OBJECT(switch_widget), "notify::active", G_CALLBACK(start_playing_opened_toggled_cb), self);
+
+ /* Playlist/Remember playlist */
+ switch_widget = GTK_WIDGET (gtk_builder_get_object (builder, "remember-playlist"));
+ g_signal_connect(G_OBJECT(switch_widget), "notify::active", G_CALLBACK(remember_playlist_toggled_cb), self);
+
+ /* Subtitles/Automatically show subtitles when playing movie file */
+ switch_widget = GTK_WIDGET (gtk_builder_get_object (builder, "enable-subtitle"));
+ g_signal_connect(G_OBJECT(switch_widget), "notify::active", G_CALLBACK(parole_conf_dialog_enable_subtitle_changed_cb), self);
+
+ g_signal_connect(G_OBJECT(dialog), "delete-event", G_CALLBACK(gtk_widget_hide_on_delete), NULL);
+
gtk_builder_connect_signals (builder, self);
g_object_unref (builder);
diff --git a/src/parole-conf-dialog.h b/src/parole-conf-dialog.h
index 564fc92..ee1ec49 100644
--- a/src/parole-conf-dialog.h
+++ b/src/parole-conf-dialog.h
@@ -36,22 +36,22 @@ typedef struct ParoleConfDialogPrivate ParoleConfDialogPrivate;
typedef struct
{
- GObject parent;
- ParoleConfDialogPrivate *priv;
+ GObject parent;
+ ParoleConfDialogPrivate *priv;
} ParoleConfDialog;
typedef struct
{
- GObjectClass parent_class;
+ GObjectClass parent_class;
} ParoleConfDialogClass;
-GType parole_conf_dialog_get_type (void) G_GNUC_CONST;
-ParoleConfDialog *parole_conf_dialog_new (void);
+GType parole_conf_dialog_get_type (void) G_GNUC_CONST;
+ParoleConfDialog *parole_conf_dialog_new (void);
-void parole_conf_dialog_open (ParoleConfDialog *self,
- GtkWidget *parent);
+void parole_conf_dialog_open (ParoleConfDialog *self,
+ GtkWidget *parent);
G_END_DECLS
diff --git a/src/parole-conf.c b/src/parole-conf.c
index 84a6cec..f5e8683 100644
--- a/src/parole-conf.c
+++ b/src/parole-conf.c
@@ -51,7 +51,6 @@ enum
PROP_VIS_NAME,
PROP_VOLUME,
/* Folders */
- PROP_ISO_IMAGE_FOLDER,
PROP_MEDIA_CHOOSER_FOLDER,
/* Parole General */
PROP_MULTIMEDIA_KEYS,
@@ -79,7 +78,8 @@ enum
PROP_SATURATION,
/* Window properties */
PROP_WINDOW_HEIGHT,
- PROP_MINIMIZED,
+ PROP_WINDOW_MAXIMIZED,
+ PROP_WINDOW_MINIMIZED,
PROP_WINDOW_WIDTH,
N_PROP
};
@@ -150,7 +150,7 @@ static void parole_conf_set_property (GObject *object,
/* leave if the channel is not set */
if (G_UNLIKELY (conf->channel == NULL))
- return;
+ return;
/* build property name */
g_snprintf (prop_name, sizeof (prop_name), "/%s", g_param_spec_get_name (pspec));
@@ -348,13 +348,13 @@ parole_conf_class_init (ParoleConfClass *klass)
object_class->set_property = parole_conf_set_property;
if (!g_value_type_transformable (G_TYPE_STRING, G_TYPE_INT))
- g_value_register_transform_func (G_TYPE_STRING, G_TYPE_INT, transform_string_to_int);
+ g_value_register_transform_func (G_TYPE_STRING, G_TYPE_INT, transform_string_to_int);
if (!g_value_type_transformable (G_TYPE_STRING, G_TYPE_BOOLEAN))
- g_value_register_transform_func (G_TYPE_STRING, G_TYPE_BOOLEAN, transform_string_to_boolean);
+ g_value_register_transform_func (G_TYPE_STRING, G_TYPE_BOOLEAN, transform_string_to_boolean);
if (!g_value_type_transformable (G_TYPE_STRING, GST_ENUM_TYPE_ASPECT_RATIO))
- g_value_register_transform_func (G_TYPE_STRING, GST_ENUM_TYPE_ASPECT_RATIO, transform_string_to_enum);
+ g_value_register_transform_func (G_TYPE_STRING, GST_ENUM_TYPE_ASPECT_RATIO, transform_string_to_enum);
/**
* ParoleConf:vis-enabled:
@@ -381,10 +381,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_VIS_NAME,
g_param_spec_string ("vis-name",
- "/audio/visualization-name",
- NULL,
- "none",
- G_PARAM_READWRITE));
+ "/audio/visualization-name",
+ NULL,
+ "none",
+ G_PARAM_READWRITE));
/**
* ParoleConf:volume:
@@ -396,27 +396,12 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_VOLUME,
g_param_spec_int ("volume",
- "/audio/volume",
- NULL,
- 0,
- 100,
- 50,
- G_PARAM_READWRITE));
-
- /**
- * ParoleConf:iso-image-folder:
- *
- * Xfconf property: /folders/last-used-iso
- *
- * Path to directory containing last used iso image.
- **/
- g_object_class_install_property (object_class,
- PROP_ISO_IMAGE_FOLDER,
- g_param_spec_string ("iso-image-folder",
- "/folders/last-used-iso",
- NULL,
- "none",
- G_PARAM_READWRITE));
+ "/audio/volume",
+ NULL,
+ 0,
+ 100,
+ 50,
+ G_PARAM_READWRITE));
/**
* ParoleConf:media-chooser-folder:
@@ -428,10 +413,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_MEDIA_CHOOSER_FOLDER,
g_param_spec_string ("media-chooser-folder",
- "/folders/last-used-media",
- NULL,
- "none",
- G_PARAM_READWRITE));
+ "/folders/last-used-media",
+ NULL,
+ "none",
+ G_PARAM_READWRITE));
/**
* ParoleConf:multimedia-keys:
@@ -443,10 +428,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_MULTIMEDIA_KEYS,
g_param_spec_boolean ("multimedia-keys",
- "/parole/multimedia-keys",
- NULL,
- TRUE,
- G_PARAM_READWRITE));
+ "/parole/multimedia-keys",
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
/**
* ParoleConf:plugins:
@@ -458,10 +443,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_PLUGINS,
g_param_spec_string ("plugins",
- "/parole/plugins",
- NULL,
- "none",
- G_PARAM_READWRITE));
+ "/parole/plugins",
+ NULL,
+ "none",
+ G_PARAM_READWRITE));
/**
* ParoleConf:scan-recursive:
@@ -473,10 +458,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_SCAN_FOLDER_RECURSIVELY,
g_param_spec_boolean ("scan-recursive",
- "/parole/scan-recursive",
- NULL,
- TRUE,
- G_PARAM_READWRITE));
+ "/parole/scan-recursive",
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
/**
* ParoleConf:remember-playlist:
@@ -488,10 +473,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_REMEMBER_PLAYLIST,
g_param_spec_boolean ("remember-playlist",
- "/playlist/remember-playlist",
- NULL,
- FALSE,
- G_PARAM_READWRITE));
+ "/playlist/remember-playlist",
+ NULL,
+ FALSE,
+ G_PARAM_READWRITE));
/**
* ParoleConf:remove-duplicated:
@@ -503,10 +488,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_REMOVE_DUPLICATED_PLAYLIST_ENTRIES,
g_param_spec_boolean ("remove-duplicated",
- "/playlist/remove-duplicates",
- NULL,
- FALSE,
- G_PARAM_READWRITE));
+ "/playlist/remove-duplicates",
+ NULL,
+ FALSE,
+ G_PARAM_READWRITE));
/**
* ParoleConf:repeat:
@@ -518,10 +503,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_REPEAT,
g_param_spec_boolean ("repeat",
- "/playlist/repeat",
- NULL,
- FALSE,
- G_PARAM_READWRITE));
+ "/playlist/repeat",
+ NULL,
+ FALSE,
+ G_PARAM_READWRITE));
/**
* ParoleConf:replace-playlist:
@@ -534,10 +519,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_REPLACE_PLAYLIST,
g_param_spec_boolean ("replace-playlist",
- "/playlist/replace-playlist",
- NULL,
- FALSE,
- G_PARAM_READWRITE));
+ "/playlist/replace-playlist",
+ NULL,
+ FALSE,
+ G_PARAM_READWRITE));
/**
* ParoleConf:showhide-playlist:
@@ -549,10 +534,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_SHOWHIDE_PLAYLIST,
g_param_spec_boolean ("showhide-playlist",
- "/playlist/show-playlist",
- NULL,
- FALSE,
- G_PARAM_READWRITE));
+ "/playlist/show-playlist",
+ NULL,
+ FALSE,
+ G_PARAM_READWRITE));
/**
* ParoleConf:shuffle:
@@ -564,10 +549,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_SHUFFLE,
g_param_spec_boolean ("shuffle",
- "/playlist/shuffle",
- NULL,
- FALSE,
- G_PARAM_READWRITE));
+ "/playlist/shuffle",
+ NULL,
+ FALSE,
+ G_PARAM_READWRITE));
/**
* ParoleConf:play-opened-files:
@@ -580,10 +565,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_START_PLAYING_OPENED_FILES,
g_param_spec_boolean ("play-opened-files",
- "/playlist/play-opened-files",
- NULL,
- TRUE,
- G_PARAM_READWRITE));
+ "/playlist/play-opened-files",
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
/**
* ParoleConf:enable-subtitle:
@@ -595,10 +580,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_SUBTITLE_ENABLED,
g_param_spec_boolean ("enable-subtitle",
- "/subtitles/enabled",
- NULL,
- TRUE,
- G_PARAM_READWRITE));
+ "/subtitles/enabled",
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
/**
* ParoleConf:subtitle-encoding:
@@ -610,10 +595,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_SUBTITLE_ENCODING,
g_param_spec_string ("subtitle-encoding",
- "/subtitles/encoding",
- NULL,
- "UTF-8",
- G_PARAM_READWRITE));
+ "/subtitles/encoding",
+ NULL,
+ "UTF-8",
+ G_PARAM_READWRITE));
/**
* ParoleConf:subtitle-font:
@@ -625,10 +610,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_SUBTITLE_FONT,
g_param_spec_string ("subtitle-font",
- "/subtitles/font",
- NULL,
- "Sans Bold 20",
- G_PARAM_READWRITE));
+ "/subtitles/font",
+ NULL,
+ "Sans Bold 20",
+ G_PARAM_READWRITE));
/**
* ParoleConf:aspect-ratio:
@@ -640,11 +625,11 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_ASPECT_RATIO,
g_param_spec_enum ("aspect-ratio",
- "/video/aspect-ratio",
- NULL,
- GST_ENUM_TYPE_ASPECT_RATIO,
- PAROLE_ASPECT_RATIO_AUTO,
- G_PARAM_READWRITE));
+ "/video/aspect-ratio",
+ NULL,
+ GST_ENUM_TYPE_ASPECT_RATIO,
+ PAROLE_ASPECT_RATIO_AUTO,
+ G_PARAM_READWRITE));
/**
* ParoleConf:brightness:
@@ -656,12 +641,12 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_BRIGHTNESS,
g_param_spec_int ("brightness",
- "/video/brightness",
- NULL,
- -1000,
- 1000,
- 0,
- G_PARAM_READWRITE));
+ "/video/brightness",
+ NULL,
+ -1000,
+ 1000,
+ 0,
+ G_PARAM_READWRITE));
/**
* ParoleConf:contrast:
@@ -673,12 +658,12 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_CONTRAST,
g_param_spec_int ("contrast",
- "/video/contrast",
- NULL,
- -1000,
- 1000,
- 0,
- G_PARAM_READWRITE));
+ "/video/contrast",
+ NULL,
+ -1000,
+ 1000,
+ 0,
+ G_PARAM_READWRITE));
/**
* ParoleConf:reset-saver:
@@ -690,10 +675,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_DISABLE_SCREEN_SAVER,
g_param_spec_boolean ("reset-saver",
- "/video/disable-screensaver",
- NULL,
- TRUE,
- G_PARAM_READWRITE));
+ "/video/disable-screensaver",
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
/**
* ParoleConf:enable-xv:
@@ -705,10 +690,10 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_ENABLE_XV,
g_param_spec_boolean ("enable-xv",
- "/video/enable-xv",
- NULL,
- TRUE,
- G_PARAM_READWRITE));
+ "/video/enable-xv",
+ NULL,
+ TRUE,
+ G_PARAM_READWRITE));
/**
* ParoleConf:hue:
@@ -720,12 +705,12 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_HUE,
g_param_spec_int ("hue",
- "/video/hue",
- NULL,
- -1000,
- 1000,
- 0,
- G_PARAM_READWRITE));
+ "/video/hue",
+ NULL,
+ -1000,
+ 1000,
+ 0,
+ G_PARAM_READWRITE));
/**
* ParoleConf:saturation:
@@ -737,12 +722,12 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_SATURATION,
g_param_spec_int ("saturation",
- "/video/saturation",
- NULL,
- -1000,
- 1000,
- 0,
- G_PARAM_READWRITE));
+ "/video/saturation",
+ NULL,
+ -1000,
+ 1000,
+ 0,
+ G_PARAM_READWRITE));
/**
* ParoleConf:window-height:
@@ -754,12 +739,12 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_WINDOW_HEIGHT,
g_param_spec_int ("window-height",
- "/window/height",
- NULL,
- 1,
- G_MAXINT16,
- 420,
- G_PARAM_READWRITE));
+ "/window/height",
+ NULL,
+ 1,
+ G_MAXINT16,
+ 420,
+ G_PARAM_READWRITE));
/**
* ParoleConf:minimized:
@@ -769,12 +754,27 @@ parole_conf_class_init (ParoleConfClass *klass)
* If Parole should start minimized.
**/
g_object_class_install_property (object_class,
- PROP_MINIMIZED,
+ PROP_WINDOW_MINIMIZED,
g_param_spec_boolean ("minimized",
- "/window/minimized",
- NULL,
- FALSE,
- G_PARAM_READWRITE));
+ "/window/minimized",
+ NULL,
+ FALSE,
+ G_PARAM_READWRITE));
+
+ /**
+ * ParoleConf:maximized:
+ *
+ * Xfconf property: /window/maximized
+ *
+ * If Parole should start maximized.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_WINDOW_MINIMIZED,
+ g_param_spec_boolean ("window-maximized",
+ "/window/maximized",
+ NULL,
+ FALSE,
+ G_PARAM_READWRITE));
/**
* ParoleConf:window-width:
@@ -786,12 +786,12 @@ parole_conf_class_init (ParoleConfClass *klass)
g_object_class_install_property (object_class,
PROP_WINDOW_WIDTH,
g_param_spec_int ("window-width",
- "/window/width",
- NULL,
- 1,
- G_MAXINT16,
- 760,
- G_PARAM_READWRITE));
+ "/window/width",
+ NULL,
+ 1,
+ G_MAXINT16,
+ 760,
+ G_PARAM_READWRITE));
}
@@ -908,7 +908,7 @@ parole_conf_init (ParoleConf *conf)
/* set the string we check */
if (!xfconf_channel_has_property (conf->channel, check_prop))
- xfconf_channel_set_string (conf->channel, check_prop, "Sans Bold 20");
+ xfconf_channel_set_string (conf->channel, check_prop, "Sans Bold 20");
}
conf->property_changed_id =
@@ -971,9 +971,9 @@ parole_conf_write_entry_list (ParoleConf *conf, const gchar *name, gchar **value
if (value[i] && g_strcmp0(value[i], "") != 0 && g_strcmp0(value[i], "none") != 0 )
{
if (count == 0)
- value_string = g_strdup(value[i]);
+ value_string = g_strdup(value[i]);
else
- value_string = g_strconcat (value_string, ";", value[i], NULL);
+ value_string = g_strconcat (value_string, ";", value[i], NULL);
count++;
}
}
diff --git a/src/parole-conf.h b/src/parole-conf.h
index 1913c61..2035bf3 100644
--- a/src/parole-conf.h
+++ b/src/parole-conf.h
@@ -44,12 +44,12 @@ ParoleConf *parole_conf_new (void);
gboolean parole_conf_get_property_bool (ParoleConf *conf,
const gchar *name);
-gchar **parole_conf_read_entry_list (ParoleConf *conf,
+gchar **parole_conf_read_entry_list (ParoleConf *conf,
const gchar *name);
-
-void parole_conf_write_entry_list (ParoleConf *conf,
- const gchar *name,
- gchar **value);
+
+void parole_conf_write_entry_list (ParoleConf *conf,
+ const gchar *name,
+ gchar **value);
void parole_conf_xfconf_init_failed (void);
diff --git a/src/parole-disc.c b/src/parole-disc.c
index e708af5..fa80986 100644
--- a/src/parole-disc.c
+++ b/src/parole-disc.c
@@ -95,10 +95,10 @@ free_mount_data (gpointer data)
mount = (MountData *) data;
if ( mount->uri )
- g_free (mount->uri);
+ g_free (mount->uri);
if ( mount->device )
- g_free (mount->device);
+ g_free (mount->device);
g_free (mount);
}
@@ -111,13 +111,13 @@ parole_disc_set_label(ParoleDisc *disc, const gchar *label)
if ( g_strcmp0(label, _("Insert Disc")) != 0 )
{
- menu_label = g_strdup_printf ("%s '%s'", _("Play Disc"), label);
- g_signal_emit (G_OBJECT (disc), signals [LABEL_CHANGED], 0, label);
+ menu_label = g_strdup_printf ("%s '%s'", _("Play Disc"), label);
+ g_signal_emit (G_OBJECT (disc), signals [LABEL_CHANGED], 0, label);
}
else
{
- menu_label = g_strdup(label);
- g_signal_emit (G_OBJECT (disc), signals [LABEL_CHANGED], 0, label);
+ menu_label = g_strdup(label);
+ g_signal_emit (G_OBJECT (disc), signals [LABEL_CHANGED], 0, label);
}
gtk_menu_item_set_label( GTK_MENU_ITEM (disc->priv->disc_menu_item), menu_label );
@@ -140,27 +140,22 @@ parole_disc_get_enabled(ParoleDisc *disc)
static void
parole_disc_set_kind(ParoleDisc *disc, ParoleDiscKind kind)
{
- GtkWidget *img;
gboolean enabled = TRUE;
switch (kind)
{
case PAROLE_DISC_CDDA:
- img = gtk_image_new_from_icon_name("media-cdrom-audio", GTK_ICON_SIZE_MENU);
break;
case PAROLE_DISC_SVCD:
case PAROLE_DISC_VCD:
case PAROLE_DISC_DVD:
- img = gtk_image_new_from_stock("gtk-cdrom", GTK_ICON_SIZE_MENU);
break;
default:
- img = gtk_image_new_from_stock("gtk-cdrom", GTK_ICON_SIZE_MENU);
parole_disc_set_label(disc, _("Insert Disc") );
enabled = FALSE;
break;
}
-
- gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM (disc->priv->disc_menu_item), img);
+
parole_disc_set_enabled(disc, enabled);
}
@@ -201,8 +196,8 @@ parole_disc_show_menu_item (ParoleDisc *disc, MountData *data, const gchar *labe
{
data->mi = disc->priv->disc_menu_item;
- g_object_set_data (G_OBJECT (data->mi),
- "mount-data", data);
+ g_object_set_data (G_OBJECT (data->mi),
+ "mount-data", data);
g_signal_connect (data->mi, "activate",
G_CALLBACK (parole_disc_media_activate_cb), disc);
@@ -257,16 +252,16 @@ parole_disc_add_mount_to_menu (ParoleDisc *disc, GMount *mount, const gchar *dev
if ( g_file_has_uri_scheme (file, "cdda") )
{
- kind = PAROLE_DISC_CDDA;
- uri = g_strdup ("cdda://");
- goto got_cdda;
+ kind = PAROLE_DISC_CDDA;
+ uri = g_strdup ("cdda://");
+ goto got_cdda;
}
if ( g_file_has_uri_scheme (file, "dvd") )
{
- kind = PAROLE_DISC_DVD;
- uri = g_strdup ("dvd:/");
- goto got_cdda;
+ kind = PAROLE_DISC_DVD;
+ uri = g_strdup ("dvd:/");
+ goto got_cdda;
}
content_type = g_content_type_guess_for_tree (file);
@@ -274,53 +269,53 @@ parole_disc_add_mount_to_menu (ParoleDisc *disc, GMount *mount, const gchar *dev
/* Determine the type of disc */
for ( i = 0; content_type && content_type[i]; i++)
{
- TRACE ("Checking disc content type : %s", content_type[i]);
-
- if ( !g_strcmp0 (content_type[i], "x-content/video-dvd") )
- {
- kind = PAROLE_DISC_DVD;
- uri = g_strdup ("dvd:/");
- break;
- }
- else if ( !g_strcmp0 (content_type[i], "x-content/video-vcd") )
- {
- kind = PAROLE_DISC_VCD;
- uri = g_strdup ("vcd:/");
- break;
- }
- else if ( !g_strcmp0 (content_type[i], "x-content/video-svcd") )
- {
- kind = PAROLE_DISC_SVCD;
- uri = g_strdup ("svcd:/");
- break;
- }
- else if ( !g_strcmp0 (content_type[i], "x-content/audio-cdda") )
- {
- kind = PAROLE_DISC_CDDA;
- uri = g_strdup ("cdda://");
- break;
- }
+ TRACE ("Checking disc content type : %s", content_type[i]);
+
+ if ( !g_strcmp0 (content_type[i], "x-content/video-dvd") )
+ {
+ kind = PAROLE_DISC_DVD;
+ uri = g_strdup ("dvd:/");
+ break;
+ }
+ else if ( !g_strcmp0 (content_type[i], "x-content/video-vcd") )
+ {
+ kind = PAROLE_DISC_VCD;
+ uri = g_strdup ("vcd:/");
+ break;
+ }
+ else if ( !g_strcmp0 (content_type[i], "x-content/video-svcd") )
+ {
+ kind = PAROLE_DISC_SVCD;
+ uri = g_strdup ("svcd:/");
+ break;
+ }
+ else if ( !g_strcmp0 (content_type[i], "x-content/audio-cdda") )
+ {
+ kind = PAROLE_DISC_CDDA;
+ uri = g_strdup ("cdda://");
+ break;
+ }
}
if ( content_type )
- g_strfreev (content_type);
+ g_strfreev (content_type);
got_cdda:
if ( kind != PAROLE_DISC_UNKNOWN )
{
- MountData *data;
- gchar *name;
+ MountData *data;
+ gchar *name;
- name = g_mount_get_name (mount);
+ name = g_mount_get_name (mount);
- data = parole_disc_get_mount_data (disc, uri, device, kind);
- parole_disc_show_menu_item (disc, data, name);
+ data = parole_disc_get_mount_data (disc, uri, device, kind);
+ parole_disc_show_menu_item (disc, data, name);
- if ( uri )
- g_free (uri);
+ if ( uri )
+ g_free (uri);
- g_ptr_array_add (disc->priv->array, data);
- g_free (name);
+ g_ptr_array_add (disc->priv->array, data);
+ g_free (name);
}
g_object_unref (file);
@@ -349,33 +344,33 @@ parole_disc_check_cdrom (ParoleDisc *disc, GVolume *volume, const gchar *device)
if ( (fd = open (device, O_RDONLY)) < 0 )
{
- g_debug ("Failed to open device : %s", device);
- disc->priv->needs_update = TRUE;
- goto out;
+ g_debug ("Failed to open device : %s", device);
+ disc->priv->needs_update = TRUE;
+ goto out;
}
if ( (drive = ioctl (fd, CDROM_DRIVE_STATUS, NULL)) )
{
- if ( drive == CDS_DRIVE_NOT_READY )
- {
- g_print ("Drive :%s is not yet ready\n", device);
- disc->priv->needs_update = TRUE;
- }
- else if ( drive == CDS_DISC_OK )
- {
- if ( (drive = ioctl (fd, CDROM_DISC_STATUS, NULL)) > 0 )
+ if ( drive == CDS_DRIVE_NOT_READY )
{
- if ( drive == CDS_AUDIO || drive == CDS_MIXED )
- {
- data = parole_disc_get_mount_data (disc, "cdda://", device, PAROLE_DISC_CDDA);
+ g_print ("Drive :%s is not yet ready\n", device);
+ disc->priv->needs_update = TRUE;
+ }
+ else if ( drive == CDS_DISC_OK )
+ {
+ if ( (drive = ioctl (fd, CDROM_DISC_STATUS, NULL)) > 0 )
+ {
+ if ( drive == CDS_AUDIO || drive == CDS_MIXED )
+ {
+ data = parole_disc_get_mount_data (disc, "cdda://", device, PAROLE_DISC_CDDA);
- name = g_volume_get_name (volume);
-
- parole_disc_show_menu_item (disc, data, name);
- g_ptr_array_add (disc->priv->array, data);
- }
+ name = g_volume_get_name (volume);
+
+ parole_disc_show_menu_item (disc, data, name);
+ g_ptr_array_add (disc->priv->array, data);
+ }
+ }
}
- }
}
close (fd);
@@ -404,24 +399,24 @@ parole_disc_add_drive (ParoleDisc *disc, GDrive *drive, const gchar *device)
for ( i = 0; i < len; i++)
{
- GVolume *volume;
- GMount *mount;
+ GVolume *volume;
+ GMount *mount;
- volume = g_list_nth_data (list, i);
- TRACE ("Volume name %s", g_volume_get_name (volume));
+ volume = g_list_nth_data (list, i);
+ TRACE ("Volume name %s", g_volume_get_name (volume));
- mount = g_volume_get_mount (volume);
- if ( mount )
- {
- TRACE ("Mount name : %s", g_mount_get_name (mount));
- parole_disc_add_mount_to_menu (disc, mount, device);
- g_object_unref (mount);
- }
- else
- {
- /* Could be a cdda?*/
- parole_disc_check_cdrom (disc, volume, device);
- }
+ mount = g_volume_get_mount (volume);
+ if ( mount )
+ {
+ TRACE ("Mount name : %s", g_mount_get_name (mount));
+ parole_disc_add_mount_to_menu (disc, mount, device);
+ g_object_unref (mount);
+ }
+ else
+ {
+ /* Could be a cdda?*/
+ parole_disc_check_cdrom (disc, volume, device);
+ }
}
g_list_foreach (list, (GFunc) g_object_unref, NULL);
@@ -453,19 +448,19 @@ parole_disc_get_drives (ParoleDisc *disc)
for ( i = 0; i < len; i++)
{
- GDrive *drive;
- gchar *device = NULL;
+ GDrive *drive;
+ gchar *device = NULL;
- drive = g_list_nth_data (list, i);
+ drive = g_list_nth_data (list, i);
- /* FIXME what happens if there is more than one disc drive? */
- if ( g_drive_can_eject (drive) && g_drive_has_media (drive) )
- {
- device = g_drive_get_identifier (drive, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
- parole_disc_add_drive (disc, drive, device);
- if ( device )
- g_free (device);
- }
+ /* FIXME what happens if there is more than one disc drive? */
+ if ( g_drive_can_eject (drive) && g_drive_has_media (drive) )
+ {
+ device = g_drive_get_identifier (drive, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
+ parole_disc_add_drive (disc, drive, device);
+ if ( device )
+ g_free (device);
+ }
}
g_list_foreach (list, (GFunc) g_object_unref, NULL);
@@ -481,10 +476,10 @@ parole_disc_get_drives (ParoleDisc *disc)
* needed, perform it when the menu item is activated.
**/
static void
-parole_disc_select_cb (GtkItem *item, ParoleDisc *disc)
+parole_disc_select_cb (GtkMenuItem *item, ParoleDisc *disc)
{
if ( disc->priv->needs_update )
- parole_disc_get_drives (disc);
+ parole_disc_get_drives (disc);
}
/**
@@ -516,23 +511,23 @@ parole_disc_class_init (ParoleDiscClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
signals[DISC_SELECTED] =
- g_signal_new ("disc-selected",
- PAROLE_TYPE_DISC,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleDiscClass, disc_selected),
- NULL, NULL,
- _gmarshal_VOID__STRING_STRING,
- G_TYPE_NONE, 2,
- G_TYPE_STRING, G_TYPE_STRING);
+ g_signal_new ("disc-selected",
+ PAROLE_TYPE_DISC,
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ParoleDiscClass, disc_selected),
+ NULL, NULL,
+ _gmarshal_VOID__STRING_STRING,
+ G_TYPE_NONE, 2,
+ G_TYPE_STRING, G_TYPE_STRING);
signals[LABEL_CHANGED] =
- g_signal_new ("label-changed",
- PAROLE_TYPE_DISC,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleDiscClass, label_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__STRING,
- G_TYPE_NONE, 1, G_TYPE_STRING);
+ g_signal_new ("label-changed",
+ PAROLE_TYPE_DISC,
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ParoleDiscClass, label_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
object_class->finalize = parole_disc_finalize;
@@ -580,8 +575,8 @@ parole_disc_init (ParoleDisc *disc)
disc->priv->disc_menu_item = GTK_WIDGET (gtk_builder_get_object (builder, "menu-open-disc"));
- g_signal_connect (gtk_builder_get_object (builder, "media-menu-item"), "select",
- G_CALLBACK (parole_disc_select_cb), disc);
+ g_signal_connect (gtk_builder_get_object (builder, "media-menu"), "select",
+ G_CALLBACK (parole_disc_select_cb), disc);
g_object_unref (builder);
}
diff --git a/src/parole-disc.h b/src/parole-disc.h
index 838a421..2cf20ed 100644
--- a/src/parole-disc.h
+++ b/src/parole-disc.h
@@ -45,30 +45,30 @@ typedef enum
typedef struct
{
- GObject parent;
+ GObject parent;
ParoleDiscPrivate *priv;
} ParoleDisc;
typedef struct
{
- GObjectClass parent_class;
+ GObjectClass parent_class;
- void (*disc_selected) (ParoleDisc *disc,
- const gchar *uri,
- const gchar *device);
-
- void (*label_changed) (ParoleDisc *disc,
- const gchar *label_changed);
-
- void (*dvd_enabled) (ParoleDisc *disc,
- gboolean dvd_enabled);
+ void (*disc_selected) (ParoleDisc *disc,
+ const gchar *uri,
+ const gchar *device);
+
+ void (*label_changed) (ParoleDisc *disc,
+ const gchar *label_changed);
+
+ void (*dvd_enabled) (ParoleDisc *disc,
+ gboolean dvd_enabled);
} ParoleDiscClass;
-GType parole_disc_get_type (void) G_GNUC_CONST;
+GType parole_disc_get_type (void) G_GNUC_CONST;
-ParoleDisc *parole_disc_new (void);
+ParoleDisc *parole_disc_new (void);
G_END_DECLS
diff --git a/src/parole-mediachooser.c b/src/parole-mediachooser.c
index 8372f32..6185f30 100644
--- a/src/parole-mediachooser.c
+++ b/src/parole-mediachooser.c
@@ -46,42 +46,46 @@
/*
* GtkBuilder Callbacks
*/
-void parole_media_chooser_add_clicked (GtkWidget *widget,
- ParoleMediaChooser *chooser);
+void parole_media_chooser_add_clicked (GtkWidget *widget,
+ ParoleMediaChooser *chooser);
-void parole_media_chooser_close_clicked (GtkWidget *widget,
- ParoleMediaChooser *chooser);
+void parole_media_chooser_close_clicked (GtkWidget *widget,
+ ParoleMediaChooser *chooser);
-void parole_media_chooser_destroy_cb (GtkWidget *widget,
- ParoleMediaChooser *chooser);
-
-void media_chooser_folder_changed_cb (GtkWidget *widget,
- ParoleMediaChooser *chooser);
+void parole_media_chooser_destroy_cb (GtkWidget *widget,
+ ParoleMediaChooser *chooser);
+
+void media_chooser_folder_changed_cb (GtkWidget *widget,
+ ParoleMediaChooser *chooser);
-void media_chooser_file_activate_cb (GtkFileChooser *filechooser,
- ParoleMediaChooser *chooser);
+void media_chooser_file_activate_cb (GtkFileChooser *filechooser,
+ ParoleMediaChooser *chooser);
struct ParoleMediaChooser
{
GObject parent;
- ParoleConf *conf;
- GtkWidget *window;
- GtkWidget *spinner;
+ ParoleConf *conf;
+ GtkWidget *window;
+ GtkWidget *spinner;
};
struct ParoleMediaChooserClass
{
- GObjectClass parent_class;
+ GObjectClass parent_class;
- void (*media_files_opened) (ParoleMediaChooser *chooser,
- GSList *list);
+ void (*media_files_opened) (ParoleMediaChooser *chooser,
+ GSList *list);
+
+ void (*iso_opened) (ParoleMediaChooser *chooser,
+ gchar *filename);
};
enum
{
MEDIA_FILES_OPENED,
+ ISO_OPENED,
LAST_SIGNAL
};
@@ -97,10 +101,10 @@ media_chooser_folder_changed_cb (GtkWidget *widget, ParoleMediaChooser *chooser)
if ( folder )
{
- g_object_set (G_OBJECT (chooser->conf),
- "media-chooser-folder", folder,
- NULL);
- g_free (folder);
+ g_object_set (G_OBJECT (chooser->conf),
+ "media-chooser-folder", folder,
+ NULL);
+ g_free (folder);
}
}
@@ -120,18 +124,33 @@ parole_media_chooser_add (ParoleMediaChooser *chooser, GtkWidget *file_chooser)
filter = gtk_file_chooser_get_filter (GTK_FILE_CHOOSER (file_chooser));
if ( G_UNLIKELY (files == NULL) )
- return;
-
- g_object_get (G_OBJECT (chooser->conf),
- "scan-recursive", &scan_recursive,
- NULL);
+ return;
+
+ g_object_get (G_OBJECT (chooser->conf),
+ "scan-recursive", &scan_recursive,
+ NULL);
len = g_slist_length (files);
for ( i = 0; i < len; i++)
{
- file = g_slist_nth_data (files, i);
- parole_get_media_files (filter, file, scan_recursive, &media_files);
+ file = g_slist_nth_data (files, i);
+ if (g_str_has_suffix(file, ".iso"))
+ {
+ // FIXME: Is there some way to add the ISO to the playlist?
+ // For now we will play the ISO if it is the first file found, otherwise ignore.
+ if (g_slist_length(media_files) != 0)
+ continue;
+ g_signal_emit (G_OBJECT (chooser), signals [ISO_OPENED], 0, file);
+
+ g_slist_free (media_files);
+
+ g_slist_foreach (files, (GFunc) g_free, NULL);
+ g_slist_free (files);
+
+ return;
+ }
+ parole_get_media_files (filter, file, scan_recursive, &media_files);
}
g_signal_emit (G_OBJECT (chooser), signals [MEDIA_FILES_OPENED], 0, media_files);
@@ -161,7 +180,7 @@ parole_media_chooser_add_idle (gpointer data)
static void
parole_media_chooser_open (ParoleMediaChooser *chooser)
{
- parole_window_busy_cursor (chooser->window->window);
+ parole_window_busy_cursor (gtk_widget_get_window(GTK_WIDGET(chooser->window)));
gtk_widget_show( chooser->spinner );
@@ -192,10 +211,10 @@ void media_chooser_file_activate_cb (GtkFileChooser *filechooser, ParoleMediaCho
static void
parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser)
{
- GtkWidget *file_chooser;
- GtkBuilder *builder;
- GtkWidget *recursive;
- GtkFileFilter *filter, *all_files;
+ GtkWidget *file_chooser;
+ GtkBuilder *builder;
+ GtkWidget *recursive;
+ GtkFileFilter *filter, *all_files;
gboolean scan_recursive;
gboolean replace_playlist;
gboolean play;
@@ -215,6 +234,7 @@ parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser)
gtk_file_filter_set_name( filter, _("Supported files") );
gtk_file_filter_add_mime_type (GTK_FILE_FILTER (filter), "audio/*");
gtk_file_filter_add_mime_type (GTK_FILE_FILTER (filter), "video/*");
+ gtk_file_filter_add_mime_type (GTK_FILE_FILTER (filter), "application/x-cd-image");
gtk_file_chooser_add_filter( GTK_FILE_CHOOSER(file_chooser), filter );
all_files = gtk_file_filter_new();
@@ -224,20 +244,20 @@ parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser)
/* Set the folder that is shown */
g_object_get (G_OBJECT (media_chooser->conf),
- "media-chooser-folder", &folder,
- NULL);
+ "media-chooser-folder", &folder,
+ NULL);
if ( folder )
- gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (file_chooser), folder);
+ gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (file_chooser), folder);
gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (file_chooser), TRUE);
/* Get playlist-properties to load files accordingly */
g_object_get (G_OBJECT (media_chooser->conf),
- "scan-recursive", &scan_recursive,
- "replace-playlist", &replace_playlist,
- "play-opened-files", &play,
- NULL);
+ "scan-recursive", &scan_recursive,
+ "replace-playlist", &replace_playlist,
+ "play-opened-files", &play,
+ NULL);
recursive = GTK_WIDGET (gtk_builder_get_object (builder, "recursive"));
@@ -259,7 +279,7 @@ parole_media_chooser_finalize (GObject *object)
g_object_unref (chooser->conf);
if ( chooser->window )
- gtk_widget_destroy (chooser->window);
+ gtk_widget_destroy (chooser->window);
G_OBJECT_CLASS (parole_media_chooser_parent_class)->finalize (object);
}
@@ -270,14 +290,24 @@ parole_media_chooser_class_init (ParoleMediaChooserClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
signals[MEDIA_FILES_OPENED] =
- g_signal_new("media-files-opened",
- PAROLE_TYPE_MEDIA_CHOOSER,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleMediaChooserClass, media_files_opened),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1,
- G_TYPE_POINTER);
+ g_signal_new ("media-files-opened",
+ PAROLE_TYPE_MEDIA_CHOOSER,
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ParoleMediaChooserClass, media_files_opened),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1,
+ G_TYPE_POINTER);
+
+ signals[ISO_OPENED] =
+ g_signal_new ("iso-opened",
+ PAROLE_TYPE_MEDIA_CHOOSER,
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ParoleMediaChooserClass, iso_opened),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1,
+ G_TYPE_POINTER);
object_class->finalize = parole_media_chooser_finalize;
}
@@ -299,8 +329,8 @@ ParoleMediaChooser *parole_media_chooser_open_local (GtkWidget *parent)
gtk_window_set_modal (GTK_WINDOW (chooser->window), TRUE);
if ( parent )
- gtk_window_set_transient_for (GTK_WINDOW (chooser->window), GTK_WINDOW (parent));
-
+ gtk_window_set_transient_for (GTK_WINDOW (chooser->window), GTK_WINDOW (parent));
+
gtk_window_set_position (GTK_WINDOW (chooser->window), GTK_WIN_POS_CENTER_ON_PARENT);
gtk_widget_show_all (chooser->window);
diff --git a/src/parole-mediachooser.h b/src/parole-mediachooser.h
index b04bb22..17f0b32 100644
--- a/src/parole-mediachooser.h
+++ b/src/parole-mediachooser.h
@@ -37,10 +37,10 @@ G_BEGIN_DECLS
typedef struct ParoleMediaChooser ParoleMediaChooser;
typedef struct ParoleMediaChooserClass ParoleMediaChooserClass;
-GType parole_media_chooser_get_type (void) G_GNUC_CONST;
+GType parole_media_chooser_get_type (void) G_GNUC_CONST;
-ParoleMediaChooser *parole_media_chooser_open_local (GtkWidget *parent);
-
+ParoleMediaChooser *parole_media_chooser_open_local (GtkWidget *parent);
+
G_END_DECLS
#endif /* __PAROLE_MEDIA_CHOOSER_H */
diff --git a/src/parole-medialist.c b/src/parole-medialist.c
index 85aad22..c5a2a1a 100644
--- a/src/parole-medialist.c
+++ b/src/parole-medialist.c
@@ -57,14 +57,14 @@
#include "common/parole-common.h"
-#define PAROLE_AUTO_SAVED_PLAYLIST "xfce4/parole/auto-saved-playlist.m3u"
+#define PAROLE_AUTO_SAVED_PLAYLIST "xfce4/parole/auto-saved-playlist.m3u"
typedef struct
{
GtkWidget *chooser;
GtkTreeSelection *sel;
ParoleMediaList *list;
-
+ gboolean closing;
} ParolePlaylistSave;
/* Playlist filetypes */
@@ -86,91 +86,72 @@ static GtkTargetEntry target_entry[] =
{ "text/uri-list", 0, 1 },
};
-static void parole_media_list_dbus_class_init (ParoleMediaListClass *klass);
-static void parole_media_list_dbus_init (ParoleMediaList *list);
+static void parole_media_list_dbus_class_init (ParoleMediaListClass *klass);
+static void parole_media_list_dbus_init (ParoleMediaList *list);
static GtkTreeRowReference *
- parole_media_list_get_row_reference_from_iter (ParoleMediaList *list,
- GtkTreeIter *iter,
- gboolean select_path);
+parole_media_list_get_row_reference_from_iter (ParoleMediaList *list,
+ GtkTreeIter *iter,
+ gboolean select_path);
-static void parole_media_list_select_path (ParoleMediaList *list, gboolean disc,
- GtkTreePath *path);
+static void parole_media_list_select_path (ParoleMediaList *list,
+ gboolean disc,
+ GtkTreePath *path);
/*
* Callbacks for GtkBuilder
*/
-void parole_media_list_add_clicked_cb (GtkButton *button,
- ParoleMediaList *list);
-
-void parole_media_list_remove_clicked_cb (GtkButton *button,
- ParoleMediaList *list);
-
-void parole_media_list_clear_clicked_cb (GtkButton *button,
- ParoleMediaList *list);
-
-void parole_media_list_repeat_toggled_cb (GtkToggleButton *button,
- ParoleMediaList *list);
-
-void parole_media_list_shuffle_toggled_cb (GtkToggleButton *button,
- ParoleMediaList *list);
-
-void parole_media_list_row_activated_cb (GtkTreeView *view,
- GtkTreePath *path,
- GtkTreeViewColumn *col,
- ParoleMediaList *list);
-
-gboolean parole_media_list_button_release_event (GtkWidget *widget,
- GdkEventButton *ev,
- ParoleMediaList *list);
-
-void parole_media_list_drag_data_received_cb (GtkWidget *widget,
- GdkDragContext *drag_context,
- gint x,
- gint y,
- GtkSelectionData *data,
- guint info,
- guint drag_time,
- ParoleMediaList *list);
-
-gboolean parole_media_list_key_press (GtkWidget *widget,
- GdkEventKey *ev,
- ParoleMediaList *list);
-
-void parole_media_list_format_cursor_changed_cb (GtkTreeView *view,
- ParolePlaylistSave *data);
-
-void parole_media_list_close_save_dialog_cb (GtkButton *button,
- ParolePlaylistSave *data);
-
-void parole_media_list_save_playlist_cb (GtkButton *button,
- ParolePlaylistSave *data);
-
-void parole_media_list_save_cb (GtkButton *button,
- ParoleMediaList *list);
-
-gboolean parole_media_list_query_tooltip (GtkWidget *widget,
- gint x,
- gint y,
- gboolean keyboard_mode,
- GtkTooltip *tooltip,
- ParoleMediaList *list);
-
-void parole_media_list_menu_pos (GtkMenu *menu,
- gint *px, gint *py, gboolean *push_in, gpointer data);
-
-void parole_media_list_send_dvd_menu_navigation (ParoleMediaList *list, gint msg_id);
-
-void parole_media_list_dvd_menu_activated (GtkMenuItem *widget, ParoleMediaList *list);
-
-void parole_media_list_dvd_title_activated (GtkMenuItem *widget, ParoleMediaList *list);
-
-void parole_media_list_dvd_audio_activated (GtkMenuItem *widget, ParoleMediaList *list);
-
-void parole_media_list_dvd_angle_activated (GtkMenuItem *widget, ParoleMediaList *list);
-
-void parole_media_list_dvd_chapter_activated (GtkMenuItem *widget, ParoleMediaList *list);
-
+void parole_media_list_add_clicked_cb (GtkButton *button,
+ ParoleMediaList *list);
+
+void parole_media_list_remove_clicked_cb (GtkButton *button,
+ ParoleMediaList *list);
+
+void parole_media_list_clear_clicked_cb (GtkButton *button,
+ ParoleMediaList *list);
+
+void parole_media_list_move_up_clicked_cb (GtkButton *button,
+ ParoleMediaList *list);
+
+void parole_media_list_move_down_clicked_cb (GtkButton *button,
+ ParoleMediaList *list);
+
+void parole_media_list_row_activated_cb (GtkTreeView *view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *col,
+ ParoleMediaList *list);
+
+gboolean parole_media_list_button_release_event (GtkWidget *widget,
+ GdkEventButton *ev,
+ ParoleMediaList *list);
+
+void parole_media_list_drag_data_received_cb (GtkWidget *widget,
+ GdkDragContext *drag_context,
+ gint x,
+ gint y,
+ GtkSelectionData *data,
+ guint info,
+ guint drag_time,
+ ParoleMediaList *list);
+
+gboolean parole_media_list_key_press (GtkWidget *widget,
+ GdkEventKey *ev,
+ ParoleMediaList *list);
+
+void
+parole_media_list_format_cursor_changed_cb (GtkTreeView *view,
+ ParolePlaylistSave *data);
+
+void parole_media_list_save_playlist_cb (GtkButton *button,
+ ParolePlaylistSave *data);
+
+gboolean parole_media_list_query_tooltip (GtkWidget *widget,
+ gint x,
+ gint y,
+ gboolean keyboard_mode,
+ GtkTooltip *tooltip,
+ ParoleMediaList *list);
+
/*
* End of GtkBuilder callbacks
*/
@@ -182,29 +163,22 @@ struct ParoleMediaListPrivate
{
DBusGConnection *bus;
ParoleConf *conf;
- GtkWidget *view;
- GtkWidget *disc_view;
- GtkWidget *box;
- GtkListStore *store;
- GtkListStore *disc_store;
- GtkTreeSelection *sel;
- GtkTreeSelection *disc_sel;
-
- GtkWidget *dvd_menu;
- GtkWidget *dvd_menu_button;
- GtkWidget *dvd_label;
+ GtkWidget *view, *disc_view;
+ GtkListStore *store, *disc_store;
+ GtkTreeSelection *sel, *disc_sel;
+ GtkTreeViewColumn *col, *disc_col;
+
GtkWidget *playlist_controls;
GtkWidget *playlist_notebook;
GtkWidget *remove_button;
GtkWidget *clear_button;
+
GtkWidget *repeat_button;
GtkWidget *shuffle_button;
- GtkWidget *settings_button;
- GtkWidget *n_items;
-
- char *history[3];
+
+ char *history[3];
};
enum
@@ -212,22 +186,11 @@ enum
MEDIA_ACTIVATED,
MEDIA_CURSOR_CHANGED,
URI_OPENED,
- SHUFFLE_TOGGLED,
- REPEAT_TOGGLED,
SHOW_PLAYLIST,
- GST_DVD_NAV_MESSAGE,
+ ISO_OPENED,
LAST_SIGNAL
};
-enum
-{
- GST_DVD_ROOT_MENU,
- GST_DVD_TITLE_MENU,
- GST_DVD_AUDIO_MENU,
- GST_DVD_ANGLE_MENU,
- GST_DVD_CHAPTER_MENU
-};
-
static guint signals [LAST_SIGNAL] = { 0 };
G_DEFINE_TYPE (ParoleMediaList, parole_media_list, GTK_TYPE_VBOX)
@@ -239,6 +202,57 @@ parole_media_list_set_widget_sensitive (ParoleMediaList *list, gboolean sensitiv
gtk_widget_set_sensitive (GTK_WIDGET (list->priv->clear_button), sensitive);
}
+static void
+parole_media_list_set_playlist_count (ParoleMediaList *list, gint n_items)
+{
+ /* Toggle sensitivity based on playlist count */
+ parole_media_list_set_widget_sensitive (list, n_items != 0);
+ gtk_widget_set_sensitive (list->priv->remove_button, n_items != 0);
+ gtk_widget_set_sensitive (list->priv->clear_button, n_items != 0);
+
+ if ( n_items == 1 )
+ {
+ if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
+ {
+ gtk_tree_view_column_set_title (list->priv->col, g_strdup_printf(_("Playlist (%i item)"), n_items));
+ }
+ else
+ {
+ gtk_tree_view_column_set_title (list->priv->disc_col, g_strdup_printf(_("Playlist (%i chapter)"), n_items));
+ }
+ }
+ else
+ {
+ if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
+ {
+ gtk_tree_view_column_set_title (list->priv->col, g_strdup_printf(_("Playlist (%i items)"), n_items));
+ }
+ else
+ {
+ gtk_tree_view_column_set_title (list->priv->disc_col, g_strdup_printf(_("Playlist (%i chapters)"), n_items));
+ }
+ }
+
+ /*
+ * Will emit the signal media_cursor_changed with FALSE because there is no any
+ * row remaining, so the player can disable click on the play button.
+ */
+ g_signal_emit (G_OBJECT (list), signals [MEDIA_CURSOR_CHANGED], 0, n_items != 0);
+}
+
+gint
+parole_media_list_get_playlist_count (ParoleMediaList *list)
+{
+ if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
+ {
+ return gtk_tree_model_iter_n_children(GTK_TREE_MODEL(list->priv->store), NULL);
+ }
+ else
+ {
+ return gtk_tree_model_iter_n_children(GTK_TREE_MODEL(list->priv->disc_store), NULL);
+ }
+}
+
/**
* parole_media_list_add:
* @ParoleMediaList: a #ParoleMediaList
@@ -268,23 +282,23 @@ parole_media_list_add (ParoleMediaList *list, ParoleFile *file, gboolean disc, g
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store,
- &iter,
- NAME_COL, parole_file_get_display_name (file),
- DATA_COL, file,
- LENGTH_COL, parole_taglibc_get_media_length (file),
- PIXBUF_COL, NULL,
- -1);
+ &iter,
+ NAME_COL, parole_file_get_display_name (file),
+ DATA_COL, file,
+ LENGTH_COL, parole_taglibc_get_media_length (file),
+ PIXBUF_COL, NULL,
+ -1);
if ( emit || select_row )
{
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_store), &iter);
- row = gtk_tree_row_reference_new (GTK_TREE_MODEL (list_store), path);
- if ( select_row )
- parole_media_list_select_path (list, disc, path);
- gtk_tree_path_free (path);
- if ( emit )
- g_signal_emit (G_OBJECT (list), signals [MEDIA_ACTIVATED], 0, row);
- gtk_tree_row_reference_free (row);
+ path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_store), &iter);
+ row = gtk_tree_row_reference_new (GTK_TREE_MODEL (list_store), path);
+ if ( select_row )
+ parole_media_list_select_path (list, disc, path);
+ gtk_tree_path_free (path);
+ if ( emit )
+ g_signal_emit (G_OBJECT (list), signals [MEDIA_ACTIVATED], 0, row);
+ gtk_tree_row_reference_free (row);
}
/*
@@ -294,38 +308,11 @@ parole_media_list_add (ParoleMediaList *list, ParoleFile *file, gboolean disc, g
g_object_unref (file);
if (disc)
- nch = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (list->priv->disc_store), NULL);
+ nch = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (list->priv->disc_store), NULL);
else
- nch = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (list->priv->store), NULL);
+ nch = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (list->priv->store), NULL);
- if ( nch == 1 )
- {
- gtk_widget_set_sensitive (list->priv->remove_button, TRUE);
- gtk_widget_set_sensitive (list->priv->clear_button, TRUE);
- if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
- {
- gtk_label_set_text (GTK_LABEL(list->priv->n_items),g_strdup_printf (_("%i item"),nch));
- }
- else
- {
- gtk_label_set_text (GTK_LABEL(list->priv->n_items),g_strdup_printf (_("%i chapter"),nch));
- }
- }
- else
- {
- parole_media_list_set_widget_sensitive (list, TRUE);
- if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
- {
- gtk_label_set_text (GTK_LABEL(list->priv->n_items),g_strdup_printf (_("%i items"),nch));
- }
- else
- {
- gtk_label_set_text (GTK_LABEL(list->priv->n_items),g_strdup_printf (_("%i chapters"),nch));
- }
- }
- gtk_widget_show (list->priv->n_items);
- if ( nch == 0 )
- gtk_widget_hide (list->priv->n_items);
+ parole_media_list_set_playlist_count(list, nch);
}
/**
@@ -345,27 +332,27 @@ parole_media_list_files_open (ParoleMediaList *list, GSList *files, gboolean dis
guint i;
g_object_get (G_OBJECT (list->priv->conf),
- "replace-playlist", &replace,
- NULL);
+ "replace-playlist", &replace,
+ NULL);
len = g_slist_length (files);
TRACE ("Adding %i files", len);
- if ( len > 1 )
+ if ( len > 1 && !disc )
g_signal_emit (G_OBJECT (list), signals [SHOW_PLAYLIST], 0, TRUE);
if ( len != 0 )
{
- if ( replace )
- parole_media_list_clear_list (list);
- file = g_slist_nth_data (files, 0);
- parole_media_list_add (list, file, disc, emit, TRUE);
+ if ( replace )
+ parole_media_list_clear_list (list);
+ file = g_slist_nth_data (files, 0);
+ parole_media_list_add (list, file, disc, emit, TRUE);
}
for ( i = 1; i < len; i++)
{
- file = g_slist_nth_data (files, i);
- parole_media_list_add (list, file, disc, FALSE, FALSE);
+ file = g_slist_nth_data (files, i);
+ parole_media_list_add (list, file, disc, FALSE, FALSE);
}
}
@@ -405,14 +392,14 @@ parole_media_list_add_dvd_chapters (ParoleMediaList *list, gint n_chapters)
/* Callback to determine whether opened files should start playing immediately */
static void
parole_media_list_files_opened_cb (ParoleMediaChooser *chooser,
- GSList *files,
- ParoleMediaList *list)
+ GSList *files,
+ ParoleMediaList *list)
{
gboolean play;
g_object_get (G_OBJECT (list->priv->conf),
- "play-opened-files", &play,
- NULL);
+ "play-opened-files", &play,
+ NULL);
parole_media_list_files_open (list, files, FALSE, play);
}
@@ -424,16 +411,26 @@ parole_media_list_location_opened_cb (ParoleOpenLocation *obj, const gchar *loca
if ( parole_is_uri_disc (location) )
{
- g_signal_emit (G_OBJECT (list), signals [URI_OPENED], 0, location);
+ g_signal_emit (G_OBJECT (list), signals [URI_OPENED], 0, location);
}
else
{
- file = parole_file_new (location);
- parole_media_list_add (list, file, FALSE, TRUE, TRUE);
+ file = parole_file_new (location);
+ parole_media_list_add (list, file, FALSE, TRUE, TRUE);
}
}
static void
+parole_media_list_iso_opened_cb (ParoleMediaChooser *chooser,
+ gchar *filename,
+ ParoleMediaList *list)
+{
+ gchar *uri;
+ uri = g_strdup_printf ("dvd://%s", filename);
+ g_signal_emit (G_OBJECT (list), signals [ISO_OPENED], 0, uri);
+}
+
+static void
parole_media_list_open_internal (ParoleMediaList *list)
{
ParoleMediaChooser *chooser;
@@ -441,9 +438,12 @@ parole_media_list_open_internal (ParoleMediaList *list)
TRACE ("start");
chooser = parole_media_chooser_open_local (gtk_widget_get_toplevel (GTK_WIDGET (list)));
-
+
g_signal_connect (G_OBJECT (chooser), "media_files_opened",
- G_CALLBACK (parole_media_list_files_opened_cb), list);
+ G_CALLBACK (parole_media_list_files_opened_cb), list);
+
+ g_signal_connect (G_OBJECT (chooser), "iso_opened",
+ G_CALLBACK (parole_media_list_iso_opened_cb), list);
}
static void
@@ -452,9 +452,9 @@ parole_media_list_open_location_internal (ParoleMediaList *list)
ParoleOpenLocation *location;
location = parole_open_location (gtk_widget_get_toplevel (GTK_WIDGET (list)));
-
+
g_signal_connect (G_OBJECT (location), "location-opened",
- G_CALLBACK (parole_media_list_location_opened_cb), list);
+ G_CALLBACK (parole_media_list_location_opened_cb), list);
}
/**
@@ -476,28 +476,28 @@ parole_media_list_get_files (ParoleMediaList *list)
GSList *files_list = NULL;
for ( valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->priv->store), &iter);
- valid;
- valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (list->priv->store), &iter))
+ valid;
+ valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (list->priv->store), &iter))
{
- gtk_tree_model_get (GTK_TREE_MODEL (list->priv->store), &iter,
- DATA_COL, &file,
- -1);
-
- files_list = g_slist_append (files_list, file);
+ gtk_tree_model_get (GTK_TREE_MODEL (list->priv->store), &iter,
+ DATA_COL, &file,
+ -1);
+
+ files_list = g_slist_append (files_list, file);
}
return files_list;
}
/* Callback when an item is dragged on the playlist-widget */
-void parole_media_list_drag_data_received_cb (GtkWidget *widget,
- GdkDragContext *drag_context,
- gint x,
- gint y,
- GtkSelectionData *data,
- guint info,
- guint drag_time,
- ParoleMediaList *list)
+void parole_media_list_drag_data_received_cb (GtkWidget *widget,
+ GdkDragContext *drag_context,
+ gint x,
+ gint y,
+ GtkSelectionData *data,
+ guint info,
+ guint drag_time,
+ ParoleMediaList *list)
{
gchar **uri_list;
gchar *path;
@@ -505,25 +505,25 @@ void parole_media_list_drag_data_received_cb (GtkWidget *widget,
guint added = 0;
gboolean play;
- parole_window_busy_cursor (GTK_WIDGET (list)->window);
+ parole_window_busy_cursor (gtk_widget_get_window(GTK_WIDGET (list)));
g_object_get (G_OBJECT (list->priv->conf),
- "play-opened-files", &play,
- NULL);
+ "play-opened-files", &play,
+ NULL);
- uri_list = g_uri_list_extract_uris ((const gchar *)data->data);
+ uri_list = g_uri_list_extract_uris ((const gchar *)gtk_selection_data_get_data(data));
for ( i = 0; uri_list[i] != NULL; i++)
{
- path = g_filename_from_uri (uri_list[i], NULL, NULL);
- added += parole_media_list_add_by_path (list, path, i == 0 ? play : FALSE);
+ path = g_filename_from_uri (uri_list[i], NULL, NULL);
+ added += parole_media_list_add_by_path (list, path, i == 0 ? play : FALSE);
- g_free (path);
+ g_free (path);
}
g_strfreev (uri_list);
- gdk_window_set_cursor (GTK_WIDGET (list)->window, NULL);
+ gdk_window_set_cursor (gtk_widget_get_window(GTK_WIDGET (list)), NULL);
gtk_drag_finish (drag_context, added == i ? TRUE : FALSE, FALSE, drag_time);
}
@@ -532,15 +532,16 @@ gboolean parole_media_list_key_press (GtkWidget *widget, GdkEventKey *ev, Parole
GtkWidget *vbox_player;
switch ( ev->keyval )
{
- case GDK_Delete:
+ case GDK_KEY_Delete:
parole_media_list_remove_clicked_cb (NULL, list);
return TRUE;
break;
- case GDK_Right:
- case GDK_Left:
- case GDK_Page_Down:
- case GDK_Page_Up:
- case GDK_Escape:
+ case GDK_KEY_Right:
+ case GDK_KEY_Left:
+ case GDK_KEY_Page_Down:
+ case GDK_KEY_Page_Up:
+ case GDK_KEY_Escape:
+ // FIXME: There has got to be a better way.
vbox_player = GTK_WIDGET(gtk_container_get_children( GTK_CONTAINER(gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent(widget))))))) )[0].data);
gtk_widget_grab_focus(vbox_player);
return TRUE;
@@ -562,35 +563,15 @@ parole_media_list_add_clicked_cb (GtkButton *button, ParoleMediaList *list)
void
parole_media_list_clear_clicked_cb (GtkButton *button, ParoleMediaList *list)
{
- parole_media_list_clear_list (list);
-}
-
-/* Callback for the repeat togglebutton */
-void
-parole_media_list_repeat_toggled_cb (GtkToggleButton *button, ParoleMediaList *list)
-{
- gboolean toggled;
-
- toggled = gtk_toggle_button_get_active (button);
-
- g_signal_emit (G_OBJECT (list), signals [REPEAT_TOGGLED], 0, toggled);
-}
-
-/* Callback for the shuffle togglebutton */
-void
-parole_media_list_shuffle_toggled_cb (GtkToggleButton *button, ParoleMediaList *list)
-{
- gboolean toggled;
-
- toggled = gtk_toggle_button_get_active (button);
-
- g_signal_emit (G_OBJECT (list), signals [SHUFFLE_TOGGLED], 0, toggled);
-}
-
-void parole_media_list_close_save_dialog_cb (GtkButton *button, ParolePlaylistSave *data)
-{
- gtk_widget_destroy (GTK_WIDGET (data->chooser));
- g_free (data);
+ gchar *playlist_filename;
+ GFile *playlist_file;
+ parole_media_list_clear_list (list);
+ playlist_filename = xfce_resource_save_location (XFCE_RESOURCE_DATA,
+ PAROLE_AUTO_SAVED_PLAYLIST,
+ FALSE);
+ playlist_file = g_file_new_for_path(playlist_filename);
+ g_file_delete(playlist_file, NULL, NULL);
+ g_free(playlist_filename);
}
/**
@@ -600,7 +581,7 @@ void parole_media_list_close_save_dialog_cb (GtkButton *button, ParolePlaylistSa
* Gets the first selected row in the media list view.
*
* Returns: a #GtkTreeRowReference for the selected row, or NULL if no one is
- * currently selected.
+ * currently selected.
*
**/
static GtkTreeRowReference *
@@ -615,13 +596,13 @@ parole_media_list_get_first_selected_row (ParoleMediaList *list)
if ( g_list_length (path_list) > 0 )
{
- GtkTreePath *path;
- path = g_list_nth_data (path_list, 0);
-
- if ( G_LIKELY (gtk_tree_model_get_iter (model, &iter, path) == TRUE ))
- {
- row = parole_media_list_get_row_reference_from_iter (list, &iter, FALSE);
- }
+ GtkTreePath *path;
+ path = g_list_nth_data (path_list, 0);
+
+ if ( G_LIKELY (gtk_tree_model_get_iter (model, &iter, path) == TRUE ))
+ {
+ row = parole_media_list_get_row_reference_from_iter (list, &iter, FALSE);
+ }
}
g_list_foreach (path_list, (GFunc)gtk_tree_path_free, NULL);
@@ -641,7 +622,7 @@ parole_media_list_get_first_selected_row (ParoleMediaList *list)
static ParoleFile *
parole_media_list_get_first_selected_file (ParoleMediaList *list)
{
- ParoleFile *file;
+ ParoleFile *file = NULL;
GtkTreeRowReference *row;
GtkTreeIter iter;
@@ -651,119 +632,126 @@ parole_media_list_get_first_selected_file (ParoleMediaList *list)
&iter,
gtk_tree_row_reference_get_path (row)) )
{
- gtk_tree_model_get (GTK_TREE_MODEL (list->priv->store), &iter, DATA_COL, &file, -1);
+ gtk_tree_model_get (GTK_TREE_MODEL (list->priv->store), &iter, DATA_COL, &file, -1);
}
return file;
}
-/* Callback to save the current playlist */
-void parole_media_list_save_playlist_cb (GtkButton *button, ParolePlaylistSave *data)
+static void
+parole_media_list_save_playlist_response_cb (GtkDialog *dialog,
+ gint response_id,
+ ParolePlaylistSave *data)
{
- ParolePlFormat format = PAROLE_PL_FORMAT_UNKNOWN;
- GSList *list = NULL;
- GtkTreeModel *model;
- GtkTreeIter iter;
- gchar *filename;
- gchar *dirname;
-
- filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (data->chooser));
- dirname = g_path_get_dirname (filename);
-
- if ( gtk_tree_selection_get_selected (data->sel, &model, &iter ) )
- {
- gtk_tree_model_get (model, &iter, 2, &format, -1);
- }
-
- if ( g_access (dirname, W_OK) == -1 )
- {
- gchar *msg;
- msg = g_strdup_printf ("%s %s", dirname, _("Permission denied"));
- parole_dialog_error (GTK_WINDOW (gtk_widget_get_toplevel (data->list->priv->view)),
- _("Error saving playlist file"),
- msg);
- g_free (msg);
- goto out;
- }
+ gchar *filename = NULL;
+ gchar *dirname = NULL;
- if ( format == PAROLE_PL_FORMAT_UNKNOWN )
+ if (response_id == GTK_RESPONSE_ACCEPT)
{
- format = parole_pl_parser_guess_format_from_extension (filename);
- if ( format == PAROLE_PL_FORMAT_UNKNOWN )
- {
- parole_dialog_info (GTK_WINDOW (gtk_widget_get_toplevel (data->list->priv->view)),
- _("Unknown playlist format"),
- _("Please chooser a supported playlist format"));
- goto out;
- }
+ ParolePlFormat format = PAROLE_PL_FORMAT_UNKNOWN;
+ GSList *list = NULL;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (data->chooser));
+ dirname = g_path_get_dirname (filename);
+
+ if ( gtk_tree_selection_get_selected (data->sel, &model, &iter ) )
+ {
+ gtk_tree_model_get (model, &iter, 2, &format, -1);
+ }
+
+ if ( g_access (dirname, W_OK) == -1 )
+ {
+ gchar *msg;
+ msg = g_strdup_printf ("%s %s", dirname, _("Permission denied"));
+ parole_dialog_error (GTK_WINDOW (gtk_widget_get_toplevel (data->list->priv->view)),
+ _("Error saving playlist file"),
+ msg);
+ g_free (msg);
+ goto out;
+ }
+
+ if ( format == PAROLE_PL_FORMAT_UNKNOWN )
+ {
+ format = parole_pl_parser_guess_format_from_extension (filename);
+ if ( format == PAROLE_PL_FORMAT_UNKNOWN )
+ {
+ parole_dialog_info (GTK_WINDOW (gtk_widget_get_toplevel (data->list->priv->view)),
+ _("Unknown playlist format"),
+ _("Please chooser a supported playlist format"));
+ goto out;
+ }
+ }
+
+ list = parole_media_list_get_files (data->list);
+
+ parole_pl_parser_save_from_files (list, filename, format);
+ g_slist_free (list);
+
}
-
- list = parole_media_list_get_files (data->list);
-
- parole_media_list_close_save_dialog_cb (NULL, data);
-
- parole_pl_parser_save_from_files (list, filename, format);
- g_slist_free (list);
+ data->closing = TRUE;
+ gtk_widget_destroy(GTK_WIDGET(dialog));
+ g_free(data);
out:
g_free (filename);
g_free (dirname);
}
/* Query to get the data to populate the tooltip */
-gboolean parole_media_list_query_tooltip (GtkWidget *widget,
- gint x,
- gint y,
- gboolean keyboard_mode,
- GtkTooltip *tooltip,
- ParoleMediaList *list)
-
+gboolean parole_media_list_query_tooltip (GtkWidget *widget,
+ gint x,
+ gint y,
+ gboolean keyboard_mode,
+ GtkTooltip *tooltip,
+ ParoleMediaList *list)
{
GtkTreePath *path;
if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (list->priv->view),
- x,
- y,
- &path,
- NULL,
- NULL,
- NULL))
+ x,
+ y,
+ &path,
+ NULL,
+ NULL,
+ NULL))
{
- GtkTreeIter iter;
-
- if ( path && gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path))
+ GtkTreeIter iter;
+
+ if ( path && gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path))
{
- ParoleFile *file;
- gchar *tip;
- gchar *name;
- gchar *len;
-
- gtk_tree_model_get (GTK_TREE_MODEL (list->priv->store), &iter,
- DATA_COL, &file,
- NAME_COL, &name,
- LENGTH_COL, &len,
- -1);
-
- if (!len)
- {
- len = g_strdup (_("Unknown"));
- }
-
- tip = g_strdup_printf ("File: %s\nName: %s\nLength: %s",
- parole_file_get_file_name (file),
- name,
- len);
-
- gtk_tooltip_set_text (tooltip, tip);
- g_free (tip);
- g_free (name);
- g_free (len);
- gtk_tree_path_free (path);
-
- return TRUE;
- }
+ ParoleFile *file;
+ gchar *tip;
+ gchar *name;
+ gchar *len;
+
+ gtk_tree_model_get (GTK_TREE_MODEL (list->priv->store), &iter,
+ DATA_COL, &file,
+ NAME_COL, &name,
+ LENGTH_COL, &len,
+ -1);
+
+ if (!len)
+ {
+ len = g_strdup (_("Unknown"));
+ }
+
+ tip = g_strdup_printf ("File: %s\nName: %s\nLength: %s",
+ parole_file_get_file_name (file),
+ name,
+ len);
+
+ gtk_tooltip_set_text (tooltip, tip);
+ g_free (tip);
+ g_free (name);
+ g_free (len);
+ gtk_tree_path_free (path);
+
+ return TRUE;
+ }
}
-
-
+
+
return FALSE;
}
@@ -775,30 +763,38 @@ void parole_media_list_format_cursor_changed_cb (GtkTreeView *view, ParolePlayli
gchar *filename;
gchar *fbasename;
+ /* Workaround for bug where cursor-changed is emitted on destroy */
+ if (data->closing)
+ return;
+
+ // FIXME: replaces entered filename with Playlist.
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (data->chooser));
- fbasename = g_path_get_basename (filename);
+ if (filename)
+ fbasename = g_path_get_basename (filename);
+ else
+ fbasename = g_strconcat (_("Playlist"), ".m3u", NULL);
g_free (filename);
if ( gtk_tree_selection_get_selected (data->sel, &model, &iter ) )
{
- gtk_tree_model_get (model, &iter, 2, &format, -1);
- if ( format != PAROLE_PL_FORMAT_UNKNOWN )
- {
- gchar *name, *new_name;
- name = parole_get_name_without_extension (fbasename);
- new_name = g_strdup_printf ("%s%s", name, playlist_format_map[format].ext);
- gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (data->chooser), new_name);
- g_free (new_name);
- g_free (name);
- }
+ gtk_tree_model_get (model, &iter, 2, &format, -1);
+ if ( format != PAROLE_PL_FORMAT_UNKNOWN )
+ {
+ gchar *name, *new_name;
+ name = parole_get_name_without_extension (fbasename);
+ new_name = g_strdup_printf ("%s%s", name, playlist_format_map[format].ext);
+ gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (data->chooser), new_name);
+ g_free (new_name);
+ g_free (name);
+ }
}
g_free (fbasename);
}
/* Callback to save the current playlist */
-void parole_media_list_save_cb (GtkButton *button, ParoleMediaList *list)
+void parole_media_list_save_cb (GtkWidget *widget, ParoleMediaList *list)
{
ParolePlaylistSave *data;
GtkWidget *chooser;
@@ -811,54 +807,56 @@ void parole_media_list_save_cb (GtkButton *button, ParoleMediaList *list)
data = g_new0 (ParolePlaylistSave, 1);
builder = parole_builder_new_from_string (save_playlist_ui, save_playlist_ui_length);
-
chooser = GTK_WIDGET (gtk_builder_get_object (builder, "filechooserdialog"));
store = GTK_LIST_STORE (gtk_builder_get_object (builder, "liststore"));
gtk_window_set_transient_for (GTK_WINDOW (chooser),
- GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (list))));
-
+ GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (list))));
+
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (chooser), TRUE);
-
+
filename = g_strconcat (_("Playlist"), ".m3u", NULL);
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (chooser), filename);
g_free (filename);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store,
- &iter,
- 0, _("M3U Playlists"),
- 1, "m3u",
- 2, PAROLE_PL_FORMAT_M3U,
- -1);
-
+ &iter,
+ 0, _("M3U Playlists"),
+ 1, "m3u",
+ 2, PAROLE_PL_FORMAT_M3U,
+ -1);
+
gtk_list_store_append (store, &iter);
gtk_list_store_set (store,
- &iter,
- 0, _("PLS Playlists"),
- 1, "pls",
- 2, PAROLE_PL_FORMAT_PLS,
- -1);
-
+ &iter,
+ 0, _("PLS Playlists"),
+ 1, "pls",
+ 2, PAROLE_PL_FORMAT_PLS,
+ -1);
+
gtk_list_store_append (store, &iter);
gtk_list_store_set (store,
- &iter,
- 0, _("Advanced Stream Redirector"),
- 1, "asx",
- 2, PAROLE_PL_FORMAT_ASX,
- -1);
-
+ &iter,
+ 0, _("Advanced Stream Redirector"),
+ 1, "asx",
+ 2, PAROLE_PL_FORMAT_ASX,
+ -1);
+
gtk_list_store_append (store, &iter);
gtk_list_store_set (store,
- &iter,
- 0, _("Shareable Playlist"),
- 1, "xspf",
- 2, PAROLE_PL_FORMAT_XSPF,
- -1);
+ &iter,
+ 0, _("Shareable Playlist"),
+ 1, "xspf",
+ 2, PAROLE_PL_FORMAT_XSPF,
+ -1);
view = GTK_WIDGET (gtk_builder_get_object (builder, "treeview"));
+ g_signal_connect(G_OBJECT(chooser), "response", G_CALLBACK(parole_media_list_save_playlist_response_cb), data);
+
data->chooser = chooser;
+ data->closing = FALSE;
data->sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
data->list = list;
@@ -883,7 +881,7 @@ parole_media_list_get_first_path (GtkTreeModel *model)
if (gtk_tree_model_get_iter_first (model, &iter) )
{
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (model), &iter);
+ path = gtk_tree_model_get_path (GTK_TREE_MODEL (model), &iter);
}
return path;
@@ -911,14 +909,14 @@ parole_media_list_paths_to_row_list (GList *path_list, GtkTreeModel *model)
for ( i = 0; i < len; i++)
{
- GtkTreePath *path;
- GtkTreeRowReference *row;
-
- path = g_list_nth_data (path_list, i);
-
- row = gtk_tree_row_reference_new (model, path);
- path = gtk_tree_row_reference_get_path (row);
- row_list = g_list_append (row_list, row);
+ GtkTreePath *path;
+ GtkTreeRowReference *row;
+
+ path = g_list_nth_data (path_list, i);
+
+ row = gtk_tree_row_reference_new (model, path);
+
+ row_list = g_list_append (row_list, row);
}
return row_list;
@@ -938,7 +936,7 @@ parole_media_list_remove_clicked_cb (GtkButton *button, ParoleMediaList *list)
/* Get the GtkTreePath GList of all selected rows */
path_list = gtk_tree_selection_get_selected_rows (list->priv->sel, &model);
-
+
/**
* Convert them to row references so when we remove one the others always points
* to the correct node.
@@ -951,20 +949,20 @@ parole_media_list_remove_clicked_cb (GtkButton *button, ParoleMediaList *list)
**/
if (g_list_length (path_list) != 0)
{
- GtkTreePath *path, *prev;
-
- /* Get first item */
- path = g_list_nth_data (path_list, 0);
-
- /* copy it as we don't mess with the list*/
- prev = gtk_tree_path_copy (path);
-
- if ( gtk_tree_path_prev (prev) )
- {
- parole_media_list_select_path (list, FALSE, prev);
- row_selected = TRUE;
- }
- gtk_tree_path_free (prev);
+ GtkTreePath *path, *prev;
+
+ /* Get first item */
+ path = g_list_nth_data (path_list, 0);
+
+ /* copy it as we don't mess with the list*/
+ prev = gtk_tree_path_copy (path);
+
+ if ( gtk_tree_path_prev (prev) )
+ {
+ parole_media_list_select_path (list, FALSE, prev);
+ row_selected = TRUE;
+ }
+ gtk_tree_path_free (prev);
}
g_list_foreach (path_list, (GFunc) gtk_tree_path_free, NULL);
@@ -974,30 +972,21 @@ parole_media_list_remove_clicked_cb (GtkButton *button, ParoleMediaList *list)
for ( i = 0; i < len; i++)
{
- GtkTreePath *path;
- GtkTreeRowReference *row;
- row = g_list_nth_data (row_list, i);
- path = gtk_tree_row_reference_get_path (row);
-
- if ( G_LIKELY (gtk_tree_model_get_iter (model, &iter, path) == TRUE ) )
- {
- gtk_list_store_remove (GTK_LIST_STORE (model),
- &iter);
- }
+ GtkTreePath *path;
+ GtkTreeRowReference *row;
+ row = g_list_nth_data (row_list, i);
+ path = gtk_tree_row_reference_get_path (row);
+
+ if ( G_LIKELY (gtk_tree_model_get_iter (model, &iter, path) == TRUE ) )
+ {
+ gtk_list_store_remove (GTK_LIST_STORE (model),
+ &iter);
+ }
}
g_list_foreach (row_list, (GFunc) gtk_tree_row_reference_free, NULL);
g_list_free (row_list);
- /* No row was selected, then select the first one*/
- if (!row_selected)
- {
- GtkTreePath *path;
- path = parole_media_list_get_first_path (model);
- parole_media_list_select_path (list, FALSE, path);
- gtk_tree_path_free (path);
- }
-
/*
* Returns the number of children that iter has.
* As a special case, if iter is NULL,
@@ -1005,21 +994,112 @@ parole_media_list_remove_clicked_cb (GtkButton *button, ParoleMediaList *list)
*/
nch = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (list->priv->store), NULL);
- if ( nch == 0)
+ /* No row was selected, then select the first one*/
+ if (!row_selected && nch != 0)
{
- parole_media_list_set_widget_sensitive (list, FALSE);
- gtk_label_set_text (GTK_LABEL(list->priv->n_items),_("Playlist empty"));
- gtk_widget_hide (list->priv->n_items);
- /*
- * Will emit the signal media_cursor_changed with FALSE because there is no any
- * row remaining, so the player can disable click on the play button.
- */
- g_signal_emit (G_OBJECT (list), signals [MEDIA_CURSOR_CHANGED], 0, FALSE);
+ GtkTreePath *path;
+ path = parole_media_list_get_first_path (model);
+ parole_media_list_select_path (list, FALSE, path);
+ gtk_tree_path_free (path);
}
- else if ( nch == 1 )
- gtk_label_set_text (GTK_LABEL(list->priv->n_items),g_strdup_printf (_("%i item"),nch));
- else
- gtk_label_set_text (GTK_LABEL(list->priv->n_items),g_strdup_printf (_("%i items"),nch));
+
+ parole_media_list_set_playlist_count(list, nch);
+}
+
+void
+parole_media_list_move_up_clicked_cb (GtkButton *button, ParoleMediaList *list)
+{
+ GtkTreeModel *model;
+ GList *path_list = NULL;
+ GtkTreeIter current, iter;
+
+ /* Get the GtkTreePath GList of all selected rows */
+ path_list = gtk_tree_selection_get_selected_rows (list->priv->sel, &model);
+
+ /**
+ * Select first path before the first path
+ * that we going to move.
+ **/
+ if (g_list_length (path_list) != 0)
+ {
+ GtkTreePath *path, *prev;
+ guint i;
+
+ /* Get first item */
+ path = g_list_nth_data (path_list, 0);
+ if (gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), ¤t, path))
+ {
+ /* copy it as we don't mess with the list*/
+ prev = gtk_tree_path_copy (path);
+
+ if ( gtk_tree_path_prev (prev) )
+ {
+ if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, prev))
+ {
+ /* Move each item about the previous path */
+ for (i=0; i<g_list_length(path_list); i++)
+ {
+ path = g_list_nth_data (path_list, i);
+ if (gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), ¤t, path))
+ gtk_list_store_move_before(GTK_LIST_STORE(model), ¤t, &iter);
+ }
+ }
+ }
+ gtk_tree_path_free (prev);
+ }
+ }
+
+ g_list_foreach (path_list, (GFunc) gtk_tree_path_free, NULL);
+ g_list_free (path_list);
+}
+
+void
+parole_media_list_move_down_clicked_cb (GtkButton *button, ParoleMediaList *list)
+{
+ GtkTreeModel *model;
+ GList *path_list = NULL;
+ GtkTreeIter current, iter;
+
+ /* Get the GtkTreePath GList of all selected rows */
+ path_list = gtk_tree_selection_get_selected_rows (list->priv->sel, &model);
+ /* Reverse the list to repopulate in the right order */
+ path_list = g_list_reverse(path_list);
+
+ /**
+ * Select first path before the first path
+ * that we going to move.
+ **/
+ if (g_list_length (path_list) != 0)
+ {
+ GtkTreePath *path, *next;
+ guint i;
+
+ /* Get first item */
+ path = g_list_nth_data (path_list, 0);
+ if (gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), ¤t, path))
+ {
+ /* copy it as we don't mess with the list*/
+ next = gtk_tree_path_copy (path);
+
+ gtk_tree_path_next (next);
+
+ if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, next))
+ {
+ /* Move each item about the previous path */
+ for (i=0; i<g_list_length(path_list); i++)
+ {
+ path = g_list_nth_data (path_list, i);
+ if (gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), ¤t, path))
+ gtk_list_store_move_after(GTK_LIST_STORE(model), ¤t, &iter);
+ }
+ }
+
+ gtk_tree_path_free (next);
+ }
+ }
+
+ g_list_foreach (path_list, (GFunc) gtk_tree_path_free, NULL);
+ g_list_free (path_list);
}
/**
@@ -1029,25 +1109,23 @@ parole_media_list_remove_clicked_cb (GtkButton *button, ParoleMediaList *list)
**/
void
parole_media_list_row_activated_cb (GtkTreeView *view, GtkTreePath *path,
- GtkTreeViewColumn *col, ParoleMediaList *list)
+ GtkTreeViewColumn *col, ParoleMediaList *list)
{
GtkTreeRowReference *row;
if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
- row = gtk_tree_row_reference_new (gtk_tree_view_get_model (GTK_TREE_VIEW (list->priv->view)),
- path);
+ row = gtk_tree_row_reference_new (gtk_tree_view_get_model (GTK_TREE_VIEW (list->priv->view)), path);
else
- row = gtk_tree_row_reference_new (gtk_tree_view_get_model (GTK_TREE_VIEW (list->priv->disc_view)),
- path);
-
+ row = gtk_tree_row_reference_new (gtk_tree_view_get_model (GTK_TREE_VIEW (list->priv->disc_view)), path);
+
g_signal_emit (G_OBJECT (list), signals [MEDIA_ACTIVATED], 0, row);
}
static void
parole_media_list_selection_changed_cb (GtkTreeSelection *sel, ParoleMediaList *list)
{
- g_signal_emit (G_OBJECT (list), signals [MEDIA_CURSOR_CHANGED], 0,
- gtk_tree_selection_count_selected_rows (sel) > 0);
+ g_signal_emit (G_OBJECT (list), signals [MEDIA_CURSOR_CHANGED], 0,
+ gtk_tree_selection_count_selected_rows (sel) > 0);
}
static void
@@ -1059,23 +1137,22 @@ parole_media_list_open_folder (GtkWidget *menu)
if (dirname)
{
- gchar *uri;
- uri = g_filename_to_uri (dirname, NULL, NULL);
- TRACE ("Opening %s", dirname);
- gtk_show_uri (gtk_widget_get_screen (menu), uri, GDK_CURRENT_TIME, NULL);
-
- g_free (uri);
+ gchar *uri;
+ uri = g_filename_to_uri (dirname, NULL, NULL);
+ TRACE ("Opening %s", dirname);
+ gtk_show_uri (gtk_widget_get_screen (menu), uri, GDK_CURRENT_TIME, NULL);
+
+ g_free (uri);
}
}
static void
parole_media_list_add_open_containing_folder (ParoleMediaList *list, GtkWidget *menu,
- gint x, gint y)
+ gint x, gint y)
{
GtkTreePath *path;
-
if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (list->priv->view),
x,
y,
@@ -1084,52 +1161,50 @@ parole_media_list_add_open_containing_folder (ParoleMediaList *list, GtkWidget *
NULL,
NULL))
{
-
- GtkTreeIter iter;
-
- if ( path && gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path))
+
+ GtkTreeIter iter;
+
+ if ( path && gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path))
+ {
+ ParoleFile *file;
+ const gchar *filename;
+ const gchar *uri;
+
+ gtk_tree_model_get (GTK_TREE_MODEL (list->priv->store), &iter,
+ DATA_COL, &file,
+ -1);
+
+ filename = parole_file_get_file_name (file);
+ uri = parole_file_get_uri (file);
+
+ if (g_str_has_prefix (uri, "file:///"))
{
- ParoleFile *file;
- const gchar *filename;
- const gchar *uri;
-
- gtk_tree_model_get (GTK_TREE_MODEL (list->priv->store), &iter,
- DATA_COL, &file,
- -1);
-
- filename = parole_file_get_file_name (file);
- uri = parole_file_get_uri (file);
-
- if (g_str_has_prefix (uri, "file:///"))
- {
- GtkWidget *mi, *img;
- gchar *dirname;
-
- dirname = g_path_get_dirname (filename);
-
- /* Clear */
- mi = gtk_image_menu_item_new_with_label (_("Open Containing Folder"));
- img = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), img);
- gtk_widget_set_sensitive (mi, TRUE);
- gtk_widget_show (mi);
- g_signal_connect_swapped (mi, "activate",
- G_CALLBACK (parole_media_list_open_folder), menu);
-
- g_object_set_data (G_OBJECT (menu), "folder", dirname);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-
-
- mi = gtk_separator_menu_item_new ();
- gtk_widget_show (mi);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-
-
- }
-
- gtk_tree_path_free (path);
- }
+ GtkWidget *mi, *img;
+ gchar *dirname;
+
+ dirname = g_path_get_dirname (filename);
+
+ /* Clear */
+ mi = gtk_image_menu_item_new_with_label (_("Open Containing Folder"));
+ img = gtk_image_new_from_icon_name("document-open-symbolic", GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), img);
+ gtk_widget_set_sensitive (mi, TRUE);
+ gtk_widget_show (mi);
+ g_signal_connect_swapped (mi, "activate",
+ G_CALLBACK (parole_media_list_open_folder), menu);
+
+ g_object_set_data (G_OBJECT (menu), "folder", dirname);
+
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
+
+
+ mi = gtk_separator_menu_item_new ();
+ gtk_widget_show (mi);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
+ }
+
+ gtk_tree_path_free (path);
+ }
}
}
@@ -1151,9 +1226,7 @@ parole_media_list_clear_list (ParoleMediaList *list)
{
TRACE("CLEAR START");
gtk_list_store_clear (GTK_LIST_STORE (list->priv->store));
- parole_media_list_set_widget_sensitive (list, FALSE);
- gtk_label_set_text (GTK_LABEL(list->priv->n_items),_("Playlist empty"));
- gtk_widget_hide (list->priv->n_items);
+ parole_media_list_set_playlist_count(list, 0);
TRACE("CLEAR END");
}
@@ -1161,17 +1234,17 @@ static void
replace_list_activated_cb (GtkWidget *mi, ParoleConf *conf)
{
g_object_set (G_OBJECT (conf),
- "replace-playlist", gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (mi)),
- NULL);
+ "replace-playlist", gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (mi)),
+ NULL);
}
static void
play_opened_files_activated_cb (GtkWidget *mi, ParoleConf *conf)
{
g_object_set (G_OBJECT (conf),
- "play-opened-files", gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (mi)),
- NULL);
-
+ "play-opened-files", gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (mi)),
+ NULL);
+
}
static void
@@ -1183,8 +1256,8 @@ remember_playlist_activated_cb (GtkWidget *mi, ParoleConf *conf)
"remember-playlist", gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (mi)),
NULL);
if (!gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (mi))) {
- playlist_filename = xfce_resource_save_location (XFCE_RESOURCE_DATA,
- PAROLE_AUTO_SAVED_PLAYLIST,
+ playlist_filename = xfce_resource_save_location (XFCE_RESOURCE_DATA,
+ PAROLE_AUTO_SAVED_PLAYLIST,
FALSE);
playlist_file = g_file_new_for_path(playlist_filename);
g_file_delete(playlist_file, NULL, NULL);
@@ -1193,49 +1266,6 @@ remember_playlist_activated_cb (GtkWidget *mi, ParoleConf *conf)
}
static void
-repeat_activated_cb (GtkWidget *mi, ParoleMediaList *list)
-{
- gboolean active = gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM( mi ) );
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON( list->priv->repeat_button ), active);
-}
-
-static void
-shuffle_activated_cb (GtkWidget *mi, ParoleMediaList *list)
-{
- gboolean active = gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM( mi ) );
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON( list->priv->shuffle_button ), active);
-}
-
-void
-parole_media_list_menu_pos (GtkMenu *menu, gint *px, gint *py, gboolean *push_in, gpointer data)
-{
- gint x, y;
- GtkAllocation widget_allocation, menu_allocation;
- GtkWidget *widget = gtk_menu_get_attach_widget( menu );
- GdkWindow *window;
-
- *push_in = TRUE;
-
- gtk_widget_get_allocation( widget, &widget_allocation );
- gtk_widget_get_allocation( GTK_WIDGET(menu), &menu_allocation );
-
- window = gtk_widget_get_window( widget );
- gdk_window_get_position( window, &x, &y );
-
- if (widget_allocation.width > 100)
- gtk_widget_set_size_request(GTK_WIDGET(menu), widget_allocation.width, -1);
-
- *px = x + widget_allocation.x;
- *py = y + widget_allocation.y + widget_allocation.height;
-}
-
-static void
-parole_media_list_hide_menu (GtkWidget *widget)
-{
- gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( widget ), FALSE );
-}
-
-static void
parole_media_list_destroy_menu (GtkWidget *menu)
{
gchar *dirname;
@@ -1244,191 +1274,13 @@ parole_media_list_destroy_menu (GtkWidget *menu)
if (dirname)
{
- g_free (dirname);
+ g_free (dirname);
}
gtk_widget_destroy (menu);
}
static void
-menu_detach( GtkMenu *menu )
-{
- //gtk_menu_detach (menu);
-}
-
-void
-parole_media_list_add_dvd (ParoleMediaList *list, gchar *dvd_name)
-{
- //parole_media_list_set_dvd_menu_visible(list, TRUE);
-
- gtk_label_set_label(GTK_LABEL(list->priv->dvd_label), dvd_name);
-}
-
-void
-parole_media_list_send_dvd_menu_navigation (ParoleMediaList *list, gint msg_id)
-{
- g_signal_emit (G_OBJECT (list), signals [GST_DVD_NAV_MESSAGE], 0, msg_id);
-}
-
-void
-parole_media_list_dvd_menu_activated (GtkMenuItem *widget, ParoleMediaList *list)
-{
- parole_media_list_send_dvd_menu_navigation(list, GST_DVD_ROOT_MENU);
-}
-
-void
-parole_media_list_dvd_title_activated (GtkMenuItem *widget, ParoleMediaList *list)
-{
- parole_media_list_send_dvd_menu_navigation(list, GST_DVD_TITLE_MENU);
-}
-
-void
-parole_media_list_dvd_audio_activated (GtkMenuItem *widget, ParoleMediaList *list)
-{
- parole_media_list_send_dvd_menu_navigation(list, GST_DVD_AUDIO_MENU);
-}
-
-void
-parole_media_list_dvd_angle_activated (GtkMenuItem *widget, ParoleMediaList *list)
-{
- parole_media_list_send_dvd_menu_navigation(list, GST_DVD_ANGLE_MENU);
-}
-
-void
-parole_media_list_dvd_chapter_activated (GtkMenuItem *widget, ParoleMediaList *list)
-{
- parole_media_list_send_dvd_menu_navigation(list, GST_DVD_CHAPTER_MENU);
-}
-
-
-static void
-parole_media_list_show_dvd_menu (GtkToggleButton *button, ParoleMediaList *list)
-{
- gboolean toggled = gtk_toggle_button_get_active( button );
- GtkBuilder *builder;
- GtkMenu *menu;
- GtkMenuItem *dvd_menu, *title_menu, *audio_menu, *angle_menu, *chapter_menu;
-
- if (!toggled)
- return;
-
- builder = parole_builder_new_from_string (playlist_ui, playlist_ui_length);
-
- menu = GTK_MENU (gtk_builder_get_object (builder, "dvd-menu"));
-
- dvd_menu = GTK_MENU_ITEM (gtk_builder_get_object (builder, "dvd-menu-menu"));
- g_signal_connect (dvd_menu, "activate",
- G_CALLBACK (parole_media_list_dvd_menu_activated), list);
-
- title_menu = GTK_MENU_ITEM (gtk_builder_get_object (builder, "dvd-menu-title"));
- g_signal_connect (title_menu, "activate",
- G_CALLBACK (parole_media_list_dvd_title_activated), list);
-
- audio_menu = GTK_MENU_ITEM (gtk_builder_get_object (builder, "dvd-menu-audio"));
- g_signal_connect (audio_menu, "activate",
- G_CALLBACK (parole_media_list_dvd_audio_activated), list);
-
- angle_menu = GTK_MENU_ITEM (gtk_builder_get_object (builder, "dvd-menu-angle"));
- g_signal_connect (angle_menu, "activate",
- G_CALLBACK (parole_media_list_dvd_angle_activated), list);
-
- chapter_menu = GTK_MENU_ITEM (gtk_builder_get_object (builder, "dvd-menu-chapter"));
- g_signal_connect (chapter_menu, "activate",
- G_CALLBACK (parole_media_list_dvd_chapter_activated), list);
-
- gtk_menu_attach_to_widget( GTK_MENU(menu), list->priv->dvd_menu_button, (GtkMenuDetachFunc) menu_detach );
-
- g_signal_connect_swapped (menu, "selection-done",
- G_CALLBACK (parole_media_list_destroy_menu), menu);
-
- g_signal_connect_swapped (menu, "destroy",
- G_CALLBACK (parole_media_list_hide_menu), list->priv->dvd_menu_button);
-
- gtk_menu_popup (GTK_MENU (menu),
- NULL, NULL,
- (GtkMenuPositionFunc) parole_media_list_menu_pos, NULL,
- 3, gtk_get_current_event_time ());
-}
-
-static void
-parole_media_list_show_button_menu (GtkToggleButton *button, ParoleMediaList *list)
-{
- gboolean toggled = gtk_toggle_button_get_active( button );
- gboolean val;
- GtkBuilder *builder;
- GtkMenu *menu;
- GtkMenuItem *clear;
- GtkCheckMenuItem *repeat_menu, *shuffle_menu, *replace, *play_opened;
- GtkCheckMenuItem *remember;
-
- if (!toggled)
- return;
-
- builder = parole_builder_new_from_string (playlist_ui, playlist_ui_length);
-
- menu = GTK_MENU (gtk_builder_get_object (builder, "playlist-menu"));
- repeat_menu = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-repeat"));
- shuffle_menu = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-shuffle"));
- replace = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-replace"));
- play_opened = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-play-opened"));
- remember = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-remember"));
- clear = GTK_MENU_ITEM (gtk_builder_get_object (builder, "menu-clear"));
-
- gtk_menu_attach_to_widget( GTK_MENU(menu), list->priv->settings_button, (GtkMenuDetachFunc) menu_detach );
-
- g_object_get (G_OBJECT (list->priv->conf),
- "repeat", &val,
- NULL);
- gtk_check_menu_item_set_active (repeat_menu, val);
- g_signal_connect (repeat_menu, "activate",
- G_CALLBACK (repeat_activated_cb), list);
-
- g_object_get (G_OBJECT (list->priv->conf),
- "shuffle", &val,
- NULL);
-
- gtk_check_menu_item_set_active (shuffle_menu, val);
- g_signal_connect (shuffle_menu, "activate",
- G_CALLBACK (shuffle_activated_cb), list);
-
- g_object_get (G_OBJECT (list->priv->conf),
- "replace-playlist", &val,
- NULL);
-
- gtk_check_menu_item_set_active (replace, val);
- g_signal_connect (replace, "activate",
- G_CALLBACK (replace_list_activated_cb), list->priv->conf);
-
- g_object_get (G_OBJECT (list->priv->conf),
- "play-opened-files", &val,
- NULL);
- gtk_check_menu_item_set_active (play_opened, val);
- g_signal_connect (play_opened, "activate",
- G_CALLBACK (play_opened_files_activated_cb), list->priv->conf);
-
- g_object_get (G_OBJECT (list->priv->conf),
- "remember-playlist", &val,
- NULL);
- gtk_check_menu_item_set_active (remember, val);
- g_signal_connect (remember, "activate",
- G_CALLBACK (remember_playlist_activated_cb), list->priv->conf);
-
- g_signal_connect_swapped (clear, "activate",
- G_CALLBACK (parole_media_list_clear_list), list);
-
- g_signal_connect_swapped (menu, "selection-done",
- G_CALLBACK (parole_media_list_destroy_menu), menu);
-
- g_signal_connect_swapped (menu, "destroy",
- G_CALLBACK (parole_media_list_hide_menu), list->priv->settings_button);
-
- gtk_menu_popup (GTK_MENU (menu),
- NULL, NULL,
- (GtkMenuPositionFunc) parole_media_list_menu_pos, NULL,
- 3, gtk_get_current_event_time ());
-}
-
-static void
parole_media_list_show_menu (ParoleMediaList *list, GdkEventButton *ev)
{
gboolean val;
@@ -1438,55 +1290,38 @@ parole_media_list_show_menu (ParoleMediaList *list, GdkEventButton *ev)
GtkBuilder *builder;
GtkMenu *menu;
- GtkMenuItem *clear;
- GtkCheckMenuItem *repeat_menu, *shuffle_menu, *replace, *play_opened;
- GtkCheckMenuItem *remember;
+ GtkMenuItem *clear;
+ GtkCheckMenuItem *replace, *play_opened;
+ GtkCheckMenuItem *remember;
builder = parole_builder_new_from_string (playlist_ui, playlist_ui_length);
menu = GTK_MENU (gtk_builder_get_object (builder, "playlist-menu"));
- repeat_menu = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-repeat"));
- shuffle_menu = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-shuffle"));
replace = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-replace"));
play_opened = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-play-opened"));
remember = GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "menu-remember"));
clear = GTK_MENU_ITEM (gtk_builder_get_object (builder, "menu-clear"));
parole_media_list_add_open_containing_folder (list, GTK_WIDGET(menu), (gint)ev->x, (gint)ev->y);
-
- g_object_get (G_OBJECT (list->priv->conf),
- "repeat", &val,
- NULL);
- gtk_check_menu_item_set_active (repeat_menu, val);
- g_signal_connect (repeat_menu, "activate",
- G_CALLBACK (repeat_activated_cb), list);
-
+
g_object_get (G_OBJECT (list->priv->conf),
- "shuffle", &val,
- NULL);
-
- gtk_check_menu_item_set_active (shuffle_menu, val);
- g_signal_connect (shuffle_menu, "activate",
- G_CALLBACK (shuffle_activated_cb), list);
-
- g_object_get (G_OBJECT (list->priv->conf),
- "replace-playlist", &val,
- NULL);
+ "replace-playlist", &val,
+ NULL);
gtk_check_menu_item_set_active (replace, val);
g_signal_connect (replace, "activate",
G_CALLBACK (replace_list_activated_cb), list->priv->conf);
-
+
g_object_get (G_OBJECT (list->priv->conf),
- "play-opened-files", &val,
- NULL);
+ "play-opened-files", &val,
+ NULL);
gtk_check_menu_item_set_active (play_opened, val);
g_signal_connect (play_opened, "activate",
G_CALLBACK (play_opened_files_activated_cb), list->priv->conf);
g_object_get (G_OBJECT (list->priv->conf),
- "remember-playlist", &val,
- NULL);
+ "remember-playlist", &val,
+ NULL);
gtk_check_menu_item_set_active (remember, val);
g_signal_connect (remember, "activate",
G_CALLBACK (remember_playlist_activated_cb), list->priv->conf);
@@ -1508,8 +1343,8 @@ parole_media_list_button_release_event (GtkWidget *widget, GdkEventButton *ev, P
{
if ( ev->button == 3 )
{
- parole_media_list_show_menu (list, ev);
- return TRUE;
+ parole_media_list_show_menu (list, ev);
+ return TRUE;
}
return FALSE;
@@ -1520,13 +1355,13 @@ parole_media_list_select_path (ParoleMediaList *list, gboolean disc, GtkTreePath
{
if (disc)
{
- gtk_tree_selection_select_path (list->priv->disc_sel, path);
- gtk_tree_view_set_cursor (GTK_TREE_VIEW (list->priv->disc_view), path, NULL, FALSE);
+ gtk_tree_selection_select_path (list->priv->disc_sel, path);
+ gtk_tree_view_set_cursor (GTK_TREE_VIEW (list->priv->disc_view), path, NULL, FALSE);
}
else
{
- gtk_tree_selection_select_path (list->priv->sel, path);
- gtk_tree_view_set_cursor (GTK_TREE_VIEW (list->priv->view), path, NULL, FALSE);
+ gtk_tree_selection_select_path (list->priv->sel, path);
+ gtk_tree_view_set_cursor (GTK_TREE_VIEW (list->priv->view), path, NULL, FALSE);
}
}
@@ -1540,7 +1375,7 @@ parole_media_list_get_row_reference_from_iter (ParoleMediaList *list, GtkTreeIte
row = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->store), path);
if ( select_path)
- parole_media_list_select_path (list, FALSE, path);
+ parole_media_list_select_path (list, FALSE, path);
gtk_tree_path_free (path);
@@ -1593,24 +1428,6 @@ parole_media_list_class_init (ParoleMediaListClass *klass)
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
- signals[SHUFFLE_TOGGLED] =
- g_signal_new ("shuffle-toggled",
- PAROLE_TYPE_MEDIA_LIST,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleMediaListClass, shuffle_toggled),
- NULL, NULL,
- g_cclosure_marshal_VOID__BOOLEAN,
- G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
-
- signals[REPEAT_TOGGLED] =
- g_signal_new ("repeat-toggled",
- PAROLE_TYPE_MEDIA_LIST,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleMediaListClass, repeat_toggled),
- NULL, NULL,
- g_cclosure_marshal_VOID__BOOLEAN,
- G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
-
signals[SHOW_PLAYLIST] =
g_signal_new ("show-playlist",
PAROLE_TYPE_MEDIA_LIST,
@@ -1620,14 +1437,14 @@ parole_media_list_class_init (ParoleMediaListClass *klass)
g_cclosure_marshal_VOID__BOOLEAN,
G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
- signals[GST_DVD_NAV_MESSAGE] =
- g_signal_new ("gst-dvd-nav-message",
+ signals[ISO_OPENED] =
+ g_signal_new ("iso-opened",
PAROLE_TYPE_MEDIA_LIST,
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ParoleMediaListClass, gst_dvd_nav_message),
+ G_STRUCT_OFFSET (ParoleMediaListClass, iso_opened),
NULL, NULL,
- g_cclosure_marshal_VOID__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
g_type_class_add_private (klass, sizeof (ParoleMediaListPrivate));
@@ -1639,7 +1456,6 @@ parole_media_list_setup_view (ParoleMediaList *list)
{
GtkTreeSelection *sel, *disc_sel;
GtkListStore *list_store, *disc_list_store;
- GtkTreeViewColumn *col, *disc_col;
GtkCellRenderer *renderer, *disc_renderer;
list_store = gtk_list_store_new (COL_NUMBERS, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_OBJECT);
@@ -1650,16 +1466,16 @@ parole_media_list_setup_view (ParoleMediaList *list)
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (list->priv->view), TRUE);
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (list->priv->disc_view), TRUE);
- col = gtk_tree_view_column_new ();
- disc_col = gtk_tree_view_column_new ();
+ list->priv->col = gtk_tree_view_column_new ();
+ list->priv->disc_col = gtk_tree_view_column_new ();
renderer = gtk_cell_renderer_pixbuf_new ();
disc_renderer = gtk_cell_renderer_pixbuf_new ();
- gtk_tree_view_column_pack_start(col, renderer, FALSE);
- gtk_tree_view_column_pack_start(disc_col, disc_renderer, FALSE);
- gtk_tree_view_column_set_attributes(col, renderer, "pixbuf", PIXBUF_COL, NULL);
- gtk_tree_view_column_set_attributes(disc_col, disc_renderer, "pixbuf", PIXBUF_COL, NULL);
+ gtk_tree_view_column_pack_start(list->priv->col, renderer, FALSE);
+ gtk_tree_view_column_pack_start(list->priv->disc_col, disc_renderer, FALSE);
+ gtk_tree_view_column_set_attributes(list->priv->col, renderer, "pixbuf", PIXBUF_COL, NULL);
+ gtk_tree_view_column_set_attributes(list->priv->disc_col, disc_renderer, "pixbuf", PIXBUF_COL, NULL);
/**
* Name col
@@ -1668,17 +1484,17 @@ parole_media_list_setup_view (ParoleMediaList *list)
renderer = gtk_cell_renderer_text_new();
disc_renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start (col, renderer, TRUE);
- gtk_tree_view_column_set_attributes (col, renderer, "text", NAME_COL, NULL);
+ gtk_tree_view_column_pack_start (list->priv->col, renderer, TRUE);
+ gtk_tree_view_column_set_attributes (list->priv->col, renderer, "text", NAME_COL, NULL);
g_object_set (renderer,
- "ellipsize", PANGO_ELLIPSIZE_END,
- NULL);
-
- gtk_tree_view_column_pack_start (disc_col, disc_renderer, TRUE);
- gtk_tree_view_column_set_attributes (disc_col, disc_renderer, "text", NAME_COL, NULL);
+ "ellipsize", PANGO_ELLIPSIZE_END,
+ NULL);
+
+ gtk_tree_view_column_pack_start (list->priv->disc_col, disc_renderer, TRUE);
+ gtk_tree_view_column_set_attributes (list->priv->disc_col, disc_renderer, "text", NAME_COL, NULL);
g_object_set (disc_renderer,
- "ellipsize", PANGO_ELLIPSIZE_END,
- NULL);
+ "ellipsize", PANGO_ELLIPSIZE_END,
+ NULL);
/**
* Media length
@@ -1687,15 +1503,15 @@ parole_media_list_setup_view (ParoleMediaList *list)
renderer = gtk_cell_renderer_text_new();
disc_renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start (col, renderer, FALSE);
- gtk_tree_view_column_pack_start (disc_col, disc_renderer, FALSE);
- gtk_tree_view_column_set_attributes (col, renderer, "text", LENGTH_COL, NULL);
- gtk_tree_view_column_set_attributes (disc_col, disc_renderer, "text", LENGTH_COL, NULL);
+ gtk_tree_view_column_pack_start (list->priv->col, renderer, FALSE);
+ gtk_tree_view_column_pack_start (list->priv->disc_col, disc_renderer, FALSE);
+ gtk_tree_view_column_set_attributes (list->priv->col, renderer, "text", LENGTH_COL, NULL);
+ gtk_tree_view_column_set_attributes (list->priv->disc_col, disc_renderer, "text", LENGTH_COL, NULL);
- gtk_tree_view_append_column (GTK_TREE_VIEW (list->priv->view), col);
- gtk_tree_view_append_column (GTK_TREE_VIEW (list->priv->disc_view), disc_col);
- gtk_tree_view_column_set_title (col, _("Media list"));
- gtk_tree_view_column_set_title (disc_col, _("Chapter list"));
+ gtk_tree_view_append_column (GTK_TREE_VIEW (list->priv->view), list->priv->col);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (list->priv->disc_view), list->priv->disc_col);
+ gtk_tree_view_column_set_title (list->priv->col, g_strdup_printf(_("Playlist (%i items)"), 0));
+ gtk_tree_view_column_set_title (list->priv->disc_col, g_strdup_printf(_("Playlist (%i chapters)"), 0));
gtk_drag_dest_set (list->priv->view, GTK_DEST_DEFAULT_ALL, target_entry, G_N_ELEMENTS (target_entry),
GDK_ACTION_COPY | GDK_ACTION_MOVE);
@@ -1705,9 +1521,9 @@ parole_media_list_setup_view (ParoleMediaList *list)
gtk_tree_selection_set_mode (sel, GTK_SELECTION_MULTIPLE);
g_signal_connect (sel, "changed",
- G_CALLBACK (parole_media_list_selection_changed_cb), list);
+ G_CALLBACK (parole_media_list_selection_changed_cb), list);
g_signal_connect (disc_sel, "changed",
- G_CALLBACK (parole_media_list_selection_changed_cb), list);
+ G_CALLBACK (parole_media_list_selection_changed_cb), list);
list->priv->store = list_store;
list->priv->disc_store = disc_list_store;
@@ -1727,15 +1543,9 @@ parole_media_list_init (ParoleMediaList *list)
builder = parole_builder_new_from_string (playlist_ui, playlist_ui_length);
- list->priv->dvd_menu_button = GTK_WIDGET (gtk_builder_get_object(builder, "dvd_menu_button"));
- list->priv->dvd_menu = GTK_WIDGET (gtk_builder_get_object(builder, "dvd-menu"));
- list->priv->dvd_label = GTK_WIDGET (gtk_builder_get_object(builder, "dvd_label"));
list->priv->playlist_controls = GTK_WIDGET (gtk_builder_get_object(builder, "playlist_controls"));
list->priv->playlist_notebook = GTK_WIDGET (gtk_builder_get_object(builder, "playlist_notebook"));
- g_signal_connect (GTK_TOGGLE_BUTTON(list->priv->dvd_menu_button), "toggled",
- G_CALLBACK (parole_media_list_show_dvd_menu), list);
-
list->priv->view = GTK_WIDGET (gtk_builder_get_object (builder, "media-list"));
list->priv->disc_view = GTK_WIDGET (gtk_builder_get_object (builder, "disc-list"));
@@ -1749,12 +1559,7 @@ parole_media_list_init (ParoleMediaList *list)
list->priv->clear_button = GTK_WIDGET (gtk_builder_get_object (builder, "clear-media"));
list->priv->repeat_button = GTK_WIDGET (gtk_builder_get_object (builder, "repeat-media"));
list->priv->shuffle_button = GTK_WIDGET (gtk_builder_get_object (builder, "shuffle-media"));
- list->priv->settings_button = GTK_WIDGET (gtk_builder_get_object (builder, "settings"));
- list->priv->n_items = GTK_WIDGET (gtk_builder_get_object (builder, "n_items"));
- g_signal_connect (GTK_TOGGLE_BUTTON(list->priv->settings_button), "toggled",
- G_CALLBACK (parole_media_list_show_button_menu), list);
-
gtk_builder_connect_signals (builder, list);
g_object_unref (builder);
@@ -1771,12 +1576,12 @@ parole_media_list_get (void)
if ( G_LIKELY (list != NULL ) )
{
- g_object_ref (list);
+ g_object_ref (list);
}
else
{
- list = g_object_new (PAROLE_TYPE_MEDIA_LIST, NULL);
- g_object_add_weak_pointer (list, &list);
+ list = g_object_new (PAROLE_TYPE_MEDIA_LIST, NULL);
+ g_object_add_weak_pointer (list, &list);
}
return GTK_WIDGET (list);
@@ -1789,25 +1594,25 @@ void parole_media_list_load (ParoleMediaList *list)
GSList *fileslist = NULL;
g_object_get (G_OBJECT (list->priv->conf),
- "play-opened-files", &play,
- "remember-playlist", &load_saved_list,
- NULL);
+ "play-opened-files", &play,
+ "remember-playlist", &load_saved_list,
+ NULL);
if ( load_saved_list )
{
- gchar *playlist_file;
-
- playlist_file = xfce_resource_save_location (XFCE_RESOURCE_DATA,
- PAROLE_AUTO_SAVED_PLAYLIST,
- FALSE);
- if ( playlist_file )
- {
- fileslist = parole_pl_parser_parse_from_file_by_extension (playlist_file);
- g_free (playlist_file);
-
- parole_media_list_files_open (list, fileslist, FALSE, play);
- g_slist_free (fileslist);
- }
+ gchar *playlist_file;
+
+ playlist_file = xfce_resource_save_location (XFCE_RESOURCE_DATA,
+ PAROLE_AUTO_SAVED_PLAYLIST,
+ FALSE);
+ if ( playlist_file )
+ {
+ fileslist = parole_pl_parser_parse_from_file_by_extension (playlist_file);
+ g_free (playlist_file);
+
+ parole_media_list_files_open (list, fileslist, FALSE, play);
+ g_slist_free (fileslist);
+ }
}
}
@@ -1855,8 +1660,8 @@ parole_media_list_add_by_path (ParoleMediaList *list, const gchar *path, gboolea
}
GtkTreeRowReference *parole_media_list_get_next_row (ParoleMediaList *list,
- GtkTreeRowReference *row,
- gboolean repeat)
+ GtkTreeRowReference *row,
+ gboolean repeat)
{
GtkTreeRowReference *next = NULL;
GtkTreePath *path;
@@ -1865,7 +1670,7 @@ GtkTreeRowReference *parole_media_list_get_next_row (ParoleMediaList *list,
g_return_val_if_fail (row != NULL, NULL);
if ( !gtk_tree_row_reference_valid (row) )
- return NULL;
+ return NULL;
path = gtk_tree_row_reference_get_path (row);
@@ -1873,15 +1678,15 @@ GtkTreeRowReference *parole_media_list_get_next_row (ParoleMediaList *list,
if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path))
{
- next = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->store), path);
- //parole_media_list_select_path (list, path);
+ next = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->store), path);
+ //parole_media_list_select_path (list, path);
}
else if ( repeat ) /* Repeat playing ?*/
{
- if ( gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->priv->store), &iter))
- {
- next = parole_media_list_get_row_reference_from_iter (list, &iter, TRUE);
- }
+ if ( gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->priv->store), &iter))
+ {
+ next = parole_media_list_get_row_reference_from_iter (list, &iter, TRUE);
+ }
}
gtk_tree_path_free (path);
@@ -1890,7 +1695,7 @@ GtkTreeRowReference *parole_media_list_get_next_row (ParoleMediaList *list,
}
GtkTreeRowReference *parole_media_list_get_prev_row (ParoleMediaList *list,
- GtkTreeRowReference *row)
+ GtkTreeRowReference *row)
{
GtkTreeRowReference *prev = NULL;
GtkTreePath *path;
@@ -1899,7 +1704,7 @@ GtkTreeRowReference *parole_media_list_get_prev_row (ParoleMediaList *list,
g_return_val_if_fail (row != NULL, NULL);
if ( !gtk_tree_row_reference_valid (row) )
- return NULL;
+ return NULL;
path = gtk_tree_row_reference_get_path (row);
@@ -1907,11 +1712,11 @@ GtkTreeRowReference *parole_media_list_get_prev_row (ParoleMediaList *list,
if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path))
{
- prev = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->store), path);
- //parole_media_list_select_path (list, path);
+ prev = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->store), path);
+ //parole_media_list_select_path (list, path);
}
else
- prev = row;
+ prev = row;
gtk_tree_path_free (path);
@@ -1919,7 +1724,7 @@ GtkTreeRowReference *parole_media_list_get_prev_row (ParoleMediaList *list,
}
GtkTreeRowReference *parole_media_list_get_row_n (ParoleMediaList *list,
- gint wanted_row)
+ gint wanted_row)
{
GtkTreeRowReference *row = NULL;
GtkTreePath *path;
@@ -1933,18 +1738,18 @@ GtkTreeRowReference *parole_media_list_get_row_n (ParoleMediaList *list,
if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
{
if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path))
- row = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->store), path);
+ row = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->store), path);
}
else
{
if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->disc_store), &iter, path))
- row = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->disc_store), path);
+ row = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->disc_store), path);
}
gtk_tree_path_free (path);
if ( !gtk_tree_row_reference_valid (row) )
- return NULL;
+ return NULL;
return row;
}
@@ -1963,7 +1768,7 @@ GtkTreeRowReference *parole_media_list_get_row_random (ParoleMediaList *list)
if ( nch == 1 || nch == 0 )
{
- return NULL;
+ return NULL;
}
current_path = gtk_tree_path_to_string(gtk_tree_row_reference_get_path(parole_media_list_get_selected_row(list)));
@@ -1989,7 +1794,7 @@ GtkTreeRowReference *parole_media_list_get_row_random (ParoleMediaList *list)
if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path))
{
- row = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->store), path);
+ row = gtk_tree_row_reference_new (GTK_TREE_MODEL (list->priv->store), path);
}
gtk_tree_path_free (path);
@@ -2000,9 +1805,9 @@ GtkTreeRowReference *parole_media_list_get_row_random (ParoleMediaList *list)
gboolean parole_media_list_is_selected_row (ParoleMediaList *list)
{
if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
- return gtk_tree_selection_count_selected_rows (list->priv->sel) > 0;
+ return gtk_tree_selection_count_selected_rows (list->priv->sel) > 0;
else
- return gtk_tree_selection_count_selected_rows (list->priv->disc_sel) > 0;
+ return gtk_tree_selection_count_selected_rows (list->priv->disc_sel) > 0;
}
gboolean parole_media_list_is_empty (ParoleMediaList *list)
@@ -2010,9 +1815,9 @@ gboolean parole_media_list_is_empty (ParoleMediaList *list)
GtkTreeIter iter;
if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
- return !gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->priv->store), &iter);
+ return !gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->priv->store), &iter);
else
- return !gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->priv->disc_store), &iter);
+ return !gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->priv->disc_store), &iter);
}
/**
@@ -2030,12 +1835,12 @@ GtkTreeRowReference *parole_media_list_get_first_row (ParoleMediaList *list)
if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
{
if ( gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->priv->store), &iter) )
- row = parole_media_list_get_row_reference_from_iter (list, &iter, TRUE);
+ row = parole_media_list_get_row_reference_from_iter (list, &iter, TRUE);
}
else
{
if ( gtk_tree_model_get_iter_first (GTK_TREE_MODEL (list->priv->disc_store), &iter) )
- row = parole_media_list_get_row_reference_from_iter (list, &iter, TRUE);
+ row = parole_media_list_get_row_reference_from_iter (list, &iter, TRUE);
}
return row;
@@ -2071,11 +1876,11 @@ void parole_media_list_select_row (ParoleMediaList *list, GtkTreeRowReference *r
if ( gtk_tree_row_reference_valid (row) )
{
- path = gtk_tree_row_reference_get_path (row);
- parole_media_list_select_path (list,
- gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 1,
- path);
- gtk_tree_path_free (path);
+ path = gtk_tree_row_reference_get_path (row);
+ parole_media_list_select_path (list,
+ gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 1,
+ path);
+ gtk_tree_path_free (path);
}
}
@@ -2086,20 +1891,20 @@ void parole_media_list_set_row_pixbuf (ParoleMediaList *list, GtkTreeRowReferen
if ( gtk_tree_row_reference_valid (row) )
{
- path = gtk_tree_row_reference_get_path (row);
-
- if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
- {
- if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path) )
- gtk_list_store_set (list->priv->store, &iter, PIXBUF_COL, pix, -1);
- }
- else
- {
- if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->disc_store), &iter, path) )
- gtk_list_store_set (list->priv->disc_store, &iter, PIXBUF_COL, pix, -1);
- }
-
- gtk_tree_path_free (path);
+ path = gtk_tree_row_reference_get_path (row);
+
+ if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
+ {
+ if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path) )
+ gtk_list_store_set (list->priv->store, &iter, PIXBUF_COL, pix, -1);
+ }
+ else
+ {
+ if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->disc_store), &iter, path) )
+ gtk_list_store_set (list->priv->disc_store, &iter, PIXBUF_COL, pix, -1);
+ }
+
+ gtk_tree_path_free (path);
}
}
@@ -2112,20 +1917,20 @@ GtkTreeRowReference *row)
if ( gtk_tree_row_reference_valid (row) )
{
- path = gtk_tree_row_reference_get_path (row);
-
- if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
- {
- if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path) )
- gtk_tree_model_get (GTK_TREE_MODEL(list->priv->store), &iter, NAME_COL, &name, -1);
- }
- else
- {
- if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->disc_store), &iter, path) )
- gtk_tree_model_get (GTK_TREE_MODEL(list->priv->store), &iter, NAME_COL, &name, -1);
- }
-
- gtk_tree_path_free (path);
+ path = gtk_tree_row_reference_get_path (row);
+
+ if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
+ {
+ if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path) )
+ gtk_tree_model_get (GTK_TREE_MODEL(list->priv->store), &iter, NAME_COL, &name, -1);
+ }
+ else
+ {
+ if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->disc_store), &iter, path) )
+ gtk_tree_model_get (GTK_TREE_MODEL(list->priv->disc_store), &iter, NAME_COL, &name, -1);
+ }
+
+ gtk_tree_path_free (path);
}
return name;
@@ -2138,20 +1943,20 @@ void parole_media_list_set_row_name (ParoleMediaList *list, GtkTreeRowReference
if ( gtk_tree_row_reference_valid (row) )
{
- path = gtk_tree_row_reference_get_path (row);
-
- if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
- {
- if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path) )
- gtk_list_store_set (list->priv->store, &iter, NAME_COL, name, -1);
- }
- else
- {
- if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->disc_store), &iter, path) )
- gtk_list_store_set (list->priv->disc_store, &iter, NAME_COL, name, -1);
- }
-
- gtk_tree_path_free (path);
+ path = gtk_tree_row_reference_get_path (row);
+
+ if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
+ {
+ if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path) )
+ gtk_list_store_set (list->priv->store, &iter, NAME_COL, name, -1);
+ }
+ else
+ {
+ if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->disc_store), &iter, path) )
+ gtk_list_store_set (list->priv->disc_store, &iter, NAME_COL, name, -1);
+ }
+
+ gtk_tree_path_free (path);
}
}
@@ -2162,20 +1967,20 @@ void parole_media_list_set_row_length (ParoleMediaList *list, GtkTreeRowReferenc
if ( gtk_tree_row_reference_valid (row) )
{
- path = gtk_tree_row_reference_get_path (row);
-
- if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
- {
- if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path) )
- gtk_list_store_set (list->priv->store, &iter, LENGTH_COL, len, -1);
- }
- else
- {
- if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->disc_store), &iter, path) )
- gtk_list_store_set (list->priv->disc_store, &iter, LENGTH_COL, len, -1);
- }
-
- gtk_tree_path_free (path);
+ path = gtk_tree_row_reference_get_path (row);
+
+ if (gtk_notebook_get_current_page(GTK_NOTEBOOK(list->priv->playlist_notebook)) == 0)
+ {
+ if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->store), &iter, path) )
+ gtk_list_store_set (list->priv->store, &iter, LENGTH_COL, len, -1);
+ }
+ else
+ {
+ if ( gtk_tree_model_get_iter (GTK_TREE_MODEL (list->priv->disc_store), &iter, path) )
+ gtk_list_store_set (list->priv->disc_store, &iter, LENGTH_COL, len, -1);
+ }
+
+ gtk_tree_path_free (path);
}
}
@@ -2196,24 +2001,24 @@ gboolean parole_media_list_add_files (ParoleMediaList *list, gchar **filenames,
for ( i = 0; filenames && filenames[i] != NULL; i++)
{
- /*
- * File on disk?
- */
- if ( !enqueue && g_file_test (filenames[i], G_FILE_TEST_EXISTS ) )
- {
- added += parole_media_list_add_by_path (list, filenames[i], i == 0 ? TRUE : FALSE);
- }
- else
- {
- ParoleFile *file;
- TRACE ("File=%s", filenames[i]);
- file = parole_file_new (filenames[i]);
- if (enqueue) {
- parole_media_list_add (list, file, FALSE, FALSE, FALSE);}
- else
- parole_media_list_add (list, file, FALSE, i == 0 ? TRUE : FALSE, i == 0 ? TRUE : FALSE);
- added++;
- }
+ /*
+ * File on disk?
+ */
+ if ( !enqueue && g_file_test (filenames[i], G_FILE_TEST_EXISTS ) )
+ {
+ added += parole_media_list_add_by_path (list, filenames[i], i == 0 ? TRUE : FALSE);
+ }
+ else
+ {
+ ParoleFile *file;
+ TRACE ("File=%s", filenames[i]);
+ file = parole_file_new (filenames[i]);
+ if (enqueue) {
+ parole_media_list_add (list, file, FALSE, FALSE, FALSE);}
+ else
+ parole_media_list_add (list, file, FALSE, i == 0 ? TRUE : FALSE, i == 0 ? TRUE : FALSE);
+ added++;
+ }
}
return added > 0;
@@ -2224,35 +2029,41 @@ void parole_media_list_save_list (ParoleMediaList *list)
gboolean save;
g_object_get (G_OBJECT (list->priv->conf),
- "remember-playlist", &save,
- NULL);
+ "remember-playlist", &save,
+ NULL);
if ( save )
{
- GSList *fileslist;
- gchar *history;
-
- history = xfce_resource_save_location (XFCE_RESOURCE_DATA, PAROLE_AUTO_SAVED_PLAYLIST , TRUE);
-
- if ( !history )
- {
- g_warning ("Failed to save playlist");
- return;
- }
-
- fileslist = parole_media_list_get_files (list);
- if ( g_slist_length (fileslist) > 0 )
- {
- parole_pl_parser_save_from_files (fileslist, history, PAROLE_PL_FORMAT_M3U);
- g_slist_foreach (fileslist, (GFunc) g_object_unref, NULL);
- }
- g_slist_free (fileslist);
+ GSList *fileslist;
+ gchar *history;
+
+ history = xfce_resource_save_location (XFCE_RESOURCE_DATA, PAROLE_AUTO_SAVED_PLAYLIST , TRUE);
+
+ if ( !history )
+ {
+ g_warning ("Failed to save playlist");
+ return;
+ }
+
+ fileslist = parole_media_list_get_files (list);
+ if ( g_slist_length (fileslist) > 0 )
+ {
+ parole_pl_parser_save_from_files (fileslist, history, PAROLE_PL_FORMAT_M3U);
+ g_slist_foreach (fileslist, (GFunc) g_object_unref, NULL);
+ }
+ else
+ {
+ // If the playlist is empty, delete the list.
+ remove(history);
+ g_free(history);
+ }
+ g_slist_free (fileslist);
}
}
-static gboolean parole_media_list_dbus_add_files (ParoleMediaList *list,
- gchar **in_files, gboolean enqueue,
- GError **error);
+static gboolean parole_media_list_dbus_add_files (ParoleMediaList *list,
+ gchar **in_files, gboolean enqueue,
+ GError **error);
#include "org.parole.media.list.h"
@@ -2263,20 +2074,20 @@ static void
parole_media_list_dbus_class_init (ParoleMediaListClass *klass)
{
dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass),
- &dbus_glib_parole_media_list_object_info);
+ &dbus_glib_parole_media_list_object_info);
}
static void
parole_media_list_dbus_init (ParoleMediaList *list)
{
dbus_g_connection_register_g_object (list->priv->bus,
- PAROLE_DBUS_PLAYLIST_PATH,
- G_OBJECT (list));
+ PAROLE_DBUS_PLAYLIST_PATH,
+ G_OBJECT (list));
}
-static gboolean parole_media_list_dbus_add_files (ParoleMediaList *list,
- gchar **in_files, gboolean enqueue,
- GError **error)
+static gboolean parole_media_list_dbus_add_files (ParoleMediaList *list,
+ gchar **in_files, gboolean enqueue,
+ GError **error)
{
TRACE ("Adding files for DBus request");
gtk_window_present (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (list))));
@@ -2287,34 +2098,18 @@ static gboolean parole_media_list_dbus_add_files (ParoleMediaList *list,
void parole_media_list_grab_focus (ParoleMediaList *list)
{
- if (GTK_WIDGET_VISIBLE (list->priv->view) )
- gtk_widget_grab_focus (list->priv->view);
+ if (gtk_widget_get_visible (list->priv->view) )
+ gtk_widget_grab_focus (list->priv->view);
}
-void
-parole_media_list_set_repeat_toggled (ParoleMediaList *list,
- gboolean repeat_toggled)
+void parole_media_list_connect_repeat_action (ParoleMediaList *list, GtkAction *action)
{
- gboolean toggled;
-
- toggled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (list->priv->repeat_button));
-
- if (toggled != repeat_toggled)
- {
- gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON (list->priv->repeat_button), repeat_toggled );
- }
+ gtk_activatable_set_use_action_appearance(GTK_ACTIVATABLE(list->priv->repeat_button), TRUE);
+ gtk_activatable_set_related_action(GTK_ACTIVATABLE(list->priv->repeat_button), action);
}
-
-void
-parole_media_list_set_shuffle_toggled (ParoleMediaList *list,
- gboolean shuffle_toggled)
+
+void parole_media_list_connect_shuffle_action (ParoleMediaList *list, GtkAction *action)
{
- gboolean toggled;
-
- toggled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (list->priv->shuffle_button));
-
- if (toggled != shuffle_toggled)
- {
- gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON (list->priv->shuffle_button), shuffle_toggled );
- }
+ gtk_activatable_set_use_action_appearance(GTK_ACTIVATABLE(list->priv->shuffle_button), TRUE);
+ gtk_activatable_set_related_action(GTK_ACTIVATABLE(list->priv->shuffle_button), action);
}
diff --git a/src/parole-medialist.h b/src/parole-medialist.h
index 65412f9..649d4f6 100644
--- a/src/parole-medialist.h
+++ b/src/parole-medialist.h
@@ -51,118 +51,142 @@ typedef struct ParoleMediaListPrivate ParoleMediaListPrivate;
typedef struct
{
- GtkVBox parent;
+ GtkVBox parent;
- ParoleMediaListPrivate *priv;
+ ParoleMediaListPrivate *priv;
} ParoleMediaList;
typedef struct
{
- GtkVBoxClass parent_class;
+ GtkVBoxClass parent_class;
- void (*media_activated) (ParoleMediaList *list,
- GtkTreeRowReference *row);
-
- void (*media_cursor_changed) (ParoleMediaList *list,
- gboolean media_selected);
-
- void (*uri_opened) (ParoleMediaList *list,
- const gchar *uri);
-
- void (*shuffle_toggled) (ParoleMediaList *list,
- gboolean shuffle_toggled);
-
- void (*repeat_toggled) (ParoleMediaList *list,
- gboolean repeat_toggled);
-
- void (*show_playlist) (ParoleMediaList *list,
- gboolean show_playlist);
-
- void (*gst_dvd_nav_message) (ParoleMediaList *list,
- gint gst_dvd_nav_message);
+ void (*media_activated) (ParoleMediaList *list,
+ GtkTreeRowReference *row);
+
+ void (*media_cursor_changed) (ParoleMediaList *list,
+ gboolean media_selected);
+
+ void (*uri_opened) (ParoleMediaList *list,
+ const gchar *uri);
+
+ void (*show_playlist) (ParoleMediaList *list,
+ gboolean show_playlist);
+
+ void (*gst_dvd_nav_message) (ParoleMediaList *list,
+ gint gst_dvd_nav_message);
+
+ void (*iso_opened) (ParoleMediaList *list,
+ const gchar *filename);
+
+ void (*dvd_chapter_count) (ParoleMediaList *list,
+ gint chapter_count);
} ParoleMediaListClass;
-GType parole_media_list_get_type (void) G_GNUC_CONST;
+GType parole_media_list_get_type (void) G_GNUC_CONST;
-GtkWidget *parole_media_list_get (void);
+GtkWidget *parole_media_list_get (void);
-void parole_media_list_load (ParoleMediaList *list);
+void parole_media_list_load (ParoleMediaList *list);
-void parole_media_list_set_playlist_view(ParoleMediaList *list, gint view);
+void
+parole_media_list_set_playlist_view (ParoleMediaList *list,
+ gint view);
-void parole_media_list_clear_disc_list (ParoleMediaList *list);
+void
+parole_media_list_clear_disc_list (ParoleMediaList *list);
-void parole_media_list_clear_list (ParoleMediaList *list);
+void parole_media_list_clear_list (ParoleMediaList *list);
+gboolean parole_media_list_add_by_path (ParoleMediaList *list,
+ const gchar *path,
+ gboolean emit);
-gboolean parole_media_list_add_by_path (ParoleMediaList *list,
- const gchar *path,
- gboolean emit);
+gboolean
+parole_media_list_is_selected_row (ParoleMediaList *list);
-gboolean parole_media_list_is_selected_row (ParoleMediaList *list);
+gboolean parole_media_list_is_empty (ParoleMediaList *list);
-gboolean parole_media_list_is_empty (ParoleMediaList *list);
+gint
+parole_media_list_get_playlist_count (ParoleMediaList *list);
-GtkTreeRowReference *parole_media_list_get_first_row (ParoleMediaList *list);
+GtkTreeRowReference
+*parole_media_list_get_first_row (ParoleMediaList *list);
-GtkTreeRowReference *parole_media_list_get_selected_row (ParoleMediaList *list);
+GtkTreeRowReference
+*parole_media_list_get_selected_row (ParoleMediaList *list);
-ParoleFile *parole_media_list_get_selected_file (ParoleMediaList *list);
+ParoleFile
+*parole_media_list_get_selected_file (ParoleMediaList *list);
-void parole_media_list_select_row (ParoleMediaList *list,
- GtkTreeRowReference *row);
+void parole_media_list_select_row (ParoleMediaList *list,
+ GtkTreeRowReference *row);
-GtkTreeRowReference *parole_media_list_get_next_row (ParoleMediaList *list,
- GtkTreeRowReference *row,
- gboolean repeat);
+GtkTreeRowReference
+*parole_media_list_get_next_row (ParoleMediaList *list,
+ GtkTreeRowReference *row,
+ gboolean repeat);
-GtkTreeRowReference *parole_media_list_get_prev_row (ParoleMediaList *list,
- GtkTreeRowReference *row);
+GtkTreeRowReference
+*parole_media_list_get_prev_row (ParoleMediaList *list,
+ GtkTreeRowReference *row);
-GtkTreeRowReference *parole_media_list_get_row_random (ParoleMediaList *list);
+GtkTreeRowReference
+*parole_media_list_get_row_random (ParoleMediaList *list);
-void parole_media_list_set_row_pixbuf (ParoleMediaList *list,
- GtkTreeRowReference *row,
- GdkPixbuf *pix);
-
-gchar *parole_media_list_get_row_name (ParoleMediaList *list,
-GtkTreeRowReference *row);
+void
+parole_media_list_set_row_pixbuf (ParoleMediaList *list,
+ GtkTreeRowReference *row,
+ GdkPixbuf *pix);
+
+gchar *parole_media_list_get_row_name (ParoleMediaList *list,
+ GtkTreeRowReference *row);
-void parole_media_list_set_row_name (ParoleMediaList *list,
- GtkTreeRowReference *row,
- const gchar *name);
+void parole_media_list_set_row_name (ParoleMediaList *list,
+ GtkTreeRowReference *row,
+ const gchar *name);
+void
+parole_media_list_set_row_length (ParoleMediaList *list,
+ GtkTreeRowReference *row,
+ const gchar *length);
-void parole_media_list_set_row_length (ParoleMediaList *list,
- GtkTreeRowReference *row,
- const gchar *length);
+void parole_media_list_open (ParoleMediaList *list);
-void parole_media_list_open (ParoleMediaList *list);
+void parole_media_list_open_location (ParoleMediaList *list);
-void parole_media_list_open_location (ParoleMediaList *list);
+gboolean parole_media_list_add_files (ParoleMediaList *list,
+ gchar **filenames,
+ gboolean enqueue);
+
+void
+parole_media_list_add_cdda_tracks (ParoleMediaList *list,
+ gint n_tracks);
-gboolean parole_media_list_add_files (ParoleMediaList *list,
- gchar **filenames, gboolean enqueue);
-
-void parole_media_list_add_cdda_tracks (ParoleMediaList *list, gint n_tracks);
+void
+parole_media_list_add_dvd_chapters (ParoleMediaList *list,
+ gint n_chapters);
-void parole_media_list_add_dvd_chapters (ParoleMediaList *list, gint n_chapters);
+GtkTreeRowReference
+*parole_media_list_get_row_n (ParoleMediaList *list,
+ gint wanted_row);
-GtkTreeRowReference *parole_media_list_get_row_n (ParoleMediaList *list,
- gint wanted_row);
+void parole_media_list_save_list (ParoleMediaList *list);
-void parole_media_list_save_list (ParoleMediaList *list);
+void parole_media_list_save_cb (GtkWidget *widget,
+ ParoleMediaList *list);
-void parole_media_list_grab_focus (ParoleMediaList *list);
-
-void parole_media_list_set_repeat_toggled (ParoleMediaList *list,
- gboolean repeat_toggled);
-
-void parole_media_list_set_shuffle_toggled (ParoleMediaList *list,
- gboolean shuffle_toggled);
-
+void parole_media_list_grab_focus (ParoleMediaList *list);
+
+void
+parole_media_list_connect_repeat_action (ParoleMediaList *list,
+ GtkAction *action);
+
+void
+parole_media_list_connect_shuffle_action (ParoleMediaList *list,
+ GtkAction *action);
+
void parole_media_list_add_dvd (ParoleMediaList *list, gchar *dvd_name);
diff --git a/src/parole-module.c b/src/parole-module.c
index b406f1f..8a42cc2 100644
--- a/src/parole-module.c
+++ b/src/parole-module.c
@@ -33,10 +33,10 @@
#include "parole-module.h"
-static void parole_provider_module_plugin_init (ParoleProviderPluginIface *iface);
+static void parole_provider_module_plugin_init (ParoleProviderPluginIface *iface);
static void parole_provider_module_class_init (ParoleProviderModuleClass *klass);
-static void parole_provider_module_init (ParoleProviderModule *module);
+static void parole_provider_module_init (ParoleProviderModule *module);
GType
parole_provider_module_get_type (void)
@@ -45,29 +45,29 @@ parole_provider_module_get_type (void)
if (G_UNLIKELY (type == G_TYPE_INVALID))
{
- static const GTypeInfo info =
- {
- sizeof (ParoleProviderModuleClass),
- NULL,
- NULL,
- (GClassInitFunc) parole_provider_module_class_init,
- NULL,
- NULL,
- sizeof (ParoleProviderModule),
- 0,
- (GInstanceInitFunc) parole_provider_module_init,
- NULL,
- };
-
- static const GInterfaceInfo plugin_info =
- {
- (GInterfaceInitFunc) parole_provider_module_plugin_init,
- NULL,
- NULL,
- };
-
- type = g_type_register_static (G_TYPE_TYPE_MODULE, "ParoleProviderModule", &info, 0);
- g_type_add_interface_static (type, PAROLE_TYPE_PROVIDER_PLUGIN, &plugin_info);
+ static const GTypeInfo info =
+ {
+ sizeof (ParoleProviderModuleClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) parole_provider_module_class_init,
+ NULL,
+ NULL,
+ sizeof (ParoleProviderModule),
+ 0,
+ (GInstanceInitFunc) parole_provider_module_init,
+ NULL,
+ };
+
+ static const GInterfaceInfo plugin_info =
+ {
+ (GInterfaceInitFunc) parole_provider_module_plugin_init,
+ NULL,
+ NULL,
+ };
+
+ type = g_type_register_static (G_TYPE_TYPE_MODULE, "ParoleProviderModule", &info, 0);
+ g_type_add_interface_static (type, PAROLE_TYPE_PROVIDER_PLUGIN, &plugin_info);
}
return type;
@@ -84,16 +84,16 @@ parole_module_load (GTypeModule *gtype_module)
if ( G_UNLIKELY (module->library == NULL) )
{
- g_critical ("Failed to load plugin : %s", g_module_error ());
- return FALSE;
+ g_critical ("Failed to load plugin : %s", g_module_error ());
+ return FALSE;
}
if ( !g_module_symbol (module->library, "parole_plugin_initialize", (gpointer) &module->initialize) ||
!g_module_symbol (module->library, "parole_plugin_shutdown", (gpointer) &module->shutdown))
{
- g_critical ("Plugin %s missing required symbols", gtype_module->name);
- g_module_close (module->library);
- return FALSE;
+ g_critical ("Plugin %s missing required symbols", gtype_module->name);
+ g_module_close (module->library);
+ return FALSE;
}
TRACE ("Loading module %s", gtype_module->name);
@@ -101,6 +101,8 @@ parole_module_load (GTypeModule *gtype_module)
module->provider_type = (*module->initialize) (module);
module->active = TRUE;
+ TRACE ("Finished loading module %s", gtype_module->name);
+
return TRUE;
}
@@ -143,8 +145,8 @@ parole_provider_module_get_is_configurable (ParoleProviderPlugin *plugin)
module = PAROLE_PROVIDER_MODULE (plugin);
if ( module->instance )
- return parole_provider_plugin_get_is_configurable (module->instance);
-
+ return parole_provider_plugin_get_is_configurable (module->instance);
+
return FALSE;
}
@@ -156,7 +158,7 @@ parole_provider_module_configure (ParoleProviderPlugin *plugin, GtkWidget *paren
module = PAROLE_PROVIDER_MODULE (plugin);
if ( module->instance )
- parole_provider_plugin_configure (module->instance, parent);
+ parole_provider_plugin_configure (module->instance, parent);
}
static void
@@ -191,27 +193,36 @@ parole_provider_module_new (const gchar *filename, const gchar *desktop_file)
module->desktop_file = g_strdup (desktop_file);
g_object_set_data_full (G_OBJECT (module), "desktop-file",
- module->desktop_file, (GDestroyNotify) g_free);
+ module->desktop_file, (GDestroyNotify) g_free);
return module;
}
-
-void parole_provider_module_new_plugin (ParoleProviderModule *module)
+/**
+ * parole_provider_module_new_plugin:
+ * @module : The #ParoleProviderModule that is being initialized.
+ *
+ * Initialize the #ParoleProviderModule plugin. Return #TRUE if successful.
+ **/
+gboolean parole_provider_module_new_plugin (ParoleProviderModule *module)
{
TRACE ("start");
- g_return_if_fail (PAROLE_IS_PROVIDER_MODULE (module));
+ g_return_val_if_fail (PAROLE_IS_PROVIDER_MODULE (module), FALSE);
#ifdef debug
- g_return_if_fail (module->active == TRUE);
- g_return_if_fail (module->instance == NULL);
- g_return_if_fail (module->player == NULL);
+ g_return_val_if_fail (module->active == TRUE, FALSE);
+ g_return_val_if_fail (module->instance == NULL, FALSE);
+ g_return_val_if_fail (module->player == NULL, FALSE);
#endif
module->instance = g_object_new (module->provider_type, NULL);
+ g_return_val_if_fail (PAROLE_IS_PROVIDER_PLUGIN (PAROLE_PROVIDER_PLUGIN (module->instance)), FALSE);
+
module->player = parole_plugin_player_new ();
parole_provider_plugin_set_player (PAROLE_PROVIDER_PLUGIN (module->instance), PAROLE_PROVIDER_PLAYER (module->player));
+
+ return TRUE;
}
void parole_provider_module_free_plugin (ParoleProviderModule *module)
@@ -222,14 +233,14 @@ void parole_provider_module_free_plugin (ParoleProviderModule *module)
if ( module->instance )
{
- g_object_unref (module->instance);
- module->instance = NULL;
+ g_object_unref (module->instance);
+ module->instance = NULL;
}
if ( module->player )
{
- g_object_unref (module->player);
- module->player = NULL;
+ g_object_unref (module->player);
+ module->player = NULL;
}
}
diff --git a/src/parole-module.h b/src/parole-module.h
index 8250bf9..405e6a3 100644
--- a/src/parole-module.h
+++ b/src/parole-module.h
@@ -30,48 +30,48 @@
G_BEGIN_DECLS
-#define PAROLE_TYPE_PROVIDER_MODULE (parole_provider_module_get_type () )
-#define PAROLE_PROVIDER_MODULE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PAROLE_TYPE_PROVIDER_MODULE, ParoleProviderModule))
-#define PAROLE_PROVIDER_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAROLE_TYPE_PROVIDER_MODULE, ParoleProviderModuleClass))
-#define PAROLE_IS_PROVIDER_MODULE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PAROLE_TYPE_PROVIDER_MODULE))
+#define PAROLE_TYPE_PROVIDER_MODULE (parole_provider_module_get_type () )
+#define PAROLE_PROVIDER_MODULE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PAROLE_TYPE_PROVIDER_MODULE, ParoleProviderModule))
+#define PAROLE_PROVIDER_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAROLE_TYPE_PROVIDER_MODULE, ParoleProviderModuleClass))
+#define PAROLE_IS_PROVIDER_MODULE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PAROLE_TYPE_PROVIDER_MODULE))
#define PAROLE_IS_PROVIDER_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAROLE_TYPE_PROVIDER_MODULE))
-#define PAROLE_PROVIDER_MODULE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), PAROLE_TYPE_PROVIDER_MODULE, ParoleProviderModuleClass))
+#define PAROLE_PROVIDER_MODULE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), PAROLE_TYPE_PROVIDER_MODULE, ParoleProviderModuleClass))
typedef struct _ParoleProviderModuleClass ParoleProviderModuleClass;
typedef struct _ParoleProviderModule ParoleProviderModule;
struct _ParoleProviderModule
{
- GTypeModule parent;
+ GTypeModule parent;
- GModule *library;
- ParolePluginPlayer *player;
+ GModule *library;
+ ParolePluginPlayer *player;
- GType (*initialize) (ParoleProviderModule *module);
+ GType (*initialize) (ParoleProviderModule *module);
- void (*shutdown) (void);
+ void (*shutdown) (void);
- GType provider_type;
- gboolean active;
- gpointer instance;
- gchar *desktop_file;
+ GType provider_type;
+ gboolean active;
+ gpointer instance;
+ gchar *desktop_file;
};
struct _ParoleProviderModuleClass
{
- GTypeModuleClass parent_class;
+ GTypeModuleClass parent_class;
} ;
-GType parole_provider_module_get_type (void) G_GNUC_CONST;
+GType parole_provider_module_get_type (void) G_GNUC_CONST;
-ParoleProviderModule *parole_provider_module_new (const gchar *filename,
- const gchar *desktop_file);
+ParoleProviderModule *parole_provider_module_new (const gchar *filename,
+ const gchar *desktop_file);
-void parole_provider_module_new_plugin (ParoleProviderModule *module);
+gboolean parole_provider_module_new_plugin (ParoleProviderModule *module);
-void parole_provider_module_free_plugin (ParoleProviderModule *module);
+void parole_provider_module_free_plugin (ParoleProviderModule *module);
-gboolean parole_provider_module_get_is_active (ParoleProviderModule *module);
+gboolean parole_provider_module_get_is_active (ParoleProviderModule *module);
G_END_DECLS
diff --git a/src/parole-open-location.c b/src/parole-open-location.c
index a908a66..4692899 100644
--- a/src/parole-open-location.c
+++ b/src/parole-open-location.c
@@ -40,18 +40,17 @@ static void parole_open_location_finalize (GObject *object);
struct ParoleOpenLocation
{
- GObject parent;
+ GObject parent;
-
- GtkWidget *entry;
+ GtkWidget *entry;
};
struct ParoleOpenLocationClass
{
- GObjectClass parent_class;
+ GObjectClass parent_class;
- void (*location_opened) (ParoleOpenLocation *self,
- const gchar *address);
+ void (*location_opened) (ParoleOpenLocation *self,
+ const gchar *address);
};
enum
@@ -81,19 +80,19 @@ parole_open_location_response_cb (GtkDialog *dialog, gint response_id, ParoleOpe
if ( response_id == GTK_RESPONSE_OK )
{
- location = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT(self->entry));
-
- if ( !location || strlen (location) == 0)
- goto out;
+ location = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT(self->entry));
+
+ if ( !location || strlen (location) == 0)
+ goto out;
- TRACE ("Location %s", location);
+ TRACE ("Location %s", location);
- gtk_widget_hide (GTK_WIDGET (dialog));
- g_signal_emit (G_OBJECT (self), signals [LOCATION_OPENED], 0, location);
+ gtk_widget_hide (GTK_WIDGET (dialog));
+ g_signal_emit (G_OBJECT (self), signals [LOCATION_OPENED], 0, location);
}
- out:
- gtk_widget_destroy (GTK_WIDGET (dialog));
+out:
+ gtk_widget_destroy (GTK_WIDGET (dialog));
}
/* Populate the history-popup */
@@ -105,24 +104,24 @@ parole_open_location_get_completion_model (void)
gchar **lines = NULL;
guint i;
- store = gtk_list_store_new (N_COLS, GTK_TYPE_STRING);
+ store = gtk_list_store_new (N_COLS, G_TYPE_STRING);
lines = parole_get_history ();
if ( lines )
{
- for ( i = 0; lines[i]; i++)
- {
- if ( g_strcmp0(lines[i], "") != 0 )
- {
- gtk_list_store_append (store, &iter);
- gtk_list_store_set (store, &iter,
- COL_ADDRESS, lines [i],
- -1);
+ for ( i = 0; lines[i]; i++)
+ {
+ if ( g_strcmp0(lines[i], "") != 0 )
+ {
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ COL_ADDRESS, lines [i],
+ -1);
+ }
}
- }
-
- g_strfreev (lines);
+
+ g_strfreev (lines);
}
return GTK_TREE_MODEL (store);
}
@@ -178,8 +177,8 @@ ParoleOpenLocation *parole_open_location (GtkWidget *parent)
dialog = GTK_WIDGET (gtk_builder_get_object (builder, "open-location"));
if ( parent )
- gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
-
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
+
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ON_PARENT);
self->entry = GTK_WIDGET (gtk_builder_get_object (builder, "entry"));
@@ -190,14 +189,14 @@ ParoleOpenLocation *parole_open_location (GtkWidget *parent)
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
g_signal_connect_swapped (gtk_builder_get_object (builder, "clear-history"), "clicked",
- G_CALLBACK (parole_open_location_clear_history), model);
+ G_CALLBACK (parole_open_location_clear_history), model);
gtk_widget_set_tooltip_text (GTK_WIDGET (gtk_builder_get_object (builder, "clear-history")), _("Clear History"));
g_signal_connect (dialog, "delete-event",
- G_CALLBACK (gtk_widget_destroy), NULL);
-
+ G_CALLBACK (gtk_widget_destroy), NULL);
+
g_signal_connect (dialog, "response",
- G_CALLBACK (parole_open_location_response_cb), self);
+ G_CALLBACK (parole_open_location_response_cb), self);
gtk_widget_show_all (dialog);
g_object_unref (builder);
diff --git a/src/parole-open-location.h b/src/parole-open-location.h
index 8ad1603..cf7fbed 100644
--- a/src/parole-open-location.h
+++ b/src/parole-open-location.h
@@ -28,16 +28,16 @@
G_BEGIN_DECLS
-#define PAROLE_TYPE_OPEN_LOCATION (parole_open_location_get_type () )
-#define PAROLE_OPEN_LOCATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PAROLE_TYPE_OPEN_LOCATION, ParoleOpenLocation))
-#define PAROLE_IS_OPEN_LOCATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PAROLE_TYPE_OPEN_LOCATION))
+#define PAROLE_TYPE_OPEN_LOCATION (parole_open_location_get_type () )
+#define PAROLE_OPEN_LOCATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PAROLE_TYPE_OPEN_LOCATION, ParoleOpenLocation))
+#define PAROLE_IS_OPEN_LOCATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PAROLE_TYPE_OPEN_LOCATION))
-typedef struct ParoleOpenLocation ParoleOpenLocation;
-typedef struct ParoleOpenLocationClass ParoleOpenLocationClass;
+typedef struct ParoleOpenLocation ParoleOpenLocation;
+typedef struct ParoleOpenLocationClass ParoleOpenLocationClass;
-GType parole_open_location_get_type (void) G_GNUC_CONST;
+GType parole_open_location_get_type (void) G_GNUC_CONST;
-ParoleOpenLocation *parole_open_location (GtkWidget *parent);
+ParoleOpenLocation *parole_open_location (GtkWidget *parent);
G_END_DECLS
diff --git a/src/parole-player.c b/src/parole-player.c
index bbd8e8e..5bb2c8e 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -72,14 +72,12 @@
#include "common/parole-common.h"
-#define RC_STYLE \
- "include \"" GTKRC_DIR "/parole.gtkrc\""
-
-#define RC_STYLE_FILE \
- GTKRC_DIR "/parole.gtkrc"
-
int GTK_ICON_SIZE_ARTWORK_FALLBACK;
+GtkAction *playpause_action;
+GtkAction *previous_action;
+GtkAction *next_action;
+
static void
get_time_string (gchar *timestring, gint total_seconds)
{
@@ -94,187 +92,234 @@ get_time_string (gchar *timestring, gint total_seconds)
if ( hours == 0 )
{
- g_snprintf (timestring, 128, "%02i:%02i", minutes, seconds);
+ g_snprintf (timestring, 128, "%02i:%02i", minutes, seconds);
}
else
{
- g_snprintf (timestring, 128, "%i:%02i:%02i", hours, minutes, seconds);
+ g_snprintf (timestring, 128, "%i:%02i:%02i", hours, minutes, seconds);
}
}
/*
* DBus Glib init
*/
-static void parole_player_dbus_class_init (ParolePlayerClass *klass);
-static void parole_player_dbus_init (ParolePlayer *player);
+static void parole_player_dbus_class_init (ParolePlayerClass *klass);
+static void parole_player_dbus_init (ParolePlayer *player);
-static void parole_player_disc_selected_cb (ParoleDisc *disc,
- const gchar *uri,
- const gchar *device,
- ParolePlayer *player);
-
+static void parole_player_disc_selected_cb (ParoleDisc *disc,
+ const gchar *uri,
+ const gchar *device,
+ ParolePlayer *player);
-static void parole_player_select_custom_subtitle (GtkMenuItem *widget, gpointer data);
-
-static gboolean parole_audiobox_expose_event (GtkWidget *w, GdkEventExpose *ev, ParolePlayer *player);
+static void parole_player_select_custom_subtitle (GtkMenuItem *widget, gpointer data);
+
+static gboolean parole_overlay_expose_event (GtkWidget *widget, cairo_t *cr, gpointer user_data);
+
+static gboolean parole_audiobox_expose_event (GtkWidget *w, GdkEventExpose *ev, ParolePlayer *player);
/*
* GtkBuilder Callbacks
*/
-gboolean parole_player_configure_event_cb (GtkWidget *widget,
- GdkEventConfigure *ev,
- ParolePlayer *player);
-
-gboolean parole_player_range_button_press (GtkWidget *widget,
- GdkEventButton *ev,
- ParolePlayer *player);
-
-gboolean parole_player_range_button_release (GtkWidget *widget,
- GdkEventButton *ev,
- ParolePlayer *player);
-
-void parole_player_range_value_changed (GtkRange *range,
- ParolePlayer *player);
-
-void parole_player_play_pause_clicked (GtkButton *button,
- ParolePlayer *player);
-
-void parole_player_stop_clicked (GtkButton *button,
- ParolePlayer *player);
-
-void parole_player_forward_cb (GtkButton *button,
- ParolePlayer *player);
-
-void parole_player_back_cb (GtkButton *button,
- ParolePlayer *player);
-
-void parole_player_seekf_cb (GtkWidget *widget, ParolePlayer *player, gdouble seek);
-
-void parole_player_seekb_cb (GtkWidget *widget, ParolePlayer *player, gdouble seek);
-
-gboolean parole_player_window_state_event (GtkWidget *widget,
- GdkEventWindowState *event,
- ParolePlayer *player);
-
-void parole_player_leave_fs_cb (GtkButton *button,
- ParolePlayer *player);
-
-void parole_player_destroy_cb (GtkObject *window,
- ParolePlayer *player);
-
-gboolean parole_player_delete_event_cb (GtkWidget *widget,
- GdkEvent *ev,
- ParolePlayer *player);
-
-void parole_player_show_hide_playlist (GtkWidget *widget,
- ParolePlayer *player);
-
-void parole_player_reset_controls (ParolePlayer *player, gboolean fullscreen);
+void on_content_area_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation,
+ ParolePlayer *player);
+
+
+gboolean parole_player_configure_event_cb (GtkWidget *widget,
+ GdkEventConfigure *ev,
+ ParolePlayer *player);
+
+gboolean parole_player_range_button_press (GtkWidget *widget,
+ GdkEventButton *ev,
+ ParolePlayer *player);
+
+gboolean parole_player_range_button_release (GtkWidget *widget,
+ GdkEventButton *ev,
+ ParolePlayer *player);
+
+void parole_player_range_value_changed (GtkRange *range,
+ ParolePlayer *player);
+
+void parole_player_playpause_action_cb (GtkAction *action,
+ ParolePlayer *player);
+
+void parole_player_pause_clicked (GtkButton *button,
+ ParolePlayer *player);
+
+void parole_player_next_action_cb (GtkAction *action,
+ ParolePlayer *player);
+
+void parole_player_previous_action_cb (GtkAction *action,
+ ParolePlayer *player);
+
+void parole_player_toggle_playlist_action_cb (GtkAction *action,
+ ParolePlayer *player);
+
+void parole_player_fullscreen_action_cb (GtkAction *action,
+ ParolePlayer *player);
+
+void parole_player_seekf_cb (GtkWidget *widget,
+ ParolePlayer *player,
+ gdouble seek);
+
+void parole_player_seekb_cb (GtkWidget *widget,
+ ParolePlayer *player,
+ gdouble seek);
+
+gboolean parole_player_window_state_event (GtkWidget *widget,
+ GdkEventWindowState *event,
+ ParolePlayer *player);
+
+void parole_player_destroy_cb (GObject *window,
+ ParolePlayer *player);
+
+gboolean parole_player_delete_event_cb (GtkWidget *widget,
+ GdkEvent *ev,
+ ParolePlayer *player);
+
+void parole_player_reset_controls (ParolePlayer *player,
+ gboolean fullscreen);
/*Menu items callbacks*/
-void parole_player_menu_open_location_cb (GtkWidget *widget,
- ParolePlayer *player);
-
-void parole_player_menu_add_cb (GtkWidget *widget,
- ParolePlayer *player);
+void parole_player_menu_open_location_cb (GtkWidget *widget,
+ ParolePlayer *player);
-void parole_player_menu_exit_cb (GtkWidget *widget,
- ParolePlayer *player);
+void parole_player_menu_add_cb (GtkWidget *widget,
+ ParolePlayer *player);
+
+void parole_player_media_menu_select_cb (GtkMenuItem *widget,
+ ParolePlayer *player);
+
+void parole_player_save_playlist_cb (GtkWidget *widget,
+ ParolePlayer *player);
-void dvd_iso_mi_activated_cb (GtkWidget *widget,
- ParolePlayer *player);
+void parole_player_menu_exit_cb (GtkWidget *widget,
+ ParolePlayer *player);
-void cd_iso_mi_activated_cb (GtkWidget *widget,
- ParolePlayer *player);
+void parole_player_volume_up (GtkWidget *widget,
+ ParolePlayer *player);
-void parole_player_volume_up (GtkWidget *widget,
- ParolePlayer *player);
+void parole_player_volume_down (GtkWidget *widget,
+ ParolePlayer *player);
-void parole_player_volume_down (GtkWidget *widget,
- ParolePlayer *player);
+void parole_player_volume_mute (GtkWidget *widget,
+ ParolePlayer *player);
-void parole_player_volume_mute (GtkWidget *widget,
- ParolePlayer *player);
+void parole_player_open_preferences_cb (GtkWidget *widget,
+ ParolePlayer *player);
-void parole_player_open_preferences_cb (GtkWidget *widget,
- ParolePlayer *player);
+void parole_player_volume_value_changed_cb (GtkScaleButton *widget,
+ gdouble value,
+ ParolePlayer *player);
-void parole_player_volume_value_changed_cb (GtkScaleButton *widget,
- gdouble value,
- ParolePlayer *player);
+gboolean parole_player_volume_scroll_event_cb (GtkWidget *widget,
+ GdkEventScroll *ev,
+ ParolePlayer *player);
-gboolean parole_player_volume_scroll_event_cb (GtkWidget *widget,
- GdkEventScroll *ev,
- ParolePlayer *player);
+void parole_player_toggle_shuffle_action_cb (GtkToggleAction *action,
+ ParolePlayer *player);
-void parole_player_full_screen_activated_cb (GtkWidget *widget,
- ParolePlayer *player);
+void parole_player_toggle_repeat_action_cb (GtkToggleAction *action,
+ ParolePlayer *player);
+
+static void parole_player_clear_subtitles (ParolePlayer *player);
-void parole_player_shuffle_toggled_cb (GtkWidget *widget,
- ParolePlayer *player);
-
-void parole_player_repeat_toggled_cb (GtkWidget *widget,
- ParolePlayer *player);
-
-static void parole_player_clear_subtitles (ParolePlayer *player);
-
-static void parole_player_clear_audio_tracks (ParolePlayer *player);
+static void parole_player_clear_audio_tracks (ParolePlayer *player);
/*
* Aspect ratio
*/
-void ratio_none_toggled_cb (GtkWidget *widget,
- ParolePlayer *player);
-
-void ratio_auto_toggled_cb (GtkWidget *widget,
- ParolePlayer *player);
-
-void ratio_square_toggled_cb (GtkWidget *widget,
- ParolePlayer *player);
-
-void ratio_4_3_toggled_cb (GtkWidget *widget,
- ParolePlayer *player);
-
-void ratio_16_9_toggled_cb (GtkWidget *widget,
- ParolePlayer *player);
-
-void ratio_20_9_toggled_cb (GtkWidget *widget,
- ParolePlayer *player);
-
-void parole_player_set_playlist_visible (ParolePlayer *player,
- gboolean visibility);
-
-gboolean parole_player_gst_widget_button_press (GtkWidget *widget,
- GdkEventButton *ev, ParolePlayer *player);
-
-void parole_show_about (GtkWidget *widget,
- ParolePlayer *player);
-
-void parole_player_set_audiotrack_radio_menu_item_selected(
- ParolePlayer *player, gint audio_index);
-
-void parole_player_set_subtitle_radio_menu_item_selected(
- ParolePlayer *player, gint sub_index);
-
-void parole_player_combo_box_audiotrack_changed_cb(GtkWidget *widget,
- ParolePlayer *player);
-
-void parole_player_combo_box_subtitles_changed_cb(GtkWidget *widget,
- ParolePlayer *player);
-
-static void parole_player_audiotrack_radio_menu_item_changed_cb(GtkWidget *widget, ParolePlayer *player);
-
-static void parole_player_subtitles_radio_menu_item_changed_cb(GtkWidget *widget, ParolePlayer *player);
-
-static void parole_player_dvd_chapter_count_change_cb (ParoleGst *gst, gint chapter_count, ParolePlayer *player);
-
-static void parole_player_dvd_chapter_change_cb (ParoleGst *gst, gint chapter_count, ParolePlayer *player);
-
-
-gboolean parole_player_key_press (GtkWidget *widget,
- GdkEventKey *ev,
- ParolePlayer *player);
-
+void ratio_none_toggled_cb (GtkWidget *widget,
+ ParolePlayer *player);
+
+void ratio_auto_toggled_cb (GtkWidget *widget,
+ ParolePlayer *player);
+
+void ratio_square_toggled_cb (GtkWidget *widget,
+ ParolePlayer *player);
+
+void ratio_4_3_toggled_cb (GtkWidget *widget,
+ ParolePlayer *player);
+
+void ratio_16_9_toggled_cb (GtkWidget *widget,
+ ParolePlayer *player);
+
+void ratio_20_9_toggled_cb (GtkWidget *widget,
+ ParolePlayer *player);
+
+void parole_player_set_playlist_visible (ParolePlayer *player,
+ gboolean visibility);
+
+gboolean parole_player_gst_widget_button_press (GtkWidget *widget,
+ GdkEventButton *ev,
+ ParolePlayer *player);
+
+gboolean parole_player_gst_widget_button_release (GtkWidget *widget,
+ GdkEventButton *ev,
+ ParolePlayer *player);
+
+gboolean
+parole_player_gst_widget_motion_notify_event (GtkWidget *widget,
+ GdkEventMotion *ev,
+ ParolePlayer *player);
+
+void parole_show_about (GtkWidget *widget,
+ ParolePlayer *player);
+
+void parole_player_set_audiotrack_radio_menu_item_selected(
+ ParolePlayer *player,
+ gint audio_index);
+
+void parole_player_set_subtitle_radio_menu_item_selected(
+ ParolePlayer *player,
+ gint sub_index);
+
+void
+parole_player_combo_box_audiotrack_changed_cb (GtkWidget *widget,
+ ParolePlayer *player);
+
+void
+parole_player_combo_box_subtitles_changed_cb (GtkWidget *widget,
+ ParolePlayer *player);
+
+static void
+parole_player_audiotrack_radio_menu_item_changed_cb (GtkWidget *widget,
+ ParolePlayer *player);
+
+static void
+parole_player_subtitles_radio_menu_item_changed_cb (GtkWidget *widget,
+ ParolePlayer *player);
+
+static void
+parole_player_dvd_chapter_count_change_cb (ParoleGst *gst,
+ gint chapter_count,
+ ParolePlayer *player);
+
+static void parole_player_dvd_chapter_change_cb (ParoleGst *gst,
+ gint chapter_count,
+ ParolePlayer *player);
+
+void parole_player_dvd_menu_activated (GtkMenuItem *widget,
+ ParolePlayer *player);
+
+void parole_player_dvd_title_activated (GtkMenuItem *widget,
+ ParolePlayer *player);
+
+void parole_player_dvd_audio_activated (GtkMenuItem *widget,
+ ParolePlayer *player);
+
+void parole_player_dvd_angle_activated (GtkMenuItem *widget,
+ ParolePlayer *player);
+
+void parole_player_dvd_chapter_activated (GtkMenuItem *widget,
+ ParolePlayer *player);
+
+gboolean parole_player_key_press (GtkWidget *widget,
+ GdkEventKey *ev,
+ ParolePlayer *player);
+
+gboolean parole_player_hide_controls (gpointer data);
+
static GtkTargetEntry target_entry[] =
{
{ "STRING", 0, 0 },
@@ -289,96 +334,108 @@ static GtkTargetEntry target_entry[] =
struct ParolePlayerPrivate
{
- DBusGConnection *bus;
- ParoleMediaList *list;
- ParoleDisc *disc;
- ParoleScreenSaver *screen_saver;
- ParoleConf *conf;
-#ifdef HAVE_XF86_KEYSYM
- ParoleButton *button;
-#endif
-
- XfceSMClient *sm_client;
- gchar *client_id;
-
- GtkFileFilter *video_filter;
- GtkRecentManager *recent;
-
- GtkWidget *gst;
- ParoleMediaType current_media_type;
-
- GtkWidget *window;
- GtkWidget *recent_menu;
- GtkWidget *playlist_nt;
- GtkWidget *main_nt; /*Main notebook*/
- GtkWidget *show_hide_playlist;
- GtkWidget *show_hide_playlist_button;
- GtkWidget *show_hide_playlist_image;
- GtkWidget *shuffle_menu_item;
- GtkWidget *repeat_menu_item;
- GtkWidget *play_pause;
- GtkWidget *seekf;
- GtkWidget *seekb;
- GtkWidget *range;
-
- GtkWidget *playcontrol_box;
- GtkWidget *progressbar_buffering;
-
- GtkWidget *label_elapsed;
- GtkWidget *label_duration;
- GtkWidget *fs_window; /* Window for packing control widgets
- * when in full screen mode
- */
- GtkWidget *control; /* contains all play button*/
- GtkWidget *go_fs;
- GtkWidget *leave_fs;
-
- GtkWidget *hbox_infobar;
- GtkWidget *infobar;
- GtkWidget *combobox_audiotrack;
- GtkWidget *combobox_subtitles;
- GtkListStore *liststore_audiotrack;
- GtkListStore *liststore_subtitles;
- GList *audio_list;
- GList *subtitle_list;
- gboolean update_languages;
- gboolean updated_subs;
- GtkWidget *subtitles_group;
- GtkWidget *subtitles_menu_custom;
- GtkWidget *audio_group;
-
- GtkWidget *subtitles_menu;
- GtkWidget *languages_menu;
-
- GtkWidget *main_box;
- GtkWidget *eventbox_output;
-
- GtkWidget *audiobox;
- GtkWidget *audiobox_cover;
- GtkWidget *audiobox_title;
- GtkWidget *audiobox_album;
- GtkWidget *audiobox_artist;
-
- GtkWidget *volume;
- GtkWidget *menu_bar;
- GtkWidget *play_box;
-
- gboolean exit;
-
- gboolean embedded;
- gboolean full_screen;
+ DBusGConnection *bus;
+ ParoleMediaList *list;
+ ParoleDisc *disc;
+ ParoleScreenSaver *screen_saver;
- ParoleState state;
- gboolean user_seeking;
- gboolean internal_range_change;
- gboolean buffering;
-
- gboolean wait_for_gst_disc_info;
+ ParoleConf *conf;
+ ParoleConfDialog *settings_dialog;
+
+ XfceSMClient *sm_client;
+ gchar *client_id;
- gint handle_width;
+#ifdef HAVE_XF86_KEYSYM
+ ParoleButton *button;
+#endif
+ GtkFileFilter *video_filter;
+ GtkRecentManager *recent;
+
+ GtkWidget *window;
+ GtkWidget *playlist_nt;
+ /* Parole Player layouts */
+ gboolean embedded;
+ gboolean full_screen;
+ /* Remembered window sizes */
+ gint last_h, last_w;
+ /* HPaned handle-width for calculating size with playlist */
+ gint handle_width;
+
+ /* Menubar */
+ GtkWidget *menu_bar;
+ GtkWidget *recent_menu;
+ GtkWidget *save_playlist;
+ GtkWidget *dvd_menu;
+ GtkWidget *chapters_menu;
+
+ /* Media Controls */
+ GtkWidget *control;
+ GtkWidget *playpause_button;
+ GtkWidget *playpause_image;
+ GtkWidget *fullscreen_button;
+ GtkWidget *fullscreen_image;
+ GtkWidget *label_elapsed;
+ GtkWidget *label_duration;
+ GtkWidget *range;
+ GtkWidget *progressbar_buffering;
+ GtkWidget *volume;
+ GtkWidget *mute;
+ GtkWidget *showhide_playlist_button;
+
+ /* Infobar */
+ GtkWidget *infobar;
+ /* Audio Track */
+ GtkWidget *combobox_audiotrack;
+ GtkListStore *liststore_audiotrack;
+ GList *audio_list;
+ gboolean update_languages;
+ GtkWidget *audio_group;
+ GtkWidget *languages_menu;
+ /* Subtitle Track */
+ GtkWidget *combobox_subtitles;
+ GtkListStore *liststore_subtitles;
+ GList *subtitle_list;
+ gboolean updated_subs;
+ GtkWidget *subtitles_group;
+ GtkWidget *subtitles_menu_custom;
+ GtkWidget *subtitles_menu;
+
+ /* Output Widgets */
+ GtkWidget *eventbox_output;
+ /* Idle Logo */
+ GtkWidget *logo_image;
+ /* VideoBox (Gst Video Output) Widget */
+ GtkWidget *videobox;
+ /* AudioBox (Artwork, Title, Track, Album) Widgets */
+ GtkWidget *audiobox;
+ GtkWidget *audiobox_cover;
+ GtkWidget *audiobox_title;
+ GtkWidget *audiobox_album;
+ GtkWidget *audiobox_artist;
+
+ /* Current media-list row reference */
GtkTreeRowReference *row;
-
+
+ /* GStreamer */
+ GtkWidget *gst;
+ ParoleMediaType current_media_type;
+ ParoleState state;
+ gboolean user_seeking;
+ gboolean internal_range_change;
+ gboolean buffering;
+ gboolean wait_for_gst_disc_info;
+
+ /* Actions */
+ GtkAction *media_next_action;
+ GtkAction *media_playpause_action;
+ GtkAction *media_previous_action;
+ GtkAction *media_fullscreen_action;
+ GtkToggleAction *toggle_playlist_action;
+ GtkToggleAction *toggle_repeat_action;
+ GtkToggleAction *toggle_shuffle_action;
+
+ gboolean exit;
};
enum
@@ -389,7 +446,7 @@ enum
G_DEFINE_TYPE (ParolePlayer, parole_player, G_TYPE_OBJECT)
-void parole_show_about (GtkWidget *widget, ParolePlayer *player)
+void parole_show_about (GtkWidget *widget, ParolePlayer *player)
{
parole_about (GTK_WINDOW (player->priv->window));
}
@@ -397,48 +454,49 @@ void parole_show_about (GtkWidget *widget, ParolePlayer *player)
void ratio_none_toggled_cb (GtkWidget *widget, ParolePlayer *player)
{
g_object_set (G_OBJECT (player->priv->conf),
- "aspect-ratio", PAROLE_ASPECT_RATIO_NONE,
- NULL);
+ "aspect-ratio", PAROLE_ASPECT_RATIO_NONE,
+ NULL);
}
void ratio_auto_toggled_cb (GtkWidget *widget, ParolePlayer *player)
{
g_object_set (G_OBJECT (player->priv->conf),
- "aspect-ratio", PAROLE_ASPECT_RATIO_AUTO,
- NULL);
+ "aspect-ratio", PAROLE_ASPECT_RATIO_AUTO,
+ NULL);
}
void ratio_square_toggled_cb (GtkWidget *widget, ParolePlayer *player)
{
g_object_set (G_OBJECT (player->priv->conf),
- "aspect-ratio", PAROLE_ASPECT_RATIO_SQUARE,
- NULL);
+ "aspect-ratio", PAROLE_ASPECT_RATIO_SQUARE,
+ NULL);
}
void ratio_4_3_toggled_cb (GtkWidget *widget, ParolePlayer *player)
{
g_object_set (G_OBJECT (player->priv->conf),
- "aspect-ratio", PAROLE_ASPECT_RATIO_4_3,
- NULL);
+ "aspect-ratio", PAROLE_ASPECT_RATIO_4_3,
+ NULL);
}
void ratio_16_9_toggled_cb (GtkWidget *widget, ParolePlayer *player)
{
g_object_set (G_OBJECT (player->priv->conf),
- "aspect-ratio", PAROLE_ASPECT_RATIO_16_9,
- NULL);
+ "aspect-ratio", PAROLE_ASPECT_RATIO_16_9,
+ NULL);
}
void ratio_20_9_toggled_cb (GtkWidget *widget, ParolePlayer *player)
{
g_object_set (G_OBJECT (player->priv->conf),
- "aspect-ratio", PAROLE_ASPECT_RATIO_DVB,
- NULL);
+ "aspect-ratio", PAROLE_ASPECT_RATIO_DVB,
+ NULL);
}
void parole_player_set_playlist_visible (ParolePlayer *player, gboolean visibility)
{
gint window_w, window_h, playlist_w;
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
if (gtk_widget_get_visible (player->priv->playlist_nt) == visibility)
return;
@@ -446,133 +504,47 @@ void parole_player_set_playlist_visible (ParolePlayer *player, gboolean visibili
gtk_window_get_size (GTK_WINDOW (player->priv->window), &window_w, &window_h);
/* Get the playlist width. If we fail to get it, use the default 220. */
- playlist_w = player->priv->playlist_nt->allocation.width;
+ gtk_widget_get_allocation( GTK_WIDGET( player->priv->playlist_nt ), allocation );
+ playlist_w = allocation->width;
if (playlist_w == 1)
playlist_w = 220;
- gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(player->priv->show_hide_playlist), visibility );
+ gtk_toggle_action_set_active( player->priv->toggle_playlist_action, visibility );
if ( visibility )
{
if ( !player->priv->full_screen )
gtk_window_resize(GTK_WINDOW (player->priv->window), window_w+playlist_w+player->priv->handle_width, window_h);
gtk_widget_show (player->priv->playlist_nt);
- gtk_image_set_from_stock( GTK_IMAGE( player->priv->show_hide_playlist_image ), "gtk-go-forward", GTK_ICON_SIZE_LARGE_TOOLBAR );
- gtk_widget_set_tooltip_text( GTK_WIDGET( player->priv->show_hide_playlist_button ), _("Hide playlist") );
- g_object_set (G_OBJECT (player->priv->conf),
- "showhide-playlist", TRUE,
- NULL);
+ gtk_action_set_tooltip( GTK_ACTION( player->priv->toggle_playlist_action ), _("Hide playlist") );
+ gtk_widget_set_tooltip_text (GTK_WIDGET(player->priv->showhide_playlist_button), _("Hide playlist") );
+ g_object_set (G_OBJECT (player->priv->conf),
+ "showhide-playlist", TRUE,
+ NULL);
}
else
{
gtk_widget_hide (player->priv->playlist_nt);
- gtk_image_set_from_stock( GTK_IMAGE( player->priv->show_hide_playlist_image ), "gtk-go-back", GTK_ICON_SIZE_LARGE_TOOLBAR );
- gtk_widget_set_tooltip_text( GTK_WIDGET( player->priv->show_hide_playlist_button ), _("Show playlist") );
- g_object_set (G_OBJECT (player->priv->conf),
- "showhide-playlist", FALSE,
- NULL);
+ gtk_action_set_tooltip( GTK_ACTION( player->priv->toggle_playlist_action ), _("Show playlist") );
+ gtk_widget_set_tooltip_text (GTK_WIDGET(player->priv->showhide_playlist_button), _("Show playlist") );
+ g_object_set (G_OBJECT (player->priv->conf),
+ "showhide-playlist", FALSE,
+ NULL);
if ( !player->priv->full_screen )
gtk_window_resize(GTK_WINDOW (player->priv->window), window_w-playlist_w-player->priv->handle_width, window_h);
}
}
-void parole_player_show_hide_playlist (GtkWidget *widget, ParolePlayer *player)
+void parole_player_toggle_playlist_action_cb (GtkAction *action, ParolePlayer *player)
{
gboolean visible;
- visible = GTK_WIDGET_VISIBLE (player->priv->playlist_nt);
+ visible = gtk_widget_get_visible (player->priv->playlist_nt);
parole_player_set_playlist_visible( player, !visible );
}
-typedef enum
-{
- PAROLE_ISO_IMAGE_DVD,
- PAROLE_ISO_IMAGE_CD
-} ParoleIsoImage;
-
-
-
-static void
-iso_files_folder_changed_cb (GtkFileChooser *widget, ParolePlayer *player)
-{
- gchar *folder;
- folder = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (widget));
-
- if ( folder )
- {
- g_object_set (G_OBJECT (player->priv->conf),
- "iso-image-folder", folder,
- NULL);
- g_free (folder);
- }
-}
-
-static void
-parole_player_open_iso_image (ParolePlayer *player, ParoleIsoImage image)
-{
- GtkWidget *chooser;
- GtkFileFilter *filter;
- gchar *file = NULL;
- const gchar *folder;
- gint response;
-
- chooser = gtk_file_chooser_dialog_new (_("Open ISO image"), GTK_WINDOW (player->priv->window),
- GTK_FILE_CHOOSER_ACTION_OPEN,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN, GTK_RESPONSE_OK,
- NULL);
-
- gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (chooser), FALSE);
-
- g_object_get (G_OBJECT (player->priv->conf),
- "iso-image-folder", &folder,
- NULL);
-
- if ( folder )
- gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser), folder);
-
- g_signal_connect (chooser, "current-folder-changed",
- G_CALLBACK (iso_files_folder_changed_cb), player);
-
- filter = gtk_file_filter_new ();
- gtk_file_filter_set_name (filter, image == PAROLE_ISO_IMAGE_CD ? _("CD image") : _("DVD image"));
- gtk_file_filter_add_mime_type (filter, "application/x-cd-image");
- gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), filter);
-
- gtk_window_set_default_size (GTK_WINDOW (chooser), 680, 480);
- response = gtk_dialog_run (GTK_DIALOG (chooser));
-
- if ( response == GTK_RESPONSE_OK )
- {
- file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
- }
-
- gtk_widget_destroy (chooser);
-
- if ( file )
- {
- gchar *uri;
- //FIXME: vcd will word for svcd?
- uri = g_strdup_printf ("%s%s", PAROLE_ISO_IMAGE_CD ? "dvd://" : ("vcd://"), file);
- TRACE ("Playing ISO image %s", uri);
- parole_player_disc_selected_cb (NULL, uri, NULL, player);
- g_free (file);
- g_free (uri);
- }
-}
-
-void dvd_iso_mi_activated_cb (GtkWidget *widget, ParolePlayer *player)
-{
- parole_player_open_iso_image (player, PAROLE_ISO_IMAGE_DVD);
-}
-
-void cd_iso_mi_activated_cb (GtkWidget *widget, ParolePlayer *player)
-{
- parole_player_open_iso_image (player, PAROLE_ISO_IMAGE_CD);
-}
-
static void
parole_player_change_range_value (ParolePlayer *player, gdouble value)
{
@@ -580,11 +552,11 @@ parole_player_change_range_value (ParolePlayer *player, gdouble value)
if ( !player->priv->user_seeking )
{
- player->priv->internal_range_change = TRUE;
-
- gtk_range_set_value (GTK_RANGE (player->priv->range), value);
+ player->priv->internal_range_change = TRUE;
+
+ gtk_range_set_value (GTK_RANGE (player->priv->range), value);
- player->priv->internal_range_change = FALSE;
+ player->priv->internal_range_change = FALSE;
}
get_time_string (pos_text, value);
@@ -594,32 +566,35 @@ parole_player_change_range_value (ParolePlayer *player, gdouble value)
static void
parole_player_reset (ParolePlayer *player)
{
- parole_gst_stop (PAROLE_GST (player->priv->gst));
- player->priv->update_languages = TRUE;
- gtk_window_set_title (GTK_WINDOW (player->priv->window), "Parole Media Player");
- player->priv->audio_list = NULL;
- player->priv->subtitle_list = NULL;
-
- gtk_widget_hide(GTK_WIDGET(player->priv->infobar));
+ parole_gst_stop (PAROLE_GST (player->priv->gst));
+ player->priv->update_languages = TRUE;
+ gtk_window_set_title (GTK_WINDOW (player->priv->window), _("Parole Media Player"));
+ gtk_widget_hide(GTK_WIDGET(player->priv->dvd_menu));
+ player->priv->audio_list = NULL;
+ player->priv->subtitle_list = NULL;
+
+ gtk_widget_hide(GTK_WIDGET(player->priv->infobar));
parole_player_change_range_value (player, 0);
if ( player->priv->row )
{
- parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL);
- gtk_tree_row_reference_free (player->priv->row);
- player->priv->row = NULL;
+ parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL);
+ gtk_tree_row_reference_free (player->priv->row);
+ player->priv->row = NULL;
}
if (player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD)
{
TRACE("CLEAR DVD LIST");
- parole_media_list_clear_disc_list (player->priv->list);
- TRACE("END CLEAR DVD LIST");
+ parole_media_list_clear_disc_list (player->priv->list);
+ TRACE("END CLEAR DVD LIST");
}
- player->priv->current_media_type = PAROLE_MEDIA_TYPE_UNKNOWN;
+ player->priv->current_media_type = PAROLE_MEDIA_TYPE_UNKNOWN;
parole_media_list_set_playlist_view(player->priv->list, PAROLE_MEDIA_LIST_PLAYLIST_VIEW_STANDARD);
+ gtk_action_set_sensitive(GTK_ACTION(player->priv->toggle_repeat_action), TRUE);
+ gtk_action_set_sensitive(GTK_ACTION(player->priv->toggle_shuffle_action), TRUE);
}
static void
@@ -627,203 +602,278 @@ parole_player_dvd_reset (ParolePlayer *player)
{
if ( player->priv->row )
{
- parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL);
- gtk_tree_row_reference_free (player->priv->row);
- player->priv->row = NULL;
+ parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL);
+ gtk_tree_row_reference_free (player->priv->row);
+ player->priv->row = NULL;
}
}
+void
+parole_player_dvd_menu_activated (GtkMenuItem *widget, ParolePlayer *player)
+{
+ parole_gst_send_navigation_command (PAROLE_GST(player->priv->gst), GST_DVD_ROOT_MENU);
+}
+
+void
+parole_player_dvd_title_activated (GtkMenuItem *widget, ParolePlayer *player)
+{
+ parole_gst_send_navigation_command (PAROLE_GST(player->priv->gst), GST_DVD_TITLE_MENU);
+}
+void
+parole_player_dvd_audio_activated (GtkMenuItem *widget, ParolePlayer *player)
+{
+ parole_gst_send_navigation_command (PAROLE_GST(player->priv->gst), GST_DVD_AUDIO_MENU);
+
+}
+
+void
+parole_player_dvd_angle_activated (GtkMenuItem *widget, ParolePlayer *player)
+{
+ parole_gst_send_navigation_command (PAROLE_GST(player->priv->gst), GST_DVD_ANGLE_MENU);
+}
+
+void
+parole_player_dvd_chapter_activated (GtkMenuItem *widget, ParolePlayer *player)
+{
+ parole_gst_send_navigation_command (PAROLE_GST(player->priv->gst), GST_DVD_CHAPTER_MENU);
+}
static gboolean
parole_sublang_equal_lists (GList *orig, GList *new)
{
- GList *o, *n;
- gboolean retval;
+ GList *o, *n;
+ gboolean retval;
- if ((orig == NULL && new != NULL) || (orig != NULL && new == NULL))
- return FALSE;
- if (orig == NULL && new == NULL)
- return TRUE;
+ if ((orig == NULL && new != NULL) || (orig != NULL && new == NULL))
+ return FALSE;
+ if (orig == NULL && new == NULL)
+ return TRUE;
- if (g_list_length (orig) != g_list_length (new))
- return FALSE;
+ if (g_list_length (orig) != g_list_length (new))
+ return FALSE;
- retval = TRUE;
- o = orig;
- n = new;
- while (o != NULL && n != NULL && retval != FALSE)
- {
- if (g_str_equal (o->data, n->data) == FALSE)
- retval = FALSE;
+ retval = TRUE;
+ o = orig;
+ n = new;
+ while (o != NULL && n != NULL && retval != FALSE)
+ {
+ if (g_str_equal (o->data, n->data) == FALSE)
+ retval = FALSE;
o = g_list_next (o);
n = g_list_next (n);
- }
+ }
+
+ return retval;
+}
- return retval;
+static void
+parole_player_clear_chapters (ParolePlayer *player)
+{
+ GList *menu_items, *menu_iter;
+ gint counter = 0;
+
+ /* Clear the chapter menu options */
+ menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->chapters_menu) );
+ //gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(player->priv->subtitles_group), TRUE);
+
+ for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
+ {
+ if (counter >= 2)
+ gtk_widget_destroy(GTK_WIDGET(menu_iter->data));
+ counter++;
+ }
+ g_list_free(menu_items);
+}
+
+static void
+parole_player_chapter_selection_changed_cb(GtkWidget *widget, ParolePlayer *player)
+{
+ gint chapter_id = atoi((char*)g_object_get_data(G_OBJECT(widget), "chapter-id"));
+ parole_gst_set_dvd_chapter(PAROLE_GST(player->priv->gst) , chapter_id);
+}
+
+static void
+parole_player_update_chapters (ParolePlayer *player, gint chapter_count)
+{
+ int chapter_id;
+ GtkWidget *menu_item;
+ parole_player_clear_chapters(player);
+
+ for (chapter_id=0; chapter_id<chapter_count; chapter_id++)
+ {
+ menu_item = GTK_WIDGET(gtk_menu_item_new_with_label (g_strdup_printf(_("Chapter %i"), chapter_id+1)));
+ gtk_widget_show (menu_item);
+
+ g_object_set_data(G_OBJECT(menu_item), "chapter-id", g_strdup_printf("%i", chapter_id+1));
+
+ gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->chapters_menu), menu_item);
+ g_signal_connect (menu_item, "activate",
+ G_CALLBACK (parole_player_chapter_selection_changed_cb), player);
+ }
}
static void
parole_player_clear_subtitles (ParolePlayer *player)
{
- GtkTreeIter iter;
- GList *menu_items, *menu_iter;
- gint counter = 0;
-
- /* Clear the InfoBar Combobox */
- gtk_list_store_clear(player->priv->liststore_subtitles);
- gtk_list_store_append(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter);
- gtk_list_store_set(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter, 0, "None", -1);
- gtk_combo_box_set_active( GTK_COMBO_BOX(player->priv->combobox_subtitles), 0 );
-
- /* Clear the subtitle menu options */
- menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->subtitles_menu) );
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(player->priv->subtitles_group), TRUE);
-
- for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
- {
- if (counter >= 4)
- gtk_widget_destroy(GTK_WIDGET(menu_iter->data));
- counter++;
- }
- g_list_free(menu_items);
+ GtkTreeIter iter;
+ GList *menu_items, *menu_iter;
+ gint counter = 0;
+
+ /* Clear the InfoBar Combobox */
+ gtk_list_store_clear(player->priv->liststore_subtitles);
+ gtk_list_store_append(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter);
+ gtk_list_store_set(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter, 0, "None", -1);
+ gtk_combo_box_set_active( GTK_COMBO_BOX(player->priv->combobox_subtitles), 0 );
+
+ /* Clear the subtitle menu options */
+ menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->subtitles_menu) );
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(player->priv->subtitles_group), TRUE);
+
+ for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
+ {
+ if (counter >= 4)
+ gtk_widget_destroy(GTK_WIDGET(menu_iter->data));
+ counter++;
+ }
+ g_list_free(menu_items);
}
static void
parole_player_set_subtitles_list (ParolePlayer *player, GList *subtitle_list)
{
- GList *l;
- gchar* language;
-
- GtkTreeIter iter;
- gint counter = 0;
-
- GtkWidget *menu_item;
-
- parole_player_clear_subtitles( player );
-
- player->priv->subtitle_list = subtitle_list;
-
- for (l = subtitle_list; l != NULL; l = l->next)
- {
- language = g_strdup (l->data);
-
- gtk_list_store_append(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter);
- gtk_list_store_set(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter, 0, language, -1);
-
- menu_item = gtk_radio_menu_item_new_with_label_from_widget (GTK_RADIO_MENU_ITEM(player->priv->subtitles_group), language);
- gtk_widget_show (menu_item);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->subtitles_menu), menu_item);
- g_signal_connect (menu_item, "activate",
- G_CALLBACK (parole_player_subtitles_radio_menu_item_changed_cb), player);
-
- g_free (language);
-
- counter++;
- }
-
- if (g_list_length (subtitle_list) != 1) {
- gtk_widget_show(player->priv->infobar);
- }
+ GList *l;
+ gchar* language;
+
+ GtkTreeIter iter;
+ gint counter = 0;
+
+ GtkWidget *menu_item;
+
+ parole_player_clear_subtitles( player );
+
+ player->priv->subtitle_list = subtitle_list;
+
+ for (l = subtitle_list; l != NULL; l = l->next)
+ {
+ language = g_strdup (l->data);
+
+ gtk_list_store_append(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter);
+ gtk_list_store_set(GTK_LIST_STORE(player->priv->liststore_subtitles), &iter, 0, language, -1);
+
+ menu_item = gtk_radio_menu_item_new_with_label_from_widget (GTK_RADIO_MENU_ITEM(player->priv->subtitles_group), language);
+ gtk_widget_show (menu_item);
+
+ gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->subtitles_menu), menu_item);
+ g_signal_connect (menu_item, "activate",
+ G_CALLBACK (parole_player_subtitles_radio_menu_item_changed_cb), player);
+
+ g_free (language);
+
+ counter++;
+ }
+
+ if (g_list_length (subtitle_list) != 1) {
+ gtk_widget_show(player->priv->infobar);
+ }
}
static void
parole_player_clear_audio_tracks (ParolePlayer *player)
{
- GList *menu_items, *menu_iter;
- GtkWidget *empty_item;
-
- gtk_list_store_clear(player->priv->liststore_audiotrack);
- player->priv->audio_group = NULL;
-
- /* Clear the subtitle menu options */
-
- menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
-
- for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
- gtk_widget_destroy(GTK_WIDGET(menu_iter->data));
- g_list_free(menu_items);
-
- empty_item = gtk_menu_item_new_with_label(_("Empty"));
- gtk_widget_set_sensitive( empty_item, FALSE );
- gtk_widget_show( empty_item );
-
- gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->languages_menu), empty_item);
+ GList *menu_items, *menu_iter;
+ GtkWidget *empty_item;
+
+ gtk_list_store_clear(player->priv->liststore_audiotrack);
+ player->priv->audio_group = NULL;
+
+ /* Clear the subtitle menu options */
+
+ menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
+
+ for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
+ gtk_widget_destroy(GTK_WIDGET(menu_iter->data));
+ g_list_free(menu_items);
+
+ empty_item = gtk_menu_item_new_with_label(_("Empty"));
+ gtk_widget_set_sensitive( empty_item, FALSE );
+ gtk_widget_show( empty_item );
+
+ gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->languages_menu), empty_item);
}
static void
parole_player_set_audio_list (ParolePlayer *player, GList *audio_list)
{
- GList *menu_iter;
- GList *l;
- gchar* language;
-
- GtkTreeIter iter;
-
- GtkWidget *menu_item;
-
- parole_player_clear_audio_tracks( player );
-
- menu_iter = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
-
- gtk_widget_destroy(GTK_WIDGET(menu_iter->data));
- g_list_free(menu_iter);
-
- player->priv->audio_list = audio_list;
-
- for (l = audio_list; l != NULL; l = l->next)
- {
- language = g_strdup (l->data);
-
- gtk_list_store_append(GTK_LIST_STORE(player->priv->liststore_audiotrack), &iter);
- gtk_list_store_set(GTK_LIST_STORE(player->priv->liststore_audiotrack), &iter, 0, language, -1);
-
- if (player->priv->audio_group == NULL)
- {
- player->priv->audio_group = GTK_WIDGET (gtk_radio_menu_item_new_with_label (NULL, language));
- gtk_widget_show (GTK_WIDGET(player->priv->audio_group));
- gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->languages_menu), GTK_WIDGET(player->priv->audio_group));
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(player->priv->audio_group), TRUE);
-
- g_signal_connect (player->priv->audio_group, "activate",
- G_CALLBACK (parole_player_audiotrack_radio_menu_item_changed_cb), player);
- } else {
-
- menu_item = gtk_radio_menu_item_new_with_label_from_widget (GTK_RADIO_MENU_ITEM(player->priv->audio_group), language);
- gtk_widget_show (menu_item);
- gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->languages_menu), menu_item);
-
- g_signal_connect (menu_item, "activate",
- G_CALLBACK (parole_player_audiotrack_radio_menu_item_changed_cb), player);
- }
-
- g_free (language);
- }
-
- gtk_combo_box_set_active( GTK_COMBO_BOX(player->priv->combobox_audiotrack), 0 );
-
- if (g_list_length (audio_list) >= 2) {
- gtk_widget_set_sensitive( GTK_WIDGET( player->priv->combobox_audiotrack ), TRUE );
- gtk_widget_show(player->priv->infobar);
- }
- else {
- gtk_widget_set_sensitive( GTK_WIDGET( player->priv->combobox_audiotrack ), FALSE );
- }
+ GList *menu_iter;
+ GList *l;
+ gchar* language;
+
+ GtkTreeIter iter;
+
+ GtkWidget *menu_item;
+
+ parole_player_clear_audio_tracks( player );
+
+ menu_iter = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
+
+ gtk_widget_destroy(GTK_WIDGET(menu_iter->data));
+ g_list_free(menu_iter);
+
+ player->priv->audio_list = audio_list;
+
+ for (l = audio_list; l != NULL; l = l->next)
+ {
+ language = g_strdup (l->data);
+
+ gtk_list_store_append(GTK_LIST_STORE(player->priv->liststore_audiotrack), &iter);
+ gtk_list_store_set(GTK_LIST_STORE(player->priv->liststore_audiotrack), &iter, 0, language, -1);
+
+ if (player->priv->audio_group == NULL)
+ {
+ player->priv->audio_group = GTK_WIDGET (gtk_radio_menu_item_new_with_label (NULL, language));
+ gtk_widget_show (GTK_WIDGET(player->priv->audio_group));
+ gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->languages_menu), GTK_WIDGET(player->priv->audio_group));
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(player->priv->audio_group), TRUE);
+
+ g_signal_connect (player->priv->audio_group, "activate",
+ G_CALLBACK (parole_player_audiotrack_radio_menu_item_changed_cb), player);
+ } else {
+
+ menu_item = gtk_radio_menu_item_new_with_label_from_widget (GTK_RADIO_MENU_ITEM(player->priv->audio_group), language);
+ gtk_widget_show (menu_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (player->priv->languages_menu), menu_item);
+
+ g_signal_connect (menu_item, "activate",
+ G_CALLBACK (parole_player_audiotrack_radio_menu_item_changed_cb), player);
+ }
+
+ g_free (language);
+ }
+
+ gtk_combo_box_set_active( GTK_COMBO_BOX(player->priv->combobox_audiotrack), 0 );
+
+ if (g_list_length (audio_list) >= 2) {
+ gtk_widget_set_sensitive( GTK_WIDGET( player->priv->combobox_audiotrack ), TRUE );
+ gtk_widget_show(player->priv->infobar);
+ }
+ else {
+ gtk_widget_set_sensitive( GTK_WIDGET( player->priv->combobox_audiotrack ), FALSE );
+ }
}
static void
parole_player_update_audio_tracks (ParolePlayer *player, ParoleGst *gst)
{
- GList * list = gst_get_lang_list_for_type (gst, "AUDIO");
-
- if (parole_sublang_equal_lists (player->priv->audio_list, list) == TRUE)
- {
- return;
- }
-
- parole_player_set_audio_list (player, list);
-
+ GList * list = gst_get_lang_list_for_type (gst, "AUDIO");
+
+ if (parole_sublang_equal_lists (player->priv->audio_list, list) == TRUE)
+ {
+ return;
+ }
+
+ parole_player_set_audio_list (player, list);
+
g_free (list->data);
g_list_free (list);
list = NULL;
@@ -832,37 +882,37 @@ parole_player_update_audio_tracks (ParolePlayer *player, ParoleGst *gst)
static void
parole_player_update_subtitles (ParolePlayer *player, ParoleGst *gst)
{
- GList * list = gst_get_lang_list_for_type (gst, "TEXT");
-
- guint64 sub_index;
- gboolean sub_enabled;
-
- sub_index = 0;
-
- g_object_get (G_OBJECT (player->priv->conf),
- "enable-subtitle", &sub_enabled,
- NULL);
-
- if (sub_enabled)
- sub_index = 1;
-
+ GList * list = gst_get_lang_list_for_type (gst, "TEXT");
+
+ guint64 sub_index;
+ gboolean sub_enabled;
+
+ sub_index = 0;
+
+ g_object_get (G_OBJECT (player->priv->conf),
+ "enable-subtitle", &sub_enabled,
+ NULL);
+
+ if (sub_enabled)
+ sub_index = 1;
+
if (parole_sublang_equal_lists (player->priv->subtitle_list, list) == TRUE)
{
- if (g_list_length (list) == 0)
- {
- parole_player_clear_subtitles(player);
- }
- return;
+ if (g_list_length (list) == 0)
+ {
+ parole_player_clear_subtitles(player);
+ }
+ return;
}
parole_player_set_subtitles_list (player, list);
-
- gtk_combo_box_set_active( GTK_COMBO_BOX(player->priv->combobox_subtitles), sub_index );
-
- if (g_list_length (list) != 1) {
- gtk_widget_show(player->priv->infobar);
- }
- g_free (list->data);
+
+ gtk_combo_box_set_active( GTK_COMBO_BOX(player->priv->combobox_subtitles), sub_index );
+
+ if (g_list_length (list) != 1) {
+ gtk_widget_show(player->priv->infobar);
+ }
+ g_free (list->data);
g_list_free (list);
list = NULL;
}
@@ -870,21 +920,21 @@ parole_player_update_subtitles (ParolePlayer *player, ParoleGst *gst)
static void
parole_player_update_languages (ParolePlayer *player, ParoleGst *gst)
{
- if (player->priv->update_languages == TRUE)
- {
- if (gst_get_has_video( PAROLE_GST(player->priv->gst) ))
- {
- parole_player_update_audio_tracks(player, gst);
- parole_player_update_subtitles(player, gst);
-
- /* Enable custom subtitles for video as long as its not a DVD. */
- gtk_widget_set_sensitive(player->priv->subtitles_menu_custom,
- player->priv->current_media_type != PAROLE_MEDIA_TYPE_DVD);
- }
- else
- gtk_widget_set_sensitive(player->priv->subtitles_menu_custom, FALSE);
- player->priv->update_languages = FALSE;
- }
+ if (player->priv->update_languages == TRUE)
+ {
+ if (gst_get_has_video( PAROLE_GST(player->priv->gst) ))
+ {
+ parole_player_update_audio_tracks(player, gst);
+ parole_player_update_subtitles(player, gst);
+
+ /* Enable custom subtitles for video as long as its not a DVD. */
+ gtk_widget_set_sensitive(player->priv->subtitles_menu_custom,
+ player->priv->current_media_type != PAROLE_MEDIA_TYPE_DVD);
+ }
+ else
+ gtk_widget_set_sensitive(player->priv->subtitles_menu_custom, FALSE);
+ player->priv->update_languages = FALSE;
+ }
}
static void
@@ -892,16 +942,17 @@ parole_player_show_audiobox (ParolePlayer *player)
{
/* Only show the audiobox if we're sure there's no video playing and
visualizations are disabled. */
+ gtk_widget_hide(player->priv->logo_image);
if (!gst_get_has_video ( PAROLE_GST(player->priv->gst) ) &&
!gst_get_has_vis ( PAROLE_GST(player->priv->gst) ) )
{
- gtk_widget_show(player->priv->audiobox);
- gtk_widget_hide_all(player->priv->eventbox_output);
+ gtk_widget_show(player->priv->audiobox);
+ gtk_widget_hide(player->priv->videobox);
}
else
{
- gtk_widget_hide(player->priv->audiobox);
- gtk_widget_show_all(player->priv->eventbox_output);
+ gtk_widget_hide(player->priv->audiobox);
+ gtk_widget_show(player->priv->videobox);
}
}
@@ -919,7 +970,7 @@ parole_player_select_custom_subtitle (GtkMenuItem *widget, gpointer data)
ParolePlayer *player;
ParoleFile *file;
- GtkWidget *chooser;
+ GtkWidget *chooser, *button, *img;
GtkFileFilter *filter, *all_files;
gint response;
@@ -931,20 +982,26 @@ parole_player_select_custom_subtitle (GtkMenuItem *widget, gpointer data)
/* Build the FileChooser dialog for subtitle selection. */
chooser = gtk_file_chooser_dialog_new (_("Select Subtitle File"), NULL,
- GTK_FILE_CHOOSER_ACTION_OPEN,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN, GTK_RESPONSE_OK,
- NULL);
-
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+ NULL,
+ NULL);
+ gtk_window_set_icon_name(GTK_WINDOW(chooser), "parole");
+ button = gtk_dialog_add_button(GTK_DIALOG(chooser), _("Cancel"), GTK_RESPONSE_CANCEL);
+ img = gtk_image_new_from_icon_name("gtk-cancel", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image(GTK_BUTTON(button), img);
+ button = gtk_dialog_add_button(GTK_DIALOG(chooser), _("Open"), GTK_RESPONSE_OK);
+ img = gtk_image_new_from_icon_name("document-open", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image(GTK_BUTTON(button), img);
+
gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (chooser), FALSE);
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (chooser), FALSE);
- g_object_get (G_OBJECT (player->priv->conf),
- "media-chooser-folder", &folder,
- NULL);
+ g_object_get (G_OBJECT (player->priv->conf),
+ "media-chooser-folder", &folder,
+ NULL);
if ( folder )
- gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser), folder);
+ gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser), folder);
/* Subtitle format filter */
filter = gtk_file_filter_new ();
@@ -969,7 +1026,7 @@ parole_player_select_custom_subtitle (GtkMenuItem *widget, gpointer data)
/* Run the dialog, get the selected filename. */
response = gtk_dialog_run (GTK_DIALOG (chooser));
if ( response == GTK_RESPONSE_OK )
- sub = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
+ sub = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
gtk_widget_destroy (chooser);
@@ -983,24 +1040,24 @@ parole_player_select_custom_subtitle (GtkMenuItem *widget, gpointer data)
if ( g_str_has_prefix (uri, "file:/") )
{
- TRACE ("Trying to play media file %s", uri);
- TRACE ("Trying to use subtitle file %s", sub);
- player->priv->updated_subs = TRUE;
-
- file = parole_media_list_get_selected_file( player->priv->list );
+ TRACE ("Trying to play media file %s", uri);
+ TRACE ("Trying to use subtitle file %s", sub);
+ player->priv->updated_subs = TRUE;
+
+ file = parole_media_list_get_selected_file( player->priv->list );
/* Set the subtitles in gst as well as in the media list, for later
retrieval. */
if ( file )
{
- parole_file_set_custom_subtitles(file, sub);
- parole_gst_set_custom_subtitles(PAROLE_GST (player->priv->gst), sub);
- parole_gst_play_uri (PAROLE_GST (player->priv->gst), uri, sub);
- }
+ parole_file_set_custom_subtitles(file, sub);
+ parole_gst_set_custom_subtitles(PAROLE_GST (player->priv->gst), sub);
+ parole_gst_play_uri (PAROLE_GST (player->priv->gst), uri, sub);
+ }
}
- g_free (sub);
- g_free (uri);
+ g_free (sub);
+ g_free (uri);
}
}
@@ -1015,59 +1072,59 @@ parole_player_media_activated_cb (ParoleMediaList *list, GtkTreeRowReference *ro
if ( gtk_tree_model_get_iter (model, &iter, gtk_tree_row_reference_get_path (row)) )
{
- gtk_tree_model_get (model, &iter, DATA_COL, &file, -1);
-
- if ( file )
- {
- const gchar *sub = NULL;
- const gchar *uri;
- const gchar *directory = NULL;
- gint dvd_chapter;
-
- uri = parole_file_get_uri (file);
- directory = parole_file_get_directory(file);
-
- if ( g_str_has_prefix (uri, "dvd") )
- {
- parole_player_dvd_reset (player);
- player->priv->row = gtk_tree_row_reference_copy (row);
- dvd_chapter = parole_file_get_dvd_chapter(file);
- parole_gst_set_dvd_chapter(PAROLE_GST(player->priv->gst), dvd_chapter);
- g_object_unref (file);
- return;
- }
- parole_player_reset (player);
- player->priv->row = gtk_tree_row_reference_copy (row);
-
- if ( g_str_has_prefix (uri, "file:/") )
- {
- if ( parole_file_filter (player->priv->video_filter, file) )
- {
- sub = parole_file_get_custom_subtitles (file);
- parole_gst_set_custom_subtitles(PAROLE_GST(player->priv->gst), sub);
- if (sub == NULL)
- sub = parole_get_subtitle_path (uri);
- }
- }
- TRACE ("Trying to play media file %s", uri);
- TRACE ("File content type %s", parole_file_get_content_type(file));
-
-
- parole_gst_play_uri (PAROLE_GST (player->priv->gst),
- parole_file_get_uri (file),
- sub);
-
- gtk_window_set_title (GTK_WINDOW (player->priv->window), parole_media_list_get_row_name (player->priv->list, player->priv->row));
-
- if ( directory )
- {
+ gtk_tree_model_get (model, &iter, DATA_COL, &file, -1);
+
+ if ( file )
+ {
+ const gchar *sub = NULL;
+ const gchar *uri;
+ const gchar *directory = NULL;
+ gint dvd_chapter;
+
+ uri = parole_file_get_uri (file);
+ directory = parole_file_get_directory(file);
+
+ if ( g_str_has_prefix (uri, "dvd") )
+ {
+ parole_player_dvd_reset (player);
+ player->priv->row = gtk_tree_row_reference_copy (row);
+ dvd_chapter = parole_file_get_dvd_chapter(file);
+ parole_gst_set_dvd_chapter(PAROLE_GST(player->priv->gst), dvd_chapter);
+ g_object_unref (file);
+ return;
+ }
+ parole_player_reset (player);
+ player->priv->row = gtk_tree_row_reference_copy (row);
+
+ if ( g_str_has_prefix (uri, "file:/") )
+ {
+ if ( parole_file_filter (player->priv->video_filter, file) )
+ {
+ sub = parole_file_get_custom_subtitles (file);
+ parole_gst_set_custom_subtitles(PAROLE_GST(player->priv->gst), sub);
+ if (sub == NULL)
+ sub = parole_get_subtitle_path (uri);
+ }
+ }
+ TRACE ("Trying to play media file %s", uri);
+ TRACE ("File content type %s", parole_file_get_content_type(file));
+
+
+ parole_gst_play_uri (PAROLE_GST (player->priv->gst),
+ parole_file_get_uri (file),
+ sub);
+
+ gtk_window_set_title (GTK_WINDOW (player->priv->window), parole_media_list_get_row_name (player->priv->list, player->priv->row));
+
+ if ( directory )
+ {
g_object_set (G_OBJECT (player->priv->conf),
"media-chooser-folder", directory,
NULL);
- }
+ }
- g_object_unref (file);
- }
+ g_object_unref (file);
+ }
}
}
@@ -1083,29 +1140,35 @@ parole_player_disc_selected_cb (ParoleDisc *disc, const gchar *uri, const gchar
player->priv->wait_for_gst_disc_info = TRUE;
if ( player->priv->row )
{
- parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL);
- gtk_tree_row_reference_free (player->priv->row);
- player->priv->row = NULL;
+ parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL);
+ gtk_tree_row_reference_free (player->priv->row);
+ player->priv->row = NULL;
}
TRACE("CLEAR PLAYLIST");
parole_media_list_clear_list (player->priv->list);
TRACE("END CLEAR PLAYLIST");
}
else if ( player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD )
+ {
parole_media_list_set_playlist_view(player->priv->list, PAROLE_MEDIA_LIST_PLAYLIST_VIEW_DISC);
+ gtk_widget_show(GTK_WIDGET(player->priv->dvd_menu));
+ gtk_action_set_sensitive(GTK_ACTION(player->priv->toggle_repeat_action), FALSE);
+ gtk_action_set_sensitive(GTK_ACTION(player->priv->toggle_shuffle_action), FALSE);
+ }
}
static void
-parole_player_disc_label_changed_cb (ParoleDisc *disc, const gchar *label, ParolePlayer *player)
+parole_player_uri_opened_cb (ParoleMediaList *list, const gchar *uri, ParolePlayer *player)
{
- parole_media_list_add_dvd(player->priv->list, g_strdup(label));
+ parole_player_reset (player);
+ parole_gst_play_uri (PAROLE_GST (player->priv->gst), uri, NULL);
}
static void
-parole_player_uri_opened_cb (ParoleMediaList *list, const gchar *uri, ParolePlayer *player)
+parole_player_iso_opened_cb (ParoleMediaList *list, const gchar *uri, ParolePlayer *player)
{
parole_player_reset (player);
- parole_gst_play_uri (PAROLE_GST (player->priv->gst), uri, NULL);
+ parole_player_disc_selected_cb (NULL, uri, NULL, player);
}
static void
@@ -1127,9 +1190,9 @@ parole_player_recent_menu_clear_activated_cb (GtkWidget *widget, ParolePlayer *p
gtk_message_dialog_format_secondary_text ( GTK_MESSAGE_DIALOG(dlg),
_("Are you sure you wish to clear your recent items history? This cannot be undone."));
- gtk_dialog_add_button (GTK_DIALOG(dlg), GTK_STOCK_CANCEL, 0);
+ gtk_dialog_add_button (GTK_DIALOG(dlg), _("Cancel"), 0);
clear_button = gtk_dialog_add_button(GTK_DIALOG(dlg),
- GTK_STOCK_CLEAR,
+ "edit-clear",
1);
gtk_button_set_label( GTK_BUTTON(clear_button), _("Clear Recent Items") );
@@ -1148,7 +1211,7 @@ parole_player_recent_menu_item_activated_cb (GtkWidget *widget, ParolePlayer *pl
{
gchar *uri;
gchar *filename;
- gchar *filenames[1];
+ gchar *filenames[] = {NULL, NULL};
ParoleMediaList *list;
uri = gtk_recent_chooser_get_current_uri(GTK_RECENT_CHOOSER(widget));
@@ -1160,13 +1223,12 @@ parole_player_recent_menu_item_activated_cb (GtkWidget *widget, ParolePlayer *pl
gtk_recent_manager_add_item (player->priv->recent, uri);
filenames[0] = g_strdup(filename);
- filenames[1] = NULL;
- list = parole_player_get_media_list (player);
- parole_media_list_add_files (list, filenames, FALSE);
-
- g_free(filenames[0]);
- }
+ list = parole_player_get_media_list (player);
+ parole_media_list_add_files (list, filenames, FALSE);
+
+ g_free(filenames[0]);
+ }
g_free(filename);
g_free(uri);
@@ -1177,52 +1239,25 @@ parole_player_media_cursor_changed_cb (ParoleMediaList *list, gboolean media_sel
{
if (player->priv->state < PAROLE_STATE_PAUSED)
{
- gtk_widget_set_sensitive (player->priv->play_pause,
- media_selected || !parole_media_list_is_empty (player->priv->list));
- }
-}
-
-static void
-parole_player_media_list_shuffle_toggled_cb (ParoleMediaList *list, gboolean shuffle_toggled, ParolePlayer *player)
-{
- gboolean toggled;
-
- toggled = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(player->priv->shuffle_menu_item));
-
- if (toggled != shuffle_toggled)
- {
- gtk_check_menu_item_set_active ( GTK_CHECK_MENU_ITEM(player->priv->shuffle_menu_item), shuffle_toggled);
+ gtk_action_set_sensitive (player->priv->media_playpause_action,
+ media_selected || !parole_media_list_is_empty (player->priv->list));
}
-}
-
-static void
-parole_player_media_list_repeat_toggled_cb (ParoleMediaList *list, gboolean repeat_toggled, ParolePlayer *player)
-{
- gboolean toggled;
- toggled = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(player->priv->repeat_menu_item));
-
- if (toggled != repeat_toggled)
- {
- gtk_check_menu_item_set_active ( GTK_CHECK_MENU_ITEM(player->priv->repeat_menu_item), repeat_toggled);
- }
+ gtk_action_set_sensitive (player->priv->media_previous_action,
+ parole_media_list_get_playlist_count (player->priv->list) > 1);
+ gtk_action_set_sensitive (player->priv->media_next_action,
+ parole_media_list_get_playlist_count (player->priv->list) > 1);
}
static void
parole_player_media_list_show_playlist_cb (ParoleMediaList *list, gboolean show_playlist, ParolePlayer *player)
{
parole_media_list_set_playlist_view(player->priv->list,
- player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD);
+ player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD);
parole_player_set_playlist_visible (player, show_playlist);
}
static void
-parole_player_media_list_gst_nav_message_cb (ParoleMediaList *list, gint msg_id, ParolePlayer *player)
-{
- parole_gst_send_navigation_command (PAROLE_GST(player->priv->gst), msg_id);
-}
-
-static void
parole_player_media_progressed_cb (ParoleGst *gst, const ParoleStream *stream, gint64 value, ParolePlayer *player)
{
#ifdef DEBUG
@@ -1231,7 +1266,7 @@ parole_player_media_progressed_cb (ParoleGst *gst, const ParoleStream *stream, g
if (!player->priv->user_seeking)
{
- parole_player_change_range_value (player, value);
+ parole_player_change_range_value (player, value);
}
}
@@ -1241,29 +1276,33 @@ parole_player_seekable_notify (ParoleStream *stream, GParamSpec *spec, ParolePla
gboolean seekable;
g_object_get (G_OBJECT (stream),
- "seekable", &seekable,
- NULL);
-
+ "seekable", &seekable,
+ NULL);
+
gtk_widget_set_tooltip_text (GTK_WIDGET (player->priv->range), seekable ? NULL : _("Media stream is not seekable"));
gtk_widget_set_sensitive (GTK_WIDGET (player->priv->range), seekable);
- gtk_widget_set_sensitive (player->priv->seekf, seekable);
- gtk_widget_set_sensitive (player->priv->seekb, seekable);
}
static void
-parole_player_set_playpause_button_image (GtkWidget *widget, const gchar *stock_id)
+parole_player_set_playpause_button_from_stock (ParolePlayer *player, const gchar *stock_id)
{
- GtkWidget *img;
+ gchar *icon_name = NULL, *label = NULL, *tooltip = NULL;
- g_object_get (G_OBJECT (widget),
- "image", &img,
- NULL);
-
- g_object_set (G_OBJECT (img),
- "stock", stock_id,
- NULL);
-
- g_object_unref (img);
+ if (g_strcmp0(stock_id, "gtk-media-play") == 0) {
+ icon_name = g_strdup("media-playback-start-symbolic");
+ label = _("_Play");
+ tooltip = _("Play");
+ } else if (g_strcmp0(stock_id, "gtk-media-pause") == 0) {
+ icon_name = g_strdup("media-playback-pause-symbolic");
+ label = _("_Pause");
+ tooltip = _("Pause");
+ }
+
+ gtk_action_set_icon_name(player->priv->media_playpause_action, icon_name);
+ gtk_action_set_label(player->priv->media_playpause_action, label);
+ gtk_action_set_tooltip(player->priv->media_playpause_action, tooltip);
+ gtk_image_set_from_icon_name(GTK_IMAGE(player->priv->playpause_image), icon_name, 24);
+ gtk_widget_set_tooltip_text(GTK_WIDGET(player->priv->playpause_button), tooltip);
}
static void
@@ -1276,38 +1315,38 @@ parole_player_save_uri (ParolePlayer *player, const ParoleStream *stream)
guint i;
g_object_get (G_OBJECT (stream),
- "uri", &uri,
- NULL);
+ "uri", &uri,
+ NULL);
g_object_get (G_OBJECT (stream),
- "media-type", &media_type,
- NULL);
-
+ "media-type", &media_type,
+ NULL);
+
if ( media_type == PAROLE_MEDIA_TYPE_LOCAL_FILE )
{
- gtk_recent_manager_add_item (player->priv->recent, uri);
- goto out;
+ gtk_recent_manager_add_item (player->priv->recent, uri);
+ goto out;
}
-
+
lines = parole_get_history ();
if (lines )
{
- for ( i = 0; lines[i]; i++)
- {
- if ( !g_strcmp0 (lines[i], uri) )
- {
- save = FALSE;
- break;
- }
- }
+ for ( i = 0; lines[i]; i++)
+ {
+ if ( !g_strcmp0 (lines[i], uri) )
+ {
+ save = FALSE;
+ break;
+ }
+ }
}
if ( media_type != PAROLE_MEDIA_TYPE_CDDA && media_type != PAROLE_MEDIA_TYPE_DVD )
{
if ( save )
{
- parole_insert_line_history (uri);
+ parole_insert_line_history (uri);
}
}
@@ -1325,73 +1364,69 @@ parole_player_playing (ParolePlayer *player, const ParoleStream *stream)
gboolean seekable;
gboolean live;
- pix = parole_icon_load ("player_play", 16);
-
- if ( !pix )
- pix = parole_icon_load ("gtk-media-play-ltr", 16);
+ pix = parole_icon_load ("media-playback-start", 16);
parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, pix);
g_object_get (G_OBJECT (stream),
- "seekable", &seekable,
- "duration", &duration,
- "live", &live,
- NULL);
-
+ "seekable", &seekable,
+ "duration", &duration,
+ "live", &live,
+ NULL);
+
if (player->priv->wait_for_gst_disc_info == TRUE)
{
parole_media_list_add_cdda_tracks(player->priv->list, parole_gst_get_num_tracks(PAROLE_GST (player->priv->gst)));
player->priv->wait_for_gst_disc_info = FALSE;
}
-
- gtk_widget_set_sensitive (player->priv->play_pause, TRUE);
+
+ gtk_action_set_sensitive (player->priv->media_playpause_action, TRUE);
- parole_player_set_playpause_button_image (player->priv->play_pause, GTK_STOCK_MEDIA_PAUSE);
- gtk_widget_set_tooltip_text(player->priv->play_pause, _("Pause"));
+ parole_player_set_playpause_button_from_stock (player, "gtk-media-pause");
gtk_widget_set_sensitive (player->priv->range, seekable);
player->priv->internal_range_change = TRUE;
if ( live || duration == 0)
{
- parole_player_change_range_value (player, 0);
- gtk_widget_set_visible( player->priv->label_duration, FALSE );
- gtk_widget_set_visible( player->priv->label_elapsed, FALSE );
- }
+ parole_player_change_range_value (player, 0);
+ gtk_widget_set_visible( player->priv->label_duration, FALSE );
+ gtk_widget_set_visible( player->priv->label_elapsed, FALSE );
+ }
else
{
- gtk_range_set_range (GTK_RANGE (player->priv->range), 0, duration);
- gtk_widget_set_visible( player->priv->label_duration, TRUE );
- gtk_widget_set_visible( player->priv->label_elapsed, TRUE );
- }
-
- if ( duration != 0)
- {
- gchar dur_text[128];
- get_time_string (dur_text, duration);
-
- gtk_label_set_text (GTK_LABEL (player->priv->label_duration), dur_text);
- if ( player->priv->current_media_type != PAROLE_MEDIA_TYPE_DVD )
- {
- parole_media_list_set_row_length (player->priv->list,
- player->priv->row,
- dur_text);
- }
- }
-
+ gtk_range_set_range (GTK_RANGE (player->priv->range), 0, duration);
+ gtk_widget_set_visible( player->priv->label_duration, TRUE );
+ gtk_widget_set_visible( player->priv->label_elapsed, TRUE );
+ }
+
+ if ( duration != 0)
+ {
+ gchar dur_text[128];
+ get_time_string (dur_text, duration);
+
+ gtk_label_set_text (GTK_LABEL (player->priv->label_duration), dur_text);
+ if ( player->priv->current_media_type != PAROLE_MEDIA_TYPE_DVD )
+ {
+ parole_media_list_set_row_length (player->priv->list,
+ player->priv->row,
+ dur_text);
+ }
+ }
+
player->priv->internal_range_change = FALSE;
- gtk_widget_set_sensitive (player->priv->seekf, seekable);
- gtk_widget_set_sensitive (player->priv->seekb, seekable);
gtk_widget_set_tooltip_text (GTK_WIDGET (player->priv->range), seekable ? NULL : _("Media stream is not seekable"));
if ( pix )
- g_object_unref (pix);
-
+ g_object_unref (pix);
+
parole_player_save_uri (player, stream);
parole_media_list_select_row (player->priv->list, player->priv->row);
gtk_widget_grab_focus (player->priv->gst);
parole_player_update_languages (player, PAROLE_GST(player->priv->gst));
+
+ g_timeout_add_seconds (4, (GSourceFunc) parole_player_hide_controls, player);
}
static void
@@ -1401,20 +1436,19 @@ parole_player_paused (ParolePlayer *player)
TRACE ("Player paused");
- pix = parole_icon_load (GTK_STOCK_MEDIA_PAUSE, 16);
+ pix = parole_icon_load ("media-playback-pause", 16);
parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, pix);
- gtk_widget_set_sensitive (player->priv->play_pause, TRUE);
+ gtk_action_set_sensitive (player->priv->media_playpause_action, TRUE);
if ( player->priv->user_seeking == FALSE)
{
- parole_player_set_playpause_button_image (player->priv->play_pause, GTK_STOCK_MEDIA_PLAY);
- gtk_widget_set_tooltip_text(player->priv->play_pause, _("Play"));
+ parole_player_set_playpause_button_from_stock (player, "gtk-media-play");
}
if ( pix )
- g_object_unref (pix);
-
+ g_object_unref (pix);
+
}
static void
@@ -1430,26 +1464,32 @@ parole_player_quit (ParolePlayer *player)
static void
parole_player_stopped (ParolePlayer *player)
{
+ gchar dur_text[128];
TRACE ("Player stopped");
- gtk_widget_set_sensitive (player->priv->play_pause,
- parole_media_list_is_selected_row (player->priv->list) ||
- !parole_media_list_is_empty (player->priv->list));
+ gtk_action_set_sensitive (player->priv->media_playpause_action,
+ parole_media_list_is_selected_row (player->priv->list) ||
+ !parole_media_list_is_empty (player->priv->list));
+
+ gtk_window_set_title (GTK_WINDOW (player->priv->window), _("Parole Media Player"));
+
+ gtk_widget_hide(player->priv->videobox);
+ gtk_widget_hide(player->priv->audiobox);
+ gtk_widget_show(player->priv->logo_image);
+
+ get_time_string (dur_text, 0);
+ gtk_label_set_text (GTK_LABEL (player->priv->label_duration), dur_text);
parole_player_change_range_value (player, 0);
gtk_widget_set_sensitive (player->priv->range, FALSE);
-
- gtk_widget_set_sensitive (player->priv->seekf, FALSE);
- gtk_widget_set_sensitive (player->priv->seekb, FALSE);
- parole_player_set_playpause_button_image (player->priv->play_pause, GTK_STOCK_MEDIA_PLAY);
- gtk_widget_set_tooltip_text(player->priv->play_pause, _("Play"));
+ parole_player_set_playpause_button_from_stock (player, "gtk-media-play");
parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL);
if ( player->priv->exit )
{
- parole_player_quit (player);
+ parole_player_quit (player);
}
}
@@ -1461,49 +1501,49 @@ parole_player_play_selected_row (ParolePlayer *player)
row = parole_media_list_get_selected_row (player->priv->list);
if ( row == NULL )
- row = parole_media_list_get_first_row (player->priv->list);
+ row = parole_media_list_get_first_row (player->priv->list);
if ( row )
- parole_player_media_activated_cb (player->priv->list, row, player);
+ parole_player_media_activated_cb (player->priv->list, row, player);
}
static void
parole_player_play_next (ParolePlayer *player, gboolean allow_shuffle)
{
- gboolean repeat, shuffle;
+ gboolean repeat, shuffle;
GtkTreeRowReference *row;
- if ( player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD )
+ if ( player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD )
{
- parole_gst_next_dvd_chapter (PAROLE_GST(player->priv->gst));
- return;
+ parole_gst_next_dvd_chapter (PAROLE_GST(player->priv->gst));
+ return;
}
g_object_get (G_OBJECT (player->priv->conf),
- "shuffle", &shuffle,
- "repeat", &repeat,
- NULL);
+ "shuffle", &shuffle,
+ "repeat", &repeat,
+ NULL);
if ( player->priv->row )
{
- parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL);
-
- if ( shuffle && allow_shuffle )
- row = parole_media_list_get_row_random (player->priv->list);
- else
- row = parole_media_list_get_next_row (player->priv->list, player->priv->row, repeat);
-
- if ( row )
- {
- parole_player_media_activated_cb (player->priv->list, row, player);
- return;
- }
- else
- {
- TRACE ("No remaining media in the list");
- gtk_tree_row_reference_free (player->priv->row);
- player->priv->row = NULL;
- }
+ parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL);
+
+ if ( shuffle && allow_shuffle )
+ row = parole_media_list_get_row_random (player->priv->list);
+ else
+ row = parole_media_list_get_next_row (player->priv->list, player->priv->row, repeat);
+
+ if ( row )
+ {
+ parole_player_media_activated_cb (player->priv->list, row, player);
+ return;
+ }
+ else
+ {
+ TRACE ("No remaining media in the list");
+ gtk_tree_row_reference_free (player->priv->row);
+ player->priv->row = NULL;
+ }
}
parole_gst_stop (PAROLE_GST (player->priv->gst));
@@ -1512,31 +1552,31 @@ parole_player_play_next (ParolePlayer *player, gboolean allow_shuffle)
static void
parole_player_play_prev (ParolePlayer *player)
{
- GtkTreeRowReference *row;
+ GtkTreeRowReference *row;
- if ( player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD )
+ if ( player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD )
{
- parole_gst_prev_dvd_chapter (PAROLE_GST(player->priv->gst));
- return;
+ parole_gst_prev_dvd_chapter (PAROLE_GST(player->priv->gst));
+ return;
}
if ( player->priv->row )
{
- parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL);
-
- row = parole_media_list_get_prev_row (player->priv->list, player->priv->row);
-
- if ( row )
- {
- parole_player_media_activated_cb (player->priv->list, row, player);
- return;
- }
- else
- {
- TRACE ("No remaining media in the list");
- gtk_tree_row_reference_free (player->priv->row);
- player->priv->row = NULL;
- }
+ parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL);
+
+ row = parole_media_list_get_prev_row (player->priv->list, player->priv->row);
+
+ if ( row )
+ {
+ parole_player_media_activated_cb (player->priv->list, row, player);
+ return;
+ }
+ else
+ {
+ TRACE ("No remaining media in the list");
+ gtk_tree_row_reference_free (player->priv->row);
+ player->priv->row = NULL;
+ }
}
parole_gst_stop (PAROLE_GST (player->priv->gst));
@@ -1550,26 +1590,26 @@ parole_player_reset_saver_changed (ParolePlayer *player, const ParoleStream *str
TRACE ("Start");
g_object_get (G_OBJECT (player->priv->conf),
- "reset-saver", &reset_saver,
- NULL);
-
+ "reset-saver", &reset_saver,
+ NULL);
+
if ( !reset_saver )
- parole_screen_saver_uninhibit (player->priv->screen_saver, GTK_WINDOW (player->priv->window));
+ parole_screen_saver_uninhibit (player->priv->screen_saver, GTK_WINDOW (player->priv->window));
else if ( player->priv->state == PAROLE_STATE_PLAYING )
{
- gboolean has_video;
-
- g_object_get (G_OBJECT (stream),
- "has-video", &has_video,
- NULL);
-
- if ( has_video )
- {
- parole_screen_saver_inhibit (player->priv->screen_saver, GTK_WINDOW (player->priv->window));
- }
+ gboolean has_video;
+
+ g_object_get (G_OBJECT (stream),
+ "has-video", &has_video,
+ NULL);
+
+ if ( has_video )
+ {
+ parole_screen_saver_inhibit (player->priv->screen_saver, GTK_WINDOW (player->priv->window));
+ }
}
else
- parole_screen_saver_uninhibit (player->priv->screen_saver, GTK_WINDOW (player->priv->window));
+ parole_screen_saver_uninhibit (player->priv->screen_saver, GTK_WINDOW (player->priv->window));
}
static void
@@ -1582,79 +1622,105 @@ parole_player_media_state_cb (ParoleGst *gst, const ParoleStream *stream, Parole
if ( state == PAROLE_STATE_PLAYING )
{
- parole_player_playing (player, stream);
- parole_player_show_audiobox(player);
+ parole_player_playing (player, stream);
+ parole_player_show_audiobox(player);
}
else if ( state == PAROLE_STATE_PAUSED )
{
- parole_player_paused (player);
+ parole_player_paused (player);
}
else if ( state == PAROLE_STATE_STOPPED )
{
- parole_player_stopped (player);
+ parole_player_stopped (player);
}
/* PAROLE_STATE_ABOUT_TO_FINISH is used for continuous playback of audio CDs */
else if ( state == PAROLE_STATE_ABOUT_TO_FINISH )
{
#ifdef DEBUG
- TRACE ("***Playback about to finish***");
+ TRACE ("***Playback about to finish***");
#endif
- if ( player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD )
- parole_player_play_next (player, TRUE);
+ if ( player->priv->current_media_type == PAROLE_MEDIA_TYPE_DVD )
+ parole_player_play_next (player, TRUE);
}
else if ( state == PAROLE_STATE_PLAYBACK_FINISHED )
{
#ifdef DEBUG
- TRACE ("***Playback finished***");
+ TRACE ("***Playback finished***");
#endif
- parole_player_play_next (player, TRUE);
+ parole_player_play_next (player, TRUE);
}
}
-void
-parole_player_play_pause_clicked (GtkButton *button, ParolePlayer *player)
+static void
+on_infobar_close_clicked (GtkButton *button, ParolePlayer *player)
+{
+ gtk_widget_hide(player->priv->infobar);
+}
+
+static void
+parole_player_toggle_playpause (ParolePlayer *player)
{
if ( player->priv->state == PAROLE_STATE_PLAYING )
- parole_gst_pause (PAROLE_GST (player->priv->gst));
+ parole_gst_pause (PAROLE_GST (player->priv->gst));
else if ( player->priv->state == PAROLE_STATE_PAUSED )
- parole_gst_resume (PAROLE_GST (player->priv->gst));
+ parole_gst_resume (PAROLE_GST (player->priv->gst));
else
- parole_player_play_selected_row (player);
+ parole_player_play_selected_row (player);
}
void
-parole_player_stop_clicked (GtkButton *button, ParolePlayer *player)
+parole_player_playpause_action_cb (GtkAction *action, ParolePlayer *player)
{
- parole_gst_stop (PAROLE_GST (player->priv->gst));
+ parole_player_toggle_playpause (player);
+}
+
+void
+parole_player_pause_clicked (GtkButton *button, ParolePlayer *player)
+{
+ parole_gst_pause (PAROLE_GST (player->priv->gst));
}
-void parole_player_forward_cb (GtkButton *button, ParolePlayer *player)
+void parole_player_next_action_cb (GtkAction *action, ParolePlayer *player)
{
- parole_player_play_next (player, TRUE);
+ parole_player_play_next (player, TRUE);
}
-
-void parole_player_back_cb (GtkButton *button, ParolePlayer *player)
+
+void parole_player_previous_action_cb (GtkAction *action, ParolePlayer *player)
+{
+ parole_player_play_prev (player);
+}
+
+GtkAction *parole_player_get_action(ParolePlayerAction action)
{
- parole_player_play_prev (player);
+ switch(action)
+ {
+ case PAROLE_PLAYER_ACTION_PLAYPAUSE:
+ return playpause_action;
+ break;
+ case PAROLE_PLAYER_ACTION_PREVIOUS:
+ return previous_action;
+ break;
+ case PAROLE_PLAYER_ACTION_NEXT:
+ return next_action;
+ break;
+ default:
+ return NULL;
+ }
}
void parole_player_seekf_cb (GtkWidget *widget, ParolePlayer *player, gdouble seek)
{
- seek = parole_gst_get_stream_position (PAROLE_GST (player->priv->gst) )
- +
- seek;
- parole_gst_seek (PAROLE_GST (player->priv->gst), seek);
- parole_player_change_range_value (player, seek);
+ seek = parole_gst_get_stream_position (PAROLE_GST (player->priv->gst) ) + seek;
+ parole_gst_seek (PAROLE_GST (player->priv->gst), seek);
+ parole_player_change_range_value (player, seek);
}
void parole_player_seekb_cb (GtkWidget *widget, ParolePlayer *player, gdouble seek)
{
- seek = parole_gst_get_stream_position (PAROLE_GST (player->priv->gst) )
- -
- seek;
- if ( seek < 0 ) { seek = 0; }
- parole_gst_seek (PAROLE_GST (player->priv->gst), seek);
- parole_player_change_range_value (player, seek);
+ seek = parole_gst_get_stream_position (PAROLE_GST (player->priv->gst) ) - seek;
+ if ( seek < 0 ) { seek = 0; }
+ parole_gst_seek (PAROLE_GST (player->priv->gst), seek);
+ parole_player_change_range_value (player, seek);
}
gboolean
@@ -1684,11 +1750,11 @@ parole_player_range_value_changed (GtkRange *range, ParolePlayer *player)
if ( !player->priv->internal_range_change )
{
- value = gtk_range_get_value (GTK_RANGE (range));
- player->priv->user_seeking = TRUE;
- TRACE ("Sending a seek request with value :%e", value);
- parole_gst_seek (PAROLE_GST (player->priv->gst), value);
- player->priv->user_seeking = FALSE;
+ value = gtk_range_get_value (GTK_RANGE (range));
+ player->priv->user_seeking = TRUE;
+ TRACE ("Sending a seek request with value :%e", value);
+ parole_gst_seek (PAROLE_GST (player->priv->gst), value);
+ player->priv->user_seeking = FALSE;
}
}
@@ -1711,85 +1777,88 @@ parole_player_media_tag_cb (ParoleGst *gst, const ParoleStream *stream, ParolePl
if ( player->priv->row )
{
- g_object_get (G_OBJECT (stream),
- "title", &title,
- "album", &album,
- "artist", &artist,
- "year", &year,
- NULL);
-
- if ( title )
- {
- parole_media_list_set_row_name (player->priv->list, player->priv->row, title);
- gtk_window_set_title (GTK_WINDOW (player->priv->window), title);
- gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_title), g_markup_printf_escaped("<span color='#F4F4F4'><b><big>%s</big></b></span>", title));
- g_free (title);
- }
- else
- gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_title), g_strdup_printf("<span color='#F4F4F4'><b><big>%s</big></b></span>", _("Unknown Song")));
-
- if ( album )
- {
- if (year)
- gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_markup_printf_escaped("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s (%s)</span></big>", _("on"), album, year));
- else
- gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_markup_printf_escaped("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s</span></big>", _("on"), album));
-
- g_free (album);
- }
-
- else
- gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_strdup_printf("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s</span></big>", _("on"), _("Unknown Album")));
-
- if (year)
- g_free (year);
-
- if ( artist )
- {
- gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_artist), g_markup_printf_escaped("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s</span></big>", _("by"), artist));
- g_free (artist);
- }
- else
- gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_artist), g_strdup_printf("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s</span></big>", _("by"), _("Unknown Artist")));
-
- image = parole_stream_get_image(G_OBJECT(stream));
- if (image)
- {
- gtk_image_set_from_pixbuf(GTK_IMAGE(player->priv->audiobox_cover), image);
- g_object_unref(image);
- }
- else
- gtk_image_set_from_icon_name(GTK_IMAGE(player->priv->audiobox_cover), "audio-x-generic", GTK_ICON_SIZE_ARTWORK_FALLBACK);
+ g_object_get (G_OBJECT (stream),
+ "title", &title,
+ "album", &album,
+ "artist", &artist,
+ "year", &year,
+ NULL);
+
+ if ( title )
+ {
+ parole_media_list_set_row_name (player->priv->list, player->priv->row, title);
+ gtk_window_set_title (GTK_WINDOW (player->priv->window), title);
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_title), g_markup_printf_escaped("<span color='#F4F4F4'><b><big>%s</big></b></span>", title));
+ g_free (title);
+ }
+ else
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_title), g_strdup_printf("<span color='#F4F4F4'><b><big>%s</big></b></span>", _("Unknown Song")));
+
+ if ( album )
+ {
+ if (year)
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_markup_printf_escaped("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s (%s)</span></big>", _("on"), album, year));
+ else
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_markup_printf_escaped("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s</span></big>", _("on"), album));
+
+ g_free (album);
+ }
+
+ else
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_album), g_strdup_printf("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s</span></big>", _("on"), _("Unknown Album")));
+
+ if (year)
+ g_free (year);
+
+ if ( artist )
+ {
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_artist), g_markup_printf_escaped("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s</span></big>", _("by"), artist));
+ g_free (artist);
+ }
+ else
+ gtk_label_set_markup(GTK_LABEL(player->priv->audiobox_artist), g_strdup_printf("<big><span color='#BBBBBB'><i>%s</i></span> <span color='#F4F4F4'>%s</span></big>", _("by"), _("Unknown Artist")));
+
+ image = parole_stream_get_image(G_OBJECT(stream));
+ if (image)
+ {
+ gtk_image_set_from_pixbuf(GTK_IMAGE(player->priv->audiobox_cover), image);
+ g_object_unref(image);
+ }
+ else
+ gtk_image_set_from_icon_name(GTK_IMAGE(player->priv->audiobox_cover), "audio-x-generic-symbolic", GTK_ICON_SIZE_ARTWORK_FALLBACK);
}
}
static void
parole_player_buffering_cb (ParoleGst *gst, const ParoleStream *stream, gint percentage, ParolePlayer *player)
{
- gchar *buff;
+ gchar *buff;
if ( percentage == 100 )
{
- player->priv->buffering = FALSE;
- parole_gst_resume (PAROLE_GST (player->priv->gst));
- gtk_widget_hide (player->priv->progressbar_buffering);
- gtk_widget_show (player->priv->playcontrol_box);
+ player->priv->buffering = FALSE;
+ parole_gst_resume (PAROLE_GST (player->priv->gst));
+ gtk_widget_hide (player->priv->progressbar_buffering);
+ gtk_widget_show (player->priv->label_duration);
+ gtk_widget_show (player->priv->range);
+ gtk_widget_show (player->priv->label_elapsed);
}
else
{
- player->priv->buffering = TRUE;
-
-
- if ( player->priv->state == PAROLE_STATE_PLAYING )
- parole_gst_pause (PAROLE_GST (player->priv->gst));
-
- buff = g_strdup_printf ("%s (%d%%)", _("Buffering"), percentage);
-
- gtk_progress_bar_set_text (GTK_PROGRESS_BAR (player->priv->progressbar_buffering), buff);
- gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (player->priv->progressbar_buffering), (gdouble) percentage/100);
- gtk_widget_hide (player->priv->playcontrol_box);
- gtk_widget_show (player->priv->progressbar_buffering);
- g_free (buff);
+ player->priv->buffering = TRUE;
+
+ if ( player->priv->state == PAROLE_STATE_PLAYING )
+ parole_gst_pause (PAROLE_GST (player->priv->gst));
+
+ buff = g_strdup_printf ("%s (%d%%)", _("Buffering"), percentage);
+
+ gtk_progress_bar_set_text (GTK_PROGRESS_BAR (player->priv->progressbar_buffering), buff);
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (player->priv->progressbar_buffering), (gdouble) percentage/100);
+ gtk_widget_hide (player->priv->label_duration);
+ gtk_widget_hide (player->priv->range);
+ gtk_widget_hide (player->priv->label_elapsed);
+ gtk_widget_show (player->priv->progressbar_buffering);
+ g_free (buff);
}
}
@@ -1797,12 +1866,13 @@ static void
parole_player_dvd_chapter_count_change_cb (ParoleGst *gst, gint chapter_count, ParolePlayer *player)
{
gtk_tree_row_reference_free (player->priv->row);
- player->priv->row = NULL;
-
- /* FIXME Cannot clear list prior to adding new chapters. */
- //parole_media_list_clear_list (player->priv->list);
-
+ player->priv->row = NULL;
+
+ /* FIXME Cannot clear list prior to adding new chapters. */
+ //parole_media_list_clear_list (player->priv->list);
+
parole_media_list_add_dvd_chapters (player->priv->list, chapter_count);
+ parole_player_update_chapters(player, chapter_count);
}
static void
@@ -1810,25 +1880,22 @@ parole_player_dvd_chapter_change_cb (ParoleGst *gst, gint chapter_count, ParoleP
{
GdkPixbuf *pix = NULL;
- parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL);
-
+ parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, NULL);
+
player->priv->row = parole_media_list_get_row_n (player->priv->list, chapter_count-1);
- pix = parole_icon_load ("player_play", 16);
-
- if ( !pix )
- pix = parole_icon_load ("gtk-media-play-ltr", 16);
+ pix = parole_icon_load ("media-playback-start", 16);
parole_media_list_set_row_pixbuf (player->priv->list, player->priv->row, pix);
parole_media_list_select_row (player->priv->list, player->priv->row);
if ( pix )
- g_object_unref (pix);
+ g_object_unref (pix);
}
gboolean parole_player_delete_event_cb (GtkWidget *widget, GdkEvent *ev, ParolePlayer *player)
{
- parole_window_busy_cursor (GTK_WIDGET (player->priv->window)->window);
+ parole_window_busy_cursor (gtk_widget_get_window(GTK_WIDGET (player->priv->window)));
player->priv->exit = TRUE;
parole_gst_terminate (PAROLE_GST (player->priv->gst));
@@ -1837,35 +1904,8 @@ gboolean parole_player_delete_event_cb (GtkWidget *widget, GdkEvent *ev, ParoleP
}
void
-parole_player_destroy_cb (GtkObject *window, ParolePlayer *player)
-{
-}
-
-static void
-parole_player_play_menu_item_activate (ParolePlayer *player)
-{
- gtk_widget_activate (player->priv->play_pause);
-}
-
-static void
-parole_player_move_fs_window (ParolePlayer *player)
+parole_player_destroy_cb (GObject *window, ParolePlayer *player)
{
- GdkScreen *screen;
- GdkRectangle rect;
-
- screen = gtk_window_get_screen (GTK_WINDOW (player->priv->fs_window));
-
- gdk_screen_get_monitor_geometry (screen,
- gdk_screen_get_monitor_at_window (screen, player->priv->window->window),
- &rect);
-
- gtk_window_resize (GTK_WINDOW (player->priv->fs_window),
- rect.width,
- player->priv->play_box->allocation.height);
-
- gtk_window_move (GTK_WINDOW (player->priv->fs_window),
- rect.x,
- rect.height + rect.y - player->priv->play_box->allocation.height);
}
gboolean
@@ -1874,6 +1914,22 @@ parole_player_window_state_event (GtkWidget *widget,
ParolePlayer *player)
{
gboolean fullscreen = FALSE;
+
+ if (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED)
+ {
+ /* Restore the previously saved window size if maximized */
+ g_object_set (G_OBJECT (player->priv->conf),
+ "window-width", player->priv->last_w,
+ "window-height", player->priv->last_h,
+ "window-maximized", TRUE,
+ NULL);
+ }
+ else
+ {
+ g_object_set (G_OBJECT (player->priv->conf),
+ "window-maximized", FALSE,
+ NULL);
+ }
if (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)
fullscreen = TRUE;
@@ -1894,9 +1950,7 @@ parole_player_window_state_event (GtkWidget *widget,
void
parole_player_reset_controls (ParolePlayer *player, gboolean fullscreen)
{
- gint npages;
static gint current_page = 0;
- GdkWindow *gdkwindow;
gboolean show_playlist;
@@ -1905,42 +1959,33 @@ parole_player_reset_controls (ParolePlayer *player, gboolean fullscreen)
/* If the player is in fullscreen mode, change to windowed mode. */
if ( player->priv->full_screen )
{
- npages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (player->priv->main_nt));
- gtk_widget_reparent (player->priv->play_box, player->priv->control);
- gtk_box_set_child_packing( GTK_BOX(player->priv->control), GTK_WIDGET(player->priv->play_box), TRUE, TRUE, 2, GTK_PACK_START );
- gtk_widget_hide (player->priv->fs_window);
- gtk_widget_show (player->priv->play_box);
gtk_widget_show (player->priv->menu_bar);
- show_playlist = gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM(player->priv->show_hide_playlist) );
+ show_playlist = gtk_toggle_action_get_active (player->priv->toggle_playlist_action);
gtk_widget_show (player->priv->playlist_nt);
parole_player_set_playlist_visible(player, show_playlist);
- gtk_widget_show (player->priv->go_fs);
- gtk_widget_hide (player->priv->leave_fs);
- gtk_widget_show (player->priv->show_hide_playlist_button);
-
- gtk_notebook_set_show_tabs (GTK_NOTEBOOK (player->priv->main_nt), npages > 1);
+ gtk_action_set_label(player->priv->media_fullscreen_action, _("_Fullscreen"));
+ gtk_widget_set_tooltip_text (player->priv->fullscreen_button, _("Fullscreen"));
+ gtk_image_set_from_icon_name (GTK_IMAGE(player->priv->fullscreen_image), "view-fullscreen-symbolic", 24);
+ gtk_action_set_icon_name(player->priv->media_fullscreen_action, "view-fullscreen-symbolic");
+ gtk_action_set_visible (GTK_ACTION(player->priv->toggle_playlist_action), TRUE);
gtk_window_unfullscreen (GTK_WINDOW (player->priv->window));
gtk_notebook_set_current_page (GTK_NOTEBOOK (player->priv->playlist_nt), current_page);
- gdkwindow = gtk_widget_get_window (player->priv->window);
- gdk_window_set_cursor (gdkwindow, NULL);
+ parole_gst_set_cursor_visible (PAROLE_GST (player->priv->gst), FALSE);
player->priv->full_screen = FALSE;
}
else
{
- parole_player_move_fs_window (player);
- gtk_widget_reparent (player->priv->play_box, player->priv->fs_window);
-
- gtk_widget_hide (player->priv->play_box);
gtk_widget_hide (player->priv->menu_bar);
gtk_widget_hide (player->priv->playlist_nt);
parole_player_set_playlist_visible(player, FALSE);
- gtk_widget_hide (player->priv->go_fs);
- gtk_widget_show (player->priv->leave_fs);
- gtk_widget_hide (player->priv->show_hide_playlist_button);
+ gtk_action_set_label(player->priv->media_fullscreen_action, _("Leave _Fullscreen"));
+ gtk_widget_set_tooltip_text (player->priv->fullscreen_button, _("Leave Fullscreen"));
+ gtk_image_set_from_icon_name (GTK_IMAGE(player->priv->fullscreen_image), "view-restore-symbolic", 24);
+ gtk_action_set_icon_name(player->priv->media_fullscreen_action, "view-restore-symbolic");
+ gtk_action_set_visible (GTK_ACTION(player->priv->toggle_playlist_action), FALSE);
current_page = gtk_notebook_get_current_page (GTK_NOTEBOOK (player->priv->playlist_nt));
- gtk_notebook_set_show_tabs (GTK_NOTEBOOK (player->priv->main_nt), FALSE);
gtk_window_fullscreen (GTK_WINDOW (player->priv->window));
player->priv->full_screen = TRUE;
@@ -1951,9 +1996,8 @@ parole_player_reset_controls (ParolePlayer *player, gboolean fullscreen)
{
gtk_widget_hide (player->priv->menu_bar);
gtk_widget_hide (player->priv->playlist_nt);
- gtk_widget_hide (player->priv->go_fs);
- gtk_widget_hide (player->priv->show_hide_playlist);
- gtk_widget_hide (player->priv->show_hide_playlist_button);
+ gtk_action_set_visible (player->priv->media_fullscreen_action, FALSE);
+ gtk_action_set_visible (GTK_ACTION(player->priv->toggle_playlist_action), FALSE);
}
}
@@ -1961,7 +2005,7 @@ void
parole_player_embedded (ParolePlayer *player)
{
if ( player->priv->embedded == TRUE )
- return;
+ return;
player->priv->embedded = TRUE;
@@ -1972,32 +2016,29 @@ void
parole_player_full_screen (ParolePlayer *player, gboolean fullscreen)
{
if ( player->priv->full_screen == fullscreen )
- return;
+ return;
parole_player_reset_controls(player, fullscreen);
}
-static void
-parole_player_full_screen_menu_item_activate (ParolePlayer *player)
+void parole_player_fullscreen_action_cb (GtkAction *action, ParolePlayer *player)
{
parole_player_full_screen (player, !player->priv->full_screen);
}
-void parole_player_full_screen_activated_cb (GtkWidget *widget, ParolePlayer *player)
-{
- parole_player_full_screen_menu_item_activate (player);
-}
-
-void parole_player_leave_fs_cb (GtkButton *button, ParolePlayer *player)
+static void parole_player_hide_menubar_cb (GtkWidget *widget, ParolePlayer *player)
{
- parole_player_full_screen_menu_item_activate (player);
+ if (!player->priv->full_screen)
+ gtk_widget_set_visible(player->priv->menu_bar, !gtk_widget_get_visible(player->priv->menu_bar));
}
static void
parole_player_show_menu (ParolePlayer *player, guint button, guint activate_time)
{
GtkWidget *menu, *mi;
- gboolean sensitive;
+ GtkAccelGroup *accels = gtk_accel_group_new();
+
+ gtk_window_add_accel_group(GTK_WINDOW(player->priv->window), accels);
player->priv->current_media_type = parole_gst_get_current_stream_type (PAROLE_GST (player->priv->gst));
@@ -2005,60 +2046,55 @@ parole_player_show_menu (ParolePlayer *player, guint button, guint activate_time
/*Play menu item
*/
- mi = gtk_image_menu_item_new_from_stock (player->priv->state == PAROLE_STATE_PLAYING
- ? GTK_STOCK_MEDIA_PAUSE : GTK_STOCK_MEDIA_PLAY,
- NULL);
-
- g_object_get (G_OBJECT (player->priv->play_pause),
- "sensitive", &sensitive,
- NULL);
-
- gtk_widget_set_sensitive (mi, sensitive);
- gtk_widget_show (mi);
- g_signal_connect_swapped (mi, "activate",
- G_CALLBACK (parole_player_play_menu_item_activate), player);
+ mi = gtk_action_create_menu_item(player->priv->media_playpause_action);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
/*
- * Previous item in playlist.
+ * Next item in playlist.
*/
- mi = gtk_image_menu_item_new_from_stock (GTK_STOCK_MEDIA_NEXT, NULL);
-
- gtk_widget_set_sensitive (mi, (player->priv->state >= PAROLE_STATE_PAUSED));
- gtk_widget_show (mi);
- g_signal_connect (mi, "activate",
- G_CALLBACK (parole_player_forward_cb), player);
+ mi = gtk_action_create_menu_item(player->priv->media_next_action);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
/*
- * Next item in playlist.
+ * Previous item in playlist.
*/
- mi = gtk_image_menu_item_new_from_stock (GTK_STOCK_MEDIA_PREVIOUS, NULL);
-
- gtk_widget_set_sensitive (mi, (player->priv->state >= PAROLE_STATE_PAUSED));
- gtk_widget_show (mi);
- g_signal_connect (mi, "activate",
- G_CALLBACK (parole_player_back_cb), player);
+ mi = gtk_action_create_menu_item(player->priv->media_previous_action);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
/*
* Un/Full screen
*/
- mi = gtk_image_menu_item_new_from_stock (player->priv->full_screen ? GTK_STOCK_LEAVE_FULLSCREEN:
- GTK_STOCK_FULLSCREEN, NULL);
- gtk_widget_show (mi);
- g_signal_connect_swapped (mi, "activate",
- G_CALLBACK (parole_player_full_screen_menu_item_activate), player);
+ mi = gtk_action_create_menu_item(player->priv->media_fullscreen_action);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
+ if (!player->priv->full_screen)
+ {
+ mi = gtk_separator_menu_item_new();
+ gtk_widget_show(GTK_WIDGET(mi));
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
+
+ /*
+ * Un/Hide menubar
+ */
+ mi = gtk_check_menu_item_new_with_label(_("Show menubar"));
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mi), gtk_widget_get_visible(player->priv->menu_bar));
+ g_signal_connect (mi, "activate",
+ G_CALLBACK (parole_player_hide_menubar_cb), player);
+ gtk_widget_add_accelerator(mi, "activate", accels,
+ GDK_KEY_m, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
+ gtk_widget_show (mi);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
+
+ }
+
g_signal_connect_swapped (menu, "selection-done",
- G_CALLBACK (gtk_widget_destroy), menu);
+ G_CALLBACK (gtk_widget_destroy), menu);
gtk_menu_popup (GTK_MENU (menu),
- NULL, NULL,
- NULL, NULL,
- button, activate_time);
+ NULL, NULL,
+ NULL, NULL,
+ button, activate_time);
}
gboolean
@@ -2068,85 +2104,72 @@ parole_player_gst_widget_button_press (GtkWidget *widget, GdkEventButton *ev, Pa
if ( ev->type == GDK_2BUTTON_PRESS )
{
- parole_player_full_screen_menu_item_activate (player);
- ret_val = TRUE;
+ gtk_action_activate (player->priv->media_fullscreen_action);
+ ret_val = TRUE;
}
return ret_val;
}
-static gboolean
+gboolean
parole_player_gst_widget_button_release (GtkWidget *widget, GdkEventButton *ev, ParolePlayer *player)
{
gboolean ret_val = FALSE;
if ( ev->button == 3 )
{
- parole_player_show_menu (player, ev->button, ev->time);
- gtk_widget_grab_focus (widget);
- ret_val = TRUE;
+ parole_player_show_menu (player, ev->button, ev->time);
+ gtk_widget_grab_focus (widget);
+ ret_val = TRUE;
}
else if ( ev->button == 1 )
{
- gtk_widget_grab_focus (widget);
- ret_val = TRUE;
+ gtk_widget_grab_focus (widget);
+ ret_val = TRUE;
}
return ret_val;
}
-static gboolean parole_player_hide_fs_window (gpointer data)
+gboolean parole_player_hide_controls (gpointer data)
{
ParolePlayer *player;
GdkWindow *gdkwindow;
- gint x, y, w, h;
+ GtkWidget *controls;
+
+ TRACE("start");
player = PAROLE_PLAYER (data);
- if ( GTK_WIDGET_VISIBLE (player->priv->fs_window) )
- {
- /* Don't hide the popup if the pointer is above it*/
- w = player->priv->fs_window->allocation.width;
- h = player->priv->fs_window->allocation.height;
-
- gtk_widget_get_pointer (player->priv->fs_window, &x, &y);
-
- if ((x >= 0) && (x <= w) && (y >= 0) && (y <= h))
- return TRUE;
-
- gtk_widget_hide (player->priv->fs_window);
- gdkwindow = gtk_widget_get_window (player->priv->window);
- parole_window_invisible_cursor (gdkwindow);
- }
+ controls = gtk_widget_get_parent(player->priv->control);
+
+ gtk_widget_hide(controls);
+ gdkwindow = gtk_widget_get_window (GTK_WIDGET(player->priv->eventbox_output));
+ parole_window_invisible_cursor (gdkwindow);
return FALSE;
}
-static gboolean
+gboolean
parole_player_gst_widget_motion_notify_event (GtkWidget *widget, GdkEventMotion *ev, ParolePlayer *player)
{
static gulong hide_timeout = 0;
GdkWindow *gdkwindow;
- if ( player->priv->full_screen )
- {
- gtk_widget_show_all (player->priv->fs_window);
- gdkwindow = gtk_widget_get_window (player->priv->window);
- gdk_window_set_cursor (gdkwindow, NULL);
- if ( hide_timeout != 0 )
- {
- g_source_remove (hide_timeout);
- hide_timeout = 0;
- }
-
- hide_timeout = g_timeout_add_seconds (4, (GSourceFunc) parole_player_hide_fs_window, player);
- }
- else if ( hide_timeout != 0)
+ if ( hide_timeout != 0)
{
- g_source_remove (hide_timeout);
- hide_timeout = 0;
+ g_source_remove (hide_timeout);
+ hide_timeout = 0;
}
+ gtk_widget_show_all (gtk_widget_get_parent(player->priv->control));
+
+ gdkwindow = gtk_widget_get_window (GTK_WIDGET(player->priv->eventbox_output));
+ gdk_window_set_cursor (gdkwindow, NULL);
+
+ if ( player->priv->state == PAROLE_STATE_PLAYING )
+ hide_timeout = g_timeout_add_seconds (4, (GSourceFunc) parole_player_hide_controls, player);
+
return FALSE;
}
@@ -2162,13 +2185,22 @@ parole_player_menu_add_cb (GtkWidget *widget, ParolePlayer *player)
parole_media_list_open (player->priv->list);
}
-void parole_player_open_preferences_cb (GtkWidget *widget, ParolePlayer *player)
+void
+parole_player_save_playlist_cb (GtkWidget *widget, ParolePlayer *player)
{
- ParoleConfDialog *dialog;
-
- dialog = parole_conf_dialog_new ();
-
- parole_conf_dialog_open (dialog, player->priv->window);
+ parole_media_list_save_cb(widget, player->priv->list);
+}
+
+void
+parole_player_media_menu_select_cb (GtkMenuItem *widget, ParolePlayer *player)
+{
+ gtk_widget_set_sensitive (player->priv->save_playlist,
+ !parole_media_list_is_empty (player->priv->list));
+}
+
+void parole_player_open_preferences_cb (GtkWidget *widget, ParolePlayer *player)
+{
+ parole_conf_dialog_open (player->priv->settings_dialog, player->priv->window);
}
void
@@ -2178,38 +2210,26 @@ parole_player_menu_exit_cb (GtkWidget *widget, ParolePlayer *player)
}
-void parole_player_shuffle_toggled_cb (GtkWidget *widget, ParolePlayer *player)
+void parole_player_toggle_shuffle_action_cb (GtkToggleAction *action, ParolePlayer *player)
{
- gboolean toggled;
-
- toggled = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget));
-
g_object_set (G_OBJECT (player->priv->conf),
- "shuffle", toggled,
- NULL);
-
- parole_media_list_set_shuffle_toggled(player->priv->list, toggled);
+ "shuffle", gtk_toggle_action_get_active (action),
+ NULL);
}
-void parole_player_repeat_toggled_cb (GtkWidget *widget, ParolePlayer *player)
+void parole_player_toggle_repeat_action_cb (GtkToggleAction *action, ParolePlayer *player)
{
- gboolean toggled;
-
- toggled = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget));
-
g_object_set (G_OBJECT (player->priv->conf),
- "repeat", toggled,
- NULL);
-
- parole_media_list_set_repeat_toggled(player->priv->list, toggled);
+ "repeat", gtk_toggle_action_get_active (action),
+ NULL);
}
static void
parole_property_notify_cb_volume (ParoleGst *gst, GParamSpec *spec, ParolePlayer *player)
{
- gdouble volume;
- volume = parole_gst_get_volume (PAROLE_GST (player->priv->gst));
- gtk_scale_button_set_value (GTK_SCALE_BUTTON (player->priv->volume), volume);
+ gdouble volume;
+ volume = parole_gst_get_volume (PAROLE_GST (player->priv->gst));
+ gtk_scale_button_set_value (GTK_SCALE_BUTTON (player->priv->volume), volume);
}
static void
@@ -2225,13 +2245,13 @@ parole_player_volume_scroll_event_cb (GtkWidget *widget, GdkEventScroll *ev, Par
if ( ev->direction == GDK_SCROLL_UP )
{
- parole_player_volume_up (NULL, player);
- ret_val = TRUE;
+ parole_player_volume_up (NULL, player);
+ ret_val = TRUE;
}
else if ( ev->direction == GDK_SCROLL_DOWN )
{
- parole_player_volume_down (NULL, player);
- ret_val = TRUE;
+ parole_player_volume_down (NULL, player);
+ ret_val = TRUE;
}
return ret_val;
@@ -2242,9 +2262,9 @@ parole_player_volume_value_changed_cb (GtkScaleButton *widget, gdouble value, Pa
{
parole_player_change_volume (player, value);
if ( value > 0.0 )
- g_object_set (G_OBJECT (player->priv->conf),
- "volume", (gint)(value * 100),
- NULL);
+ g_object_set (G_OBJECT (player->priv->conf),
+ "volume", (gint)(value * 100),
+ NULL);
}
void
@@ -2269,26 +2289,19 @@ void parole_player_volume_mute (GtkWidget *widget, ParolePlayer *player)
if (gtk_scale_button_get_value (GTK_SCALE_BUTTON (player->priv->volume)) == 0.0)
{
g_object_get (G_OBJECT (player->priv->conf),
- "volume", &value,
- NULL);
- gtk_menu_item_set_label( GTK_MENU_ITEM(widget), _("Mute") );
+ "volume", &value,
+ NULL);
+ gtk_menu_item_set_label( GTK_MENU_ITEM(player->priv->mute), _("Mute") );
}
else
{
value = 0;
- gtk_menu_item_set_label( GTK_MENU_ITEM(widget), _("Unmute") );
+ gtk_menu_item_set_label( GTK_MENU_ITEM(player->priv->mute), _("Unmute") );
}
gtk_scale_button_set_value (GTK_SCALE_BUTTON (player->priv->volume), (gdouble)(value)/100);
}
static void
-parole_player_screen_size_change_changed_cb (GdkScreen *screen, ParolePlayer *player)
-{
- if ( player->priv->full_screen )
- parole_player_move_fs_window (player);
-}
-
-static void
parole_player_sm_quit_requested_cb (ParolePlayer *player)
{
player->priv->exit = TRUE;
@@ -2312,56 +2325,53 @@ parole_player_finalize (GObject *object)
g_object_unref (player->priv->screen_saver);
if ( player->priv->client_id )
- g_free (player->priv->client_id);
-
+ g_free (player->priv->client_id);
+
g_object_unref (player->priv->sm_client);
#ifdef HAVE_XF86_KEYSYM
if (player->priv->button)
- g_object_unref (player->priv->button);
+ g_object_unref (player->priv->button);
#endif
- gtk_widget_destroy (player->priv->fs_window);
-
-
G_OBJECT_CLASS (parole_player_parent_class)->finalize (object);
}
static void parole_player_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ParolePlayer *player;
player = PAROLE_PLAYER (object);
switch (prop_id)
{
- case PROP_CLIENT_ID:
- player->priv->client_id = g_value_dup_string (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_CLIENT_ID:
+ player->priv->client_id = g_value_dup_string (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
static void parole_player_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ParolePlayer *player;
player = PAROLE_PLAYER (object);
switch (prop_id)
{
- case PROP_CLIENT_ID:
- g_value_set_string (value, player->priv->client_id);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ case PROP_CLIENT_ID:
+ g_value_set_string (value, player->priv->client_id);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
}
}
@@ -2385,17 +2395,17 @@ parole_player_constructed (GObject *object)
current_dir = g_get_current_dir ();
- player->priv->sm_client = xfce_sm_client_get_full (XFCE_SM_CLIENT_RESTART_NORMAL,
- XFCE_SM_CLIENT_PRIORITY_DEFAULT,
- player->priv->client_id,
- current_dir,
- restart_command,
- DESKTOPDIR "/" PACKAGE_NAME ".desktop");
-
+ player->priv->sm_client = xfce_sm_client_get_full (XFCE_SM_CLIENT_RESTART_NORMAL,
+ XFCE_SM_CLIENT_PRIORITY_DEFAULT,
+ player->priv->client_id,
+ current_dir,
+ restart_command,
+ DESKTOPDIR "/" PACKAGE_NAME ".desktop");
+
if ( xfce_sm_client_connect (player->priv->sm_client, NULL ) )
{
- g_signal_connect_swapped (player->priv->sm_client, "quit-requested",
- G_CALLBACK (parole_player_sm_quit_requested_cb), player);
+ g_signal_connect_swapped (player->priv->sm_client, "quit-requested",
+ G_CALLBACK (parole_player_sm_quit_requested_cb), player);
}
g_free (current_dir);
@@ -2419,12 +2429,12 @@ parole_player_class_init (ParolePlayerClass *klass)
* Since: 0.2.2
**/
g_object_class_install_property (object_class,
- PROP_CLIENT_ID,
- g_param_spec_string ("client-id",
- NULL,
- NULL,
- NULL,
- G_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY));
+ PROP_CLIENT_ID,
+ g_param_spec_string ("client-id",
+ NULL,
+ NULL,
+ NULL,
+ G_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY));
g_type_class_add_private (klass, sizeof (ParolePlayerPrivate));
@@ -2460,80 +2470,78 @@ parole_player_handle_key_press (GdkEventKey *ev, ParolePlayer *player)
if ( focused )
{
- if ( ( gtk_widget_is_ancestor (focused, player->priv->playlist_nt) ) ||
- ( gtk_widget_is_ancestor (focused, player->priv->main_nt) &&
- !gtk_widget_is_ancestor (focused, player->priv->main_box) ))
- {
- return FALSE;
- }
+ if ( gtk_widget_is_ancestor (focused, player->priv->playlist_nt) )
+ {
+ return FALSE;
+ }
}
switch (ev->keyval)
{
- case GDK_f:
- case GDK_F:
- if ( player->priv->embedded != TRUE ) parole_player_full_screen_menu_item_activate (player);
- ret_val = TRUE;
- break;
- case GDK_space:
- case GDK_p:
- case GDK_P:
- parole_player_play_pause_clicked (NULL, player);
- ret_val = TRUE;
- break;
- case GDK_Right:
- /* Media seekable ?*/
- if ( GTK_WIDGET_SENSITIVE (player->priv->range) )
- {
- if (ev->state & GDK_CONTROL_MASK) parole_player_seekf_cb (NULL, player, seek_medium);
- else parole_player_seekf_cb (NULL, player, seek_short);
- }
- ret_val = TRUE;
- break;
- case GDK_Left:
- if ( GTK_WIDGET_SENSITIVE (player->priv->range) )
- {
- if (ev->state & GDK_CONTROL_MASK) parole_player_seekb_cb (NULL, player, seek_medium);
- else parole_player_seekb_cb (NULL, player, seek_short);
- }
- ret_val = TRUE;
- break;
- case GDK_Page_Down:
- if ( GTK_WIDGET_SENSITIVE (player->priv->range) )
- parole_player_seekb_cb (NULL, player, seek_long);
- ret_val = TRUE;
- break;
- case GDK_Page_Up:
- if ( GTK_WIDGET_SENSITIVE (player->priv->range) )
- parole_player_seekf_cb (NULL, player, seek_long);
- ret_val = TRUE;
- break;
- case GDK_s:
- case GDK_S:
- parole_player_stop_clicked (NULL, player);
- ret_val = TRUE;
- break;
- case GDK_Escape:
- parole_player_full_screen (player, FALSE);
- break;
+ case GDK_KEY_f:
+ case GDK_KEY_F:
+ if ( player->priv->embedded != TRUE ) gtk_action_activate (player->priv->media_fullscreen_action);
+ ret_val = TRUE;
+ break;
+ case GDK_KEY_space:
+ case GDK_KEY_p:
+ case GDK_KEY_P:
+ parole_player_toggle_playpause(player);
+ ret_val = TRUE;
+ break;
+ case GDK_KEY_Right:
+ /* Media seekable ?*/
+ if ( gtk_widget_get_sensitive (player->priv->range) )
+ {
+ if (ev->state & GDK_CONTROL_MASK) parole_player_seekf_cb (NULL, player, seek_medium);
+ else parole_player_seekf_cb (NULL, player, seek_short);
+ }
+ ret_val = TRUE;
+ break;
+ case GDK_KEY_Left:
+ if ( gtk_widget_get_sensitive (player->priv->range) )
+ {
+ if (ev->state & GDK_CONTROL_MASK) parole_player_seekb_cb (NULL, player, seek_medium);
+ else parole_player_seekb_cb (NULL, player, seek_short);
+ }
+ ret_val = TRUE;
+ break;
+ case GDK_KEY_Page_Down:
+ if ( gtk_widget_get_sensitive (player->priv->range) )
+ parole_player_seekb_cb (NULL, player, seek_long);
+ ret_val = TRUE;
+ break;
+ case GDK_KEY_Page_Up:
+ if ( gtk_widget_get_sensitive (player->priv->range) )
+ parole_player_seekf_cb (NULL, player, seek_long);
+ ret_val = TRUE;
+ break;
+ case GDK_KEY_Escape:
+ parole_player_full_screen (player, FALSE);
+ break;
+ case GDK_KEY_m:
+ if (ev->state & GDK_CONTROL_MASK)
+ parole_player_hide_menubar_cb(NULL, player);
+ ret_val = TRUE;
+ break;
#ifdef HAVE_XF86_KEYSYM
- case XF86XK_OpenURL:
- parole_player_full_screen (player, FALSE);
- parole_media_list_open_location (player->priv->list);
- break;
+ case XF86XK_OpenURL:
+ parole_player_full_screen (player, FALSE);
+ parole_media_list_open_location (player->priv->list);
+ break;
#endif
- break;
- /*
- * Pass these to the media list and tell it to
- * grab the focus
- */
- case GDK_Up:
- case GDK_Down:
- if (!player->priv->full_screen && gtk_widget_get_visible(player->priv->playlist_nt))
- parole_media_list_grab_focus (player->priv->list);
- break;
- default:
- break;
+ break;
+ /*
+ * Pass these to the media list and tell it to
+ * grab the focus
+ */
+ case GDK_KEY_Up:
+ case GDK_KEY_Down:
+ if (!player->priv->full_screen && gtk_widget_get_visible(player->priv->playlist_nt))
+ parole_media_list_grab_focus (player->priv->list);
+ break;
+ default:
+ break;
}
return ret_val;
@@ -2542,42 +2550,36 @@ parole_player_handle_key_press (GdkEventKey *ev, ParolePlayer *player)
gboolean
parole_player_key_press (GtkWidget *widget, GdkEventKey *ev, ParolePlayer *player)
{
-/*
- gchar *key;
- key = gdk_keyval_name (ev->keyval);
- g_print ("Key Press 0x%X:%s on widget=%s\n", ev->keyval, key, gtk_widget_get_name (widget));
-*/
-
switch (ev->keyval)
{
- case GDK_F11:
- if ( player->priv->embedded != TRUE ) parole_player_full_screen_menu_item_activate (player);
- return TRUE;
+ case GDK_KEY_F11:
+ if ( player->priv->embedded != TRUE ) gtk_action_activate (player->priv->media_fullscreen_action);
+ return TRUE;
#ifdef HAVE_XF86_KEYSYM
- case XF86XK_AudioPlay:
- parole_player_play_pause_clicked (NULL, player);
- return TRUE;
- case XF86XK_AudioStop:
- parole_player_stop_clicked (NULL, player);
- return TRUE;
- case XF86XK_AudioRaiseVolume:
- parole_player_volume_up (NULL, player);
- return TRUE;
- case XF86XK_AudioLowerVolume:
- parole_player_volume_down (NULL, player);
- return TRUE;
- case XF86XK_AudioMute:
- parole_player_volume_mute (NULL, player);
- return TRUE;
- case XF86XK_AudioPrev:
- parole_player_play_prev (player);
- return TRUE;
- case XF86XK_AudioNext:
- parole_player_play_next (player, TRUE);
- return TRUE;
+ case XF86XK_AudioPlay:
+ parole_player_toggle_playpause(player);
+ return TRUE;
+ case XF86XK_AudioStop:
+ parole_player_pause_clicked (NULL, player);
+ return TRUE;
+ case XF86XK_AudioRaiseVolume:
+ parole_player_volume_up (NULL, player);
+ return TRUE;
+ case XF86XK_AudioLowerVolume:
+ parole_player_volume_down (NULL, player);
+ return TRUE;
+ case XF86XK_AudioMute:
+ parole_player_volume_mute (NULL, player);
+ return TRUE;
+ case XF86XK_AudioPrev:
+ parole_player_play_prev (player);
+ return TRUE;
+ case XF86XK_AudioNext:
+ parole_player_play_next (player, TRUE);
+ return TRUE;
#endif /* HAVE_XF86_KEYSYM */
- default:
- break;
+ default:
+ break;
}
return parole_player_handle_key_press (ev, player);
@@ -2591,20 +2593,20 @@ parole_player_button_pressed_cb (ParoleButton *button, ParoleButtonKey key, Paro
switch (key)
{
- case PAROLE_KEY_AUDIO_PLAY:
- parole_player_play_pause_clicked (NULL, player);
- break;
- case PAROLE_KEY_AUDIO_STOP:
- parole_player_stop_clicked (NULL, player);
- break;
- case PAROLE_KEY_AUDIO_PREV:
- parole_player_play_prev (player);
- break;
- case PAROLE_KEY_AUDIO_NEXT:
- parole_player_play_next (player, TRUE);
- break;
- default:
- break;
+ case PAROLE_KEY_AUDIO_PLAY:
+ parole_player_toggle_playpause(player);
+ break;
+ case PAROLE_KEY_AUDIO_STOP:
+ parole_player_pause_clicked (NULL, player);
+ break;
+ case PAROLE_KEY_AUDIO_PREV:
+ parole_player_play_prev (player);
+ break;
+ case PAROLE_KEY_AUDIO_NEXT:
+ parole_player_play_next (player, TRUE);
+ break;
+ default:
+ break;
}
}
#endif
@@ -2616,83 +2618,156 @@ parole_gst_set_default_aspect_ratio (ParolePlayer *player, GtkBuilder *builder)
const gchar *widget_name;
g_object_get (G_OBJECT (player->priv->conf),
- "aspect-ratio", &ratio,
- NULL);
-
+ "aspect-ratio", &ratio,
+ NULL);
+
switch (ratio )
{
- case PAROLE_ASPECT_RATIO_NONE:
- widget_name = "ratio_none";
- break;
- case PAROLE_ASPECT_RATIO_AUTO:
- widget_name = "ratio_auto";
- break;
- case PAROLE_ASPECT_RATIO_SQUARE:
- widget_name = "ratio_square";
- break;
- case PAROLE_ASPECT_RATIO_16_9:
- widget_name = "ratio_16_9";
- break;
- case PAROLE_ASPECT_RATIO_4_3:
- widget_name = "ratio_4_3";
- break;
- case PAROLE_ASPECT_RATIO_DVB:
- widget_name = "ratio_20_9";
- break;
- default:
- g_warn_if_reached ();
- return;
- }
-
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, widget_name)),
- TRUE);
+ case PAROLE_ASPECT_RATIO_NONE:
+ widget_name = "ratio_none";
+ break;
+ case PAROLE_ASPECT_RATIO_AUTO:
+ widget_name = "ratio_auto";
+ break;
+ case PAROLE_ASPECT_RATIO_SQUARE:
+ widget_name = "ratio_square";
+ break;
+ case PAROLE_ASPECT_RATIO_16_9:
+ widget_name = "ratio_16_9";
+ break;
+ case PAROLE_ASPECT_RATIO_4_3:
+ widget_name = "ratio_4_3";
+ break;
+ case PAROLE_ASPECT_RATIO_DVB:
+ widget_name = "ratio_20_9";
+ break;
+ default:
+ g_warn_if_reached ();
+ return;
+ }
+
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, widget_name)), TRUE);
+}
+
+static void
+on_bug_report_clicked (GtkWidget *w, ParolePlayer *player)
+{
+ GtkWidget *dialog;
+ if (!gtk_show_uri(NULL, "http://docs.xfce.org/apps/parole/bugs", GDK_CURRENT_TIME, NULL))
+ {
+ dialog = gtk_message_dialog_new(GTK_WINDOW(player->priv->window),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _("Unable to open default web browser"));
+ gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
+ _("Please go to http://docs.xfce.org/apps/parole/bugs to report your bug."));
+ gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
+ }
+}
+
+/**
+ *
+ * Draw a simple rectangular GtkOverlay
+ * using the theme's background and border-color
+ * to keep it on top of the gst-video-widget with Gtk3.8 and above
+ *
+ * NOTE: Transparency is not supported, so there's also no fadeout.
+ **/
+static gboolean
+parole_overlay_expose_event (GtkWidget *widget, cairo_t *cr, gpointer user_data)
+{
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
+ GtkStyleContext *context;
+ GdkRGBA acolor;
+
+ gtk_widget_get_allocation(widget, allocation);
+ cairo_rectangle (cr, 0, 0, allocation->width, allocation->height);
+ g_free (allocation);
+
+ context = gtk_widget_get_style_context(GTK_WIDGET(widget));
+ gtk_style_context_add_class (context, "background");
+ gtk_style_context_add_class (context, "osd");
+ gtk_style_context_get_background_color (context, GTK_STATE_NORMAL, &acolor);
+ gdk_cairo_set_source_rgba (cr, &acolor);
+ cairo_fill_preserve (cr);
+
+ gtk_style_context_get_border_color (context, GTK_STATE_NORMAL, &acolor);
+ gdk_cairo_set_source_rgba (cr, &acolor);
+ cairo_stroke (cr);
+
+ return FALSE;
}
+/* This function allows smoothly adjusting the window alignment with coverart */
static gboolean
parole_audiobox_expose_event (GtkWidget *w, GdkEventExpose *ev, ParolePlayer *player)
{
- gboolean homogeneous = w->allocation.width > 536;
+ GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
+ gboolean homogeneous;
+ /* Float the cover and text together in the middle if there is space */
+ gtk_widget_get_allocation(w, allocation);
+ homogeneous = allocation->width > 536;
+ g_free(allocation);
+
+ /* Nothing to do if the homogeneous setting is already good */
if ( gtk_box_get_homogeneous( GTK_BOX(w) ) == homogeneous )
return FALSE;
gtk_box_set_homogeneous( GTK_BOX(w), homogeneous );
- if (homogeneous)
- {
- g_object_set( player->priv->audiobox_cover, "xalign", 1.0, NULL);
- gtk_box_set_child_packing (GTK_BOX(w),
- player->priv->audiobox_cover,
- TRUE,
- TRUE,
- 0,
- GTK_PACK_START);
- }
- else
- {
- g_object_set( player->priv->audiobox_cover, "xalign", 0.0, NULL);
- gtk_box_set_child_packing (GTK_BOX(w),
- player->priv->audiobox_cover,
- FALSE,
- TRUE,
- 0,
- GTK_PACK_START);
- }
+
+ /* Expand the coverart if the parent box packing is homogenous */
+ gtk_box_set_child_packing (GTK_BOX(w),
+ player->priv->audiobox_cover,
+ homogeneous,
+ TRUE,
+ 0,
+ GTK_PACK_START);
return FALSE;
}
+void
+on_content_area_size_allocate (GtkWidget *widget, GtkAllocation *allocation, ParolePlayer *player)
+{
+ g_return_if_fail (allocation != NULL);
+
+ gtk_widget_set_allocation(widget, allocation);
+
+ if ( gtk_widget_get_realized (widget) )
+ {
+ gtk_widget_queue_draw (widget);
+ }
+}
+
gboolean
parole_player_configure_event_cb (GtkWidget *widget, GdkEventConfigure *ev, ParolePlayer *player)
{
- gint w,h;
+ gint old_w, old_h, new_w, new_h;
if ( !player->priv->full_screen )
{
- gtk_window_get_size (GTK_WINDOW (widget), &w, &h);
- g_object_set (G_OBJECT (player->priv->conf),
- "window-width", w,
- "window-height", h,
- NULL);
+ /* Store the previously saved window size in case of maximize */
+ g_object_get (G_OBJECT (player->priv->conf),
+ "window-width", &old_w,
+ "window-height", &old_h,
+ NULL);
+
+ /* Get the current window size */
+ gtk_window_get_size (GTK_WINDOW (widget), &new_w, &new_h);
+
+ /* Configure gets run twice, only change on update */
+ if (old_w != new_w || old_h != new_h)
+ {
+ player->priv->last_w = old_w;
+ player->priv->last_h = old_h;
+ g_object_set (G_OBJECT (player->priv->conf),
+ "window-width", new_w,
+ "window-height", new_h,
+ NULL);
+ }
}
return FALSE;
@@ -2700,34 +2775,34 @@ parole_player_configure_event_cb (GtkWidget *widget, GdkEventConfigure *ev, Paro
static void
parole_player_drag_data_received_cb (GtkWidget *widget,
- GdkDragContext *drag_context,
- gint x,
- gint y,
- GtkSelectionData *data,
- guint info,
- guint drag_time,
- ParolePlayer *player)
+ GdkDragContext *drag_context,
+ gint x,
+ gint y,
+ GtkSelectionData *data,
+ guint info,
+ guint drag_time,
+ ParolePlayer *player)
{
gchar **uri_list;
guint added = 0;
guint i;
- parole_window_busy_cursor (widget->window);
+ parole_window_busy_cursor (gtk_widget_get_window(widget));
- uri_list = g_uri_list_extract_uris ((const gchar *)data->data);
+ uri_list = g_uri_list_extract_uris ((const gchar *)gtk_selection_data_get_data(data));
for ( i = 0; uri_list[i] != NULL; i++)
{
- gchar *path;
- path = g_filename_from_uri (uri_list[i], NULL, NULL);
- added += parole_media_list_add_by_path (player->priv->list, path, i == 0 ? TRUE : FALSE);
+ gchar *path;
+ path = g_filename_from_uri (uri_list[i], NULL, NULL);
+ added += parole_media_list_add_by_path (player->priv->list, path, i == 0 ? TRUE : FALSE);
- g_free (path);
+ g_free (path);
}
g_strfreev (uri_list);
- gdk_window_set_cursor (widget->window, NULL);
+ gdk_window_set_cursor (gtk_widget_get_window(widget), NULL);
gtk_drag_finish (drag_context, added == i ? TRUE : FALSE, FALSE, drag_time);
}
@@ -2735,16 +2810,15 @@ static void
parole_player_window_notify_is_active (ParolePlayer *player)
{
if ( !player->priv->full_screen )
- return;
-
+ return;
+
if (!gtk_window_is_active (GTK_WINDOW (player->priv->window)) )
{
- gtk_widget_hide (player->priv->fs_window);
- parole_gst_set_cursor_visible (PAROLE_GST (player->priv->gst), TRUE);
+ parole_gst_set_cursor_visible (PAROLE_GST (player->priv->gst), TRUE);
}
else
{
- parole_gst_set_cursor_visible (PAROLE_GST (player->priv->gst), FALSE);
+ parole_gst_set_cursor_visible (PAROLE_GST (player->priv->gst), FALSE);
}
}
@@ -2775,15 +2849,15 @@ parole_player_set_wm_opacity_hint (GtkWidget *widget)
atom = XInternAtom (xdisplay, "_NET_WM_WINDOW_OPACITY_LOCKED", TRUE);
if ( atom == None )
- return;
+ return;
gdkwindow = gtk_widget_get_window (widget);
- XChangeProperty (xdisplay, GDK_WINDOW_XID (gdkwindow),
- atom, XA_CARDINAL,
- 32, PropModeAppend,
- (guchar *) &mode,
- 1);
+ XChangeProperty (xdisplay, gdk_x11_window_get_xid (gdkwindow),
+ atom, XA_CARDINAL,
+ 32, PropModeAppend,
+ (guchar *) &mode,
+ 1);
}
static void
@@ -2791,15 +2865,15 @@ parole_player_setup_multimedia_keys (ParolePlayer *player)
{
#ifdef HAVE_XF86_KEYSYM
gboolean enabled;
- g_object_get (G_OBJECT (player->priv->conf),
- "multimedia-keys", &enabled,
- NULL);
+ g_object_get (G_OBJECT (player->priv->conf),
+ "multimedia-keys", &enabled,
+ NULL);
if ( enabled )
{
- player->priv->button = parole_button_new ();
- g_signal_connect (player->priv->button, "button-pressed",
- G_CALLBACK (parole_player_button_pressed_cb), player);
+ player->priv->button = parole_button_new ();
+ g_signal_connect (player->priv->button, "button-pressed",
+ G_CALLBACK (parole_player_button_pressed_cb), player);
}
#endif
}
@@ -2807,30 +2881,41 @@ parole_player_setup_multimedia_keys (ParolePlayer *player)
static void
parole_player_init (ParolePlayer *player)
{
- GtkWidget *output;
+ GtkWidget *icon;
GtkBuilder *builder;
- GdkScreen *screen;
gint w, h;
+ gboolean maximized;
gboolean showhide;
GdkColor background;
gint volume;
-
- GtkWidget *hbox_audiobox;
+
GtkWidget *hpaned;
+ GdkPixbuf *logo;
GtkWidget *recent_menu;
GtkRecentFilter *recent_filter;
GtkWidget *clear_recent;
GtkWidget *recent_separator;
+ GtkWidget *bug_report;
+
gboolean repeat, shuffle;
- GtkWidget *infobar_contents;
GtkCellRenderer *cell, *sub_cell;
+ GtkWidget *hbox_infobar;
+ GtkWidget *audiotrack_box, *audiotrack_label, *subtitle_box, *subtitle_label, *infobar_close, *close_icon;
GtkWidget *content_area;
+ GtkWidget *controls_overlay, *tmp_box;
+ GtkWidget *controls_parent;
+ GtkWidget *play_box;
+
+ GList *widgets;
+
+ GtkWidget *action_widget;
+
g_setenv("PULSE_PROP_media.role", "video", TRUE);
player->priv = PAROLE_PLAYER_GET_PRIVATE (player);
@@ -2848,19 +2933,17 @@ parole_player_init (ParolePlayer *player)
builder = parole_builder_get_main_interface ();
player->priv->conf = parole_conf_new ();
+ player->priv->settings_dialog = parole_conf_dialog_new();
g_signal_connect_swapped (player->priv->conf, "notify::reset-saver",
- G_CALLBACK (parole_player_reset_saver_changed_cb), player);
+ G_CALLBACK (parole_player_reset_saver_changed_cb), player);
player->priv->gst = parole_gst_new (player->priv->conf);
player->priv->disc = parole_disc_new ();
g_signal_connect (player->priv->disc, "disc-selected",
- G_CALLBACK (parole_player_disc_selected_cb), player);
-
- g_signal_connect (player->priv->disc, "label-changed",
- G_CALLBACK (parole_player_disc_label_changed_cb), player);
-
+ G_CALLBACK (parole_player_disc_selected_cb), player);
+
player->priv->screen_saver = parole_screen_saver_new ();
player->priv->list = PAROLE_MEDIA_LIST (parole_media_list_get ());
@@ -2879,81 +2962,150 @@ parole_player_init (ParolePlayer *player)
* Gst signals
*/
g_signal_connect (G_OBJECT (player->priv->gst), "media-state",
- G_CALLBACK (parole_player_media_state_cb), player);
-
+ G_CALLBACK (parole_player_media_state_cb), player);
+
g_signal_connect (G_OBJECT (player->priv->gst), "media-progressed",
- G_CALLBACK (parole_player_media_progressed_cb), player);
-
+ G_CALLBACK (parole_player_media_progressed_cb), player);
+
g_signal_connect (G_OBJECT (player->priv->gst), "media-tag",
- G_CALLBACK (parole_player_media_tag_cb), player);
+ G_CALLBACK (parole_player_media_tag_cb), player);
g_signal_connect (G_OBJECT (player->priv->gst), "error",
- G_CALLBACK (parole_player_error_cb), player);
+ G_CALLBACK (parole_player_error_cb), player);
g_signal_connect (G_OBJECT (player->priv->gst), "buffering",
- G_CALLBACK (parole_player_buffering_cb), player);
-
+ G_CALLBACK (parole_player_buffering_cb), player);
+
g_signal_connect (G_OBJECT (player->priv->gst), "dvd-chapter-count-change",
- G_CALLBACK (parole_player_dvd_chapter_count_change_cb), player);
+ G_CALLBACK (parole_player_dvd_chapter_count_change_cb), player);
g_signal_connect (G_OBJECT (player->priv->gst), "dvd-chapter-change",
- G_CALLBACK (parole_player_dvd_chapter_change_cb), player);
-
- g_signal_connect_after (G_OBJECT (player->priv->gst), "button-release-event",
- G_CALLBACK (parole_player_gst_widget_button_release), player);
-
- g_signal_connect_after (G_OBJECT (player->priv->gst), "button-press-event",
- G_CALLBACK (parole_player_gst_widget_button_press), player);
-
- g_signal_connect (G_OBJECT (player->priv->gst), "motion-notify-event",
- G_CALLBACK (parole_player_gst_widget_motion_notify_event), player);
+ G_CALLBACK (parole_player_dvd_chapter_change_cb), player);
g_signal_connect (G_OBJECT (player->priv->gst), "notify::volume",
- G_CALLBACK (parole_property_notify_cb_volume), player);
-
- output = GTK_WIDGET (gtk_builder_get_object (builder, "output"));
+ G_CALLBACK (parole_property_notify_cb_volume), player);
+
+ /*
+ * GTK Actions
+ */
+ /* Play/Pause */
+ player->priv->media_playpause_action = gtk_action_new("playpause_action", _("_Play"), _("Play"), NULL);
+ playpause_action = player->priv->media_playpause_action;
+ gtk_action_set_icon_name(player->priv->media_playpause_action, "media-playback-start-symbolic");
+ gtk_action_set_always_show_image(player->priv->media_playpause_action, TRUE);
+ g_signal_connect(G_OBJECT(player->priv->media_playpause_action), "activate", G_CALLBACK(parole_player_playpause_action_cb), player);
+ gtk_action_set_sensitive(player->priv->media_playpause_action, FALSE);
+
+ /* Previous Track */
+ player->priv->media_previous_action = gtk_action_new("previous_action", _("P_revious Track"), _("Previous Track"), NULL);
+ previous_action = player->priv->media_previous_action;
+ gtk_action_set_icon_name(player->priv->media_previous_action, "media-skip-backward-symbolic");
+ gtk_action_set_always_show_image(player->priv->media_previous_action, TRUE);
+ g_signal_connect(G_OBJECT(player->priv->media_previous_action), "activate", G_CALLBACK(parole_player_previous_action_cb), player);
+ gtk_action_set_sensitive(player->priv->media_previous_action, FALSE);
+
+ /* Next Track */
+ player->priv->media_next_action = gtk_action_new("next_action", _("_Next Track"), _("Next Track"), NULL);
+ next_action = player->priv->media_next_action;
+ gtk_action_set_icon_name(player->priv->media_next_action, "media-skip-forward-symbolic");
+ gtk_action_set_always_show_image(player->priv->media_next_action, TRUE);
+ g_signal_connect(G_OBJECT(player->priv->media_next_action), "activate", G_CALLBACK(parole_player_next_action_cb), player);
+ gtk_action_set_sensitive(player->priv->media_next_action, FALSE);
+
+ /* Fullscreen */
+ player->priv->media_fullscreen_action = gtk_action_new("fullscreen_action", _("_Fullscreen"), _("Fullscreen"), NULL);
+ gtk_action_set_icon_name(player->priv->media_fullscreen_action, "view-fullscreen-symbolic");
+ gtk_action_set_always_show_image(player->priv->media_fullscreen_action, TRUE);
+ g_signal_connect(G_OBJECT(player->priv->media_fullscreen_action), "activate", G_CALLBACK(parole_player_fullscreen_action_cb), player);
+ gtk_action_set_sensitive(player->priv->media_fullscreen_action, TRUE);
+
+ /* Toggle Playlist */
+ player->priv->toggle_playlist_action = gtk_toggle_action_new("toggle_playlist_action", _("Show _Playlist"), _("Show Playlist"), NULL);
+ g_signal_connect(G_OBJECT(player->priv->toggle_playlist_action), "activate", G_CALLBACK(parole_player_toggle_playlist_action_cb), player);
+ gtk_action_set_sensitive(GTK_ACTION(player->priv->toggle_playlist_action), TRUE);
+
+ /* Toggle Repeat */
+ player->priv->toggle_repeat_action = gtk_toggle_action_new("toggle_repeat_action", _("_Repeat"), _("Repeat"), NULL);
+ gtk_action_set_icon_name(GTK_ACTION(player->priv->toggle_repeat_action), "media-playlist-repeat-symbolic");
+ g_signal_connect(G_OBJECT(player->priv->toggle_repeat_action), "activate", G_CALLBACK(parole_player_toggle_repeat_action_cb), player);
+ gtk_action_set_sensitive(GTK_ACTION(player->priv->toggle_repeat_action), TRUE);
+
+ /* Toggle Shuffle */
+ player->priv->toggle_shuffle_action = gtk_toggle_action_new("toggle_shuffle_action", _("_Shuffle"), _("Shuffle"), NULL);
+ gtk_action_set_icon_name(GTK_ACTION(player->priv->toggle_shuffle_action), "media-playlist-shuffle-symbolic");
+ g_signal_connect(G_OBJECT(player->priv->toggle_shuffle_action), "activate", G_CALLBACK(parole_player_toggle_shuffle_action_cb), player);
+ gtk_action_set_sensitive(GTK_ACTION(player->priv->toggle_shuffle_action), TRUE);
- gtk_drag_dest_set (output, GTK_DEST_DEFAULT_ALL,
- target_entry, G_N_ELEMENTS (target_entry),
- GDK_ACTION_COPY | GDK_ACTION_MOVE);
-
- g_signal_connect (output, "drag-data-received",
- G_CALLBACK (parole_player_drag_data_received_cb), player);
+ /*
+ * GTK Widgets
+ */
+ /* ParolePlayer Window */
player->priv->window = GTK_WIDGET (gtk_builder_get_object (builder, "main-window"));
-
g_signal_connect( G_OBJECT(player->priv->window),
"window-state-event",
G_CALLBACK(parole_player_window_state_event),
PAROLE_PLAYER(player) );
+ /* Playlist notebook */
+ player->priv->playlist_nt = GTK_WIDGET (gtk_builder_get_object (builder, "notebook-playlist"));
+
+ /* Playlist divider/handle */
+ hpaned = GTK_WIDGET (gtk_builder_get_object (builder, "hpaned"));
+ gtk_widget_style_get (hpaned, "handle-size", &player->priv->handle_width, NULL);
+
+ /* Menu Bar */
+ player->priv->menu_bar = GTK_WIDGET (gtk_builder_get_object (builder, "menubar"));
+
+ /* Save Playlist Menu Item */
+ player->priv->save_playlist = GTK_WIDGET (gtk_builder_get_object (builder, "menu-save-playlist"));
+ g_signal_connect( player->priv->save_playlist,
+ "activate",
+ G_CALLBACK(parole_player_save_playlist_cb),
+ PAROLE_PLAYER(player) );
+ g_signal_connect (gtk_builder_get_object (builder, "media-menu"), "select",
+ G_CALLBACK (parole_player_media_menu_select_cb), player);
+
+ /* Recent Menu */
recent_menu = GTK_WIDGET (gtk_builder_get_object (builder, "recent_menu"));
+ /* Initialize the Recent Menu settings */
player->priv->recent_menu = gtk_recent_chooser_menu_new_for_manager (player->priv->recent);
gtk_recent_chooser_menu_set_show_numbers (GTK_RECENT_CHOOSER_MENU(player->priv->recent_menu), TRUE);
gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER(player->priv->recent_menu), GTK_RECENT_SORT_MRU);
gtk_recent_chooser_set_show_private (GTK_RECENT_CHOOSER(player->priv->recent_menu), FALSE);
gtk_recent_chooser_set_show_not_found (GTK_RECENT_CHOOSER(player->priv->recent_menu), FALSE);
gtk_recent_chooser_set_local_only (GTK_RECENT_CHOOSER(player->priv->recent_menu), TRUE);
+
+ /* Recent Menu file filter */
recent_filter = parole_get_supported_recent_media_filter ();
gtk_recent_filter_add_application( recent_filter, "parole" );
gtk_recent_chooser_set_filter( GTK_RECENT_CHOOSER(player->priv->recent_menu), recent_filter);
+ /* Recent Menu Separator */
recent_separator = gtk_separator_menu_item_new();
- clear_recent = gtk_image_menu_item_new_from_stock(GTK_STOCK_CLEAR, NULL);
- gtk_menu_item_set_label (GTK_MENU_ITEM(clear_recent), _("Clear recent items..."));
-
gtk_menu_shell_append(GTK_MENU_SHELL(player->priv->recent_menu), recent_separator);
- gtk_menu_shell_append(GTK_MENU_SHELL(player->priv->recent_menu), clear_recent);
+ /* Clear Recent Menu Item */
+ clear_recent = gtk_image_menu_item_new_with_mnemonic (_("_Clear recent items…"));
+ icon = gtk_image_new_from_icon_name ("edit-clear-symbolic", GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM(clear_recent), GTK_WIDGET(icon));
g_signal_connect (clear_recent, "activate",
- G_CALLBACK (parole_player_recent_menu_clear_activated_cb), player);
+ G_CALLBACK (parole_player_recent_menu_clear_activated_cb), player);
+ gtk_menu_shell_append(GTK_MENU_SHELL(player->priv->recent_menu), clear_recent);
+
+ /* Connect the Recent Menu events */
+ g_signal_connect (player->priv->recent_menu, "item-activated",
+ G_CALLBACK (parole_player_recent_menu_item_activated_cb), player);
+ /* Attach the Recent Menu */
gtk_menu_item_set_submenu( GTK_MENU_ITEM(recent_menu), player->priv->recent_menu );
- g_signal_connect (player->priv->recent_menu, "item-activated",
- G_CALLBACK (parole_player_recent_menu_item_activated_cb), player);
+ /* DVD Menu */
+ player->priv->dvd_menu = GTK_WIDGET(gtk_builder_get_object (builder, "dvd-menu"));
+ player->priv->chapters_menu = GTK_WIDGET (gtk_builder_get_object (builder, "chapters-menu"));
+ /* Language Menus */
player->priv->subtitles_menu = GTK_WIDGET (gtk_builder_get_object (builder, "subtitles-menu"));
player->priv->languages_menu = GTK_WIDGET (gtk_builder_get_object (builder, "languages-menu"));
@@ -2961,165 +3113,283 @@ parole_player_init (ParolePlayer *player)
player->priv->subtitles_menu_custom = GTK_WIDGET (gtk_builder_get_object (builder, "subtitles-menu-custom"));
g_signal_connect (player->priv->subtitles_menu_custom, "activate",
- G_CALLBACK (parole_player_select_custom_subtitle), player);
+ G_CALLBACK (parole_player_select_custom_subtitle), player);
player->priv->audio_group = NULL;
-
- player->priv->main_nt = GTK_WIDGET (gtk_builder_get_object (builder, "main-notebook"));
- player->priv->playcontrol_box = GTK_WIDGET (gtk_builder_get_object (builder, "playing_box"));
- player->priv->progressbar_buffering = GTK_WIDGET (gtk_builder_get_object (builder, "progressbar_buffering"));
+ /* Additional Menu Items */
+ action_widget = GTK_WIDGET (gtk_builder_get_object (builder, "show-hide-list"));
+ gtk_activatable_set_use_action_appearance(GTK_ACTIVATABLE(action_widget), TRUE);
+ gtk_activatable_set_related_action(GTK_ACTIVATABLE(action_widget), GTK_ACTION(player->priv->toggle_playlist_action));
- player->priv->label_duration = GTK_WIDGET(gtk_builder_get_object(builder, "label_duration"));
- player->priv->label_elapsed = GTK_WIDGET(gtk_builder_get_object(builder, "label_elapsed"));
- player->priv->play_pause = GTK_WIDGET (gtk_builder_get_object (builder, "play-pause"));
- player->priv->seekf = GTK_WIDGET (gtk_builder_get_object (builder, "forward"));
- player->priv->seekb = GTK_WIDGET (gtk_builder_get_object (builder, "back"));
+ action_widget = GTK_WIDGET (gtk_builder_get_object (builder, "shuffle"));
+ gtk_activatable_set_use_action_appearance(GTK_ACTIVATABLE(action_widget), TRUE);
+ gtk_activatable_set_related_action(GTK_ACTIVATABLE(action_widget), GTK_ACTION(player->priv->toggle_shuffle_action));
+ parole_media_list_connect_shuffle_action(player->priv->list, GTK_ACTION(player->priv->toggle_shuffle_action));
- gtk_rc_parse( RC_STYLE_FILE );
-
- player->priv->range = GTK_WIDGET (gtk_builder_get_object (builder, "scale"));
- gtk_widget_set_name( player->priv->range, "ParoleScale" );
+ action_widget = GTK_WIDGET (gtk_builder_get_object (builder, "repeat"));
+ gtk_activatable_set_use_action_appearance(GTK_ACTIVATABLE(action_widget), TRUE);
+ gtk_activatable_set_related_action(GTK_ACTIVATABLE(action_widget), GTK_ACTION(player->priv->toggle_repeat_action));
+ parole_media_list_connect_repeat_action(player->priv->list, GTK_ACTION(player->priv->toggle_repeat_action));
- player->priv->volume = GTK_WIDGET (gtk_builder_get_object (builder, "volume"));
+ bug_report = GTK_WIDGET (gtk_builder_get_object (builder, "bug-report"));
+ g_signal_connect (bug_report, "activate", G_CALLBACK(on_bug_report_clicked), player);
+ /* End Menu Bar */
- player->priv->menu_bar = GTK_WIDGET (gtk_builder_get_object (builder, "menubar"));
- player->priv->play_box = GTK_WIDGET (gtk_builder_get_object (builder, "play-box"));
- player->priv->playlist_nt = GTK_WIDGET (gtk_builder_get_object (builder, "notebook-playlist"));
- player->priv->show_hide_playlist = GTK_WIDGET (gtk_builder_get_object (builder, "show-hide-list"));
- player->priv->show_hide_playlist_image = GTK_WIDGET (gtk_builder_get_object (builder, "show-hide-list-image"));
- player->priv->show_hide_playlist_button = GTK_WIDGET (gtk_builder_get_object (builder, "show-hide-list-button"));
+
+ /* Content Area (Background, Audio, Video) */
+ player->priv->eventbox_output = GTK_WIDGET (gtk_builder_get_object (builder, "content_area"));
+ gdk_color_parse("black", &background);
+ gtk_widget_modify_bg(GTK_WIDGET(player->priv->eventbox_output), GTK_STATE_NORMAL, &background);
- player->priv->shuffle_menu_item = GTK_WIDGET (gtk_builder_get_object (builder, "shuffle"));
- player->priv->repeat_menu_item = GTK_WIDGET (gtk_builder_get_object (builder, "repeat"));
+ /* Enable motion-notify event to show/hide controls on mouseover */
+ gtk_widget_add_events (GTK_WIDGET (player->priv->eventbox_output), GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
+ /* Enable DND for files onto output widget */
+ gtk_drag_dest_set (player->priv->eventbox_output, GTK_DEST_DEFAULT_ALL,
+ target_entry, G_N_ELEMENTS (target_entry),
+ GDK_ACTION_COPY | GDK_ACTION_MOVE);
+ g_signal_connect (player->priv->eventbox_output, "drag-data-received",
+ G_CALLBACK (parole_player_drag_data_received_cb), player);
+
+ /* Background Image */
+ logo = gdk_pixbuf_new_from_file (g_strdup_printf ("%s/parole.png", PIXMAPS_DIR), NULL);
+ player->priv->logo_image = GTK_WIDGET (gtk_builder_get_object (builder, "logo"));
+ gtk_image_set_from_pixbuf(GTK_IMAGE(player->priv->logo_image), logo);
+
+ /* Video Box */
+ player->priv->videobox = GTK_WIDGET (gtk_builder_get_object (builder, "video_output"));
+
+ /* Audio Box */
+ player->priv->audiobox = GTK_WIDGET (gtk_builder_get_object (builder, "audio_output"));
+ player->priv->audiobox_cover = GTK_WIDGET (gtk_builder_get_object (builder, "audio_cover"));
+ player->priv->audiobox_title = GTK_WIDGET (gtk_builder_get_object (builder, "audio_title"));
+ player->priv->audiobox_album = GTK_WIDGET (gtk_builder_get_object (builder, "audio_album"));
+ player->priv->audiobox_artist = GTK_WIDGET (gtk_builder_get_object (builder, "audio_artist"));
+ g_signal_connect(player->priv->audiobox, "draw",
+ G_CALLBACK(parole_audiobox_expose_event), player);
+ /* End Content Area */
+
+ /* FIXME: UGLY CODE IN THE NEXT BLOCK */
+ /* Media Controls */
+ controls_overlay = GTK_WIDGET(gtk_overlay_new());
+
player->priv->control = GTK_WIDGET (gtk_builder_get_object (builder, "control"));
- player->priv->go_fs = GTK_WIDGET (gtk_builder_get_object (builder, "go_fs"));
- player->priv->leave_fs = GTK_WIDGET (gtk_builder_get_object (builder, "leave_fs"));
- player->priv->main_box = GTK_WIDGET (gtk_builder_get_object (builder, "main-box"));
- player->priv->eventbox_output = GTK_WIDGET (gtk_builder_get_object (builder, "eventbox_output"));
+
+ play_box = GTK_WIDGET (gtk_builder_get_object (builder, "media_controls"));
+ controls_parent = GTK_WIDGET(gtk_builder_get_object (builder, "box2"));
+ gtk_box_pack_start (GTK_BOX(controls_parent), controls_overlay, TRUE, TRUE, 0);
+ gtk_widget_reparent(GTK_WIDGET(player->priv->eventbox_output), controls_overlay);
+ tmp_box = GTK_WIDGET(gtk_event_box_new());
+
+ gtk_widget_set_vexpand(GTK_WIDGET(tmp_box), FALSE);
+ gtk_widget_set_hexpand(GTK_WIDGET(tmp_box), FALSE);
+ gtk_widget_set_margin_left(tmp_box, 10);
+ gtk_widget_set_margin_right(tmp_box, 10);
+ gtk_widget_set_margin_bottom(tmp_box, 10);
+ gtk_widget_set_margin_top(tmp_box, 10);
+ gtk_widget_set_valign(tmp_box, GTK_ALIGN_END);
+
+#if GTK_CHECK_VERSION(3,8,0)
+#else
+ gdk_color_parse("#080810", &background);
+ gtk_widget_modify_bg(GTK_WIDGET(controls_overlay), GTK_STATE_NORMAL, &background);
+#endif
+ gtk_widget_reparent(GTK_WIDGET(player->priv->control), tmp_box);
+ gtk_overlay_add_overlay(GTK_OVERLAY(controls_overlay), tmp_box);
+ gtk_box_set_child_packing( GTK_BOX(player->priv->control), GTK_WIDGET(play_box), TRUE, TRUE, 2, GTK_PACK_START );
+ gtk_container_set_border_width(GTK_CONTAINER(play_box), 3);
+ gtk_widget_show_all(controls_parent);
+
+ /* Enable motion-notify event to prevent hiding controls on mouseover */
+ gtk_widget_add_events (GTK_WIDGET (player->priv->control), GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
+ g_signal_connect(G_OBJECT(player->priv->control), "motion-notify-event",
+ G_CALLBACK(parole_player_gst_widget_motion_notify_event), player);
+
+ gtk_widget_add_events (GTK_WIDGET (play_box), GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
+ g_signal_connect(G_OBJECT(play_box), "motion-notify-event",
+ G_CALLBACK(parole_player_gst_widget_motion_notify_event), player);
+ for (widgets = gtk_container_get_children(GTK_CONTAINER(play_box)); widgets != NULL; widgets = g_list_next(widgets)) {
+ gtk_widget_add_events (GTK_WIDGET (widgets->data), GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
+ g_signal_connect(G_OBJECT(widgets->data), "motion-notify-event",
+ G_CALLBACK(parole_player_gst_widget_motion_notify_event), player);
+ }
+
+ /* Previous, Play/Pause, Next */
+ action_widget = GTK_WIDGET(gtk_builder_get_object(builder, "media_previous"));
+ gtk_widget_set_tooltip_text(GTK_WIDGET(action_widget), _("Previous Track"));
+ gtk_activatable_set_use_action_appearance(GTK_ACTIVATABLE(action_widget), FALSE);
+ gtk_activatable_set_related_action(GTK_ACTIVATABLE(action_widget), player->priv->media_previous_action);
+
+ player->priv->playpause_button = GTK_WIDGET(gtk_builder_get_object(builder, "media_playpause"));
+ player->priv->playpause_image = GTK_WIDGET(gtk_builder_get_object(builder, "image_media_playpause"));
+ gtk_activatable_set_use_action_appearance(GTK_ACTIVATABLE(player->priv->playpause_button), FALSE);
+ gtk_activatable_set_related_action(GTK_ACTIVATABLE(player->priv->playpause_button), player->priv->media_playpause_action);
+
+ action_widget = GTK_WIDGET(gtk_builder_get_object(builder, "media_next"));
+ gtk_widget_set_tooltip_text(GTK_WIDGET(action_widget), _("Next Track"));
+ gtk_activatable_set_use_action_appearance(GTK_ACTIVATABLE(action_widget), FALSE);
+ gtk_activatable_set_related_action(GTK_ACTIVATABLE(action_widget), player->priv->media_next_action);
+
+ /* Elapsed/Duration labels */
+ player->priv->label_duration = GTK_WIDGET(gtk_builder_get_object(builder, "media_time_duration"));
+ player->priv->label_elapsed = GTK_WIDGET(gtk_builder_get_object(builder, "media_time_elapsed"));
+
+ /* Time Slider */
+ player->priv->range = GTK_WIDGET (gtk_builder_get_object (builder, "media_progress_slider"));
+ gtk_widget_set_name( player->priv->range, "ParoleScale" );
- hpaned = GTK_WIDGET (gtk_builder_get_object (builder, "hpaned"));
- gtk_widget_style_get (hpaned, "handle-size", &player->priv->handle_width, NULL);
+ /* Buffering Progressbar */
+ player->priv->progressbar_buffering = GTK_WIDGET (gtk_builder_get_object (builder, "media_buffering_progressbar"));
+
+ /* Volume Button */
+ player->priv->volume = GTK_WIDGET (gtk_builder_get_object (builder, "media_volumebutton"));
+ player->priv->mute = GTK_WIDGET (gtk_builder_get_object (builder, "volume-mute-menu"));
+
+ /* (un)Fullscreen button */
+ player->priv->fullscreen_button = GTK_WIDGET (gtk_builder_get_object (builder, "media_fullscreen"));
+ gtk_widget_set_tooltip_text(GTK_WIDGET(player->priv->fullscreen_button), _("Fullscreen"));
+ action_widget = GTK_WIDGET (gtk_builder_get_object (builder, "fullscreen-menu"));
+ player->priv->fullscreen_image = GTK_WIDGET (gtk_builder_get_object (builder, "image_media_fullscreen"));
+ gtk_activatable_set_use_action_appearance(GTK_ACTIVATABLE(player->priv->fullscreen_button), FALSE);
+ gtk_activatable_set_related_action(GTK_ACTIVATABLE(player->priv->fullscreen_button), player->priv->media_fullscreen_action);
+ gtk_activatable_set_related_action(GTK_ACTIVATABLE(action_widget), player->priv->media_fullscreen_action);
+
+ /* Show/Hide Playlist button */
+ player->priv->showhide_playlist_button = GTK_WIDGET (gtk_builder_get_object (builder, "media_toggleplaylist"));
+ gtk_activatable_set_use_action_appearance(GTK_ACTIVATABLE(player->priv->showhide_playlist_button), FALSE);
+ gtk_activatable_set_related_action(GTK_ACTIVATABLE(player->priv->showhide_playlist_button), GTK_ACTION(player->priv->toggle_playlist_action));
+ /* End Media Controls */
+
+ gtk_widget_set_direction (GTK_WIDGET (gtk_builder_get_object (builder, "ltrbox")),GTK_TEXT_DIR_LTR);
+ g_signal_connect(player->priv->control, "draw", G_CALLBACK(parole_overlay_expose_event), NULL);
+
+ /* Info Bar */
+ /* placeholder widget */
+ hbox_infobar = GTK_WIDGET (gtk_builder_get_object (builder, "infobar_placeholder"));
+
+ /* Initialize the InfoBar */
+ player->priv->infobar = gtk_info_bar_new ();
+ gtk_info_bar_set_message_type (GTK_INFO_BAR (player->priv->infobar),
+ GTK_MESSAGE_QUESTION);
+
+ gtk_widget_set_no_show_all (player->priv->infobar, TRUE);
+
+ content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (player->priv->infobar));
+ g_signal_connect (content_area, "size-allocate",
+ G_CALLBACK (on_content_area_size_allocate), player);
+
+ gtk_box_pack_start( GTK_BOX( hbox_infobar ), player->priv->infobar, TRUE, TRUE, 0);
- /* Audio box */
- hbox_audiobox = GTK_WIDGET (gtk_builder_get_object (builder, "hbox_audiobox"));
- g_signal_connect(hbox_audiobox, "expose-event",
- G_CALLBACK(parole_audiobox_expose_event), player);
+ /* Initialize the Audio Track combobox */
+ player->priv->liststore_audiotrack = gtk_list_store_new(1, G_TYPE_STRING);
+ player->priv->combobox_audiotrack = gtk_combo_box_new_with_model(GTK_TREE_MODEL(player->priv->liststore_audiotrack));
+ player->priv->audio_list = NULL;
- gdk_color_parse("black", &background);
- player->priv->audiobox = GTK_WIDGET (gtk_builder_get_object (builder, "audiobox"));
- gtk_widget_modify_bg(GTK_WIDGET(player->priv->audiobox), GTK_STATE_NORMAL, &background);
+ cell = gtk_cell_renderer_text_new();
+ gtk_cell_layout_pack_start( GTK_CELL_LAYOUT( player->priv->combobox_audiotrack ), cell, TRUE );
+ gtk_cell_layout_set_attributes( GTK_CELL_LAYOUT( player->priv->combobox_audiotrack ), cell, "text", 0, NULL );
+
+ /* Humanize and pack the Audio Track combobox */
+ audiotrack_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
+ audiotrack_label = gtk_label_new(_("Audio Track:"));
+ gtk_box_pack_start(GTK_BOX(audiotrack_box), audiotrack_label, FALSE, FALSE, 0);
+ gtk_box_pack_end(GTK_BOX(audiotrack_box), player->priv->combobox_audiotrack, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(content_area), audiotrack_box);
+
+ /* Initialize the Subtitles combobox */
+ player->priv->liststore_subtitles = gtk_list_store_new(1, G_TYPE_STRING);
+ player->priv->combobox_subtitles = gtk_combo_box_new_with_model(GTK_TREE_MODEL(player->priv->liststore_subtitles));
+ player->priv->subtitle_list = NULL;
- player->priv->audiobox_cover = GTK_WIDGET (gtk_builder_get_object (builder, "audiobox_cover"));
- player->priv->audiobox_title = GTK_WIDGET (gtk_builder_get_object (builder, "audiobox_title"));
- player->priv->audiobox_album = GTK_WIDGET (gtk_builder_get_object (builder, "audiobox_album"));
- player->priv->audiobox_artist = GTK_WIDGET (gtk_builder_get_object (builder, "audiobox_artist"));
+ sub_cell = gtk_cell_renderer_text_new();
+ gtk_cell_layout_pack_start( GTK_CELL_LAYOUT( player->priv->combobox_subtitles ), sub_cell, TRUE );
+ gtk_cell_layout_set_attributes( GTK_CELL_LAYOUT( player->priv->combobox_subtitles ), sub_cell, "text", 0, NULL );
+
+ /* Humanize and pack the Subtitles combobox */
+ subtitle_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
+ subtitle_label = gtk_label_new(_("Subtitles:"));
+ gtk_box_pack_start(GTK_BOX(subtitle_box), subtitle_label, FALSE, FALSE, 0);
+ gtk_box_pack_end(GTK_BOX(subtitle_box), player->priv->combobox_subtitles, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(content_area), subtitle_box);
- gtk_widget_add_events (GTK_WIDGET (player->priv->audiobox), GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
- g_signal_connect (G_OBJECT (player->priv->audiobox), "motion-notify-event",
- G_CALLBACK (parole_player_gst_widget_motion_notify_event), player);
+ infobar_close = gtk_button_new_with_label(_("Close"));
+ close_icon = gtk_image_new_from_icon_name("gtk-close", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image(GTK_BUTTON(infobar_close), close_icon);
+ g_signal_connect (infobar_close, "clicked",
+ G_CALLBACK (on_infobar_close_clicked), player);
+ gtk_box_pack_end(GTK_BOX(content_area), infobar_close, FALSE, FALSE, 0);
- gtk_box_set_child_packing( GTK_BOX(player->priv->control), GTK_WIDGET(player->priv->play_box), TRUE, TRUE, 2, GTK_PACK_START );
+ gtk_widget_show_all(content_area);
- player->priv->hbox_infobar = GTK_WIDGET (gtk_builder_get_object (builder, "hbox_infobar"));
- player->priv->combobox_audiotrack = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_audiotrack"));
- player->priv->combobox_subtitles = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_subtitles"));
- player->priv->liststore_audiotrack = GTK_LIST_STORE (gtk_builder_get_object (builder, "liststore_audiotrack"));
- player->priv->liststore_subtitles = GTK_LIST_STORE (gtk_builder_get_object (builder, "liststore_subtitles"));
- player->priv->audio_list = NULL;
- player->priv->subtitle_list = NULL;
- infobar_contents = GTK_WIDGET (gtk_builder_get_object( builder, "infobar_contents"));
+ player->priv->update_languages = FALSE;
+ player->priv->updated_subs = FALSE;
+ /* End Info Bar */
- cell = gtk_cell_renderer_text_new();
- gtk_cell_layout_pack_start( GTK_CELL_LAYOUT( player->priv->combobox_audiotrack ), cell, TRUE );
- gtk_cell_layout_set_attributes( GTK_CELL_LAYOUT( player->priv->combobox_audiotrack ), cell, "text", 0, NULL );
-
- sub_cell = gtk_cell_renderer_text_new();
- gtk_cell_layout_pack_start( GTK_CELL_LAYOUT( player->priv->combobox_subtitles ), sub_cell, TRUE );
- gtk_cell_layout_set_attributes( GTK_CELL_LAYOUT( player->priv->combobox_subtitles ), sub_cell, "text", 0, NULL );
-
- /* set up info bar */
- player->priv->infobar = gtk_info_bar_new ();
- gtk_widget_set_no_show_all (player->priv->infobar, TRUE);
-
- content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (player->priv->infobar));
- gtk_widget_reparent (infobar_contents, content_area);
- gtk_info_bar_add_button (GTK_INFO_BAR (player->priv->infobar),
- GTK_STOCK_CLOSE, GTK_RESPONSE_OK);
- g_signal_connect (G_OBJECT(player->priv->infobar), "response",
- G_CALLBACK (gtk_widget_hide), NULL);
-
- gtk_info_bar_set_message_type (GTK_INFO_BAR (player->priv->infobar),
- GTK_MESSAGE_QUESTION);
-
- gtk_box_pack_start( GTK_BOX( player->priv->hbox_infobar ), player->priv->infobar, TRUE, TRUE, 0);
- player->priv->update_languages = FALSE;
- player->priv->updated_subs = FALSE;
-
- g_object_get (G_OBJECT (player->priv->conf),
- "volume", &volume,
- NULL);
+ g_object_get (G_OBJECT (player->priv->conf),
+ "volume", &volume,
+ NULL);
gtk_scale_button_set_value (GTK_SCALE_BUTTON (player->priv->volume),
- (gdouble) (volume/100.));
+ (gdouble) (volume/100.));
/*
* Pack the playlist.
*/
gtk_notebook_append_page (GTK_NOTEBOOK (player->priv->playlist_nt),
- GTK_WIDGET (player->priv->list),
- gtk_label_new (_("Playlist")));
-
+ GTK_WIDGET (player->priv->list),
+ gtk_label_new (_("Playlist")));
+
g_object_get (G_OBJECT (player->priv->conf),
- "showhide-playlist", &showhide,
- NULL);
-
+ "showhide-playlist", &showhide,
+ NULL);
+
g_object_get (G_OBJECT (player->priv->conf),
- "window-width", &w,
- "window-height", &h,
- NULL);
-
+ "window-width", &w,
+ "window-height", &h,
+ "window-maximized", &maximized,
+ NULL);
+
+ player->priv->last_w = w;
+ player->priv->last_h = h;
+
parole_player_set_playlist_visible(player, showhide);
+ gtk_widget_set_tooltip_text(GTK_WIDGET(player->priv->showhide_playlist_button),
+ showhide ? _("Hide Playlist") : _("Show Playlist"));
gtk_window_set_default_size (GTK_WINDOW (player->priv->window), w, h);
gtk_window_resize (GTK_WINDOW (player->priv->window), w, h);
+ if (maximized)
+ gtk_window_maximize(GTK_WINDOW (player->priv->window));
gtk_widget_show_all (player->priv->window);
parole_player_set_wm_opacity_hint (player->priv->window);
- gtk_box_pack_start (GTK_BOX (output),
- player->priv->gst,
- TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (player->priv->videobox),
+ player->priv->gst,
+ TRUE, TRUE, 0);
gtk_widget_realize (player->priv->gst);
gtk_widget_show (player->priv->gst);
g_signal_connect (G_OBJECT (parole_gst_get_stream (PAROLE_GST (player->priv->gst))), "notify::seekable",
- G_CALLBACK (parole_player_seekable_notify), player);
+ G_CALLBACK (parole_player_seekable_notify), player);
- parole_player_change_volume (player,
- (gdouble) (volume/100.));
+ parole_player_change_volume (player, (gdouble) (volume/100.));
g_signal_connect (player->priv->list, "media_activated",
- G_CALLBACK (parole_player_media_activated_cb), player);
-
+ G_CALLBACK (parole_player_media_activated_cb), player);
+
g_signal_connect (player->priv->list, "media_cursor_changed",
- G_CALLBACK (parole_player_media_cursor_changed_cb), player);
-
+ G_CALLBACK (parole_player_media_cursor_changed_cb), player);
+
g_signal_connect (player->priv->list, "uri-opened",
- G_CALLBACK (parole_player_uri_opened_cb), player);
-
- g_signal_connect (player->priv->list, "repeat-toggled",
- G_CALLBACK (parole_player_media_list_repeat_toggled_cb), player);
-
- g_signal_connect (player->priv->list, "shuffle-toggled",
- G_CALLBACK (parole_player_media_list_shuffle_toggled_cb), player);
-
+ G_CALLBACK (parole_player_uri_opened_cb), player);
+
g_signal_connect (player->priv->list, "show-playlist",
- G_CALLBACK (parole_player_media_list_show_playlist_cb), player);
-
- g_signal_connect (player->priv->list, "gst-dvd-nav-message",
- G_CALLBACK (parole_player_media_list_gst_nav_message_cb), player);
+ G_CALLBACK (parole_player_media_list_show_playlist_cb), player);
+
+ g_signal_connect (player->priv->list, "iso-opened",
+ G_CALLBACK (parole_player_iso_opened_cb), player);
/*
* Load auto saved media list.
@@ -3127,43 +3397,26 @@ parole_player_init (ParolePlayer *player)
parole_media_list_load (player->priv->list);
g_object_get (G_OBJECT (player->priv->conf),
- "repeat", &repeat,
- "shuffle", &shuffle,
- NULL);
-
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "repeat")),
- repeat);
-
- parole_media_list_set_repeat_toggled(player->priv->list, repeat);
-
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gtk_builder_get_object (builder, "shuffle")),
- shuffle);
-
- parole_media_list_set_shuffle_toggled(player->priv->list, shuffle);
-
- player->priv->fs_window = gtk_window_new (GTK_WINDOW_POPUP);
- gtk_widget_set_name(GTK_WIDGET(player->priv->fs_window), "ParoleFullscreen");
-
- gtk_window_set_opacity( GTK_WINDOW(player->priv->fs_window), 0.70 );
- gtk_window_set_gravity (GTK_WINDOW (player->priv->fs_window), GDK_GRAVITY_SOUTH_WEST);
- gtk_window_set_position (GTK_WINDOW (player->priv->fs_window), GTK_WIN_POS_NONE);
+ "repeat", &repeat,
+ "shuffle", &shuffle,
+ NULL);
+
+ gtk_toggle_action_set_active (player->priv->toggle_repeat_action, repeat);
+
+ gtk_toggle_action_set_active (player->priv->toggle_shuffle_action, shuffle);
parole_gst_set_default_aspect_ratio (player, builder);
-
- gtk_builder_connect_signals (builder, player);
- screen = gtk_widget_get_screen (player->priv->window);
- g_signal_connect (G_OBJECT (screen), "size-changed",
- G_CALLBACK (parole_player_screen_size_change_changed_cb), player);
+ gtk_builder_connect_signals (builder, player);
g_object_unref (builder);
parole_player_setup_multimedia_keys (player);
g_signal_connect_swapped (player->priv->window, "notify::is-active",
- G_CALLBACK (parole_player_window_notify_is_active), player);
-
- gtk_widget_grab_focus (player->priv->gst);
+ G_CALLBACK (parole_player_window_notify_is_active), player);
+
+ gtk_widget_grab_focus (player->priv->gst);
parole_player_dbus_init (player);
}
@@ -3176,7 +3429,7 @@ parole_player_new (const gchar *client_id)
return player;
}
-ParoleMediaList *parole_player_get_media_list (ParolePlayer *player)
+ParoleMediaList *parole_player_get_media_list (ParolePlayer *player)
{
return player->priv->list;
}
@@ -3187,129 +3440,129 @@ void parole_player_play_uri_disc (ParolePlayer *player, const gchar *uri, const
{
if ( uri )
{
- parole_player_disc_selected_cb (NULL, uri, device, player);
+ parole_player_disc_selected_cb (NULL, uri, device, player);
}
else if (device)
{
- gchar *uri_local = parole_get_uri_from_unix_device (device);
- if ( uri_local )
- {
- parole_player_disc_selected_cb (NULL, uri_local, device, player);
- g_free (uri_local);
- }
+ gchar *uri_local = parole_get_uri_from_unix_device (device);
+ if ( uri_local )
+ {
+ parole_player_disc_selected_cb (NULL, uri_local, device, player);
+ g_free (uri_local);
+ }
}
}
void parole_player_set_audiotrack_radio_menu_item_selected(ParolePlayer *player, gint audio_index)
{
- GList *menu_items, *menu_iter;
- gint counter = 0;
-
- menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
-
- for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
- {
- if (counter == audio_index) {
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_iter->data), TRUE);
- break;
- }
- counter++;
- }
- g_list_free(menu_items);
+ GList *menu_items, *menu_iter;
+ gint counter = 0;
+
+ menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
+
+ for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
+ {
+ if (counter == audio_index) {
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_iter->data), TRUE);
+ break;
+ }
+ counter++;
+ }
+ g_list_free(menu_items);
}
void parole_player_set_subtitle_radio_menu_item_selected(ParolePlayer *player, gint sub_index)
{
- GList *menu_items, *menu_iter;
- menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->subtitles_menu) );
-
- if (sub_index <= 0)
- {
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_items->data), TRUE);
- }
- else
- {
- gint counter = -3;
- for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
- {
- if (counter == sub_index) {
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_iter->data), TRUE);
- break;
- }
- counter++;
- }
- }
- g_list_free(menu_items);
+ GList *menu_items, *menu_iter;
+ menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->subtitles_menu) );
+
+ if (sub_index <= 0)
+ {
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_items->data), TRUE);
+ }
+ else
+ {
+ gint counter = -3;
+ for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
+ {
+ if (counter == sub_index) {
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_iter->data), TRUE);
+ break;
+ }
+ counter++;
+ }
+ }
+ g_list_free(menu_items);
}
void parole_player_audiotrack_radio_menu_item_changed_cb(GtkWidget *widget, ParolePlayer *player)
{
- gint radio_index = 0;
- GList *menu_items, *menu_iter;
- gint counter = 0;
- gint combobox_index;
-
- menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
-
- for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
- {
- if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu_iter->data)) == TRUE) {
- radio_index = counter;
- break;
- }
- counter++;
- }
- g_list_free(menu_items);
-
- combobox_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack));
- if (radio_index != combobox_index)
- gtk_combo_box_set_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack), radio_index);
+ gint radio_index = 0;
+ GList *menu_items, *menu_iter;
+ gint counter = 0;
+ gint combobox_index;
+
+ menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->languages_menu) );
+
+ for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
+ {
+ if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu_iter->data)) == TRUE) {
+ radio_index = counter;
+ break;
+ }
+ counter++;
+ }
+ g_list_free(menu_items);
+
+ combobox_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack));
+ if (radio_index != combobox_index)
+ gtk_combo_box_set_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack), radio_index);
}
void parole_player_subtitles_radio_menu_item_changed_cb(GtkWidget *widget, ParolePlayer *player)
{
- gint radio_index = 0;
- gint combobox_index = 0;
- gint counter = 0;
-
- GList *menu_items, *menu_iter;
- menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->subtitles_menu) );
-
- for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
- {
- if (counter == 0 || counter > 3)
- {
- if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu_iter->data)) == TRUE) {
- radio_index = counter;
- break;
- }
- }
- counter++;
- }
- g_list_free(menu_items);
-
- if (radio_index != 0)
- radio_index -= 3;
-
- combobox_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_subtitles));
- if (radio_index != combobox_index)
- gtk_combo_box_set_active(GTK_COMBO_BOX(player->priv->combobox_subtitles), radio_index);
+ gint radio_index = 0;
+ gint combobox_index = 0;
+ gint counter = 0;
+
+ GList *menu_items, *menu_iter;
+ menu_items = gtk_container_get_children( GTK_CONTAINER (player->priv->subtitles_menu) );
+
+ for (menu_iter = menu_items; menu_iter != NULL; menu_iter = g_list_next(menu_iter))
+ {
+ if (counter == 0 || counter > 3)
+ {
+ if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu_iter->data)) == TRUE) {
+ radio_index = counter;
+ break;
+ }
+ }
+ counter++;
+ }
+ g_list_free(menu_items);
+
+ if (radio_index != 0)
+ radio_index -= 3;
+
+ combobox_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_subtitles));
+ if (radio_index != combobox_index)
+ gtk_combo_box_set_active(GTK_COMBO_BOX(player->priv->combobox_subtitles), radio_index);
}
void parole_player_combo_box_audiotrack_changed_cb(GtkWidget *widget, ParolePlayer *player)
{
- gint audio_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack));
- if (player->priv->update_languages == FALSE)
- gst_set_current_audio_track(PAROLE_GST(player->priv->gst), audio_index);
- parole_player_set_audiotrack_radio_menu_item_selected(player, audio_index);
+ gint audio_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_audiotrack));
+ if (player->priv->update_languages == FALSE)
+ gst_set_current_audio_track(PAROLE_GST(player->priv->gst), audio_index);
+ parole_player_set_audiotrack_radio_menu_item_selected(player, audio_index);
}
void parole_player_combo_box_subtitles_changed_cb(GtkWidget *widget, ParolePlayer *player)
{
- gint sub_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_subtitles));
- if (player->priv->update_languages == FALSE)
- gst_set_current_subtitle_track(PAROLE_GST(player->priv->gst), sub_index);
- parole_player_set_subtitle_radio_menu_item_selected(player, sub_index);
+ gint sub_index = gtk_combo_box_get_active(GTK_COMBO_BOX(player->priv->combobox_subtitles));
+ if (player->priv->update_languages == FALSE)
+ gst_set_current_subtitle_track(PAROLE_GST(player->priv->gst), sub_index);
+ parole_player_set_subtitle_radio_menu_item_selected(player, sub_index);
}
void parole_player_terminate (ParolePlayer *player)
@@ -3318,37 +3571,31 @@ void parole_player_terminate (ParolePlayer *player)
}
-static gboolean parole_player_dbus_play (ParolePlayer *player,
- GError *error);
+static gboolean parole_player_dbus_play (ParolePlayer *player,
+ GError *error);
-static gboolean parole_player_dbus_stop (ParolePlayer *player,
- GError *error);
+static gboolean parole_player_dbus_next_track (ParolePlayer *player,
+ GError *error);
-static gboolean parole_player_dbus_next_track (ParolePlayer *player,
- GError *error);
+static gboolean parole_player_dbus_prev_track (ParolePlayer *player,
+ GError *error);
-static gboolean parole_player_dbus_prev_track (ParolePlayer *player,
- GError *error);
+static gboolean parole_player_dbus_raise_volume (ParolePlayer *player,
+ GError *error);
-static gboolean parole_player_dbus_seek_forward (ParolePlayer *player,
- GError *error);
+static gboolean parole_player_dbus_lower_volume (ParolePlayer *player,
+ GError *error);
+
+static gboolean parole_player_dbus_mute (ParolePlayer *player,
+ GError *error);
+
+static gboolean parole_player_dbus_unmute (ParolePlayer *player,
+ GError *error);
-static gboolean parole_player_dbus_seek_backward (ParolePlayer *player,
- GError *error);
-
-static gboolean parole_player_dbus_raise_volume (ParolePlayer *player,
- GError *error);
-
-static gboolean parole_player_dbus_lower_volume (ParolePlayer *player,
- GError *error);
-
-static gboolean parole_player_dbus_mute (ParolePlayer *player,
- GError *error);
-
-static gboolean parole_player_dbus_play_disc (ParolePlayer *player,
- gchar *in_uri,
- gchar *in_device,
- GError **error);
+static gboolean parole_player_dbus_play_disc (ParolePlayer *player,
+ gchar *in_uri,
+ gchar *in_device,
+ GError **error);
#include "org.parole.media.player.h"
@@ -3358,96 +3605,85 @@ static gboolean parole_player_dbus_play_disc (ParolePlayer *player,
static void
parole_player_dbus_class_init (ParolePlayerClass *klass)
{
-
dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass),
- &dbus_glib_parole_player_object_info);
-
+ &dbus_glib_parole_player_object_info);
}
static void
parole_player_dbus_init (ParolePlayer *player)
{
dbus_g_connection_register_g_object (player->priv->bus,
- PAROLE_DBUS_PATH,
- G_OBJECT (player));
-}
-
-static gboolean parole_player_dbus_play (ParolePlayer *player,
- GError *error)
-{
-
- parole_player_play_pause_clicked (NULL, player);
- return TRUE;
+ PAROLE_DBUS_PATH,
+ G_OBJECT (player));
}
-static gboolean parole_player_dbus_stop (ParolePlayer *player,
- GError *error)
+static gboolean parole_player_dbus_play (ParolePlayer *player,
+ GError *error)
{
- parole_gst_stop (PAROLE_GST (player->priv->gst));
+ parole_player_toggle_playpause(player);
return TRUE;
}
-static gboolean parole_player_dbus_next_track (ParolePlayer *player,
- GError *error)
+static gboolean parole_player_dbus_next_track (ParolePlayer *player,
+ GError *error)
{
- parole_player_play_next (player, TRUE);
+ parole_player_play_next (player, TRUE);
return TRUE;
}
-static gboolean parole_player_dbus_prev_track (ParolePlayer *player,
- GError *error)
+static gboolean parole_player_dbus_prev_track (ParolePlayer *player,
+ GError *error)
{
- parole_player_play_prev (player);
+ parole_player_play_prev (player);
return TRUE;
}
-
-static gboolean parole_player_dbus_seek_forward (ParolePlayer *player,
- GError *error)
+
+static gboolean parole_player_dbus_raise_volume (ParolePlayer *player,
+ GError *error)
{
- parole_player_forward_cb (NULL, player);
+ parole_player_volume_up (NULL, player);
return TRUE;
}
-static gboolean parole_player_dbus_seek_backward (ParolePlayer *player,
- GError *error)
+static gboolean parole_player_dbus_lower_volume (ParolePlayer *player,
+ GError *error)
{
- parole_player_back_cb (NULL, player);
+ parole_player_volume_down (NULL, player);
return TRUE;
}
-
-static gboolean parole_player_dbus_raise_volume (ParolePlayer *player,
- GError *error)
+
+static gboolean parole_player_dbus_mute (ParolePlayer *player,
+ GError *error)
{
- parole_player_volume_up (NULL, player);
+ if (!gtk_scale_button_get_value (GTK_SCALE_BUTTON (player->priv->volume)) == 0.0)
+ {
+ parole_player_volume_mute(NULL, player);
+ }
return TRUE;
}
-static gboolean parole_player_dbus_lower_volume (ParolePlayer *player,
- GError *error)
-{
- parole_player_volume_down (NULL, player);
- return TRUE;
-}
-
-static gboolean parole_player_dbus_mute (ParolePlayer *player,
- GError *error)
+static gboolean parole_player_dbus_unmute (ParolePlayer *player,
+ GError *error)
{
- gtk_scale_button_set_value (GTK_SCALE_BUTTON (player->priv->volume), 0);
+ if (gtk_scale_button_get_value (GTK_SCALE_BUTTON (player->priv->volume)) == 0.0)
+ {
+ parole_player_volume_mute(NULL, player);
+ }
return TRUE;
}
static gboolean parole_player_dbus_play_disc (ParolePlayer *player,
- gchar *in_uri,
- gchar *in_device,
- GError **error)
+ gchar *in_uri,
+ gchar *in_device,
+ GError **error)
{
TRACE ("uri : %s", in_uri);
gtk_window_present (GTK_WINDOW (player->priv->window));
if ( parole_is_uri_disc (in_uri) )
- parole_player_disc_selected_cb (NULL, in_uri, in_device, player);
-
+ parole_player_disc_selected_cb (NULL, in_uri, in_device, player);
+
return TRUE;
}
diff --git a/src/parole-player.h b/src/parole-player.h
index 54861c8..390ecb3 100644
--- a/src/parole-player.h
+++ b/src/parole-player.h
@@ -36,39 +36,51 @@ typedef struct ParolePlayerPrivate ParolePlayerPrivate;
typedef struct
{
- GObject parent;
- ParolePlayerPrivate *priv;
+ GObject parent;
+ ParolePlayerPrivate *priv;
} ParolePlayer;
typedef struct
{
- GObjectClass parent_class;
+ GObjectClass parent_class;
- void (*shuffle_toggled) (ParolePlayer *list,
- gboolean shuffle_toggled);
-
- void (*repeat_toggled) (ParolePlayer *list,
- gboolean repeat_toggled);
+ void (*shuffle_toggled) (ParolePlayer *player,
+ gboolean shuffle_toggled);
+
+ void (*repeat_toggled) (ParolePlayer *player,
+ gboolean repeat_toggled);
+
+ void (*gst_dvd_nav_message) (ParolePlayer *player,
+ gint gst_dvd_nav_message);
-
} ParolePlayerClass;
-GType parole_player_get_type (void) G_GNUC_CONST;
-ParolePlayer *parole_player_new (const gchar *client_id);
+typedef enum
+{
+ PAROLE_PLAYER_ACTION_PREVIOUS,
+ PAROLE_PLAYER_ACTION_NEXT,
+ PAROLE_PLAYER_ACTION_PLAYPAUSE
+} ParolePlayerAction;
+
+GType parole_player_get_type (void) G_GNUC_CONST;
+ParolePlayer *parole_player_new (const gchar *client_id);
+
+ParoleMediaList *parole_player_get_media_list (ParolePlayer *player);
-ParoleMediaList *parole_player_get_media_list (ParolePlayer *player);
+void parole_player_play_uri_disc (ParolePlayer *player,
+ const gchar *uri,
+ const gchar *device);
-void parole_player_play_uri_disc (ParolePlayer *player,
- const gchar *uri,
- const gchar *device);
+void parole_player_terminate (ParolePlayer *player);
-void parole_player_terminate (ParolePlayer *player);
+void parole_player_embedded (ParolePlayer *player);
-void parole_player_embedded (ParolePlayer *player);
+void parole_player_full_screen (ParolePlayer *player,
+ gboolean fullscreen);
+
+GtkAction *parole_player_get_action(ParolePlayerAction action);
-void parole_player_full_screen (ParolePlayer *player,
- gboolean fullscreen);
G_END_DECLS
diff --git a/src/parole-plugin-player.c b/src/parole-plugin-player.c
index 51f8a2a..2700cd8 100644
--- a/src/parole-plugin-player.c
+++ b/src/parole-plugin-player.c
@@ -30,6 +30,7 @@
#include <src/misc/parole-provider-player.h>
+#include "parole-dbus.h"
#include "parole-plugin-player.h"
#include "parole-plugins-manager.h"
#include "parole-medialist.h"
@@ -55,7 +56,21 @@ struct ParolePluginPlayerPrivate
};
G_DEFINE_TYPE_WITH_CODE (ParolePluginPlayer, parole_plugin_player, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLAYER, parole_plugin_player_iface_init))
+ G_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLAYER, parole_plugin_player_iface_init))
+
+static void
+parole_plugin_player_send_message (const gchar *message)
+{
+ DBusGProxy *proxy;
+
+ proxy = parole_get_proxy (PAROLE_DBUS_PATH, PAROLE_DBUS_INTERFACE);
+
+ dbus_g_proxy_call_no_reply (proxy, message,
+ G_TYPE_INVALID,
+ G_TYPE_INVALID);
+
+ g_object_unref (proxy);
+}
static GtkWidget *
parole_plugin_player_get_main_window (ParoleProviderPlayer *provider)
@@ -68,7 +83,7 @@ parole_plugin_player_get_main_window (ParoleProviderPlayer *provider)
static void
parole_plugin_player_pack_widget (ParoleProviderPlayer *provider, GtkWidget *widget,
- const gchar *title, ParolePluginContainer container_type)
+ const gchar *title, ParolePluginContainer container_type)
{
ParolePluginPlayer *player;
ParolePluginsManager *manager;
@@ -104,7 +119,7 @@ parole_plugin_player_get_stream (ParoleProviderPlayer *provider)
return parole_gst_get_stream (PAROLE_GST (player->priv->gst));
}
-static gboolean
+static gboolean
parole_plugin_player_play_uri (ParoleProviderPlayer *provider, const gchar *uri)
{
ParolePluginPlayer *player;
@@ -116,7 +131,7 @@ parole_plugin_player_play_uri (ParoleProviderPlayer *provider, const gchar *uri)
return TRUE;
}
-static gboolean
+static gboolean
parole_plugin_player_pause (ParoleProviderPlayer *provider)
{
ParolePluginPlayer *player;
@@ -128,7 +143,7 @@ parole_plugin_player_pause (ParoleProviderPlayer *provider)
return TRUE;
}
-static gboolean
+static gboolean
parole_plugin_player_resume (ParoleProviderPlayer *provider)
{
ParolePluginPlayer *player;
@@ -140,7 +155,7 @@ parole_plugin_player_resume (ParoleProviderPlayer *provider)
return TRUE;
}
-static gboolean
+static gboolean
parole_plugin_player_stop (ParoleProviderPlayer *provider)
{
ParolePluginPlayer *player;
@@ -152,7 +167,23 @@ parole_plugin_player_stop (ParoleProviderPlayer *provider)
return TRUE;
}
-static gboolean
+static gboolean
+parole_plugin_player_play_previous (ParoleProviderPlayer *provider)
+{
+ parole_plugin_player_send_message ("PrevTrack");
+
+ return TRUE;
+}
+
+static gboolean
+parole_plugin_player_play_next (ParoleProviderPlayer *provider)
+{
+ parole_plugin_player_send_message ("NextTrack");
+
+ return TRUE;
+}
+
+static gboolean
parole_plugin_player_seek (ParoleProviderPlayer *provider, gdouble pos)
{
ParolePluginPlayer *player;
@@ -184,13 +215,15 @@ static void parole_plugin_player_iface_init (ParoleProviderPlayerIface *iface)
iface->pause = parole_plugin_player_pause;
iface->resume = parole_plugin_player_resume;
iface->stop = parole_plugin_player_stop;
+ iface->play_previous = parole_plugin_player_play_previous;
+ iface->play_next = parole_plugin_player_play_next;
iface->seek = parole_plugin_player_seek;
iface->open_media_chooser = parole_plugin_player_open_media_chooser;
}
static void
parole_plugin_player_media_state_changed_cb (ParoleGst *gst, const ParoleStream *stream,
- ParoleState state, ParolePluginPlayer *player)
+ ParoleState state, ParolePluginPlayer *player)
{
g_signal_emit_by_name (G_OBJECT (player), "state-changed", stream, state);
}
@@ -219,10 +252,10 @@ parole_plugin_player_init (ParolePluginPlayer *player)
player->priv->gst = parole_gst_get ();
player->priv->state_changed = g_signal_connect (G_OBJECT (player->priv->gst), "media-state",
- G_CALLBACK (parole_plugin_player_media_state_changed_cb), player);
-
+ G_CALLBACK (parole_plugin_player_media_state_changed_cb), player);
+
player->priv->tag_message = g_signal_connect (G_OBJECT (player->priv->gst), "media-tag",
- G_CALLBACK (parole_plugin_player_media_tag_cb), player);
+ G_CALLBACK (parole_plugin_player_media_tag_cb), player);
player->priv->packed = FALSE;
player->priv->box = NULL;
@@ -237,15 +270,15 @@ parole_plugin_player_finalize (GObject *object)
if ( G_IS_OBJECT (player->priv->gst) )
{
- if (g_signal_handler_is_connected (player->priv->gst, player->priv->state_changed))
- g_signal_handler_disconnect (player->priv->gst, player->priv->state_changed);
+ if (g_signal_handler_is_connected (player->priv->gst, player->priv->state_changed))
+ g_signal_handler_disconnect (player->priv->gst, player->priv->state_changed);
- if (g_signal_handler_is_connected (player->priv->gst, player->priv->tag_message))
- g_signal_handler_disconnect (player->priv->gst, player->priv->tag_message);
+ if (g_signal_handler_is_connected (player->priv->gst, player->priv->tag_message))
+ g_signal_handler_disconnect (player->priv->gst, player->priv->tag_message);
}
if ( player->priv->packed && GTK_IS_WIDGET (player->priv->box))
- gtk_widget_destroy (player->priv->box);
+ gtk_widget_destroy (player->priv->box);
G_OBJECT_CLASS (parole_plugin_player_parent_class)->finalize (object);
}
diff --git a/src/parole-plugin-player.h b/src/parole-plugin-player.h
index 5c124e9..c90b65a 100644
--- a/src/parole-plugin-player.h
+++ b/src/parole-plugin-player.h
@@ -35,20 +35,20 @@ typedef struct ParolePluginPlayerPrivate ParolePluginPlayerPrivate;
typedef struct
{
- GObject parent;
- ParolePluginPlayerPrivate *priv;
+ GObject parent;
+ ParolePluginPlayerPrivate *priv;
} ParolePluginPlayer;
typedef struct
{
- GObjectClass parent_class;
+ GObjectClass parent_class;
} ParolePluginPlayerClass;
-GType parole_plugin_player_get_type (void) G_GNUC_CONST;
+GType parole_plugin_player_get_type (void) G_GNUC_CONST;
-ParolePluginPlayer *parole_plugin_player_new (void);
+ParolePluginPlayer *parole_plugin_player_new (void);
G_END_DECLS
diff --git a/src/parole-plugins-manager.c b/src/parole-plugins-manager.c
index b94385d..795cc5d 100644
--- a/src/parole-plugins-manager.c
+++ b/src/parole-plugins-manager.c
@@ -104,7 +104,7 @@ static void parole_plugins_manager_set_property (GObject *object,
struct ParolePluginsManagerPrivate
{
GtkWidget *list_nt;
- GtkWidget *main_nt;
+ GtkWidget *main_window;
GPtrArray *array;
@@ -166,6 +166,13 @@ parole_plugins_manager_get_selected_module_data (PrefData *pref, ParoleProviderM
GtkTreeIter iter;
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (pref->view));
+
+ if ( !sel )
+ {
+ *module = NULL;
+ *info = NULL;
+ return;
+ }
if ( !gtk_tree_selection_get_selected (sel, &model, &iter))
{
@@ -242,39 +249,47 @@ parole_plugins_manager_cell_toggled_cb (GtkCellRendererToggle *cell_renderer,
gchar *path_str,
PrefData *pref)
{
- ParoleProviderModule *module;
+ ParoleProviderModule *module = NULL;
GtkTreeIter iter;
GtkTreePath *path;
- gboolean active;
+ gboolean active = FALSE;
path = gtk_tree_path_new_from_string (path_str);
- gtk_tree_model_get_iter (GTK_TREE_MODEL (pref->store), &iter, path);
-
- gtk_tree_model_get (GTK_TREE_MODEL (pref->store), &iter,
- COL_ACTIVE, &active,
- COL_MODULE, &module,
- -1);
+ if (gtk_tree_model_get_iter (GTK_TREE_MODEL (pref->store), &iter, path))
+ {
+ gtk_tree_model_get (GTK_TREE_MODEL (pref->store), &iter,
+ COL_ACTIVE, &active,
+ COL_MODULE, &module,
+ -1);
- active ^= 1;
+ active ^= 1;
- if ( pref->manager->priv->load_plugins )
- {
- if ( active )
+ if ( pref->manager->priv->load_plugins )
{
- g_type_module_use (G_TYPE_MODULE (module));
- parole_provider_module_new_plugin (module);
- }
- else
- {
- parole_provider_module_free_plugin (module);
- g_type_module_unuse (G_TYPE_MODULE (module));
+ if ( active )
+ {
+ g_type_module_use (G_TYPE_MODULE (module));
+ if (!parole_provider_module_new_plugin (module))
+ {
+ // If plugin loading fails...
+ parole_dialog_error(GTK_WINDOW(pref->window), _("Plugin failed to load"), _("Please check your installation"));
+ parole_provider_module_free_plugin (module);
+ g_type_module_unuse (G_TYPE_MODULE (module));
+ active = FALSE;
+ }
+ }
+ else
+ {
+ parole_provider_module_free_plugin (module);
+ g_type_module_unuse (G_TYPE_MODULE (module));
+ }
}
- }
- gtk_list_store_set (GTK_LIST_STORE (pref->store), &iter,
- COL_ACTIVE, active,
- -1);
+ gtk_list_store_set (GTK_LIST_STORE (pref->store), &iter,
+ COL_ACTIVE, active,
+ -1);
+ }
gtk_tree_path_free (path);
@@ -389,9 +404,9 @@ parole_plugins_manager_show_plugins_pref (GtkWidget *widget, ParolePluginsManage
/*No plugins found*/
if ( manager->priv->array->len == 0 )
{
- parole_dialog_info (GTK_WINDOW (gtk_widget_get_toplevel (manager->priv->main_nt)),
+ parole_dialog_info (GTK_WINDOW (manager->priv->main_window),
_("No installed plugins found on this system"),
- _("No installed plugins found on this system"));
+ _("Please check your installation."));
return;
}
@@ -411,7 +426,7 @@ parole_plugins_manager_show_plugins_pref (GtkWidget *widget, ParolePluginsManage
pref->configure = GTK_WIDGET (gtk_builder_get_object (builder, "configure"));
gtk_window_set_transient_for (GTK_WINDOW (pref->window),
- GTK_WINDOW (gtk_widget_get_toplevel (manager->priv->main_nt)));
+ GTK_WINDOW (manager->priv->main_window));
for ( i = 0; i < manager->priv->array->len; i++)
{
@@ -603,7 +618,7 @@ parole_plugins_manager_init (ParolePluginsManager *manager)
manager->priv->load_plugins = TRUE;
manager->priv->list_nt = GTK_WIDGET (gtk_builder_get_object (builder, "notebook-playlist"));
- manager->priv->main_nt = GTK_WIDGET (gtk_builder_get_object (builder, "main-notebook"));
+ manager->priv->main_window = GTK_WIDGET (gtk_builder_get_object (builder, "main-window"));
manager->priv->conf = parole_conf_new();
@@ -613,17 +628,10 @@ parole_plugins_manager_init (ParolePluginsManager *manager)
g_signal_connect (manager->priv->list_nt, "page-removed",
G_CALLBACK (parole_plugins_manager_page_removed_cb), NULL);
- g_signal_connect (manager->priv->main_nt, "page-added",
- G_CALLBACK (parole_plugins_manager_page_added_cb), NULL);
-
- g_signal_connect (manager->priv->main_nt, "page-removed",
- G_CALLBACK (parole_plugins_manager_page_removed_cb), NULL);
-
g_signal_connect (gtk_builder_get_object (builder, "plugins-menu-item"), "activate",
G_CALLBACK (parole_plugins_manager_show_plugins_pref), manager);
parole_plugins_manager_set_show_tabs (GTK_NOTEBOOK (manager->priv->list_nt));
- parole_plugins_manager_set_show_tabs (GTK_NOTEBOOK (manager->priv->main_nt));
g_object_unref (builder);
}
@@ -728,9 +736,4 @@ parole_plugins_manager_pack (ParolePluginsManager *manager, GtkWidget *widget, c
gtk_notebook_append_page (GTK_NOTEBOOK (manager->priv->list_nt), widget, gtk_label_new (title));
gtk_widget_show_all (widget);
}
- else if ( container == PAROLE_PLUGIN_CONTAINER_MAIN_VIEW )
- {
- gtk_notebook_append_page (GTK_NOTEBOOK (manager->priv->main_nt), widget, gtk_label_new (title));
- gtk_widget_show_all (widget);
- }
}
diff --git a/src/parole-plugins-manager.h b/src/parole-plugins-manager.h
index 3adbf79..302b195 100644
--- a/src/parole-plugins-manager.h
+++ b/src/parole-plugins-manager.h
@@ -36,29 +36,29 @@ typedef struct ParolePluginsManagerPrivate ParolePluginsManagerPrivate;
typedef struct
{
- GObject parent;
- ParolePluginsManagerPrivate *priv;
+ GObject parent;
+ ParolePluginsManagerPrivate *priv;
} ParolePluginsManager;
typedef struct
{
- GObjectClass parent_class;
+ GObjectClass parent_class;
} ParolePluginsManagerClass;
-GType parole_plugins_manager_get_type (void) G_GNUC_CONST;
+GType parole_plugins_manager_get_type (void) G_GNUC_CONST;
-ParolePluginsManager *parole_plugins_manager_new (gboolean load_plugins);
+ParolePluginsManager *parole_plugins_manager_new (gboolean load_plugins);
-ParolePluginsManager *parole_plugins_manager_get (void);
+ParolePluginsManager *parole_plugins_manager_get (void);
-void parole_plugins_manager_load (ParolePluginsManager *manager);
+void parole_plugins_manager_load (ParolePluginsManager *manager);
-void parole_plugins_manager_pack (ParolePluginsManager *manager,
- GtkWidget *widget,
- const gchar *title,
- ParolePluginContainer container);
+void parole_plugins_manager_pack (ParolePluginsManager *manager,
+ GtkWidget *widget,
+ const gchar *title,
+ ParolePluginContainer container);
G_END_DECLS
diff --git a/src/parole-subtitle-encoding.c b/src/parole-subtitle-encoding.c
index f2d5486..9b0d97b 100644
--- a/src/parole-subtitle-encoding.c
+++ b/src/parole-subtitle-encoding.c
@@ -510,22 +510,25 @@ parole_subtitle_encoding_set (GtkComboBox * combo, const char *encoding)
model = gtk_combo_box_get_model (combo);
index_i = subtitle_encoding_get_index (encoding);
- gtk_tree_model_get_iter_first (model, &iter);
- do {
- if (!gtk_tree_model_iter_has_child (model, &iter))
- continue;
- if (!gtk_tree_model_iter_children (model, &iter2, &iter))
- continue;
- do {
- gtk_tree_model_get (model, &iter2, INDEX_COL, &i, -1);
- if (i == index_i)
- break;
- } while (gtk_tree_model_iter_next (model, &iter2));
- if (i == index_i)
- break;
- } while (gtk_tree_model_iter_next (model, &iter));
- gtk_combo_box_set_active_iter (combo, &iter2);
+ if (gtk_tree_model_get_iter_first (model, &iter))
+ {
+
+ do {
+ if (!gtk_tree_model_iter_has_child (model, &iter))
+ continue;
+ if (!gtk_tree_model_iter_children (model, &iter2, &iter))
+ continue;
+ do {
+ gtk_tree_model_get (model, &iter2, INDEX_COL, &i, -1);
+ if (i == index_i)
+ break;
+ } while (gtk_tree_model_iter_next (model, &iter2));
+ if (i == index_i)
+ break;
+ } while (gtk_tree_model_iter_next (model, &iter));
+ gtk_combo_box_set_active_iter (combo, &iter2);
+ }
}
void
diff --git a/src/parole-subtitle-encoding.h b/src/parole-subtitle-encoding.h
index 8a4315d..dd430e9 100644
--- a/src/parole-subtitle-encoding.h
+++ b/src/parole-subtitle-encoding.h
@@ -32,9 +32,9 @@
#include <gtk/gtk.h>
-void parole_subtitle_encoding_init (GtkComboBox *combo);
+void parole_subtitle_encoding_init (GtkComboBox *combo);
-void parole_subtitle_encoding_set (GtkComboBox *combo, const char *encoding);
+void parole_subtitle_encoding_set (GtkComboBox *combo, const char *encoding);
const char *parole_subtitle_encoding_get_selected (GtkComboBox *combo);
diff --git a/src/parole-utils.c b/src/parole-utils.c
index 4f5fbff..acd1543 100644
--- a/src/parole-utils.c
+++ b/src/parole-utils.c
@@ -52,13 +52,13 @@
/* List from xine-lib's demux_sputext.c */
static const char subtitle_ext[][4] = {
- "asc",
- "txt",
- "sub",
- "srt",
- "smi",
- "ssa",
- "ass"
+ "asc",
+ "txt",
+ "sub",
+ "srt",
+ "smi",
+ "ssa",
+ "ass"
};
/*
@@ -80,9 +80,9 @@ compare_by_name_using_number (const gchar *ap,
/* compare the numbers */
if (anum < bnum)
- return -1;
+ return -1;
else if (anum > bnum)
- return 1;
+ return 1;
/* the numbers are equal, and so the higher first digit should
* be sorted first, i.e. 'file10' before 'file010', since we
@@ -115,75 +115,75 @@ thunar_file_compare_by_name (ParoleFile *file_a,
/* check if we should ignore case */
if (G_LIKELY (case_sensitive))
{
- /* try simple (fast) ASCII comparison first */
- for (;; ++ap, ++bp)
- {
- /* check if the characters differ or we have a non-ASCII char */
- ac = *((const guchar *) ap);
- bc = *((const guchar *) bp);
- if (ac != bc || ac == 0 || ac > 127)
- break;
- }
-
- /* fallback to Unicode comparison */
- if (G_UNLIKELY (ac > 127 || bc > 127))
- {
- for (;; ap = g_utf8_next_char (ap), bp = g_utf8_next_char (bp))
+ /* try simple (fast) ASCII comparison first */
+ for (;; ++ap, ++bp)
{
- /* check if characters differ or end of string */
- ac = g_utf8_get_char (ap);
- bc = g_utf8_get_char (bp);
- if (ac != bc || ac == 0)
- break;
- }
+ /* check if the characters differ or we have a non-ASCII char */
+ ac = *((const guchar *) ap);
+ bc = *((const guchar *) bp);
+ if (ac != bc || ac == 0 || ac > 127)
+ break;
}
+
+ /* fallback to Unicode comparison */
+ if (G_UNLIKELY (ac > 127 || bc > 127))
+ {
+ for (;; ap = g_utf8_next_char (ap), bp = g_utf8_next_char (bp))
+ {
+ /* check if characters differ or end of string */
+ ac = g_utf8_get_char (ap);
+ bc = g_utf8_get_char (bp);
+ if (ac != bc || ac == 0)
+ break;
+ }
+ }
}
else
{
- /* try simple (fast) ASCII comparison first (case-insensitive!) */
- for (;; ++ap, ++bp)
+ /* try simple (fast) ASCII comparison first (case-insensitive!) */
+ for (;; ++ap, ++bp)
{
- /* check if the characters differ or we have a non-ASCII char */
- ac = *((const guchar *) ap);
- bc = *((const guchar *) bp);
- if (g_ascii_tolower (ac) != g_ascii_tolower (bc) || ac == 0 || ac > 127)
- break;
+ /* check if the characters differ or we have a non-ASCII char */
+ ac = *((const guchar *) ap);
+ bc = *((const guchar *) bp);
+ if (g_ascii_tolower (ac) != g_ascii_tolower (bc) || ac == 0 || ac > 127)
+ break;
}
- /* fallback to Unicode comparison (case-insensitive!) */
- if (G_UNLIKELY (ac > 127 || bc > 127))
- {
- for (;; ap = g_utf8_next_char (ap), bp = g_utf8_next_char (bp))
+ /* fallback to Unicode comparison (case-insensitive!) */
+ if (G_UNLIKELY (ac > 127 || bc > 127))
+ {
+ for (;; ap = g_utf8_next_char (ap), bp = g_utf8_next_char (bp))
{
- /* check if characters differ or end of string */
- ac = g_utf8_get_char (ap);
- bc = g_utf8_get_char (bp);
- if (g_unichar_tolower (ac) != g_unichar_tolower (bc) || ac == 0)
- break;
+ /* check if characters differ or end of string */
+ ac = g_utf8_get_char (ap);
+ bc = g_utf8_get_char (bp);
+ if (g_unichar_tolower (ac) != g_unichar_tolower (bc) || ac == 0)
+ break;
}
}
}
/* if both strings are equal, we're done */
if (G_UNLIKELY (ac == bc || (!case_sensitive && g_unichar_tolower (ac) == g_unichar_tolower (bc))))
- return 0;
+ return 0;
/* check if one of the characters that differ is a digit */
if (G_UNLIKELY (g_ascii_isdigit (ac) || g_ascii_isdigit (bc)))
{
- /* if both strings differ in a digit, we use a smarter comparison
- * to get sorting 'file1', 'file5', 'file10' done the right way.
- */
- if (g_ascii_isdigit (ac) && g_ascii_isdigit (bc))
- return compare_by_name_using_number (ap, bp);
-
- /* a second case is '20 file' and '2file', where comparison by number
- * makes sense, if the previous char for both strings is a digit.
- */
- if (ap > parole_file_get_display_name (file_a) && bp > parole_file_get_display_name (file_b)
- && g_ascii_isdigit (*(ap - 1)) && g_ascii_isdigit (*(bp - 1)))
+ /* if both strings differ in a digit, we use a smarter comparison
+ * to get sorting 'file1', 'file5', 'file10' done the right way.
+ */
+ if (g_ascii_isdigit (ac) && g_ascii_isdigit (bc))
+ return compare_by_name_using_number (ap, bp);
+
+ /* a second case is '20 file' and '2file', where comparison by number
+ * makes sense, if the previous char for both strings is a digit.
+ */
+ if (ap > parole_file_get_display_name (file_a) && bp > parole_file_get_display_name (file_b)
+ && g_ascii_isdigit (*(ap - 1)) && g_ascii_isdigit (*(bp - 1)))
{
- return compare_by_name_using_number (ap - 1, bp - 1);
+ return compare_by_name_using_number (ap - 1, bp - 1);
}
}
@@ -195,40 +195,40 @@ thunar_file_compare_by_name (ParoleFile *file_a,
#ifdef HAVE_STRCOLL
if ((ac > 127 || bc > 127) && g_get_charset (NULL))
{
- /* case-sensitive is easy, case-insensitive is expensive,
- * but we use a simple optimization to make it fast.
- */
- if (G_LIKELY (case_sensitive))
+ /* case-sensitive is easy, case-insensitive is expensive,
+ * but we use a simple optimization to make it fast.
+ */
+ if (G_LIKELY (case_sensitive))
{
- return strcoll (ap, bp);
+ return strcoll (ap, bp);
}
- else
+ else
{
- /* we use a trick here, so we don't need to allocate
- * and transform the two strings completely first (8
- * byte for each buffer, so all compilers should align
- * them properly)
+ /* we use a trick here, so we don't need to allocate
+ * and transform the two strings completely first (8
+ * byte for each buffer, so all compilers should align
+ * them properly)
+ */
+ gchar abuf[8];
+ gchar bbuf[8];
+
+ /* transform the unicode chars to strings and
+ * make sure the strings are nul-terminated.
*/
- gchar abuf[8];
- gchar bbuf[8];
-
- /* transform the unicode chars to strings and
- * make sure the strings are nul-terminated.
- */
- abuf[g_unichar_to_utf8 (ac, abuf)] = '\0';
- bbuf[g_unichar_to_utf8 (bc, bbuf)] = '\0';
+ abuf[g_unichar_to_utf8 (ac, abuf)] = '\0';
+ bbuf[g_unichar_to_utf8 (bc, bbuf)] = '\0';
- /* compare the unicode chars (as strings) */
- return strcoll (abuf, bbuf);
+ /* compare the unicode chars (as strings) */
+ return strcoll (abuf, bbuf);
}
}
#endif
/* else, they differ in an ASCII character */
if (G_UNLIKELY (!case_sensitive))
- return (g_unichar_tolower (ac) > g_unichar_tolower (bc)) ? 1 : -1;
+ return (g_unichar_tolower (ac) > g_unichar_tolower (bc)) ? 1 : -1;
else
- return (ac > bc) ? 1 : -1;
+ return (ac > bc) ? 1 : -1;
}
gchar *
@@ -241,8 +241,8 @@ parole_get_name_without_extension (const gchar *name)
for ( suffix = len -1; suffix > 0; suffix--)
{
- if ( name [suffix] == '.' )
- break;
+ if ( name [suffix] == '.' )
+ break;
}
ret = g_strndup (name, sizeof (char) * (suffix));
@@ -260,13 +260,13 @@ parole_get_subtitle_in_dir (const gchar *dir_path, const gchar *file)
for ( i = 0; i < G_N_ELEMENTS (subtitle_ext); i++)
{
- sub_path = g_strdup_printf ("%s%c%s.%s", dir_path, G_DIR_SEPARATOR, file_no_ext, subtitle_ext[i]);
-
- if ( g_file_test (sub_path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR ) )
- break;
+ sub_path = g_strdup_printf ("%s%c%s.%s", dir_path, G_DIR_SEPARATOR, file_no_ext, subtitle_ext[i]);
+
+ if ( g_file_test (sub_path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR ) )
+ break;
- g_free (sub_path);
- sub_path = NULL;
+ g_free (sub_path);
+ sub_path = NULL;
}
g_free (file_no_ext);
@@ -290,21 +290,21 @@ gchar *parole_get_subtitle_path (const gchar *uri)
if ( !parent )
{
- g_object_unref (file);
- return NULL;
+ g_object_unref (file);
+ return NULL;
}
info = g_file_query_info (file,
- "standard::*,",
- 0,
- NULL,
- &error);
+ "standard::*,",
+ 0,
+ NULL,
+ &error);
if ( error )
{
- g_warning ("%s: \n", error->message);
- g_error_free (error);
- return NULL;
+ g_warning ("%s: \n", error->message);
+ g_error_free (error);
+ return NULL;
}
file_name = g_strdup (g_file_info_get_display_name (info));
@@ -328,9 +328,9 @@ parole_is_uri_disc (const gchar *uri)
{
if ( g_str_has_prefix (uri, "dvd:/") || g_str_has_prefix (uri, "vcd:/")
|| g_str_has_prefix (uri, "svcd:/") || g_str_has_prefix (uri, "cdda:/"))
- return TRUE;
+ return TRUE;
else
- return FALSE;
+ return FALSE;
}
GdkPixbuf *parole_icon_load (const gchar *icon_name, gint size)
@@ -339,15 +339,15 @@ GdkPixbuf *parole_icon_load (const gchar *icon_name, gint size)
GError *error = NULL;
pix = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
- icon_name,
- size,
- GTK_ICON_LOOKUP_USE_BUILTIN,
- &error);
-
+ icon_name,
+ size,
+ GTK_ICON_LOOKUP_USE_BUILTIN,
+ &error);
+
if ( error )
{
- g_warning ("Unable to load icon : %s : %s", icon_name, error->message);
- g_error_free (error);
+ g_warning ("Unable to load icon : %s : %s", icon_name, error->message);
+ g_error_free (error);
}
return pix;
@@ -355,7 +355,7 @@ GdkPixbuf *parole_icon_load (const gchar *icon_name, gint size)
}
void parole_get_media_files (GtkFileFilter *filter, const gchar *path,
- gboolean recursive, GSList **list)
+ gboolean recursive, GSList **list)
{
GtkFileFilter *playlist_filter;
GSList *list_internal = NULL;
@@ -372,63 +372,63 @@ void parole_get_media_files (GtkFileFilter *filter, const gchar *path,
if ( g_file_test (path, G_FILE_TEST_IS_REGULAR ) )
{
- file = parole_file_new (path);
- if ( parole_file_filter (playlist_filter, file) &&
- parole_pl_parser_guess_format_from_extension (path) != PAROLE_PL_FORMAT_UNKNOWN )
- {
- playlist = parole_pl_parser_parse_from_file_by_extension (path);
- g_object_unref (file);
- if ( playlist)
- {
- *list = g_slist_concat (*list, playlist);
- }
- }
- else if ( parole_file_filter (filter, file) )
- {
- *list = g_slist_append (*list, file);
- }
- else
- g_object_unref (file);
+ file = parole_file_new (path);
+ if ( parole_file_filter (playlist_filter, file) &&
+ parole_pl_parser_guess_format_from_extension (path) != PAROLE_PL_FORMAT_UNKNOWN )
+ {
+ playlist = parole_pl_parser_parse_from_file_by_extension (path);
+ g_object_unref (file);
+ if ( playlist)
+ {
+ *list = g_slist_concat (*list, playlist);
+ }
+ }
+ else if ( parole_file_filter (filter, file) )
+ {
+ *list = g_slist_append (*list, file);
+ }
+ else
+ g_object_unref (file);
}
else if ( g_file_test (path, G_FILE_TEST_IS_DIR ) )
{
- dir = g_dir_open (path, 0, NULL);
-
- if ( G_UNLIKELY (dir == NULL) )
- return;
-
- while ( (name = g_dir_read_name (dir)) )
- {
- gchar *path_internal = g_build_filename (path, name, NULL);
- if ( g_file_test (path_internal, G_FILE_TEST_IS_DIR) && recursive)
- {
- parole_get_media_files (filter, path_internal, TRUE, list);
- }
- else if ( g_file_test (path_internal, G_FILE_TEST_IS_REGULAR) )
- {
- file = parole_file_new (path_internal);
- if ( parole_file_filter (playlist_filter, file) &&
- parole_pl_parser_guess_format_from_extension (path) != PAROLE_PL_FORMAT_UNKNOWN)
- {
- playlist = parole_pl_parser_parse_from_file_by_extension (path_internal);
- g_object_unref (file);
- if ( playlist)
- {
- *list = g_slist_concat (*list, playlist);
- }
- }
- else if ( parole_file_filter (filter, file) )
- {
- list_internal = g_slist_append (list_internal, file);
- }
- else
- g_object_unref (file);
- }
- g_free (path_internal);
- }
- list_internal = g_slist_sort (list_internal, (GCompareFunc) thunar_file_compare_by_name);
- g_dir_close (dir);
- *list = g_slist_concat (*list, list_internal);
+ dir = g_dir_open (path, 0, NULL);
+
+ if ( G_UNLIKELY (dir == NULL) )
+ return;
+
+ while ( (name = g_dir_read_name (dir)) )
+ {
+ gchar *path_internal = g_build_filename (path, name, NULL);
+ if ( g_file_test (path_internal, G_FILE_TEST_IS_DIR) && recursive)
+ {
+ parole_get_media_files (filter, path_internal, TRUE, list);
+ }
+ else if ( g_file_test (path_internal, G_FILE_TEST_IS_REGULAR) )
+ {
+ file = parole_file_new (path_internal);
+ if ( parole_file_filter (playlist_filter, file) &&
+ parole_pl_parser_guess_format_from_extension (path) != PAROLE_PL_FORMAT_UNKNOWN)
+ {
+ playlist = parole_pl_parser_parse_from_file_by_extension (path_internal);
+ g_object_unref (file);
+ if ( playlist)
+ {
+ *list = g_slist_concat (*list, playlist);
+ }
+ }
+ else if ( parole_file_filter (filter, file) )
+ {
+ list_internal = g_slist_append (list_internal, file);
+ }
+ else
+ g_object_unref (file);
+ }
+ g_free (path_internal);
+ }
+ list_internal = g_slist_sort (list_internal, (GCompareFunc) thunar_file_compare_by_name);
+ g_dir_close (dir);
+ *list = g_slist_concat (*list, list_internal);
}
g_object_unref (playlist_filter);
}
@@ -452,26 +452,26 @@ parole_device_has_cdda (const gchar *device)
if ( (fd = open (device, O_RDONLY)) < 0 )
{
- g_debug ("Failed to open device : %s", device);
- return FALSE;
+ g_debug ("Failed to open device : %s", device);
+ return FALSE;
}
if ( (drive = ioctl (fd, CDROM_DRIVE_STATUS, NULL)) )
{
- if ( drive == CDS_DRIVE_NOT_READY )
- {
- g_debug ("Drive :%s is not yet ready\n", device);
- }
- else if ( drive == CDS_DISC_OK )
- {
- if ( (drive = ioctl (fd, CDROM_DISC_STATUS, NULL)) > 0 )
- {
- if ( drive == CDS_AUDIO )
- {
- ret_val = TRUE;
- }
- }
- }
+ if ( drive == CDS_DRIVE_NOT_READY )
+ {
+ g_debug ("Drive :%s is not yet ready\n", device);
+ }
+ else if ( drive == CDS_DISC_OK )
+ {
+ if ( (drive = ioctl (fd, CDROM_DISC_STATUS, NULL)) > 0 )
+ {
+ if ( drive == CDS_AUDIO )
+ {
+ ret_val = TRUE;
+ }
+ }
+ }
}
close (fd);
@@ -491,49 +491,49 @@ parole_guess_uri_from_mount (GMount *mount)
if ( g_file_has_uri_scheme (file, "cdda") )
{
- uri = g_strdup ("cdda://");
+ uri = g_strdup ("cdda://");
}
else
{
- gchar **content_type;
- int i;
-
- content_type = g_content_type_guess_for_tree (file);
-
- for ( i = 0; content_type && content_type[i]; i++)
- {
- TRACE ("Checking disc content type : %s", content_type[i]);
-
- if ( !g_strcmp0 (content_type[i], "x-content/video-dvd") )
- {
- uri = g_strdup ("dvd:/");
- break;
- }
- else if ( !g_strcmp0 (content_type[i], "x-content/video-vcd") )
- {
- uri = g_strdup ("vcd:/");
- break;
- }
- else if ( !g_strcmp0 (content_type[i], "x-content/video-svcd") )
- {
- uri = g_strdup ("svcd:/");
- break;
- }
- else if ( !g_strcmp0 (content_type[i], "x-content/audio-cdda") )
- {
- uri = g_strdup ("cdda://");
- break;
- }
- }
-
- if ( content_type )
- g_strfreev (content_type);
+ gchar **content_type;
+ int i;
+
+ content_type = g_content_type_guess_for_tree (file);
+
+ for ( i = 0; content_type && content_type[i]; i++)
+ {
+ TRACE ("Checking disc content type : %s", content_type[i]);
+
+ if ( !g_strcmp0 (content_type[i], "x-content/video-dvd") )
+ {
+ uri = g_strdup ("dvd:/");
+ break;
+ }
+ else if ( !g_strcmp0 (content_type[i], "x-content/video-vcd") )
+ {
+ uri = g_strdup ("vcd:/");
+ break;
+ }
+ else if ( !g_strcmp0 (content_type[i], "x-content/video-svcd") )
+ {
+ uri = g_strdup ("svcd:/");
+ break;
+ }
+ else if ( !g_strcmp0 (content_type[i], "x-content/audio-cdda") )
+ {
+ uri = g_strdup ("cdda://");
+ break;
+ }
+ }
+
+ if ( content_type )
+ g_strfreev (content_type);
}
g_object_unref (file);
TRACE ("Got uri=%s for mount=%s", uri, g_mount_get_name (mount));
-
+
return uri;
}
@@ -547,12 +547,12 @@ parole_get_uri_from_unix_device (const gchar *device)
gchar *uri = NULL;
if ( device == NULL )
- return NULL;
-
+ return NULL;
+
/*Check for cdda */
if ( parole_device_has_cdda (device) )
{
- return g_strdup ("cdda://");
+ return g_strdup ("cdda://");
}
monitor = g_volume_monitor_get ();
@@ -563,36 +563,36 @@ parole_get_uri_from_unix_device (const gchar *device)
for ( i = 0; i < len; i++)
{
- GVolume *volume;
- GDrive *drive;
-
- volume = g_list_nth_data (list, i);
-
- drive = g_volume_get_drive (volume);
-
- if ( g_drive_can_eject (drive) && g_drive_has_media (drive) )
- {
- gchar *unix_device;
- unix_device = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
-
- if ( !g_strcmp0 (unix_device, device) )
- {
- GMount *mount;
- mount = g_volume_get_mount (volume);
-
- if ( mount )
- {
- uri = parole_guess_uri_from_mount (mount);
- g_object_unref (mount);
- g_object_unref (drive);
- g_free (unix_device);
- break;
- }
- }
- g_free (unix_device);
- }
-
- g_object_unref (drive);
+ GVolume *volume;
+ GDrive *drive;
+
+ volume = g_list_nth_data (list, i);
+
+ drive = g_volume_get_drive (volume);
+
+ if ( g_drive_can_eject (drive) && g_drive_has_media (drive) )
+ {
+ gchar *unix_device;
+ unix_device = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
+
+ if ( !g_strcmp0 (unix_device, device) )
+ {
+ GMount *mount;
+ mount = g_volume_get_mount (volume);
+
+ if ( mount )
+ {
+ uri = parole_guess_uri_from_mount (mount);
+ g_object_unref (mount);
+ g_object_unref (drive);
+ g_free (unix_device);
+ break;
+ }
+ }
+ g_free (unix_device);
+ }
+
+ g_object_unref (drive);
}
g_list_foreach (list, (GFunc) g_object_unref, NULL);
diff --git a/src/parole-utils.h b/src/parole-utils.h
index 07d2ebc..63a7741 100644
--- a/src/parole-utils.h
+++ b/src/parole-utils.h
@@ -28,32 +28,32 @@
#include <src/misc/parole-file.h>
-gint thunar_file_compare_by_name (ParoleFile *file_a,
- ParoleFile *file_b,
- gboolean case_sensitive);
+gint thunar_file_compare_by_name (ParoleFile *file_a,
+ ParoleFile *file_b,
+ gboolean case_sensitive);
-gchar *parole_get_name_without_extension (const gchar *name) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+gchar *parole_get_name_without_extension (const gchar *name) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
-gchar *parole_get_subtitle_path (const gchar *uri) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
+gchar *parole_get_subtitle_path (const gchar *uri) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
-gboolean parole_is_uri_disc (const gchar *uri);
+gboolean parole_is_uri_disc (const gchar *uri);
-GdkPixbuf *parole_icon_load (const gchar *icon_name,
- gint size);
+GdkPixbuf *parole_icon_load (const gchar *icon_name,
+ gint size);
-void parole_get_media_files (GtkFileFilter *filter,
- const gchar *path,
- gboolean recursive,
- GSList **list);
-
-gboolean parole_device_has_cdda (const gchar *device);
+void parole_get_media_files (GtkFileFilter *filter,
+ const gchar *path,
+ gboolean recursive,
+ GSList **list);
+
+gboolean parole_device_has_cdda (const gchar *device);
-gchar *parole_guess_uri_from_mount (GMount *mount);
-
-gchar *parole_get_uri_from_unix_device (const gchar *device);
+gchar *parole_guess_uri_from_mount (GMount *mount);
+
+gchar *parole_get_uri_from_unix_device (const gchar *device);
-gchar *parole_format_media_length (gint total_seconds);
+gchar *parole_format_media_length (gint total_seconds);
-gchar *parole_taglibc_get_media_length (ParoleFile *file);
+gchar *parole_taglibc_get_media_length (ParoleFile *file);
#endif /* __PAROLE_UTILS_ */
diff --git a/src/parole-vis.c b/src/parole-vis.c
index 32d78c5..d206457 100644
--- a/src/parole-vis.c
+++ b/src/parole-vis.c
@@ -39,13 +39,13 @@ parole_vis_filter (GstPluginFeature *feature, gpointer data)
GstElementFactory *factory;
if ( !GST_IS_ELEMENT_FACTORY (feature) )
- return FALSE;
-
+ return FALSE;
+
factory = GST_ELEMENT_FACTORY (feature);
if ( !g_strrstr (gst_element_factory_get_klass (factory), "Visualization"))
- return FALSE;
-
+ return FALSE;
+
return TRUE;
}
@@ -67,10 +67,10 @@ GHashTable *parole_vis_get_plugins (void)
#else
plugins = gst_registry_feature_filter (gst_registry_get_default (),
#endif
- parole_vis_filter,
- FALSE,
- NULL);
-
+ parole_vis_filter,
+ FALSE,
+ NULL);
+
g_list_foreach (plugins, (GFunc) parole_vis_get_name, &hash);
gst_plugin_feature_list_free (plugins);
diff --git a/src/parole-vis.h b/src/parole-vis.h
index f9b9fb7..66a46f2 100644
--- a/src/parole-vis.h
+++ b/src/parole-vis.h
@@ -26,6 +26,6 @@
#include <gst/gst.h>
#include <glib.h>
-GHashTable *parole_vis_get_plugins (void);
+GHashTable *parole_vis_get_plugins (void);
#endif /* __PAROLE_VIS_H_ */
diff --git a/src/plugins/notify/notify-plugin.c b/src/plugins/notify/notify-plugin.c
index 8fc83c4..ebf7bb2 100644
--- a/src/plugins/notify/notify-plugin.c
+++ b/src/plugins/notify/notify-plugin.c
@@ -26,12 +26,12 @@
#include "notify-provider.h"
-G_MODULE_EXPORT GType parole_plugin_initialize (ParoleProviderPlugin *plugin);
-
-G_MODULE_EXPORT void parole_plugin_shutdown (void);
+G_MODULE_EXPORT GType parole_plugin_initialize (ParoleProviderPlugin *plugin);
+
+G_MODULE_EXPORT void parole_plugin_shutdown (void);
G_MODULE_EXPORT GType
-parole_plugin_initialize (ParoleProviderPlugin *plugin)
+parole_plugin_initialize (ParoleProviderPlugin *plugin)
{
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
diff --git a/src/plugins/notify/notify-provider.c b/src/plugins/notify/notify-provider.c
index 9f0f1f2..1b7cda1 100644
--- a/src/plugins/notify/notify-provider.c
+++ b/src/plugins/notify/notify-provider.c
@@ -49,11 +49,11 @@ struct _NotifyProvider
NotifyNotification *notification;
};
-PAROLE_DEFINE_TYPE_WITH_CODE (NotifyProvider,
- notify_provider,
- G_TYPE_OBJECT,
- PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
- notify_provider_iface_init));
+PAROLE_DEFINE_TYPE_WITH_CODE (NotifyProvider,
+ notify_provider,
+ G_TYPE_OBJECT,
+ PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
+ notify_provider_iface_init));
static void
notification_closed_cb (NotifyNotification *n, NotifyProvider *notify)
@@ -67,19 +67,31 @@ close_notification (NotifyProvider *notify)
{
if ( notify->notification )
{
- GError *error = NULL;
- notify_notification_close (notify->notification, &error);
- if ( error )
- {
- g_warning ("Failed to close notification : %s", error->message);
- g_error_free (error);
- }
- g_object_unref (notify->notification);
- notify->notification = NULL;
+ GError *error = NULL;
+ notify_notification_close (notify->notification, &error);
+ if ( error )
+ {
+ g_warning ("Failed to close notification : %s", error->message);
+ g_error_free (error);
+ }
+ g_object_unref (notify->notification);
+ notify->notification = NULL;
}
}
static void
+on_previous_clicked(NotifyNotification *notification, char *action, NotifyProvider *notify)
+{
+ parole_provider_player_play_previous (notify->player);
+}
+
+static void
+on_next_clicked(NotifyNotification *notification, char *action, NotifyProvider *notify)
+{
+ parole_provider_player_play_next (notify->player);
+}
+
+static void
notify_playing (NotifyProvider *notify, const ParoleStream *stream)
{
GdkPixbuf *pix;
@@ -87,43 +99,44 @@ notify_playing (NotifyProvider *notify, const ParoleStream *stream)
gchar *title, *album, *artist, *year, *stream_uri;
gchar *message;
ParoleMediaType media_type;
+ GtkAction *action;
g_object_get (G_OBJECT (stream),
- "title", &title,
- "album", &album,
- "artist", &artist,
- "year", &year,
- "has-video", &has_video,
- "media-type", &media_type,
- "uri", &stream_uri,
- NULL);
-
+ "title", &title,
+ "album", &album,
+ "artist", &artist,
+ "year", &year,
+ "has-video", &has_video,
+ "media-type", &media_type,
+ "uri", &stream_uri,
+ NULL);
+
if ( g_strcmp0(stream_uri, notify->last_played_uri) == 0 )
- return;
+ return;
notify->last_played_uri = g_strdup(stream_uri);
g_free(stream_uri);
-
+
if ( has_video )
- return;
+ return;
if ( !title )
{
- gchar *uri;
- gchar *filename;
- g_object_get (G_OBJECT (stream),
- "uri", &uri,
- NULL);
-
- filename = g_filename_from_uri (uri, NULL, NULL);
- g_free (uri);
- if ( filename )
- {
- title = g_path_get_basename (filename);
- g_free (filename);
- if ( !title )
- return;
- }
+ gchar *uri;
+ gchar *filename;
+ g_object_get (G_OBJECT (stream),
+ "uri", &uri,
+ NULL);
+
+ filename = g_filename_from_uri (uri, NULL, NULL);
+ g_free (uri);
+ if ( filename )
+ {
+ title = g_path_get_basename (filename);
+ g_free (filename);
+ if ( !title )
+ return;
+ }
}
if (!album)
@@ -132,11 +145,11 @@ notify_playing (NotifyProvider *notify, const ParoleStream *stream)
artist = g_strdup( _("Unknown Artist") );
if (!year)
- message = g_strdup_printf ("%s %s\n%s %s", _("<i>on</i>"), album, _("<i>by</i>"), artist);
+ message = g_strdup_printf ("%s %s\n%s %s", _("<i>on</i>"), album, _("<i>by</i>"), artist);
else
{
- message = g_strdup_printf ("%s %s (%s)\n%s %s", _("<i>on</i>"), album, year, _("<i>by</i>"), artist);
- g_free(year);
+ message = g_strdup_printf ("%s %s (%s)\n%s %s", _("<i>on</i>"), album, year, _("<i>by</i>"), artist);
+ g_free(year);
}
g_free(artist);
@@ -172,25 +185,45 @@ notify_playing (NotifyProvider *notify, const ParoleStream *stream)
if ( pix )
{
- notify_notification_set_icon_from_pixbuf (notify->notification, pix);
- g_object_unref (pix);
+ notify_notification_set_icon_from_pixbuf (notify->notification, pix);
+ g_object_unref (pix);
}
notify_notification_set_urgency (notify->notification, NOTIFY_URGENCY_LOW);
notify_notification_set_timeout (notify->notification, 5000);
+ /* Only show Previous Track item if clicking previous is possible */
+ action = parole_provider_player_get_action(PAROLE_PROVIDER_PLAYER(notify->player), PAROLE_PLAYER_ACTION_PREVIOUS);
+ if (gtk_action_get_sensitive(action))
+ {
+ notify_notification_add_action (notify->notification,
+ "play-previous", _("Previous Track"),
+ NOTIFY_ACTION_CALLBACK(on_previous_clicked),
+ notify, NULL);
+ }
+
+ /* Only show Next Track item if clicking next is possible */
+ action = parole_provider_player_get_action(PAROLE_PROVIDER_PLAYER(notify->player), PAROLE_PLAYER_ACTION_NEXT);
+ if (gtk_action_get_sensitive(action))
+ {
+ notify_notification_add_action (notify->notification,
+ "play-next", _("Next Track"),
+ NOTIFY_ACTION_CALLBACK(on_next_clicked),
+ notify, NULL);
+ }
+
notify_notification_show (notify->notification, NULL);
g_signal_connect (notify->notification, "closed",
- G_CALLBACK (notification_closed_cb), notify);
+ G_CALLBACK (notification_closed_cb), notify);
}
static void
state_changed_cb (ParoleProviderPlayer *player, const ParoleStream *stream, ParoleState state, NotifyProvider *notify)
{
if ( state == PAROLE_STATE_PLAYING )
- notify_playing (notify, stream);
-
+ notify_playing (notify, stream);
+
else if ( state <= PAROLE_STATE_PAUSED )
- close_notification (notify);
+ close_notification (notify);
}
static gboolean notify_provider_is_configurable (ParoleProviderPlugin *plugin)
@@ -209,9 +242,9 @@ notify_provider_set_player (ParoleProviderPlugin *plugin, ParoleProviderPlayer *
notify->notification = NULL;
notify_init ("parole-notify");
-
+
g_signal_connect (player, "state_changed",
- G_CALLBACK (state_changed_cb), notify);
+ G_CALLBACK (state_changed_cb), notify);
}
static void
diff --git a/src/plugins/notify/notify-provider.h b/src/plugins/notify/notify-provider.h
index 3771211..26234d0 100644
--- a/src/plugins/notify/notify-provider.h
+++ b/src/plugins/notify/notify-provider.h
@@ -35,9 +35,9 @@ typedef struct _NotifyProvider NotifyProvider;
#define NOTIFY_IS_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NOTIFY_TYPE_PROVIDER))
#define NOTIFY_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NOTIFY_TYPE_PROVIDER, NotifyProviderClass))
-GType notify_provider_get_type (void) G_GNUC_CONST G_GNUC_INTERNAL;
+GType notify_provider_get_type (void) G_GNUC_CONST G_GNUC_INTERNAL;
-void notify_provider_register_type (ParoleProviderPlugin *provider);
+void notify_provider_register_type (ParoleProviderPlugin *provider);
G_END_DECLS
diff --git a/src/plugins/sample/sample-plugin.c b/src/plugins/sample/sample-plugin.c
index 2faa298..f842459 100644
--- a/src/plugins/sample/sample-plugin.c
+++ b/src/plugins/sample/sample-plugin.c
@@ -26,9 +26,9 @@
#include "sample-provider.h"
-G_MODULE_EXPORT GType parole_plugin_initialize (ParoleProviderPlugin *plugin);
-
-G_MODULE_EXPORT void parole_plugin_shutdown (void);
+G_MODULE_EXPORT GType parole_plugin_initialize (ParoleProviderPlugin *plugin);
+
+G_MODULE_EXPORT void parole_plugin_shutdown (void);
G_MODULE_EXPORT GType
parole_plugin_initialize (ParoleProviderPlugin *plugin)
diff --git a/src/plugins/sample/sample-provider.c b/src/plugins/sample/sample-provider.c
index 2a9ca0d..b786155 100644
--- a/src/plugins/sample/sample-provider.c
+++ b/src/plugins/sample/sample-provider.c
@@ -24,8 +24,8 @@
#include "sample-provider.h"
-static void sample_provider_iface_init (ParoleProviderPluginIface *iface);
-static void sample_provider_finalize (GObject *object);
+static void sample_provider_iface_init (ParoleProviderPluginIface *iface);
+static void sample_provider_finalize (GObject *object);
struct _SampleProviderClass
@@ -35,16 +35,16 @@ struct _SampleProviderClass
struct _SampleProvider
{
- GObject parent;
- ParoleProviderPlayer *player;
+ GObject parent;
+ ParoleProviderPlayer *player;
};
-PAROLE_DEFINE_TYPE_WITH_CODE (SampleProvider,
- sample_provider,
- G_TYPE_OBJECT,
- PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
- sample_provider_iface_init));
-
+PAROLE_DEFINE_TYPE_WITH_CODE (SampleProvider,
+ sample_provider,
+ G_TYPE_OBJECT,
+ PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
+ sample_provider_iface_init));
+
static gboolean sample_provider_is_configurable (ParoleProviderPlugin *plugin)
{
return FALSE;
diff --git a/src/plugins/sample/sample-provider.h b/src/plugins/sample/sample-provider.h
index eb01100..393d057 100644
--- a/src/plugins/sample/sample-provider.h
+++ b/src/plugins/sample/sample-provider.h
@@ -35,9 +35,9 @@ typedef struct _SampleProvider SampleProvider;
#define SAMPLE_IS_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SAMPLE_TYPE_PROVIDER))
#define SAMPLE_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SAMPLE_TYPE_PROVIDER, SampleProviderClass))
-GType sample_provider_get_type (void) G_GNUC_CONST G_GNUC_INTERNAL;
+GType sample_provider_get_type (void) G_GNUC_CONST G_GNUC_INTERNAL;
-void sample_provider_register_type (ParoleProviderPlugin *plugin);
+void sample_provider_register_type (ParoleProviderPlugin *plugin);
G_END_DECLS
diff --git a/src/plugins/tray/tray-plugin.c b/src/plugins/tray/tray-plugin.c
index 402427b..2d98f50 100644
--- a/src/plugins/tray/tray-plugin.c
+++ b/src/plugins/tray/tray-plugin.c
@@ -26,9 +26,9 @@
#include "tray-provider.h"
-G_MODULE_EXPORT GType parole_plugin_initialize (ParoleProviderPlugin *plugin);
-
-G_MODULE_EXPORT void parole_plugin_shutdown (void);
+G_MODULE_EXPORT GType parole_plugin_initialize (ParoleProviderPlugin *plugin);
+
+G_MODULE_EXPORT void parole_plugin_shutdown (void);
G_MODULE_EXPORT GType
parole_plugin_initialize (ParoleProviderPlugin *plugin)
diff --git a/src/plugins/tray/tray-provider.c b/src/plugins/tray/tray-provider.c
index 5c46305..57b685c 100644
--- a/src/plugins/tray/tray-provider.c
+++ b/src/plugins/tray/tray-provider.c
@@ -34,8 +34,8 @@
#include "tray-provider.h"
-static void tray_provider_iface_init (ParoleProviderPluginIface *iface);
-static void tray_provider_finalize (GObject *object);
+static void tray_provider_iface_init (ParoleProviderPluginIface *iface);
+static void tray_provider_finalize (GObject *object);
struct _TrayProviderClass
@@ -55,12 +55,12 @@ struct _TrayProvider
GtkWidget *menu;
};
-PAROLE_DEFINE_TYPE_WITH_CODE (TrayProvider,
- tray_provider,
- G_TYPE_OBJECT,
- PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
- tray_provider_iface_init));
-
+PAROLE_DEFINE_TYPE_WITH_CODE (TrayProvider,
+ tray_provider,
+ G_TYPE_OBJECT,
+ PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
+ tray_provider_iface_init));
+
static void
menu_selection_done_cb (TrayProvider *tray)
{
@@ -76,7 +76,7 @@ exit_activated_cb (TrayProvider *tray)
menu_selection_done_cb (tray);
ev.type = GDK_DELETE;
- ev.window = tray->window->window;
+ ev.window = gtk_widget_get_window(tray->window);
ev.send_event = TRUE;
g_signal_handler_block (tray->window, tray->sig);
@@ -84,17 +84,6 @@ exit_activated_cb (TrayProvider *tray)
}
static void
-play_pause_activated_cb (TrayProvider *tray)
-{
- menu_selection_done_cb (tray);
-
- if ( tray->state == PAROLE_STATE_PLAYING )
- parole_provider_player_pause (tray->player);
- else if ( tray->state == PAROLE_STATE_PAUSED )
- parole_provider_player_resume (tray->player);
-}
-
-static void
open_activated_cb (TrayProvider *tray)
{
parole_provider_player_open_media_chooser (tray->player);
@@ -104,24 +93,45 @@ static void
popup_menu_cb (GtkStatusIcon *icon, guint button,
guint activate_time, TrayProvider *tray)
{
- GtkWidget *menu, *mi;
+ GtkWidget *menu, *mi, *image;
+ GtkAction *action;
menu = gtk_menu_new ();
/*
- * Play pause.
+ * Play pause
*/
- mi = gtk_image_menu_item_new_from_stock (tray->state == PAROLE_STATE_PLAYING ? GTK_STOCK_MEDIA_PAUSE :
- GTK_STOCK_MEDIA_PLAY, NULL);
- gtk_widget_set_sensitive (mi, TRUE);
+ action = parole_provider_player_get_action(PAROLE_PROVIDER_PLAYER(tray->player), PAROLE_PLAYER_ACTION_PLAYPAUSE);
+ mi = gtk_action_create_menu_item(action);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
+
+ /*
+ * Previous Track
+ */
+ action = parole_provider_player_get_action(PAROLE_PROVIDER_PLAYER(tray->player), PAROLE_PLAYER_ACTION_PREVIOUS);
+ mi = gtk_action_create_menu_item(action);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
+
+ /*
+ * Next Track
+ */
+ action = parole_provider_player_get_action(PAROLE_PROVIDER_PLAYER(tray->player), PAROLE_PLAYER_ACTION_NEXT);
+ mi = gtk_action_create_menu_item(action);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
+
+ /*
+ * Separator
+ */
+ mi = gtk_separator_menu_item_new ();
gtk_widget_show (mi);
- g_signal_connect_swapped (mi, "activate", G_CALLBACK (play_pause_activated_cb), tray);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
/*
* Open
*/
- mi = gtk_image_menu_item_new_from_stock (GTK_STOCK_OPEN, NULL);
+ image = gtk_image_new_from_icon_name("document-open-symbolic", GTK_ICON_SIZE_MENU);
+ mi = gtk_image_menu_item_new_with_mnemonic(_("_Open"));
+ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), image);
gtk_widget_show (mi);
g_signal_connect_swapped (mi, "activate", G_CALLBACK (open_activated_cb), tray);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
@@ -136,7 +146,9 @@ popup_menu_cb (GtkStatusIcon *icon, guint button,
/*
* Exit
*/
- mi = gtk_image_menu_item_new_from_stock (GTK_STOCK_QUIT, NULL);
+ image = gtk_image_new_from_icon_name("system-shutdown-symbolic", GTK_ICON_SIZE_MENU);
+ mi = gtk_image_menu_item_new_with_mnemonic(_("_Quit"));
+ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), image);
gtk_widget_set_sensitive (mi, TRUE);
gtk_widget_show (mi);
g_signal_connect_swapped (mi, "activate", G_CALLBACK (exit_activated_cb), tray);
@@ -147,7 +159,7 @@ popup_menu_cb (GtkStatusIcon *icon, guint button,
icon, button, activate_time);
g_signal_connect_swapped (menu, "selection-done",
- G_CALLBACK (menu_selection_done_cb), tray);
+ G_CALLBACK (menu_selection_done_cb), tray);
tray->menu = menu;
}
@@ -155,10 +167,11 @@ popup_menu_cb (GtkStatusIcon *icon, guint button,
static void
tray_activate_cb (GtkStatusIcon *tray_icon, TrayProvider *tray)
{
- if ( GTK_WIDGET_VISIBLE (tray->window) )
- gtk_widget_hide (tray->window);
+ /* Show the window if it is hidden or does not have focus */
+ if (!gtk_widget_get_visible(tray->window) || !gtk_window_is_active(GTK_WINDOW(tray->window)))
+ gtk_window_present(GTK_WINDOW(tray->window));
else
- gtk_widget_show (tray->window);
+ gtk_widget_hide(tray->window);
}
static void
@@ -168,9 +181,9 @@ state_changed_cb (ParoleProviderPlayer *player, const ParoleStream *stream, Paro
if ( tray->menu )
{
- gtk_widget_destroy (tray->menu);
- tray->menu = NULL;
- g_signal_emit_by_name (G_OBJECT (tray->tray), "popup-menu", 0, gtk_get_current_event_time ());
+ gtk_widget_destroy (tray->menu);
+ tray->menu = NULL;
+ g_signal_emit_by_name (G_OBJECT (tray->tray), "popup-menu", 0, gtk_get_current_event_time ());
}
}
@@ -226,12 +239,12 @@ configure_plugin (TrayProvider *tray, GtkWidget *widget)
GtkWidget *hide_on_delete;
gboolean hide_on_delete_b;
- dialog = gtk_dialog_new_with_buttons (_("Tray icon plugin"),
- GTK_WINDOW (widget),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_CANCEL,
- NULL);
+ dialog = gtk_dialog_new_with_buttons (_("Tray icon plugin"),
+ GTK_WINDOW (widget),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ _("Close"),
+ GTK_RESPONSE_CANCEL,
+ NULL);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
@@ -240,12 +253,12 @@ configure_plugin (TrayProvider *tray, GtkWidget *widget)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (hide_on_delete), hide_on_delete_b);
g_signal_connect (hide_on_delete, "toggled",
- G_CALLBACK (hide_on_delete_toggled_cb), NULL);
+ G_CALLBACK (hide_on_delete_toggled_cb), NULL);
+
+ gtk_box_pack_start (GTK_BOX (content_area), hide_on_delete, TRUE, TRUE, 0);
- gtk_box_pack_start_defaults (GTK_BOX (content_area), hide_on_delete);
-
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_widget_destroy), NULL);
gtk_widget_show_all (dialog);
}
@@ -263,7 +276,7 @@ action_on_hide_confirmed_cb (GtkWidget *widget, gpointer data)
static gboolean
delete_event_cb (GtkWidget *widget, GdkEvent *ev, TrayProvider *tray)
{
- GtkWidget *dialog, *check, *content_area;
+ GtkWidget *dialog, *check, *content_area, *button;
GtkWidget *minimize, *img;
gboolean confirmed, ret_val = TRUE, minimize_to_tray;
@@ -272,34 +285,38 @@ delete_event_cb (GtkWidget *widget, GdkEvent *ev, TrayProvider *tray)
if ( confirmed )
{
- return minimize_to_tray ? gtk_widget_hide_on_delete (widget) : FALSE;
+ return minimize_to_tray ? gtk_widget_hide_on_delete (widget) : FALSE;
}
- dialog = gtk_message_dialog_new(GTK_WINDOW(widget),
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_NONE,
- NULL);
-
+ dialog = gtk_message_dialog_new(GTK_WINDOW(widget),
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_NONE,
+ NULL);
+
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG(dialog),
g_strdup_printf("<big><b>%s</b></big>", _("Are you sure you want to quit?")));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(dialog),
- _("Parole can be minimized to the system tray instead."));
+ _("Parole can be minimized to the system tray instead."));
minimize = gtk_dialog_add_button( GTK_DIALOG(dialog),
_("Minimize to tray"),
GTK_RESPONSE_OK );
- img = gtk_image_new_from_stock (GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_BUTTON);
+ img = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (minimize), img);
- gtk_dialog_add_button( GTK_DIALOG(dialog),
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL );
-
- gtk_dialog_add_button( GTK_DIALOG(dialog),
- GTK_STOCK_QUIT,
- GTK_RESPONSE_CLOSE );
+ button = gtk_dialog_add_button( GTK_DIALOG(dialog),
+ _("Cancel"),
+ GTK_RESPONSE_CANCEL );
+ img = gtk_image_new_from_icon_name ("gtk-cancel", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image(GTK_BUTTON(button), img);
+
+ button = gtk_dialog_add_button( GTK_DIALOG(dialog),
+ _("Quit"),
+ GTK_RESPONSE_CLOSE );
+ img = gtk_image_new_from_icon_name ("gtk-quit", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image(GTK_BUTTON(button), img);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
@@ -309,35 +326,35 @@ delete_event_cb (GtkWidget *widget, GdkEvent *ev, TrayProvider *tray)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), FALSE);
g_signal_connect (check, "toggled",
- G_CALLBACK (action_on_hide_confirmed_cb), NULL);
-
- gtk_box_pack_start_defaults (GTK_BOX (content_area),
- check) ;
-
+ G_CALLBACK (action_on_hide_confirmed_cb), NULL);
+
+ gtk_box_pack_start (GTK_BOX (content_area), check, TRUE, TRUE, 0);
+ gtk_widget_set_margin_left(GTK_WIDGET(check), 3);
+
gtk_widget_show_all( GTK_WIDGET(dialog) );
switch ( gtk_dialog_run (GTK_DIALOG (dialog)) )
{
- case GTK_RESPONSE_OK:
- {
- gtk_widget_hide_on_delete (widget);
- confirmed = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check));
- if ( confirmed )
- write_entry_bool ("minimize-to-tray", TRUE);
- break;
- }
- case GTK_RESPONSE_CLOSE:
- {
- confirmed = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check));
- if ( confirmed )
- write_entry_bool ("minimize-to-tray", FALSE);
- ret_val = FALSE;
- }
- break;
- case GTK_RESPONSE_CANCEL:
- break;
- default:
- break;
+ case GTK_RESPONSE_OK:
+ {
+ gtk_widget_hide_on_delete (widget);
+ confirmed = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check));
+ if ( confirmed )
+ write_entry_bool ("minimize-to-tray", TRUE);
+ break;
+ }
+ case GTK_RESPONSE_CLOSE:
+ {
+ confirmed = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check));
+ if ( confirmed )
+ write_entry_bool ("minimize-to-tray", FALSE);
+ ret_val = FALSE;
+ }
+ break;
+ case GTK_RESPONSE_CANCEL:
+ break;
+ default:
+ break;
}
gtk_widget_destroy (dialog);
@@ -375,21 +392,21 @@ tray_provider_set_player (ParoleProviderPlugin *plugin, ParoleProviderPlayer *pl
if ( pix )
{
- gtk_status_icon_set_from_pixbuf (tray->tray, pix);
- g_object_unref (pix);
+ gtk_status_icon_set_from_pixbuf (tray->tray, pix);
+ g_object_unref (pix);
}
g_signal_connect (tray->tray, "popup-menu",
- G_CALLBACK (popup_menu_cb), tray);
+ G_CALLBACK (popup_menu_cb), tray);
g_signal_connect (tray->tray, "activate",
- G_CALLBACK (tray_activate_cb), tray);
+ G_CALLBACK (tray_activate_cb), tray);
tray->sig = g_signal_connect (tray->window, "delete-event",
- G_CALLBACK (delete_event_cb), NULL);
-
+ G_CALLBACK (delete_event_cb), NULL);
+
g_signal_connect (player, "state_changed",
- G_CALLBACK (state_changed_cb), tray);
+ G_CALLBACK (state_changed_cb), tray);
}
static void
@@ -427,7 +444,7 @@ static void tray_provider_finalize (GObject *object)
tray = TRAY_PROVIDER (object);
if ( GTK_IS_WIDGET (tray->window) && g_signal_handler_is_connected (tray->window, tray->sig) )
- g_signal_handler_disconnect (tray->window, tray->sig);
+ g_signal_handler_disconnect (tray->window, tray->sig);
g_object_unref (G_OBJECT (tray->tray));
diff --git a/src/plugins/tray/tray-provider.h b/src/plugins/tray/tray-provider.h
index cc90e62..0a83558 100644
--- a/src/plugins/tray/tray-provider.h
+++ b/src/plugins/tray/tray-provider.h
@@ -35,9 +35,9 @@ typedef struct _TrayProvider TrayProvider;
#define TRAY_IS_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRAY_TYPE_PROVIDER))
#define TRAY_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRAY_TYPE_PROVIDER, TrayProviderClass))
-GType tray_provider_get_type (void) G_GNUC_CONST G_GNUC_INTERNAL;
+GType tray_provider_get_type (void) G_GNUC_CONST G_GNUC_INTERNAL;
-void tray_provider_register_type (ParoleProviderPlugin *provider);
+void tray_provider_register_type (ParoleProviderPlugin *provider);
G_END_DECLS
More information about the Xfce4-commits
mailing list