[Xfce4-commits] [apps/parole] 01/01: Tidy up trailing whitespace
noreply at xfce.org
noreply at xfce.org
Fri May 26 05:05:49 CEST 2017
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/parole.
commit c8876fb6b9db62bfb3918c6121e75659cc54e1bd
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu May 25 23:05:40 2017 -0400
Tidy up trailing whitespace
---
Makefile.am | 2 +-
THANKS | 2 +-
TODO | 2 +-
data/interfaces/Makefile.am | 6 +-
docs/plugin-api/Parole-Plugins-docs.sgml | 26 +-
docs/plugin-api/parole-plugins-tut.sgml | 30 +--
docs/plugin-api/tmpl/Parole-Plugins-unused.sgml | 12 +-
docs/plugin-api/tmpl/parole-debug.sgml | 38 +--
docs/plugin-api/tmpl/parole-enum-types.sgml | 16 +-
docs/plugin-api/tmpl/parole-file.sgml | 58 ++--
docs/plugin-api/tmpl/parole-filters.sgml | 26 +-
docs/plugin-api/tmpl/parole-marshal.sgml | 36 +--
docs/plugin-api/tmpl/parole-pl-parser.sgml | 40 +--
docs/plugin-api/tmpl/parole-provider-player.sgml | 98 +++----
docs/plugin-api/tmpl/parole-provider-plugin.sgml | 12 +-
docs/plugin-api/tmpl/parole-stream.sgml | 16 +-
docs/plugin-api/tmpl/parole.sgml | 56 ++--
src/common/parole-rc-utils.c | 28 +-
src/common/parole-rc-utils.h | 6 +-
src/common/parole-screensaver.c | 4 +-
src/common/parole-screensaver.h | 4 +-
src/dbus/parole-dbus.c | 48 ++--
src/gst/Makefile.am | 2 +-
src/main.c | 88 +++---
src/misc/parole-debug.c | 24 +-
src/misc/parole-debug.h | 4 +-
src/misc/parole-file.c | 218 +++++++--------
src/misc/parole-file.h | 22 +-
src/misc/parole-filters.c | 116 ++++----
src/misc/parole-pl-parser.c | 326 +++++++++++------------
src/misc/parole-pl-parser.h | 2 +-
src/misc/parole-provider-plugin.c | 26 +-
src/misc/parole-provider-plugin.h | 16 +-
src/misc/parole-stream.h | 8 +-
src/misc/parole.h.in | 14 +-
src/org.parole.media.player.xml | 10 +-
src/parole-about.c | 8 +-
src/parole-builder.c | 14 +-
src/parole-button.c | 62 ++---
src/parole-button.h | 8 +-
src/parole-conf-dialog.h | 4 +-
src/parole-conf.h | 10 +-
src/parole-disc.c | 146 +++++-----
src/parole-disc.h | 12 +-
src/parole-mediachooser.c | 94 +++----
src/parole-mediachooser.h | 2 +-
src/parole-module.c | 60 ++---
src/parole-module.h | 6 +-
src/parole-open-location.c | 44 +--
src/parole-plugin-player.h | 4 +-
src/parole-plugins-manager.h | 8 +-
src/parole-subtitle-encoding.c | 8 +-
src/parole-subtitle-encoding.h | 2 +-
src/parole-vis.c | 18 +-
src/plugins/mpris2/Makefile.am | 2 +-
src/plugins/mpris2/mpris2-plugin.c | 4 +-
src/plugins/mpris2/mpris2-provider.c | 36 +--
src/plugins/notify/Makefile.am | 2 +-
src/plugins/notify/notify-plugin.c | 8 +-
src/plugins/sample/sample-plugin.c | 4 +-
src/plugins/sample/sample-provider.c | 12 +-
src/plugins/tray/Makefile.am | 2 +-
src/plugins/tray/tray-plugin.c | 8 +-
63 files changed, 1015 insertions(+), 1015 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 68888ef..29c517a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -44,4 +44,4 @@ snapshot: dist
snapshot-bz2: dist-bz2
mv $(PACKAGE)-$(VERSION).tar.bz2 \
- $(PACKAGE)-$(VERSION)-r at REVISION@.tar.bz2
+ $(PACKAGE)-$(VERSION)-r at REVISION@.tar.bz2
diff --git a/THANKS b/THANKS
index f5c3df8..d7df3f7 100644
--- a/THANKS
+++ b/THANKS
@@ -1,6 +1,6 @@
What's this file about?
-----------------------
-This file lists external open source projects that were the starting point of learning how to
+This file lists external open source projects that were the starting point of learning how to
write a GStreamer based media player.
1) GStreamer itself, gstreamer plugins base.
diff --git a/TODO b/TODO
index feb3d6c..ebeb419 100644
--- a/TODO
+++ b/TODO
@@ -2,7 +2,7 @@
=== Media player ===
* Support scale ratio view.
-=== Plugins ===
+=== Plugins ===
* Library collection.
* Galago plugin to set the IM status as away when playing a film in fullscreen.
* Equalizer plugin
diff --git a/data/interfaces/Makefile.am b/data/interfaces/Makefile.am
index 6292efc..5050dfa 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)
-
+
EXTRA_DIST = \
$(interfaces) \
$(interfaces_h)
\ No newline at end of file
diff --git a/docs/plugin-api/Parole-Plugins-docs.sgml b/docs/plugin-api/Parole-Plugins-docs.sgml
index ae1047f..7dcfb3a 100644
--- a/docs/plugin-api/Parole-Plugins-docs.sgml
+++ b/docs/plugin-api/Parole-Plugins-docs.sgml
@@ -14,7 +14,7 @@
for Parole-Plugins &version;
</releaseinfo>
<pubdate>&date;</pubdate>
-
+
<copyright>
<year>2009-2011</year>
<holder>Ali Abdallah</holder>
@@ -34,29 +34,29 @@
type="http" url="http://www.gnu.org/">Free Software Foundation</ulink>.
</para>
</legalnotice>
-
+
</bookinfo>
<part id="Intro">
<title>Introduction</title>
<para>
- Parole is a modern simple media player base on the
-
+ Parole is a modern simple media player base on the
+
<ulink url="http://gstreamer.org">GStreamer</ulink> framework and written for
<ulink url="https://xfce.org">Xfce</ulink>.
</para>
</part>
-
+
<part id="parole-plugins-tut">
<title>Parole Plugin Tutorial</title>
&plugin-tut;
</part>
-
+
<part id="fundamentals">
<title>Fundamentals</title>
<xi:include href="xml/parole.xml"/>
</part>
-
+
<part id="API">
<title>Parole Plugin Reference</title>
<xi:include href="xml/parole-provider-plugin.xml"/>
@@ -76,32 +76,32 @@
<title>API Index</title>
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
</index>
-
+
<index id="api-index-0.2">
<title>API Index - 0.2</title>
<xi:include href="xml/api-index-0.2.xml"><xi:fallback /></xi:include>
</index>
-
+
<index id="api-index-0.4">
<title>API Index - 0.4</title>
<xi:include href="xml/api-index-0.4.xml"><xi:fallback /></xi:include>
</index>
-
+
<index id="api-index-0.6">
<title>API Index - 0.6</title>
<xi:include href="xml/api-index-0.6.xml"><xi:fallback /></xi:include>
</index>
-
+
<index id="api-index-deprecated">
<title>API Index - Deprecated Symbols</title>
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
</index>
-
+
<index id="parole-enum-types">
<title>Parole Enum Types</title>
<xi:include href="xml/parole-enum-types.xml"><xi:fallback /></xi:include>
</index>
-
+
<index id="parole-marshal">
<title>Parole Marshal</title>
<xi:include href="xml/parole-marshal.xml"><xi:fallback /></xi:include>
diff --git a/docs/plugin-api/parole-plugins-tut.sgml b/docs/plugin-api/parole-plugins-tut.sgml
index 216b226..d09f5c7 100644
--- a/docs/plugin-api/parole-plugins-tut.sgml
+++ b/docs/plugin-api/parole-plugins-tut.sgml
@@ -3,7 +3,7 @@
This section explains the steps required to write a plugin for Parole using
the C language interface.
</para>
-
+
<para>
A simple example can be found in the parole plugins dir shipped with the source code, the sample
plugin.
@@ -14,15 +14,15 @@
its properties dialog when needed, to set the <link linkend="ParoleProviderPlayer"><type>ParoleProviderPlayer</type></link>
interface used by plugins to access the the Parole player backend.
</para>
-
+
<sect1>
<title>Plugin structure.</title>
sample-plugin.c
<programlisting>
-
+
#include "sample-provider.h"
-
+
/* Avoid a no previous function declaration compiler warning*/
G_MODULE_EXPORT GType parole_plugin_initialize (ParoleProviderPlugin *plugin);
G_MODULE_EXPORT void parole_plugin_shutdown (void);
@@ -38,10 +38,10 @@ parole_plugin_initialize (ParoleProviderPlugin *plugin)
G_MODULE_EXPORT void
parole_plugin_shutdown (void)
{
-
+
}
</programlisting>
-
+
sample-provider.h
<programlisting>
#ifndef SAMPLE_PROVIDER_H_
@@ -67,7 +67,7 @@ void sample_provider_register_type (ParoleProviderPlugin *plugin);
G_END_DECLS
</programlisting>
-
+
sample-provider.c
<programlisting>
@@ -88,12 +88,12 @@ struct _SampleProvider
ParoleProviderPlayer *player;
};
-PAROLE_DEFINE_TYPE_WITH_CODE (SampleProvider,
- sample_provider,
+PAROLE_DEFINE_TYPE_WITH_CODE (SampleProvider,
+ sample_provider,
G_TYPE_OBJECT,
- PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
+ PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
sample_provider_iface_init));
-
+
static void sample_provider_configure (ParoleProviderPlugin *provider, GtkWidget *parent)
{
/*Open the configuration dialog, parent is the window transient for*/
@@ -109,7 +109,7 @@ sample_provider_set_player (ParoleProviderPlugin *plugin, ParoleProviderPlayer *
{
SampleProvider *provider;
provider = SAMPLE_PROVIDER (plugin);
-
+
provider->player = player;
}
@@ -124,7 +124,7 @@ sample_provider_iface_init (ParoleProviderPluginIface *iface)
static void sample_provider_class_init (SampleProviderClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
+
gobject_class->finalize = sample_provider_finalize;
}
@@ -136,7 +136,7 @@ static void sample_provider_init (SampleProvider *provider)
static void sample_provider_finalize (GObject *object)
{
G_OBJECT_CLASS (sample_provider_parent_class)->finalize (object);
-}
+}
</programlisting>
-
+
</sect1>
diff --git a/docs/plugin-api/tmpl/Parole-Plugins-unused.sgml b/docs/plugin-api/tmpl/Parole-Plugins-unused.sgml
index e3e2ae6..42bdc7a 100644
--- a/docs/plugin-api/tmpl/Parole-Plugins-unused.sgml
+++ b/docs/plugin-api/tmpl/Parole-Plugins-unused.sgml
@@ -3,22 +3,22 @@
</para>
- at parent_class:
+ at parent_class:
<!-- ##### STRUCT ParoleProviderPluginIface ##### -->
<para>
</para>
- at __parent__:
- at get_is_configurable:
- at configure:
- at set_player:
+ at __parent__:
+ at get_is_configurable:
+ at configure:
+ at set_player:
<!-- ##### STRUCT ParoleStreamClass ##### -->
<para>
</para>
- at parent_class:
+ at parent_class:
diff --git a/docs/plugin-api/tmpl/parole-debug.sgml b/docs/plugin-api/tmpl/parole-debug.sgml
index 4c6c03c..4de4b54 100644
--- a/docs/plugin-api/tmpl/parole-debug.sgml
+++ b/docs/plugin-api/tmpl/parole-debug.sgml
@@ -25,9 +25,9 @@ Parole Debug
</para>
- at _text:
- at _value:
- at _type:
+ at _text:
+ at _value:
+ at _type:
<!-- ##### MACRO PAROLE_DEBUG_ENUM_FULL ##### -->
@@ -35,9 +35,9 @@ Parole Debug
</para>
- at _value:
- at _type:
- at ...:
+ at _value:
+ at _type:
+ at ...:
<!-- ##### FUNCTION parole_debug_enum ##### -->
@@ -45,12 +45,12 @@ Parole Debug
</para>
- at func:
- at file:
- at line:
- at text:
- at v_enum:
- at type:
+ at func:
+ at file:
+ at line:
+ at text:
+ at v_enum:
+ at type:
<!-- ##### FUNCTION parole_debug_enum_full ##### -->
@@ -58,12 +58,12 @@ Parole Debug
</para>
- at func:
- at file:
- at line:
- at v_enum:
- at type:
- at format:
- at ...:
+ at func:
+ at file:
+ at line:
+ at v_enum:
+ at type:
+ at format:
+ at ...:
diff --git a/docs/plugin-api/tmpl/parole-enum-types.sgml b/docs/plugin-api/tmpl/parole-enum-types.sgml
index c45ae5a..e714eaa 100644
--- a/docs/plugin-api/tmpl/parole-enum-types.sgml
+++ b/docs/plugin-api/tmpl/parole-enum-types.sgml
@@ -25,8 +25,8 @@ parole-enum-types
</para>
- at void:
- at Returns:
+ at void:
+ at Returns:
<!-- ##### MACRO PAROLE_ENUM_TYPE_MEDIA_TYPE ##### -->
@@ -41,8 +41,8 @@ parole-enum-types
</para>
- at void:
- at Returns:
+ at void:
+ at Returns:
<!-- ##### MACRO PAROLE_ENUM_TYPE_PLUGIN_CONTAINER ##### -->
@@ -57,8 +57,8 @@ parole-enum-types
</para>
- at void:
- at Returns:
+ at void:
+ at Returns:
<!-- ##### MACRO PAROLE_ENUM_TYPE_STATE ##### -->
@@ -73,8 +73,8 @@ parole-enum-types
</para>
- at void:
- at Returns:
+ at void:
+ at Returns:
<!-- ##### MACRO PAROLE_ENUM_TYPE_PL_FORMAT ##### -->
diff --git a/docs/plugin-api/tmpl/parole-file.sgml b/docs/plugin-api/tmpl/parole-file.sgml
index ff19deb..c2aeb31 100644
--- a/docs/plugin-api/tmpl/parole-file.sgml
+++ b/docs/plugin-api/tmpl/parole-file.sgml
@@ -66,8 +66,8 @@ Simple file handling.
</para>
- at filename:
- at Returns:
+ at filename:
+ at Returns:
<!-- ##### FUNCTION parole_file_new_with_display_name ##### -->
@@ -75,9 +75,9 @@ Simple file handling.
</para>
- at filename:
- at display_name:
- at Returns:
+ at filename:
+ at display_name:
+ at Returns:
<!-- ##### FUNCTION parole_file_new_cdda_track ##### -->
@@ -85,9 +85,9 @@ Simple file handling.
</para>
- at track_num:
- at display_name:
- at Returns:
+ at track_num:
+ at display_name:
+ at Returns:
<!-- ##### FUNCTION parole_file_new_dvd_chapter ##### -->
@@ -95,9 +95,9 @@ Simple file handling.
</para>
- at chapter_num:
- at display_name:
- at Returns:
+ at chapter_num:
+ at display_name:
+ at Returns:
<!-- ##### FUNCTION parole_file_get_file_name ##### -->
@@ -105,8 +105,8 @@ Simple file handling.
</para>
- at file:
- at Returns:
+ at file:
+ at Returns:
<!-- ##### FUNCTION parole_file_get_display_name ##### -->
@@ -114,8 +114,8 @@ Simple file handling.
</para>
- at file:
- at Returns:
+ at file:
+ at Returns:
<!-- ##### FUNCTION parole_file_get_uri ##### -->
@@ -123,8 +123,8 @@ Simple file handling.
</para>
- at file:
- at Returns:
+ at file:
+ at Returns:
<!-- ##### FUNCTION parole_file_get_directory ##### -->
@@ -132,8 +132,8 @@ Simple file handling.
</para>
- at file:
- at Returns:
+ at file:
+ at Returns:
<!-- ##### FUNCTION parole_file_get_content_type ##### -->
@@ -141,8 +141,8 @@ Simple file handling.
</para>
- at file:
- at Returns:
+ at file:
+ at Returns:
<!-- ##### FUNCTION parole_file_set_dvd_chapter ##### -->
@@ -150,8 +150,8 @@ Simple file handling.
</para>
- at file:
- at dvd_chapter:
+ at file:
+ at dvd_chapter:
<!-- ##### FUNCTION parole_file_get_dvd_chapter ##### -->
@@ -159,8 +159,8 @@ Simple file handling.
</para>
- at file:
- at Returns:
+ at file:
+ at Returns:
<!-- ##### FUNCTION parole_file_set_custom_subtitles ##### -->
@@ -168,8 +168,8 @@ Simple file handling.
</para>
- at file:
- at suburi:
+ at file:
+ at suburi:
<!-- ##### FUNCTION parole_file_get_custom_subtitles ##### -->
@@ -177,7 +177,7 @@ Simple file handling.
</para>
- at file:
- at Returns:
+ at file:
+ at Returns:
diff --git a/docs/plugin-api/tmpl/parole-filters.sgml b/docs/plugin-api/tmpl/parole-filters.sgml
index 6a807d3..41c0d00 100644
--- a/docs/plugin-api/tmpl/parole-filters.sgml
+++ b/docs/plugin-api/tmpl/parole-filters.sgml
@@ -25,8 +25,8 @@ Parole Filters
</para>
- at void:
- at Returns:
+ at void:
+ at Returns:
<!-- ##### FUNCTION parole_get_supported_video_filter ##### -->
@@ -34,8 +34,8 @@ Parole Filters
</para>
- at void:
- at Returns:
+ at void:
+ at Returns:
<!-- ##### FUNCTION parole_get_supported_media_filter ##### -->
@@ -43,8 +43,8 @@ Parole Filters
</para>
- at void:
- at Returns:
+ at void:
+ at Returns:
<!-- ##### FUNCTION parole_get_supported_files_filter ##### -->
@@ -52,8 +52,8 @@ Parole Filters
</para>
- at void:
- at Returns:
+ at void:
+ at Returns:
<!-- ##### FUNCTION parole_get_supported_playlist_filter ##### -->
@@ -61,8 +61,8 @@ Parole Filters
</para>
- at void:
- at Returns:
+ at void:
+ at Returns:
<!-- ##### FUNCTION parole_file_filter ##### -->
@@ -70,8 +70,8 @@ Parole Filters
</para>
- at filter:
- at file:
- at Returns:
+ at filter:
+ at file:
+ at Returns:
diff --git a/docs/plugin-api/tmpl/parole-marshal.sgml b/docs/plugin-api/tmpl/parole-marshal.sgml
index ddbbf7d..96bd431 100644
--- a/docs/plugin-api/tmpl/parole-marshal.sgml
+++ b/docs/plugin-api/tmpl/parole-marshal.sgml
@@ -25,12 +25,12 @@ parole-marshal
</para>
- at closure:
- at return_value:
- at n_param_values:
- at param_values:
- at invocation_hint:
- at marshal_data:
+ at closure:
+ at return_value:
+ at n_param_values:
+ at param_values:
+ at invocation_hint:
+ at marshal_data:
<!-- ##### FUNCTION parole_marshal_VOID__OBJECT_DOUBLE ##### -->
@@ -38,12 +38,12 @@ parole-marshal
</para>
- at closure:
- at return_value:
- at n_param_values:
- at param_values:
- at invocation_hint:
- at marshal_data:
+ at closure:
+ at return_value:
+ at n_param_values:
+ at param_values:
+ at invocation_hint:
+ at marshal_data:
<!-- ##### FUNCTION parole_marshal_VOID__OBJECT_INT ##### -->
@@ -51,11 +51,11 @@ parole-marshal
</para>
- at closure:
- at return_value:
- at n_param_values:
- at param_values:
- at invocation_hint:
- at marshal_data:
+ at closure:
+ at return_value:
+ at n_param_values:
+ at param_values:
+ at invocation_hint:
+ at marshal_data:
diff --git a/docs/plugin-api/tmpl/parole-pl-parser.sgml b/docs/plugin-api/tmpl/parole-pl-parser.sgml
index 831dae6..8f345a2 100644
--- a/docs/plugin-api/tmpl/parole-pl-parser.sgml
+++ b/docs/plugin-api/tmpl/parole-pl-parser.sgml
@@ -25,19 +25,19 @@ Parole Playlist Parser
</para>
- at PAROLE_PL_FORMAT_UNKNOWN:
- at PAROLE_PL_FORMAT_M3U:
- at PAROLE_PL_FORMAT_PLS:
- at PAROLE_PL_FORMAT_ASX:
- at PAROLE_PL_FORMAT_XSPF:
+ at PAROLE_PL_FORMAT_UNKNOWN:
+ at PAROLE_PL_FORMAT_M3U:
+ at PAROLE_PL_FORMAT_PLS:
+ at PAROLE_PL_FORMAT_ASX:
+ at PAROLE_PL_FORMAT_XSPF:
<!-- ##### FUNCTION parole_pl_parser_guess_format_from_extension ##### -->
<para>
</para>
- at filename:
- at Returns:
+ at filename:
+ at Returns:
<!-- ##### FUNCTION parole_pl_parser_guess_format_from_data ##### -->
@@ -45,8 +45,8 @@ Parole Playlist Parser
</para>
- at filename:
- at Returns:
+ at filename:
+ at Returns:
<!-- ##### FUNCTION parole_pl_parser_can_parse_data ##### -->
@@ -54,9 +54,9 @@ Parole Playlist Parser
</para>
- at data:
- at len:
- at Returns:
+ at data:
+ at len:
+ at Returns:
<!-- ##### FUNCTION parole_pl_parser_parse_from_file_by_extension ##### -->
@@ -64,8 +64,8 @@ Parole Playlist Parser
</para>
- at filename:
- at Returns:
+ at filename:
+ at Returns:
<!-- ##### FUNCTION parole_pl_parser_parse_all_from_file ##### -->
@@ -73,8 +73,8 @@ Parole Playlist Parser
</para>
- at filename:
- at Returns:
+ at filename:
+ at Returns:
<!-- ##### FUNCTION parole_pl_parser_save_from_files ##### -->
@@ -82,9 +82,9 @@ Parole Playlist Parser
</para>
- at files:
- at filename:
- at format:
- at Returns:
+ at files:
+ at filename:
+ at format:
+ at Returns:
diff --git a/docs/plugin-api/tmpl/parole-provider-player.sgml b/docs/plugin-api/tmpl/parole-provider-player.sgml
index 19365d8..56dd67e 100644
--- a/docs/plugin-api/tmpl/parole-provider-player.sgml
+++ b/docs/plugin-api/tmpl/parole-provider-player.sgml
@@ -6,7 +6,7 @@ The interface of the player.
<!-- ##### SECTION Long_Description ##### -->
<para>
-The player interface that the plugins should use in order to, issue playback
+The player interface that the plugins should use in order to, issue playback
commands to the Parole GStreamer backend or to get information about the current
playback status.
</para>
@@ -34,7 +34,7 @@ playback status.
</para>
@paroleproviderplayeriface: the object which received the signal.
- at arg1:
+ at arg1:
<!-- ##### SIGNAL ParoleProviderPlayerIface::state-changed ##### -->
<para>
@@ -42,8 +42,8 @@ playback status.
</para>
@paroleproviderplayeriface: the object which received the signal.
- at arg1:
- at arg2:
+ at arg1:
+ at arg2:
<!-- ##### SIGNAL ParoleProviderPlayerIface::tag-message ##### -->
<para>
@@ -51,7 +51,7 @@ playback status.
</para>
@paroleproviderplayeriface: the object which received the signal.
- at arg1:
+ at arg1:
<!-- ##### STRUCT ParoleProviderPlayer ##### -->
<para>
@@ -64,29 +64,29 @@ playback status.
</para>
- at PAROLE_PLUGIN_CONTAINER_PLAYLIST:
- at PAROLE_PLUGIN_CONTAINER_MAIN_VIEW:
+ at PAROLE_PLUGIN_CONTAINER_PLAYLIST:
+ at PAROLE_PLUGIN_CONTAINER_MAIN_VIEW:
<!-- ##### ENUM ParoleState ##### -->
<para>
</para>
- at PAROLE_STATE_STOPPED:
- at PAROLE_STATE_PLAYBACK_FINISHED:
- at PAROLE_STATE_ABOUT_TO_FINISH:
- at PAROLE_STATE_PAUSED:
- at PAROLE_STATE_PLAYING:
+ at PAROLE_STATE_STOPPED:
+ at PAROLE_STATE_PLAYBACK_FINISHED:
+ at PAROLE_STATE_ABOUT_TO_FINISH:
+ at PAROLE_STATE_PAUSED:
+ at PAROLE_STATE_PLAYING:
<!-- ##### FUNCTION parole_provider_player_pack ##### -->
<para>
</para>
- at player:
- at widget:
- at title:
- at container:
+ at player:
+ at widget:
+ at title:
+ at container:
<!-- ##### FUNCTION parole_provider_player_get_action ##### -->
@@ -94,9 +94,9 @@ playback status.
</para>
- at player:
- at action:
- at Returns:
+ at player:
+ at action:
+ at Returns:
<!-- ##### FUNCTION parole_provider_player_set_fullscreen ##### -->
@@ -104,9 +104,9 @@ playback status.
</para>
- at player:
- at fullscreen:
- at Returns:
+ at player:
+ at fullscreen:
+ at Returns:
<!-- ##### FUNCTION parole_provider_player_get_fullscreen ##### -->
@@ -114,8 +114,8 @@ playback status.
</para>
- at player:
- at Returns:
+ at player:
+ at Returns:
<!-- ##### FUNCTION parole_stream_set_image ##### -->
@@ -123,8 +123,8 @@ playback status.
</para>
- at object:
- at pixbuf:
+ at object:
+ at pixbuf:
<!-- ##### FUNCTION parole_stream_get_image ##### -->
@@ -132,8 +132,8 @@ playback status.
</para>
- at object:
- at Returns:
+ at object:
+ at Returns:
<!-- ##### FUNCTION parole_provider_player_get_state ##### -->
@@ -141,8 +141,8 @@ playback status.
</para>
- at player:
- at Returns:
+ at player:
+ at Returns:
<!-- ##### FUNCTION parole_provider_player_get_stream_position ##### -->
@@ -150,8 +150,8 @@ playback status.
</para>
- at player:
- at Returns:
+ at player:
+ at Returns:
<!-- ##### FUNCTION parole_provider_player_play_uri ##### -->
@@ -159,9 +159,9 @@ playback status.
</para>
- at player:
- at uri:
- at Returns:
+ at player:
+ at uri:
+ at Returns:
<!-- ##### FUNCTION parole_provider_player_pause ##### -->
@@ -169,8 +169,8 @@ playback status.
</para>
- at player:
- at Returns:
+ at player:
+ at Returns:
<!-- ##### FUNCTION parole_provider_player_resume ##### -->
@@ -178,8 +178,8 @@ playback status.
</para>
- at player:
- at Returns:
+ at player:
+ at Returns:
<!-- ##### FUNCTION parole_provider_player_stop ##### -->
@@ -187,8 +187,8 @@ playback status.
</para>
- at player:
- at Returns:
+ at player:
+ at Returns:
<!-- ##### FUNCTION parole_provider_player_play_next ##### -->
@@ -196,8 +196,8 @@ playback status.
</para>
- at player:
- at Returns:
+ at player:
+ at Returns:
<!-- ##### FUNCTION parole_provider_player_play_previous ##### -->
@@ -205,8 +205,8 @@ playback status.
</para>
- at player:
- at Returns:
+ at player:
+ at Returns:
<!-- ##### FUNCTION parole_provider_player_seek ##### -->
@@ -214,9 +214,9 @@ playback status.
</para>
- at player:
- at pos:
- at Returns:
+ at player:
+ at pos:
+ at Returns:
<!-- ##### FUNCTION parole_provider_player_open_media_chooser ##### -->
@@ -224,6 +224,6 @@ playback status.
</para>
- at player:
+ at player:
diff --git a/docs/plugin-api/tmpl/parole-provider-plugin.sgml b/docs/plugin-api/tmpl/parole-provider-plugin.sgml
index bf86f4b..bd88e3d 100644
--- a/docs/plugin-api/tmpl/parole-provider-plugin.sgml
+++ b/docs/plugin-api/tmpl/parole-provider-plugin.sgml
@@ -34,8 +34,8 @@ can use to get access to various functionalities of the player.
</para>
- at provider:
- at Returns:
+ at provider:
+ at Returns:
<!-- ##### FUNCTION parole_provider_plugin_configure ##### -->
@@ -43,8 +43,8 @@ can use to get access to various functionalities of the player.
</para>
- at provider:
- at parent:
+ at provider:
+ at parent:
<!-- ##### FUNCTION parole_provider_plugin_set_player ##### -->
@@ -52,7 +52,7 @@ can use to get access to various functionalities of the player.
</para>
- at provider:
- at player:
+ at provider:
+ at player:
diff --git a/docs/plugin-api/tmpl/parole-stream.sgml b/docs/plugin-api/tmpl/parole-stream.sgml
index 5c7ff60..6de4b90 100644
--- a/docs/plugin-api/tmpl/parole-stream.sgml
+++ b/docs/plugin-api/tmpl/parole-stream.sgml
@@ -28,14 +28,14 @@ signal of the player, the plugin shouldn't take reference and all the properties
</para>
- at PAROLE_MEDIA_TYPE_UNKNOWN:
- at PAROLE_MEDIA_TYPE_LOCAL_FILE:
- at PAROLE_MEDIA_TYPE_CDDA:
- at PAROLE_MEDIA_TYPE_VCD:
- at PAROLE_MEDIA_TYPE_SVCD:
- at PAROLE_MEDIA_TYPE_DVD:
- at PAROLE_MEDIA_TYPE_DVB:
- at PAROLE_MEDIA_TYPE_REMOTE:
+ at PAROLE_MEDIA_TYPE_UNKNOWN:
+ at PAROLE_MEDIA_TYPE_LOCAL_FILE:
+ at PAROLE_MEDIA_TYPE_CDDA:
+ at PAROLE_MEDIA_TYPE_VCD:
+ at PAROLE_MEDIA_TYPE_SVCD:
+ at PAROLE_MEDIA_TYPE_DVD:
+ at PAROLE_MEDIA_TYPE_DVB:
+ at PAROLE_MEDIA_TYPE_REMOTE:
<!-- ##### STRUCT ParoleStream ##### -->
<para>
diff --git a/docs/plugin-api/tmpl/parole.sgml b/docs/plugin-api/tmpl/parole.sgml
index 7de4df5..0512f9f 100644
--- a/docs/plugin-api/tmpl/parole.sgml
+++ b/docs/plugin-api/tmpl/parole.sgml
@@ -46,9 +46,9 @@ Parole
</para>
- at major:
- at minor:
- at micro:
+ at major:
+ at minor:
+ at micro:
<!-- ##### MACRO PAROLE_DEFINE_TYPE ##### -->
@@ -56,9 +56,9 @@ Parole
</para>
- at TN:
- at t_n:
- at T_P:
+ at TN:
+ at t_n:
+ at T_P:
<!-- ##### MACRO PAROLE_DEFINE_TYPE_EXTENDED ##### -->
@@ -66,11 +66,11 @@ Parole
</para>
- at TN:
- at t_n:
- at T_P:
- at _f_:
- at _C_:
+ at TN:
+ at t_n:
+ at T_P:
+ at _f_:
+ at _C_:
<!-- ##### MACRO PAROLE_DEFINE_TYPE_WITH_CODE ##### -->
@@ -78,10 +78,10 @@ Parole
</para>
- at TN:
- at t_n:
- at T_P:
- at _C_:
+ at TN:
+ at t_n:
+ at T_P:
+ at _C_:
<!-- ##### MACRO PAROLE_DEFINE_ABSTRACT_TYPE ##### -->
@@ -89,9 +89,9 @@ Parole
</para>
- at TN:
- at t_n:
- at T_P:
+ at TN:
+ at t_n:
+ at T_P:
<!-- ##### MACRO PAROLE_DEFINE_ABSTRACT_TYPE_WITH_CODE ##### -->
@@ -99,10 +99,10 @@ Parole
</para>
- at TN:
- at t_n:
- at T_P:
- at _C_:
+ at TN:
+ at t_n:
+ at T_P:
+ at _C_:
<!-- ##### MACRO PAROLE_IMPLEMENT_INTERFACE ##### -->
@@ -110,8 +110,8 @@ Parole
</para>
- at TYPE_IFACE:
- at iface_init:
+ at TYPE_IFACE:
+ at iface_init:
<!-- ##### FUNCTION parole_get_supported_recent_files_filter ##### -->
@@ -119,8 +119,8 @@ Parole
</para>
- at void:
- at Returns:
+ at void:
+ at Returns:
<!-- ##### FUNCTION parole_get_supported_recent_media_filter ##### -->
@@ -128,7 +128,7 @@ Parole
</para>
- at void:
- at Returns:
+ at void:
+ at Returns:
diff --git a/src/common/parole-rc-utils.c b/src/common/parole-rc-utils.c
index 05e9db1..468ca62 100644
--- a/src/common/parole-rc-utils.c
+++ b/src/common/parole-rc-utils.c
@@ -37,15 +37,15 @@ parole_get_resource_file (const gchar *group, gboolean readonly)
{
gchar *file;
XfceRc *rc;
-
+
file = xfce_resource_save_location (XFCE_RESOURCE_CONFIG, PAROLE_RESOURCE_FILE, TRUE);
rc = xfce_rc_simple_open (file, readonly);
-
+
if (rc)
xfce_rc_set_group (rc, group);
-
+
g_free (file);
-
+
return rc;
}
@@ -55,17 +55,17 @@ gchar **parole_get_history_full (const gchar *relpath)
gchar *history = NULL;
gchar *contents = NULL;
gsize length = 0;
-
+
history = xfce_resource_lookup (XFCE_RESOURCE_CACHE, relpath);
-
- if (history && g_file_get_contents (history, &contents, &length, NULL))
+
+ if (history && g_file_get_contents (history, &contents, &length, NULL))
{
lines = g_strsplit (contents, "\n", -1);
g_free (contents);
}
-
+
g_free (history);
-
+
return lines;
}
@@ -82,10 +82,10 @@ void parole_insert_line_history (const gchar *line)
void parole_insert_line_history_full (const gchar *relpath, const gchar *line)
{
gchar *history = NULL;
-
+
history = xfce_resource_save_location (XFCE_RESOURCE_CACHE, relpath, TRUE);
-
- if ( history )
+
+ if ( history )
{
FILE *f;
f = fopen (history, "a");
@@ -105,9 +105,9 @@ void parole_clear_history_file (void)
void parole_clear_history_file_full (const gchar *relpath)
{
gchar *history = NULL;
-
+
history = xfce_resource_save_location (XFCE_RESOURCE_CACHE, relpath, FALSE);
-
+
if ( history )
{
FILE *f;
diff --git a/src/common/parole-rc-utils.h b/src/common/parole-rc-utils.h
index 8dadbda..c59342c 100644
--- a/src/common/parole-rc-utils.h
+++ b/src/common/parole-rc-utils.h
@@ -31,17 +31,17 @@
#define PAROLE_RC_GROUP_GENERAL "General"
#define PAROLE_RC_GROUP_PLUGINS "Plugins"
-XfceRc *parole_get_resource_file (const gchar *group,
+XfceRc *parole_get_resource_file (const gchar *group,
gboolean readonly);
gchar **parole_get_history (void);
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);
+ const gchar *line);
void parole_clear_history_file (void);
diff --git a/src/common/parole-screensaver.c b/src/common/parole-screensaver.c
index 0c34d61..4c3164a 100644
--- a/src/common/parole-screensaver.c
+++ b/src/common/parole-screensaver.c
@@ -82,7 +82,7 @@ void parole_screen_saver_inhibit (ParoleScreenSaver *saver, GtkWindow *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);
g_free(cmd);
@@ -97,7 +97,7 @@ void parole_screen_saver_uninhibit (ParoleScreenSaver *saver, GtkWindow *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);
g_free(cmd);
diff --git a/src/common/parole-screensaver.h b/src/common/parole-screensaver.h
index be12ae1..f5ac4a9 100644
--- a/src/common/parole-screensaver.h
+++ b/src/common/parole-screensaver.h
@@ -35,13 +35,13 @@ G_BEGIN_DECLS
typedef struct
{
GObject parent;
-
+
} ParoleScreenSaver;
typedef struct
{
GObjectClass parent_class;
-
+
} ParoleScreenSaverClass;
GType parole_screen_saver_get_type (void) G_GNUC_CONST;
diff --git a/src/dbus/parole-dbus.c b/src/dbus/parole-dbus.c
index a9f8e3f..cc0f256 100644
--- a/src/dbus/parole-dbus.c
+++ b/src/dbus/parole-dbus.c
@@ -53,7 +53,7 @@ parole_g_session_bus_get (void)
static gboolean session_bus_connected = FALSE;
DBusGConnection *bus;
GError *error = NULL;
-
+
if ( G_LIKELY (session_bus_connected) )
{
bus = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
@@ -61,7 +61,7 @@ parole_g_session_bus_get (void)
else
{
bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
-
+
if ( error )
{
g_error ("%s", error->message);
@@ -77,44 +77,44 @@ parole_get_proxy (const gchar *path, const gchar *iface)
{
DBusGConnection *bus;
DBusGProxy *proxy;
-
+
bus = parole_g_session_bus_get ();
-
- proxy = dbus_g_proxy_new_for_name (bus,
+
+ proxy = dbus_g_proxy_new_for_name (bus,
PAROLE_DBUS_NAME,
path,
iface);
-
+
if ( !proxy )
g_error ("Unable to create proxy for %s", PAROLE_DBUS_NAME);
-
+
g_signal_connect_swapped (proxy, "destroy",
G_CALLBACK (proxy_destroy_cb), bus);
-
+
return proxy;
}
-gboolean
+gboolean
parole_dbus_name_has_owner (const gchar *name)
{
DBusConnection *bus;
DBusError error;
gboolean ret;
-
+
bus = parole_session_bus_get ();
-
+
dbus_error_init (&error);
-
+
ret = dbus_bus_name_has_owner (bus, name, &error);
-
+
dbus_connection_unref (bus);
-
+
if ( dbus_error_is_set (&error) )
{
g_warning ("Failed to get name owner: %s\n", error.message);
dbus_error_free (&error);
}
-
+
return ret;
}
@@ -123,19 +123,19 @@ gboolean parole_dbus_register_name (const gchar *name)
DBusConnection *bus;
DBusError error;
int ret;
-
+
bus = parole_session_bus_get ();
-
+
dbus_error_init (&error);
-
+
ret =
dbus_bus_request_name (bus,
name,
DBUS_NAME_FLAG_ALLOW_REPLACEMENT,
&error);
-
+
dbus_connection_unref (bus);
-
+
if ( dbus_error_is_set (&error) )
{
g_warning ("Error: %s\n", error.message);
@@ -151,18 +151,18 @@ gboolean parole_dbus_release_name (const gchar *name)
DBusConnection *bus;
DBusError error;
int ret;
-
+
bus = parole_session_bus_get ();
-
+
dbus_error_init (&error);
-
+
ret =
dbus_bus_release_name (bus,
name,
&error);
dbus_connection_unref (bus);
-
+
if ( dbus_error_is_set (&error) )
{
g_warning ("Error: %s\n", error.message);
diff --git a/src/gst/Makefile.am b/src/gst/Makefile.am
index 62771b7..805d431 100644
--- a/src/gst/Makefile.am
+++ b/src/gst/Makefile.am
@@ -19,7 +19,7 @@ GENERATED_FILES = \
libparolegst_la_SOURCES = \
$(GENERATED_FILES) \
parole-gst.c \
- parole-gst.h
+ parole-gst.h
libparolegst_la_CFLAGS = \
$(GST_VIDEO_CFLAGS) \
diff --git a/src/main.c b/src/main.c
index eebcc24..e2f9f5a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -86,7 +86,7 @@ parole_send_play_disc (const gchar *uri, const gchar *device)
DBusGProxy *proxy;
GError *error = NULL;
gchar *uri_local;
-
+
if ( uri )
{
uri_local = g_strdup (uri);
@@ -95,23 +95,23 @@ parole_send_play_disc (const gchar *uri, const gchar *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_free (uri_local);
-
+
if ( error )
{
g_critical ("Unable to send uri to Parole: %s", error->message);
g_error_free (error);
}
-
+
g_object_unref (proxy);
}
@@ -133,7 +133,7 @@ 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);
@@ -151,8 +151,8 @@ parole_send_files (gchar **filenames, gboolean enqueue)
G_TYPE_BOOLEAN, enqueue,
G_TYPE_INVALID,
G_TYPE_INVALID);
-
-
+
+
if ( error )
{
g_critical ("Unable to send media files to Parole: %s", error->message);
@@ -192,19 +192,19 @@ parole_send_message (const gchar *message)
{
DBusGProxy *proxy;
GError *error = NULL;
-
+
proxy = parole_get_proxy (PAROLE_DBUS_PATH, PAROLE_DBUS_INTERFACE);
-
+
dbus_g_proxy_call (proxy, message, &error,
G_TYPE_INVALID,
G_TYPE_INVALID);
-
+
if ( error )
{
g_critical ("Failed to send message : %s : %s", message, error->message);
g_error_free (error);
}
-
+
g_object_unref (proxy);
}
@@ -217,7 +217,7 @@ int main (int argc, char **argv)
GOptionContext *ctx;
GOptionGroup *gst_option_group;
GError *error = NULL;
-
+
gchar **filenames = NULL;
gchar *device = NULL;
gboolean new_instance = FALSE;
@@ -234,9 +234,9 @@ int main (int argc, char **argv)
gboolean fullscreen = FALSE;
gboolean enqueue = FALSE;
gchar *client_id = NULL;
-
+
/* Command-line options */
- GOptionEntry option_entries[] =
+ 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 },
@@ -256,10 +256,10 @@ int main (int argc, char **argv)
{G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, N_("Media to play"), NULL},
{ NULL, },
};
-
+
if (g_thread_supported ())
dbus_threads_init_default ();
-
+
/* initialize xfconf */
if (!xfconf_init (&error))
{
@@ -267,25 +267,25 @@ int main (int argc, char **argv)
g_error_free (error);
return EXIT_FAILURE;
}
-
+
XInitThreads();
xfce_textdomain (GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
-
+
g_set_application_name (PACKAGE_NAME);
-
+
gtk_init (&argc, &argv);
-
+
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);
g_option_context_set_translation_domain (ctx, GETTEXT_PACKAGE);
g_option_context_add_group (ctx, gst_option_group);
g_option_context_add_group (ctx, gtk_get_option_group (TRUE));
-
- if ( !g_option_context_parse (ctx, &argc, &argv, &error) )
+
+ 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\n"), argv[0]);
@@ -294,47 +294,47 @@ int main (int argc, char **argv)
return EXIT_FAILURE;
}
g_option_context_free (ctx);
-
+
if ( version )
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) )
{
/* Clear startup notification */
gdk_notify_startup_complete ();
- if (!enqueue && !play && !next_track && !prev_track &&
+ 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 */
else
{
@@ -343,7 +343,7 @@ int main (int argc, char **argv)
player = parole_player_new (client_id);
g_free (client_id);
-
+
if (embedded)
parole_player_embedded (player);
else if (fullscreen)
@@ -366,8 +366,8 @@ int main (int argc, char **argv)
{
parole_player_play_uri_disc (player, NULL, device);
}
-
- if ( xfce_posix_signal_handler_init (&error))
+
+ if ( xfce_posix_signal_handler_init (&error))
{
xfce_posix_signal_handler_set_handler(SIGHUP,
parole_sig_handler,
@@ -380,8 +380,8 @@ int main (int argc, char **argv)
xfce_posix_signal_handler_set_handler(SIGTERM,
parole_sig_handler,
player, NULL);
- }
- else
+ }
+ else
{
g_warning ("Unable to set up POSIX signal handlers: %s", error->message);
g_error_free (error);
@@ -391,11 +391,11 @@ int main (int argc, char **argv)
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);
}
diff --git a/src/misc/parole-debug.c b/src/misc/parole-debug.c
index 2a76942..3065535 100644
--- a/src/misc/parole-debug.c
+++ b/src/misc/parole-debug.c
@@ -35,7 +35,7 @@
#if defined(DEBUG) && defined(G_HAVE_ISO_VARARGS)
-void parole_debug_enum (const gchar *func, const gchar *file, gint line,
+void parole_debug_enum (const gchar *func, const gchar *file, gint line,
const gchar *text, gint v_enum, GType type)
{
gchar *content = NULL;
@@ -43,13 +43,13 @@ void parole_debug_enum (const gchar *func, const gchar *file, gint line,
g_value_init (&__value__, type);
g_value_set_enum (&__value__, v_enum);
-
+
content = g_strdup_value_contents (&__value__);
-
+
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);
}
@@ -58,24 +58,24 @@ void parole_debug_enum_full (const gchar *func, const gchar *file, gint line,
{
va_list args;
gchar *buffer;
-
+
gchar *content = NULL;
GValue __value__ = { 0, };
-
+
g_value_init (&__value__, type);
g_value_set_enum (&__value__, v_enum);
-
+
content = g_strdup_value_contents (&__value__);
-
+
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 36503d2..e59aa90 100644
--- a/src/misc/parole-debug.h
+++ b/src/misc/parole-debug.h
@@ -44,9 +44,9 @@ void parole_debug_enum (const gchar *func,
const gchar *file,
gint line,
const gchar *text,
- gint v_enum,
+ gint v_enum,
GType type);
-
+
void parole_debug_enum_full (const gchar *func,
const gchar *file,
gint line,
diff --git a/src/misc/parole-file.c b/src/misc/parole-file.c
index 9eed75a..6b14d10 100644
--- a/src/misc/parole-file.c
+++ b/src/misc/parole-file.c
@@ -51,7 +51,7 @@ struct _ParoleFilePrivate
gchar *directory;
gchar *custom_subtitles;
gint dvd_chapter;
-
+
};
enum
@@ -76,35 +76,35 @@ parole_file_finalize (GObject *object)
file = PAROLE_FILE (object);
priv = PAROLE_FILE_GET_PRIVATE (file);
-
+
if ( priv->filename )
g_free (priv->filename);
if ( priv->uri )
g_free (priv->uri);
-
+
if ( 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_OBJECT_CLASS (parole_file_parent_class)->finalize (object);
}
static void
-parole_file_set_property (GObject *object, guint prop_id,
+parole_file_set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec)
{
ParoleFile *file;
file = PAROLE_FILE (object);
-
+
switch (prop_id)
{
case PROP_PATH:
@@ -129,13 +129,13 @@ parole_file_set_property (GObject *object, guint prop_id,
}
static void
-parole_file_get_property (GObject *object, guint prop_id,
+parole_file_get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
ParoleFile *file;
file = PAROLE_FILE (object);
-
+
switch (prop_id)
{
case PROP_PATH:
@@ -173,14 +173,14 @@ parole_file_constructed (GObject *object)
ParoleFile *file;
ParoleFilePrivate *priv;
GError *error = NULL;
-
+
gchar *filename;
-
+
file = PAROLE_FILE (object);
priv = PAROLE_FILE_GET_PRIVATE (file);
-
+
filename = g_strdup(priv->filename);
-
+
if ( g_str_has_prefix(filename, "cdda") )
{
priv->directory = NULL;
@@ -189,7 +189,7 @@ parole_file_constructed (GObject *object)
g_free(filename);
return;
}
-
+
if ( g_str_has_prefix(filename, "dvd") )
{
priv->directory = NULL;
@@ -198,18 +198,18 @@ parole_file_constructed (GObject *object)
g_free(filename);
return;
}
-
+
g_free(filename);
-
+
gfile = g_file_new_for_commandline_arg (priv->filename);
- info = g_file_query_info (gfile,
+ info = g_file_query_info (gfile,
"standard::*,",
0,
NULL,
&error);
-
-
+
+
priv->directory = g_file_get_path (g_file_get_parent( gfile ));
if ( error )
@@ -235,16 +235,16 @@ parole_file_constructed (GObject *object)
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);
@@ -253,7 +253,7 @@ parole_file_constructed (GObject *object)
priv->display_name = g_strdup (title_s);
}
}
-
+
taglib_tag_free_strings ();
}
taglib_file_free (tag_file);
@@ -265,9 +265,9 @@ parole_file_constructed (GObject *object)
priv->display_name = g_strdup (g_file_info_get_display_name (info));
priv->content_type = g_strdup (g_file_info_get_content_type (info));
-
+
g_object_unref (info);
-
+
out:
priv->uri = g_file_get_uri (gfile);
g_object_unref (gfile);
@@ -279,22 +279,22 @@ parole_file_class_init (ParoleFileClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = parole_file_finalize;
-
+
object_class->constructed = parole_file_constructed;
object_class->set_property = parole_file_set_property;
object_class->get_property = parole_file_get_property;
/**
* ParoleFile:filename:
- *
+ *
* The file name of the file.
- *
- * Since: 0.2
+ *
+ * Since: 0.2
**/
g_object_class_install_property (object_class,
PROP_PATH,
g_param_spec_string ("filename",
- "File name",
+ "File name",
"The file name",
NULL,
G_PARAM_CONSTRUCT_ONLY|
@@ -302,15 +302,15 @@ parole_file_class_init (ParoleFileClass *klass)
/**
* ParoleFile:display-name:
- *
+ *
* A UTF-8 name that can be displayed in the UI.
- *
- * Since: 0.2
+ *
+ * Since: 0.2
**/
g_object_class_install_property (object_class,
PROP_DISPLAY_NAME,
g_param_spec_string ("display-name",
- "Display name",
+ "Display name",
"A UTF-8 name that can be displayed in the UI",
NULL,
G_PARAM_CONSTRUCT_ONLY|
@@ -318,50 +318,50 @@ parole_file_class_init (ParoleFileClass *klass)
/**
* ParoleFile:uri:
- *
+ *
* The uri of the file.
- *
- * Since: 0.2
+ *
+ * Since: 0.2
**/
g_object_class_install_property (object_class,
PROP_URI,
g_param_spec_string ("uri",
- "Uri",
+ "Uri",
"The uri of the file",
NULL,
G_PARAM_READABLE));
/**
* ParoleFile:content-type:
- *
+ *
* The content type of the file.
- *
- * Since: 0.2
+ *
+ * Since: 0.2
**/
g_object_class_install_property (object_class,
PROP_CONTENT_TYPE,
g_param_spec_string ("content-type",
- "Content type",
+ "Content type",
"The content type of the file",
NULL,
G_PARAM_READABLE));
-
+
/**
* ParoleFile:directory:
- *
+ *
* The parent directory of the file.
- *
- * Since: 0.2
+ *
+ * Since: 0.2
**/
g_object_class_install_property (object_class,
PROP_DIRECTORY,
g_param_spec_string ("directory",
- "Parent directory",
+ "Parent directory",
"The parent directory of the file",
NULL,
G_PARAM_CONSTRUCT_ONLY|
G_PARAM_READWRITE));
-
+
/**
* ParoleFile:custom_subtitles:
*
@@ -372,12 +372,12 @@ parole_file_class_init (ParoleFileClass *klass)
g_object_class_install_property (object_class,
PROP_CUSTOM_SUBTITLES,
g_param_spec_string ("custom_subtitles",
- "Custom Subtitles",
+ "Custom Subtitles",
"The custom subtitles set by the user",
NULL,
G_PARAM_CONSTRUCT_ONLY|
G_PARAM_READWRITE));
-
+
/**
* ParoleFile:dvd_chapter:
*
@@ -388,7 +388,7 @@ parole_file_class_init (ParoleFileClass *klass)
g_object_class_install_property (object_class,
PROP_DVD_CHAPTER,
g_param_spec_int ("dvd-chapter",
- "DVD Chapter",
+ "DVD Chapter",
"DVD Chapter, used for seeking a DVD using the playlist.",
-1,
1000,
@@ -403,7 +403,7 @@ static void
parole_file_init (ParoleFile *file)
{
ParoleFilePrivate *priv;
-
+
priv = PAROLE_FILE_GET_PRIVATE (file);
priv->filename = NULL;
@@ -418,11 +418,11 @@ parole_file_init (ParoleFile *file)
/**
* parole_file_new:
* @filename: filename.
- *
- *
- *
+ *
+ *
+ *
* Returns: A new #ParoleFile object.
- *
+ *
* Since: 0.2
**/
ParoleFile *
@@ -436,21 +436,21 @@ parole_file_new (const gchar *filename)
/**
* parole_file_new_with_display_name:
* @filename: filename.
- *
- *
- *
+ *
+ *
+ *
* Returns: A new #ParoleFile object.
- *
+ *
* Since: 0.2
**/
ParoleFile *
parole_file_new_with_display_name (const gchar *filename, const gchar *display_name)
{
ParoleFile *file = NULL;
-
- file = g_object_new (PAROLE_TYPE_FILE,
- "filename", filename,
- "display-name", display_name,
+
+ file = g_object_new (PAROLE_TYPE_FILE,
+ "filename", filename,
+ "display-name", display_name,
NULL);
return file;
@@ -460,10 +460,10 @@ parole_file_new_with_display_name (const gchar *filename, const gchar *display_n
* parole_file_new_cdda_track:
* @track_num: cd track number.
* @display_name: the track name to display.
- *
- *
+ *
+ *
* Returns: A new #ParoleFile object.
- *
+ *
* Since: 0.4
**/
ParoleFile *
@@ -472,11 +472,11 @@ parole_file_new_cdda_track (const gint track_num, const gchar *display_name)
ParoleFile *file = NULL;
gchar *uri = g_strdup_printf("cdda://%i", track_num);
- file = g_object_new (PAROLE_TYPE_FILE,
- "filename", uri,
- "display-name", display_name,
+ file = g_object_new (PAROLE_TYPE_FILE,
+ "filename", uri,
+ "display-name", display_name,
NULL);
-
+
g_free(uri);
return file;
}
@@ -485,10 +485,10 @@ parole_file_new_cdda_track (const gint track_num, const gchar *display_name)
* parole_file_new_dvd_chapter:
* @chapter_num: dvd chapter number.
* @display_name: the chapter name to display.
- *
- *
+ *
+ *
* Returns: A new #ParoleFile object.
- *
+ *
* Since: 0.4
**/
ParoleFile *
@@ -497,12 +497,12 @@ parole_file_new_dvd_chapter (gint chapter_num, const gchar *display_name)
ParoleFile *file = NULL;
gchar *uri = "dvd:/";
- file = g_object_new (PAROLE_TYPE_FILE,
- "filename", uri,
- "display-name", display_name,
+ file = g_object_new (PAROLE_TYPE_FILE,
+ "filename", uri,
+ "display-name", display_name,
"dvd-chapter", chapter_num,
NULL);
-
+
//g_free(uri); FIXME This should probably be freed.
return file;
}
@@ -510,85 +510,85 @@ parole_file_new_dvd_chapter (gint chapter_num, const gchar *display_name)
/**
* parole_file_get_file_name:
* @file: a #ParoleFile.
- *
- *
+ *
+ *
* Returns: A string containing the file name.
- *
+ *
* Since: 0.2
**/
const gchar *
parole_file_get_file_name (const ParoleFile *file)
{
g_return_val_if_fail (PAROLE_IS_FILE (file), NULL);
-
+
return PAROLE_FILE_GET_PRIVATE (file)->filename;
}
/**
* parole_file_get_display_name:
* @file: a #ParoleFile.
- *
- *
+ *
+ *
* Returns: A string containing the display name.
- *
+ *
* Since: 0.2
**/
const gchar *
parole_file_get_display_name (const ParoleFile *file)
{
g_return_val_if_fail (PAROLE_IS_FILE (file), NULL);
-
+
return PAROLE_FILE_GET_PRIVATE (file)->display_name;
}
/**
* parole_file_get_uri:
* @file: a #ParoleFile.
- *
- *
+ *
+ *
* Returns: A string containing the file uri.
- *
+ *
* Since: 0.2
**/
const gchar *
parole_file_get_uri (const ParoleFile *file)
{
g_return_val_if_fail (PAROLE_IS_FILE (file), NULL);
-
+
return PAROLE_FILE_GET_PRIVATE (file)->uri;
}
/**
* parole_file_get_content_type:
* @file: a #ParoleFile.
- *
- *
+ *
+ *
* Returns: A string containing the content type of the file.
- *
+ *
* Since: 0.2
**/
const gchar *
-parole_file_get_content_type (const ParoleFile *file)
+parole_file_get_content_type (const ParoleFile *file)
{
g_return_val_if_fail (PAROLE_IS_FILE (file), NULL);
-
+
return PAROLE_FILE_GET_PRIVATE (file)->content_type;
}
/**
* parole_file_get_directory:
* @file: a #ParoleFile.
- *
- *
+ *
+ *
* Returns: A string containing the parent directory path.
- *
+ *
* Since: 0.2
**/
const gchar *
parole_file_get_directory (const ParoleFile *file)
{
g_return_val_if_fail (PAROLE_IS_FILE (file), NULL);
-
+
return PAROLE_FILE_GET_PRIVATE (file)->directory;
}
@@ -605,7 +605,7 @@ const gchar *
parole_file_get_custom_subtitles (const ParoleFile *file)
{
g_return_val_if_fail (PAROLE_IS_FILE (file), NULL);
-
+
return PAROLE_FILE_GET_PRIVATE (file)->custom_subtitles;
}
@@ -615,10 +615,10 @@ parole_file_set_custom_subtitles (const ParoleFile *file, gchar *suburi)
GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_STRING);
g_value_set_static_string (&value, suburi);
-
- parole_file_set_property (G_OBJECT(file), PROP_CUSTOM_SUBTITLES,
+
+ parole_file_set_property (G_OBJECT(file), PROP_CUSTOM_SUBTITLES,
&value, g_param_spec_string ("custom_subtitles",
- "Custom Subtitles",
+ "Custom Subtitles",
"The custom subtitles set by the user",
NULL,
G_PARAM_CONSTRUCT_ONLY|
@@ -638,7 +638,7 @@ gint
parole_file_get_dvd_chapter (const ParoleFile *file)
{
//g_return_val_if_fail (PAROLE_IS_FILE (file), NULL);
-
+
return PAROLE_FILE_GET_PRIVATE (file)->dvd_chapter;
}
@@ -648,10 +648,10 @@ parole_file_set_dvd_chapter (const ParoleFile *file, gint dvd_chapter)
GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_INT);
g_value_set_int (&value, dvd_chapter);
-
- parole_file_set_property (G_OBJECT(file), PROP_DVD_CHAPTER,
+
+ parole_file_set_property (G_OBJECT(file), PROP_DVD_CHAPTER,
&value, g_param_spec_int ("dvd-chapter",
- "DVD Chapter",
+ "DVD Chapter",
"DVD Chapter, used for seeking a DVD using the playlist.",
-1,
1000,
diff --git a/src/misc/parole-file.h b/src/misc/parole-file.h
index 4f70bed..2720ea5 100644
--- a/src/misc/parole-file.h
+++ b/src/misc/parole-file.h
@@ -54,35 +54,35 @@ 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,
+
+ParoleFile *parole_file_new_cdda_track (const gint track_num,
const gchar *display_name);
-ParoleFile *parole_file_new_dvd_chapter (gint chapter_num,
+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_dvd_chapter (const ParoleFile *file, gint dvd_chapter);
gint parole_file_get_dvd_chapter (const ParoleFile *file);
-
-const gchar
+
+const gchar
G_CONST_RETURN *parole_file_get_directory (const ParoleFile *file) G_GNUC_PURE;
-const gchar
+const gchar
G_CONST_RETURN *parole_file_get_file_name (const ParoleFile *file) G_GNUC_PURE;
-const gchar
+const gchar
G_CONST_RETURN *parole_file_get_display_name (const ParoleFile *file) G_GNUC_PURE;
-const gchar
+const gchar
G_CONST_RETURN *parole_file_get_uri (const ParoleFile *file) G_GNUC_PURE;
-const gchar
+const gchar
G_CONST_RETURN *parole_file_get_content_type (const ParoleFile *file) G_GNUC_PURE;
-const gchar
+const gchar
G_CONST_RETURN *parole_file_get_custom_subtitles (const ParoleFile *file) G_GNUC_PURE;
diff --git a/src/misc/parole-filters.c b/src/misc/parole-filters.c
index f273fc8..b436f0a 100644
--- a/src/misc/parole-filters.c
+++ b/src/misc/parole-filters.c
@@ -45,81 +45,81 @@ static char *playlist_file_extensions[] = {
/**
* parole_get_supported_audio_filter:
- *
- *
+ *
+ *
* Get a #GtkFileFilter according to the supported
* Parole audio mime types.
- *
+ *
* Returns: A #GtkFileFilter for supported audio formats.
- *
+ *
* Since: 0.2
*/
GtkFileFilter *parole_get_supported_audio_filter (void)
{
GtkFileFilter *filter;
guint i;
-
+
filter = gtk_file_filter_new ();
-
+
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]);
-
+
return filter;
}
/**
* parole_get_supported_video_filter:
- *
- *
+ *
+ *
* Get a #GtkFileFilter according to the supported
* Parole video mime types.
- *
+ *
* Returns: A #GtkFileFilter for supported video formats.
- *
+ *
* Since: 0.2
*/
GtkFileFilter *parole_get_supported_video_filter (void)
{
GtkFileFilter *filter;
guint i;
-
+
filter = gtk_file_filter_new ();
-
+
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]);
-
+
return filter;
}
/**
* parole_get_supported_media_filter:
- *
+ *
* Get a #GtkFileFilter according to the supported
* Parole media mime types, including audio and vide.
- *
+ *
* Returns: A #GtkFileFilter for supported media formats.
- *
+ *
* Since: 0.2
*/
GtkFileFilter *parole_get_supported_media_filter (void)
{
GtkFileFilter *filter;
guint i;
-
+
filter = gtk_file_filter_new ();
-
+
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]);
-
+
for ( i = 0; i < G_N_ELEMENTS (video_mime_types); i++)
gtk_file_filter_add_mime_type (filter, video_mime_types[i]);
-
+
return filter;
}
@@ -127,86 +127,86 @@ GtkRecentFilter *parole_get_supported_recent_media_filter (void)
{
GtkRecentFilter *filter;
guint i;
-
+
filter = gtk_recent_filter_new ();
-
+
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]);
-
+
for ( i = 0; i < G_N_ELEMENTS (video_mime_types); i++)
gtk_recent_filter_add_mime_type (filter, video_mime_types[i]);
-
+
return filter;
}
/**
* parole_get_supported_files_filter:
- *
- *
+ *
+ *
* Get a #GtkFileFilter according to the supported
* Parole files mime types, including audio/video/play list formats.
- *
+ *
* Returns: A #GtkFileFilter for supported files formats.
- *
+ *
* Since: 0.2
*/
GtkFileFilter *parole_get_supported_files_filter (void)
{
GtkFileFilter *filter;
guint i;
-
+
filter = parole_get_supported_media_filter ();
-
+
gtk_file_filter_set_name (filter, _("All supported files"));
-
+
for ( i = 0; i < G_N_ELEMENTS (playlist_file_extensions); i++)
gtk_file_filter_add_pattern (filter, playlist_file_extensions[i]);
-
+
return filter;
-
+
}
GtkRecentFilter *parole_get_supported_recent_files_filter (void)
{
GtkRecentFilter *filter;
guint i;
-
+
filter = parole_get_supported_recent_media_filter ();
-
+
gtk_recent_filter_set_name (filter, _("All supported files"));
-
+
for ( i = 0; i < G_N_ELEMENTS (playlist_file_extensions); i++)
gtk_recent_filter_add_pattern (filter, playlist_file_extensions[i]);
-
+
return filter;
-
+
}
/**
* parole_get_supported_playlist_filter:
- *
- *
+ *
+ *
* Get a #GtkFileFilter according to the supported
* Parole play-list mime types.
- *
+ *
* Returns: A #GtkFileFilter for supported playlist formats.
- *
+ *
* Since: 0.2
*/
GtkFileFilter *parole_get_supported_playlist_filter (void)
{
GtkFileFilter *filter;
guint i;
-
+
filter = gtk_file_filter_new ();
-
+
gtk_file_filter_set_name (filter, _("Playlist files"));
-
+
for ( i = 0; i < G_N_ELEMENTS (playlist_file_extensions); i++)
gtk_file_filter_add_pattern (filter, playlist_file_extensions[i]);
-
+
return filter;
}
@@ -214,11 +214,11 @@ GtkFileFilter *parole_get_supported_playlist_filter (void)
* parole_file_filter:
* @filter: a #GtkFileFilter.
* @file: a #ParoleFile
- *
+ *
* Tests whether a file should be displayed according to filter
- *
+ *
* Returns: TRUE if the file should be displayed.
- *
+ *
* Since: 0.2
*/
gboolean parole_file_filter (GtkFileFilter *filter, ParoleFile *file)
@@ -226,13 +226,13 @@ gboolean parole_file_filter (GtkFileFilter *filter, ParoleFile *file)
GtkFileFilterInfo filter_info;
gboolean ret;
-
+
filter_info.display_name = parole_file_get_display_name (file);
filter_info.mime_type = parole_file_get_content_type (file);
-
+
filter_info.contains = GTK_FILE_FILTER_DISPLAY_NAME | GTK_FILE_FILTER_MIME_TYPE;
-
+
ret = gtk_file_filter_filter (filter, &filter_info);
-
+
return ret;
}
diff --git a/src/misc/parole-pl-parser.c b/src/misc/parole-pl-parser.c
index 9a6c992..9f3fee6 100644
--- a/src/misc/parole-pl-parser.c
+++ b/src/misc/parole-pl-parser.c
@@ -22,12 +22,12 @@
/*
* 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>
- *
+ *
* xfmedia: Copyright (c) 2004-2005 Brian Tarricone, <bjt23 at cornell.edu>
- *
+ *
* Thanks :).
*/
@@ -56,7 +56,7 @@ typedef struct
gboolean started;
gchar *uri;
gchar *title;
-
+
} ParoleParserData;
gchar *g_substr (const gchar* string, gint start, gint end);
@@ -65,11 +65,11 @@ static gchar*
parole_filename_to_utf8(const gchar* filename)
{
gsize read_size, written;
-
+
gchar *utf8;
gchar *tmp = g_strdup(filename);
tmp = g_strconcat(tmp, "\0", NULL);
-
+
utf8 = g_filename_to_utf8(tmp, -1, &read_size, &written, NULL);
g_free(tmp);
return utf8;
@@ -81,7 +81,7 @@ parole_xspf_xml_start (GMarkupParseContext *context, const gchar *element_name,
gpointer user_data, GError **error)
{
ParoleParserData *data = user_data;
-
+
if ( !data->started )
{
if (!g_ascii_strcasecmp (element_name, "playlist") )
@@ -90,36 +90,36 @@ parole_xspf_xml_start (GMarkupParseContext *context, const gchar *element_name,
}
static void
-parole_xspf_xml_text (GMarkupParseContext *context, const gchar *text, gsize text_len,
+parole_xspf_xml_text (GMarkupParseContext *context, const gchar *text, gsize text_len,
gpointer user_data, GError **error)
{
ParoleParserData *data = user_data;
const gchar *element_name;
-
+
if (!data->started)
return;
-
+
element_name = g_markup_parse_context_get_element (context);
-
- if (!g_ascii_strcasecmp (element_name, "location") )
+
+ if (!g_ascii_strcasecmp (element_name, "location") )
{
- if (data->uri)
+ 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") )
+ else if (!g_ascii_strcasecmp (element_name, "title") )
{
- if (data->title)
+ if (data->title)
{
g_free (data->title);
data->title = NULL;
}
-
+
if (text_len > 0)
data->title = g_strdup (text);
}
@@ -131,24 +131,24 @@ parole_xspf_xml_end (GMarkupParseContext *context, const gchar *element_name,
{
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 (!g_ascii_strcasecmp (element_name, "track"))
{
- if (data->uri)
+ 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);
@@ -164,7 +164,7 @@ parole_asx_xml_start (GMarkupParseContext *context, const gchar *element_name,
{
guint i;
ParoleParserData *data = user_data;
-
+
if ( !data->started )
{
if (!g_ascii_strcasecmp (element_name, "asx") )
@@ -172,18 +172,18 @@ parole_asx_xml_start (GMarkupParseContext *context, const gchar *element_name,
else
return;
}
-
- if (!g_ascii_strcasecmp (element_name, "ref") )
+
+ if (!g_ascii_strcasecmp (element_name, "ref") )
{
- if (data->uri)
+ if (data->uri)
{
g_free (data->uri);
data->uri = NULL;
}
-
- for ( i = 0; attribute_names[i]; i++)
+
+ for ( i = 0; attribute_names[i]; i++)
{
- if ( !g_ascii_strcasecmp (attribute_names[i], "href"))
+ if ( !g_ascii_strcasecmp (attribute_names[i], "href"))
{
data->uri = g_strdup (attribute_values[i]);
break;
@@ -193,25 +193,25 @@ parole_asx_xml_start (GMarkupParseContext *context, const gchar *element_name,
}
static void
-parole_asx_xml_text (GMarkupParseContext *context, const gchar *text, gsize text_len,
+parole_asx_xml_text (GMarkupParseContext *context, const gchar *text, gsize text_len,
gpointer user_data, GError **error)
{
ParoleParserData *data = user_data;
const gchar *element_name;
-
+
if (!data->started)
return;
-
+
element_name = g_markup_parse_context_get_element (context);
-
- if (!g_ascii_strcasecmp (element_name, "title") )
+
+ if (!g_ascii_strcasecmp (element_name, "title") )
{
- if (data->title)
+ if (data->title)
{
g_free (data->title);
data->title = NULL;
}
-
+
if (text_len > 0)
data->title = g_strdup (text);
}
@@ -223,24 +223,24 @@ parole_asx_xml_end (GMarkupParseContext *context, const gchar *element_name,
{
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 (!g_ascii_strcasecmp (element_name, "entry"))
{
- if (data->uri)
+ 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);
@@ -265,28 +265,28 @@ parole_pl_parser_parse_asx (const gchar *filename)
NULL,
NULL
};
-
+
data.list = NULL;
data.title = data.uri = NULL;
-
+
file = g_file_new_for_path (filename);
-
+
if ( !g_file_load_contents (file, NULL, &contents, &size, NULL, NULL) )
goto out;
-
- if ( g_utf8_validate (contents, -1, NULL) == FALSE)
+
+ 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)
+ 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 )
@@ -303,9 +303,9 @@ parole_pl_parser_parse_asx (const gchar *filename)
g_error_free (error);
}
}
-
+
g_markup_parse_context_free (pctx);
-
+
out:
g_object_unref (file);
return data.list;
@@ -333,42 +333,42 @@ parole_pl_parser_parse_m3u (const gchar *filename)
guint num_lines;
const gchar *split_char;
guint i;
-
+
GRegex *regex;
GMatchInfo *match_info = NULL;
-
+
file = g_file_new_for_path (filename);
path = g_path_get_dirname(filename);
-
+
if ( !g_file_load_contents (file, NULL, &contents, &size, NULL, NULL) )
goto out;
-
- if ( g_utf8_validate (contents, -1, NULL) == FALSE)
+
+ 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)
+ if (fixed != NULL)
{
g_free (contents);
contents = fixed;
}
}
-
- if ( strstr (contents,"\x0d") == NULL)
+
+ if ( strstr (contents,"\x0d") == NULL)
{
split_char = "\n";
- }
- else
+ }
+ else
{
split_char = "\x0d\n";
}
-
+
lines = g_strsplit (contents, split_char, 0);
g_free (contents);
-
+
/* Regular expression for stream protocols, such as http:// smb:// */
regex = g_regex_new ("^(?!/)[a-zA-Z_0-9]+://", 0, 0, NULL);
-
+
num_lines = g_strv_length (lines);
num_lines--; /* Drop the terminating NULL */
@@ -376,12 +376,12 @@ parole_pl_parser_parse_m3u (const gchar *filename)
{
if ( lines[i][0] == '\0' || lines[i][0] == '#')
continue;
-
+
/* Absolute, local path */
if ( lines[i][0] == '/' ) {
pl_filename = g_strdup(lines[i]);
}
-
+
else {
/* Stream protocol */
if ( g_regex_match (regex, lines[i], 0, &match_info) ) {
@@ -393,18 +393,18 @@ parole_pl_parser_parse_m3u (const gchar *filename)
pl_filename = g_strjoin("/", path, lines[i], NULL);
}
}
-
+
list = g_slist_append (list, parole_file_new (pl_filename));
}
if (pl_filename)
g_free(pl_filename);
g_strfreev (lines);
-
+
g_match_info_free (match_info);
g_regex_unref (regex);
out:
-
+
g_object_unref (file);
return list;
}
@@ -421,32 +421,32 @@ parole_pl_parser_parse_pls (const gchar *filename)
rcfile = xfce_rc_simple_open (filename, TRUE);
- if ( xfce_rc_has_group (rcfile, "playlist") )
+ if ( xfce_rc_has_group (rcfile, "playlist") )
{
xfce_rc_set_group (rcfile, "playlist");
-
+
nentries = xfce_rc_read_int_entry (rcfile, "NumberOfEntries", 0);
- for (i = 1; i <= nentries; i++)
+ 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);
-
+
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);
}
}
-
+
xfce_rc_close (rcfile);
-
+
return list;
}
@@ -466,28 +466,28 @@ parole_pl_parser_parse_xspf (const gchar *filename)
NULL,
NULL
};
-
+
data.list = NULL;
data.title = data.uri = NULL;
-
+
file = g_file_new_for_path (filename);
-
+
if ( !g_file_load_contents (file, NULL, &contents, &size, NULL, NULL) )
goto out;
-
- if ( g_utf8_validate (contents, -1, NULL) == FALSE)
+
+ 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)
+ 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 )
@@ -504,9 +504,9 @@ parole_pl_parser_parse_xspf (const gchar *filename)
g_error_free (error);
}
}
-
+
g_markup_parse_context_free (pctx);
-
+
out:
g_object_unref (file);
return data.list;
@@ -516,7 +516,7 @@ static GSList *
parole_pl_parser_parse (ParolePlFormat format, const gchar *filename)
{
GSList *list = NULL;
-
+
switch (format)
{
case PAROLE_PL_FORMAT_M3U:
@@ -543,34 +543,34 @@ parole_pl_parser_save_m3u (FILE *f, GSList *files)
{
guint len;
guint i;
-
+
gchar *display_name = NULL;
gchar *file_name = NULL;
-
+
fputs ("#EXTM3U\n\n", f);
-
+
len = g_slist_length (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);
}
}
-
+
if (display_name)
g_free(display_name);
-
+
if (file_name)
g_free(file_name);
-
+
return TRUE;
}
@@ -580,11 +580,11 @@ parole_pl_parser_save_pls (FILE *f, GSList *files)
guint len;
guint i;
gchar key[128];
-
+
len = g_slist_length (files);
-
+
fprintf (f, "[playlist]\nNumberOfEntries=%d\n", len);
-
+
for ( i = 1; i <= len; i++)
{
ParoleFile *file;
@@ -594,7 +594,7 @@ parole_pl_parser_save_pls (FILE *f, GSList *files)
g_snprintf (key, 128, "Title%d", i);
fprintf (f, "%s=%s\n\n", key, parole_file_get_display_name (file));
}
-
+
return TRUE;
}
@@ -603,22 +603,22 @@ parole_pl_parser_save_asx (FILE *f, GSList *files)
{
guint len;
guint i;
-
+
len = g_slist_length (files);
fputs ("<ASX VERSION=\"3.0\">\n", f);
-
+
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",
+ 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);
-
+
return TRUE;
}
@@ -627,37 +627,37 @@ parole_pl_parser_save_xspf (FILE *f, GSList *files)
{
guint len;
guint i;
-
+
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);
-
+
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",
+ 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);
-
+
return TRUE;
}
/**
* parole_pl_parser_guess_format_from_extension:
* @filename: a filename.
- *
+ *
* Guess a playlist format from the filename extension.
- *
- * Returns: PAROLE_PL_FORMAT_UNKNOWN if unable to get the playlist format, and a valid
+ *
+ * Returns: PAROLE_PL_FORMAT_UNKNOWN if unable to get the playlist format, and a valid
* playlist format otherwise.
- *
+ *
* Since: 0.2
*/
ParolePlFormat
@@ -665,31 +665,31 @@ 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;
-
+
if ( g_str_has_suffix (filename, ".pls") || g_str_has_suffix (filename, ".PLS") )
return PAROLE_PL_FORMAT_PLS;
-
+
if ( g_str_has_suffix (filename, ".xspf") || g_str_has_suffix (filename, ".XSPF") )
return PAROLE_PL_FORMAT_XSPF;
-
+
if ( g_str_has_suffix (filename, ".asx") || g_str_has_suffix (filename, ".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_UNKNOWN;
}
/**
* parole_pl_parser_guess_format_from_data:
* @filename: a filename.
- *
+ *
* Guess a playlist format from its data.
- *
- * Returns: PAROLE_PL_FORMAT_UNKNOWN if unable to get the playlist format, and a valid
+ *
+ * Returns: PAROLE_PL_FORMAT_UNKNOWN if unable to get the playlist format, and a valid
* playlist format otherwise.
- *
+ *
* Since: 0.2
*/
ParolePlFormat
@@ -698,9 +698,9 @@ parole_pl_parser_guess_format_from_data (const gchar *filename)
GFile *file;
gchar *contents = NULL;
gsize size;
-
+
ParolePlFormat format = PAROLE_PL_FORMAT_UNKNOWN;
-
+
file = g_file_new_for_path (filename);
if ( !g_file_load_contents (file, NULL, &contents, &size, NULL, NULL ) )
@@ -715,7 +715,7 @@ parole_pl_parser_guess_format_from_data (const gchar *filename)
format = PAROLE_PL_FORMAT_XSPF;
else if ( strstr (contents, "NumberOfEntries") )
format = PAROLE_PL_FORMAT_PLS;
- else
+ else
/* try to load the file as M3U*/
format = PAROLE_PL_FORMAT_M3U;
@@ -730,12 +730,12 @@ out:
* @files: a #GSList list of #ParoleFile files.
* @filename: a filename to save.
* @format: a #ParolePlFormat format of the playlist.
- *
+ *
* Saves a #GSList containing a list of #ParoleFile files to filename.
- *
- *
+ *
+ *
* Returns: TRUE if the playlist was saved, FALSE otherwise.
- *
+ *
* Since: 0.2
**/
gboolean parole_pl_parser_save_from_files (GSList *files, const gchar *filename, ParolePlFormat format)
@@ -746,7 +746,7 @@ gboolean parole_pl_parser_save_from_files (GSList *files, const gchar *filename,
PAROLE_DEBUG_ENUM_FULL (format, PAROLE_ENUM_TYPE_PL_FORMAT, "Saving playlist %s ", filename);
f = fopen (filename, "w");
-
+
switch (format)
{
case PAROLE_PL_FORMAT_M3U:
@@ -764,29 +764,29 @@ gboolean parole_pl_parser_save_from_files (GSList *files, const gchar *filename,
default:
break;
}
-
+
fclose (f);
-
+
return ret_val;
}
/**
* parole_pl_parser_parse_from_file_by_extension:
* @filename: a filename.
- *
- *
- * Returns: a #GSList containts a list of #ParoleFile parsed from the playlist,
+ *
+ *
+ * Returns: a #GSList containts a list of #ParoleFile parsed from the playlist,
* or NULL if no files were parsed.
- *
+ *
* Since: 0.2
*/
GSList *parole_pl_parser_parse_from_file_by_extension (const gchar *filename)
{
ParolePlFormat format = PAROLE_PL_FORMAT_UNKNOWN;
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;
@@ -794,7 +794,7 @@ GSList *parole_pl_parser_parse_from_file_by_extension (const gchar *filename)
PAROLE_DEBUG_ENUM_FULL (format, PAROLE_ENUM_TYPE_PL_FORMAT, "playlist %s ", filename);
list = parole_pl_parser_parse (format, filename);
-
+
out:
return list;
}
@@ -802,24 +802,24 @@ out:
/**
* parole_pl_parser_parse_all_from_file:
* @filename: a filename
- *
+ *
* This function tries to parse a playlist without guessing the playlist format.
- *
- *
- * Returns: a #GSList containts a list of #ParoleFile parsed from the playlist,
+ *
+ *
+ * Returns: a #GSList containts a list of #ParoleFile parsed from the playlist,
* or NULL if no files were parsed.
- *
+ *
* Since: 0.2
*/
GSList *parole_pl_parser_parse_all_from_file (const gchar *filename)
{
GSList *list = NULL;
-
+
list = parole_pl_parser_parse_asx (filename);
list = g_slist_concat (list, parole_pl_parser_parse_m3u (filename));
list = g_slist_concat (list, parole_pl_parser_parse_pls (filename));
list = g_slist_concat (list, parole_pl_parser_parse_xspf (filename));
-
+
return list;
}
@@ -827,11 +827,11 @@ GSList *parole_pl_parser_parse_all_from_file (const gchar *filename)
* parole_pl_parser_can_parse_data:
* @data: data.
* @len: length of data.
- *
+ *
* Get if the Parole parser can parse from the passed data.
- *
+ *
* Returns: TRUE if it can parse from the data, FALSE otherwise.
- *
+ *
* Since: 0.2
*/
gboolean parole_pl_parser_can_parse_data (const guchar *data, gint len)
@@ -841,20 +841,20 @@ gboolean parole_pl_parser_can_parse_data (const guchar *data, gint len)
gboolean result = FALSE;
mime_type = g_content_type_guess (NULL, data, len, &result_uncertain);
-
+
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);
}
-
+
return result;
}
diff --git a/src/misc/parole-pl-parser.h b/src/misc/parole-pl-parser.h
index 3ea18c2..ca65e37 100644
--- a/src/misc/parole-pl-parser.h
+++ b/src/misc/parole-pl-parser.h
@@ -38,7 +38,7 @@ typedef enum
PAROLE_PL_FORMAT_PLS,
PAROLE_PL_FORMAT_ASX,
PAROLE_PL_FORMAT_XSPF
-
+
} ParolePlFormat;
ParolePlFormat parole_pl_parser_guess_format_from_extension (const gchar *filename);
diff --git a/src/misc/parole-provider-plugin.c b/src/misc/parole-provider-plugin.c
index ad99f2c..3736f7f 100644
--- a/src/misc/parole-provider-plugin.c
+++ b/src/misc/parole-provider-plugin.c
@@ -49,32 +49,32 @@ parole_provider_plugin_get_type (void)
type = g_type_register_static (G_TYPE_INTERFACE, "ParoleProviderPlugin", &info, 0);
}
-
+
return type;
}
/**
* parole_provider_plugin_get_is_configurable:
* @provider: a #ParoleProviderPlugin
- *
+ *
* Get if the plugin is configurable.
- *
+ *
* Returns: TRUE if the plugin is configurable, FALSE otherwise.
- *
- *
+ *
+ *
* Since: 0.2
**/
gboolean parole_provider_plugin_get_is_configurable (ParoleProviderPlugin *provider)
{
gboolean configurable = FALSE;
-
+
g_return_val_if_fail (PAROLE_IS_PROVIDER_PLUGIN (provider), FALSE);
if ( PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->get_is_configurable )
{
configurable = (*PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->get_is_configurable) (provider);
}
-
+
return configurable;
}
@@ -82,16 +82,16 @@ gboolean parole_provider_plugin_get_is_configurable (ParoleProviderPlugin *provi
* parole_provider_plugin_configure:
* @provider: a #ParoleProviderPlugin
* @parent: a #GtkWidget parent window
- *
+ *
* Open the plugin configuration dialog
- *
- *
+ *
+ *
* Since: 0.2
**/
void parole_provider_plugin_configure (ParoleProviderPlugin *provider, GtkWidget *parent)
{
g_return_if_fail (PAROLE_IS_PROVIDER_PLUGIN (provider));
-
+
if ( PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->configure )
{
(*PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->configure) (provider, parent);
@@ -102,10 +102,10 @@ void parole_provider_plugin_configure (ParoleProviderPlugin *provider, GtkWidget
* parole_provider_plugin_set_player:
* @provider: a #ParoleProviderPlugin
* @player: a #ParoleProviderPlayer
- *
+ *
* The player calls this method on the iface_init funtion implemented by the plugin
* to set the #ParoleProviderPlayer, don't take any reference of the Player.
- *
+ *
* Since: 0.2
**/
void parole_provider_plugin_set_player (ParoleProviderPlugin *provider, ParoleProviderPlayer *player)
diff --git a/src/misc/parole-provider-plugin.h b/src/misc/parole-provider-plugin.h
index d6c1b04..531fb84 100644
--- a/src/misc/parole-provider-plugin.h
+++ b/src/misc/parole-provider-plugin.h
@@ -31,7 +31,7 @@
#include <src/misc/parole-stream.h>
#include <src/misc/parole-provider-player.h>
-G_BEGIN_DECLS
+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))
@@ -41,31 +41,31 @@ G_BEGIN_DECLS
typedef struct _ParoleProviderPluginIface ParoleProviderPluginIface;
typedef struct _ParoleProviderPlugin ParoleProviderPlugin;
-struct _ParoleProviderPluginIface
+struct _ParoleProviderPluginIface
{
GTypeInterface __parent__;
-
+
/*< public >*/
gboolean (*get_is_configurable) (ParoleProviderPlugin *provider);
-
+
void (*configure) (ParoleProviderPlugin *provider,
GtkWidget *parent);
-
+
void (*set_player) (ParoleProviderPlugin *provider,
ParoleProviderPlayer *player);
};
GType parole_provider_plugin_get_type (void) G_GNUC_CONST;
-gboolean
+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);
-
+
G_END_DECLS
#endif /* __PAROLE_PLUGIN_IFACE_H__ */
diff --git a/src/misc/parole-stream.h b/src/misc/parole-stream.h
index e11a32c..e5b85cf 100644
--- a/src/misc/parole-stream.h
+++ b/src/misc/parole-stream.h
@@ -46,7 +46,7 @@ typedef enum
PAROLE_MEDIA_TYPE_DVD,
PAROLE_MEDIA_TYPE_DVB,
PAROLE_MEDIA_TYPE_REMOTE
-
+
} ParoleMediaType;
@@ -57,7 +57,7 @@ typedef enum
PAROLE_STATE_ABOUT_TO_FINISH,
PAROLE_STATE_PAUSED,
PAROLE_STATE_PLAYING
-
+
} ParoleState;
@@ -67,7 +67,7 @@ typedef struct _ParoleStreamClass ParoleStreamClass;
struct _ParoleStream
{
GObject parent;
-
+
};
struct _ParoleStreamClass
@@ -77,7 +77,7 @@ struct _ParoleStreamClass
GType parole_stream_get_type (void) G_GNUC_CONST;
-void parole_stream_set_image (GObject *object,
+void parole_stream_set_image (GObject *object,
GdkPixbuf *pixbuf);
GdkPixbuf *parole_stream_get_image (GObject *object);
diff --git a/src/misc/parole.h.in b/src/misc/parole.h.in
index dffdc49..d3a4fa3 100644
--- a/src/misc/parole.h.in
+++ b/src/misc/parole.h.in
@@ -46,9 +46,9 @@
* @major: major version number.
* @minor: minor version number.
* @micro: micor version number.
- *
+ *
* Checks the parole version.
- *
+ *
* Since: 0.2
*/
#define PAROLE_CHECK_VERSION(major,minor,micro) \
@@ -65,7 +65,7 @@
* @TN: The name of the new type, in Camel case.
* @t_n: The name of the new type, in lowercase, with words separated by '_'.
* @T_P: The #GType of the parent type.
- *
+ *
* Since: 0.2
*/
#define PAROLE_DEFINE_TYPE(TN, t_n, T_P) PAROLE_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
@@ -77,7 +77,7 @@
* @T_P: The #GType of the parent type.
* @_f_: #GTypeFlags to pass to g_type_module_register_type ().
* @_C_: Custom code that gets inserted in *_get_type() function.
- *
+ *
* Since: 0.2
*/
#define PAROLE_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_) _PAROLE_DEFINE_TYPE_EXTENDED_BEGIN(TN, t_n, T_P, _f_) {_C_;} _PAROLE_DEFINE_TYPE_EXTENDED_END()
@@ -88,7 +88,7 @@
* @t_n: The name of the new type, in lowercase, with words separated by '_'.
* @T_P: The #GType of the parent type.
* @_C_: Custom code that gets inserted in *_get_type() function.
- *
+ *
* Since: 0.2
*/
#define PAROLE_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _PAROLE_DEFINE_TYPE_EXTENDED_BEGIN(TN, t_n, T_P, 0) {_C_;} _PAROLE_DEFINE_TYPE_EXTENDED_END()
@@ -98,7 +98,7 @@
* @TN: The name of the new type, in Camel case.
* @t_n: The name of the new type, in lowercase, with words separated by '_'.
* @T_P: The #GType of the parent type.
- *
+ *
* Since: 0.2
*/
#define PAROLE_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P) PAROLE_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, {})
@@ -109,7 +109,7 @@
* @t_n: The name of the new type, in lowercase, with words separated by '_'.
* @T_P: The #GType of the parent type.
* @_C_: Custom code that gets inserted in *_get_type() function.
- *
+ *
* Since: 0.2
*/
#define PAROLE_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) PAROLE_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, _C_)
diff --git a/src/org.parole.media.player.xml b/src/org.parole.media.player.xml
index b8342e9..bf4c6fc 100644
--- a/src/org.parole.media.player.xml
+++ b/src/org.parole.media.player.xml
@@ -15,19 +15,19 @@
<method name="PrevTrack">
</method>
-
+
<method name="RaiseVolume">
</method>
-
+
<method name="LowerVolume">
</method>
-
+
<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 ac3f041..1d2153e 100644
--- a/src/parole-about.c
+++ b/src/parole-about.c
@@ -45,7 +45,7 @@
void parole_about (GtkWindow *parent)
{
/* List of authors */
- static const gchar *authors[] =
+ static const gchar *authors[] =
{
"Ali Abdallah <aliov at xfce.org>",
"Sean Davis <bluesabre at xfce.org>",
@@ -59,12 +59,12 @@ void parole_about (GtkWindow *parent)
"Ali Abdallah <aliov at xfce.org>",
NULL,
};
-
+
/* Copyright information */
- static const gchar *copyrights =
+ static const gchar *copyrights =
"Copyright \302\251 2009-2011 Ali Abdallah\n"
"Copyright \302\251 2012-2014 Sean Davis, Simon Steinbeiss";
-
+
gtk_show_about_dialog (parent,
"authors", authors,
"comments", _("Parole Media Player"),
diff --git a/src/parole-builder.c b/src/parole-builder.c
index ebfdac3..1ebfd66 100644
--- a/src/parole-builder.c
+++ b/src/parole-builder.c
@@ -36,14 +36,14 @@
/**
* parole_builder_get_main_interface:
- *
+ *
* Build Parole's UI from the interface-file.
**/
GtkBuilder *
parole_builder_get_main_interface (void)
{
static gpointer parole_builder_object = NULL;
-
+
if ( G_LIKELY (parole_builder_object != NULL) )
{
g_object_ref (parole_builder_object);
@@ -53,7 +53,7 @@ parole_builder_get_main_interface (void)
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);
}
@@ -69,19 +69,19 @@ parole_builder_new_from_string (const gchar *ui, gsize length)
{
GError *error = NULL;
GtkBuilder *builder;
-
+
builder = gtk_builder_new ();
/* Set the locale before loading the GtkBuilder interface definition. */
xfce_textdomain (GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
-
+
gtk_builder_add_from_string (builder, ui, length, &error);
-
+
if ( error )
{
g_critical ("%s", error->message);
g_error_free (error);
}
-
+
return builder;
}
diff --git a/src/parole-button.c b/src/parole-button.c
index a5fbb0e..0d73155 100644
--- a/src/parole-button.c
+++ b/src/parole-button.c
@@ -24,7 +24,7 @@
/*
* Based on code from gpm-button (gnome power manager)
* Copyright (C) 2006-2007 Richard Hughes <richard at hughsie.com>
- *
+ *
*/
#ifdef HAVE_CONFIG_H
@@ -66,7 +66,7 @@ struct ParoleButtonPrivate
{
GdkScreen *screen;
GdkWindow *window;
-
+
};
enum
@@ -91,15 +91,15 @@ static guint
parole_button_get_key (unsigned int keycode)
{
ParoleButtonKey key = PAROLE_KEY_UNKNOWN;
-
+
guint i;
-
+
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;
}
-
+
return key;
}
@@ -116,24 +116,24 @@ parole_button_filter_x_events (GdkXEvent *xevent, GdkEvent *ev, gpointer data)
{
ParoleButtonKey key;
ParoleButton *button;
-
+
XEvent *xev = (XEvent *) xevent;
-
+
if ( xev->type != KeyPress )
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;
}
-
+
return GDK_FILTER_CONTINUE;
}
@@ -143,35 +143,35 @@ parole_button_filter_x_events (GdkXEvent *xevent, GdkEvent *ev, gpointer data)
* @keycode : the #int representing the pressed key on the keyboard.
*
* Attempt to get the pressed key and modifier keys.
- *
+ *
* Return value: %TRUE on success, else %FALSE.
- **/
+ **/
static gboolean
parole_button_grab_keystring (ParoleButton *button, guint keycode)
{
GdkDisplay *display;
guint ret;
guint modmask = 0;
-
+
display = gdk_display_get_default();
-
+
gdk_error_trap_push ();
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;
}
-
+
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",
@@ -204,18 +204,18 @@ parole_button_xevent_key (ParoleButton *button, guint keysym , ParoleButtonKey k
g_warning ("could not map keysym %x to keycode\n", keysym);
return FALSE;
}
-
- if ( !parole_button_grab_keystring(button, keycode))
+
+ if ( !parole_button_grab_keystring(button, keycode))
{
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);
-
+
parole_key_map [key].key_code = keycode;
parole_key_map [key].key = key;
-
+
return TRUE;
}
@@ -230,13 +230,13 @@ parole_button_setup (ParoleButton *button)
{
button->priv->screen = gdk_screen_get_default ();
button->priv->window = gdk_screen_get_root_window (button->priv->screen);
-
+
parole_button_xevent_key (button, XF86XK_AudioPlay, PAROLE_KEY_AUDIO_PLAY);
parole_button_xevent_key (button, XF86XK_AudioStop, PAROLE_KEY_AUDIO_STOP);
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,
+ gdk_window_add_filter (button->priv->window,
parole_button_filter_x_events, button);
}
@@ -251,7 +251,7 @@ parole_button_class_init(ParoleButtonClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS(klass);
- signals [BUTTON_PRESSED] =
+ signals [BUTTON_PRESSED] =
g_signal_new ("button-pressed",
PAROLE_TYPE_BUTTON,
G_SIGNAL_RUN_LAST,
@@ -275,10 +275,10 @@ static void
parole_button_init (ParoleButton *button)
{
button->priv = PAROLE_BUTTON_GET_PRIVATE (button);
-
+
button->priv->screen = NULL;
button->priv->window = NULL;
-
+
parole_button_setup (button);
}
@@ -303,9 +303,9 @@ ParoleButton *
parole_button_new (void)
{
ParoleButton *button = NULL;
-
+
button = g_object_new (PAROLE_TYPE_BUTTON, NULL);
-
+
return button;
}
diff --git a/src/parole-button.h b/src/parole-button.h
index 770473a..0d45204 100644
--- a/src/parole-button.h
+++ b/src/parole-button.h
@@ -33,7 +33,7 @@ typedef enum
PAROLE_KEY_AUDIO_PREV,
PAROLE_KEY_AUDIO_NEXT,
PAROLE_KEY_NUMBERS,
-
+
} ParoleButtonKey;
#ifdef HAVE_XF86_KEYSYM
@@ -50,16 +50,16 @@ typedef struct
{
GObject parent;
ParoleButtonPrivate *priv;
-
+
} ParoleButton;
typedef struct
{
GObjectClass parent_class;
-
+
void (*button_pressed) (ParoleButton *button,
ParoleButtonKey type);
-
+
} ParoleButtonClass;
GType parole_button_get_type (void) G_GNUC_CONST;
diff --git a/src/parole-conf-dialog.h b/src/parole-conf-dialog.h
index ee1ec49..dae5193 100644
--- a/src/parole-conf-dialog.h
+++ b/src/parole-conf-dialog.h
@@ -38,13 +38,13 @@ typedef struct
{
GObject parent;
ParoleConfDialogPrivate *priv;
-
+
} ParoleConfDialog;
typedef struct
{
GObjectClass parent_class;
-
+
} ParoleConfDialogClass;
GType parole_conf_dialog_get_type (void) G_GNUC_CONST;
diff --git a/src/parole-conf.h b/src/parole-conf.h
index 2035bf3..7a95834 100644
--- a/src/parole-conf.h
+++ b/src/parole-conf.h
@@ -43,14 +43,14 @@ ParoleConf *parole_conf_new (void);
gboolean parole_conf_get_property_bool (ParoleConf *conf,
const gchar *name);
-
+
gchar **parole_conf_read_entry_list (ParoleConf *conf,
const gchar *name);
-
-void parole_conf_write_entry_list (ParoleConf *conf,
+
+void parole_conf_write_entry_list (ParoleConf *conf,
const gchar *name,
- gchar **value);
-
+ gchar **value);
+
void parole_conf_xfconf_init_failed (void);
G_END_DECLS;
diff --git a/src/parole-disc.c b/src/parole-disc.c
index d023331..7cf074f 100644
--- a/src/parole-disc.c
+++ b/src/parole-disc.c
@@ -55,9 +55,9 @@ struct ParoleDiscPrivate
{
GVolumeMonitor *monitor;
GPtrArray *array;
-
+
GtkWidget *disc_menu_item;
-
+
gboolean needs_update;
};
@@ -78,7 +78,7 @@ typedef struct
gchar *uri;
gchar *device;
ParoleDiscKind kind;
-
+
} MountData;
/**
@@ -91,15 +91,15 @@ static void
free_mount_data (gpointer data)
{
MountData *mount;
-
+
mount = (MountData *) data;
-
+
if ( mount->uri )
g_free (mount->uri);
-
+
if ( mount->device )
g_free (mount->device);
-
+
g_free (mount);
}
@@ -108,7 +108,7 @@ static void
parole_disc_set_label(ParoleDisc *disc, const gchar *label)
{
gchar *menu_label;
-
+
if ( g_strcmp0(label, _("Insert Disc")) != 0 )
{
menu_label = g_strdup_printf ("%s '%s'", _("Play Disc"), label);
@@ -119,7 +119,7 @@ parole_disc_set_label(ParoleDisc *disc, const gchar *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 );
g_free(menu_label);
}
@@ -141,7 +141,7 @@ static void
parole_disc_set_kind(ParoleDisc *disc, ParoleDiscKind kind)
{
gboolean enabled = TRUE;
-
+
switch (kind)
{
case PAROLE_DISC_CDDA:
@@ -171,9 +171,9 @@ static void
parole_disc_media_activate_cb (GtkWidget *widget, ParoleDisc *disc)
{
MountData *data;
-
+
data = g_object_get_data (G_OBJECT (widget), "mount-data");
-
+
g_signal_emit (G_OBJECT (disc), signals [DISC_SELECTED], 0, data->uri, data->device);
}
@@ -182,8 +182,8 @@ parole_disc_media_activate_cb (GtkWidget *widget, ParoleDisc *disc)
* @disc : the #ParoleDisc instance.
* @data : the #MountData of the inserted disc.
* @label : the name of the inserted disc.
- *
- * Show the respective disc-item in the "Media" menu, or "Insert Disc" if no
+ *
+ * Show the respective disc-item in the "Media" menu, or "Insert Disc" if no
* disc is detected.
**/
static void
@@ -195,10 +195,10 @@ parole_disc_show_menu_item (ParoleDisc *disc, MountData *data, const gchar *labe
if (parole_disc_get_enabled(disc))
{
data->mi = disc->priv->disc_menu_item;
-
+
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);
}
@@ -214,20 +214,20 @@ parole_disc_show_menu_item (ParoleDisc *disc, MountData *data, const gchar *labe
* Get data from the mount-point.
**/
static MountData *
-parole_disc_get_mount_data (ParoleDisc *disc,
- const gchar *uri,
+parole_disc_get_mount_data (ParoleDisc *disc,
+ const gchar *uri,
const gchar *device,
ParoleDiscKind kind)
{
MountData *data;
-
+
data = g_new0 (MountData, 1);
-
+
data->kind = kind;
data->uri = data->device = NULL;
data->uri = g_strdup (uri);
data->device = g_strdup (device);
-
+
return data;
}
@@ -247,30 +247,30 @@ parole_disc_add_mount_to_menu (ParoleDisc *disc, GMount *mount, const gchar *dev
guint i;
ParoleDiscKind kind = PAROLE_DISC_UNKNOWN;
gchar *uri = NULL;
-
+
file = g_mount_get_root (mount);
-
+
if ( g_file_has_uri_scheme (file, "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;
}
-
+
content_type = g_content_type_guess_for_tree (file);
/* 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;
@@ -296,7 +296,7 @@ parole_disc_add_mount_to_menu (ParoleDisc *disc, GMount *mount, const gchar *dev
break;
}
}
-
+
if ( content_type )
g_strfreev (content_type);
@@ -305,19 +305,19 @@ got_cdda:
{
MountData *data;
gchar *name;
-
+
name = g_mount_get_name (mount);
-
+
data = parole_disc_get_mount_data (disc, uri, device, kind);
parole_disc_show_menu_item (disc, data, name);
-
+
if ( uri )
g_free (uri);
-
+
g_ptr_array_add (disc->priv->array, data);
g_free (name);
}
-
+
g_object_unref (file);
}
@@ -335,20 +335,20 @@ parole_disc_check_cdrom (ParoleDisc *disc, GVolume *volume, const gchar *device)
#if defined(__linux__)
gint fd;
gint drive;
-
+
MountData *data;
-
+
gchar *name;
TRACE ("device : %s", device);
-
+
if ( (fd = open (device, O_RDONLY)) < 0 )
{
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 )
@@ -363,16 +363,16 @@ parole_disc_check_cdrom (ParoleDisc *disc, GVolume *volume, const gchar *device)
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);
}
}
}
}
-
+
close (fd);
out:
;
@@ -393,18 +393,18 @@ parole_disc_add_drive (ParoleDisc *disc, GDrive *drive, const gchar *device)
GList *list;
guint len;
guint i;
-
+
list = g_drive_get_volumes (drive);
len = g_list_length (list);
-
+
for ( i = 0; i < len; i++)
{
GVolume *volume;
GMount *mount;
-
+
volume = g_list_nth_data (list, i);
TRACE ("Volume name %s", g_volume_get_name (volume));
-
+
mount = g_volume_get_mount (volume);
if ( mount )
{
@@ -418,7 +418,7 @@ parole_disc_add_drive (ParoleDisc *disc, GDrive *drive, const gchar *device)
parole_disc_check_cdrom (disc, volume, device);
}
}
-
+
g_list_foreach (list, (GFunc) g_object_unref, NULL);
g_list_free (list);
}
@@ -426,7 +426,7 @@ parole_disc_add_drive (ParoleDisc *disc, GDrive *drive, const gchar *device)
/**
* parole_disc_get_drives:
* @disc : the #ParoleDisc instance.
- *
+ *
* Get the list of available drives and attempt to add each to the menu.
**/
static void
@@ -435,9 +435,9 @@ parole_disc_get_drives (ParoleDisc *disc)
GList *list;
guint len;
guint i;
-
+
list = g_volume_monitor_get_connected_drives (disc->priv->monitor);
-
+
len = g_list_length (list);
/*
@@ -445,14 +445,14 @@ parole_disc_get_drives (ParoleDisc *disc)
* in case a device is not yet ready.
*/
disc->priv->needs_update = FALSE;
-
+
for ( i = 0; i < len; i++)
{
GDrive *drive;
gchar *device = NULL;
-
+
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) )
{
@@ -462,7 +462,7 @@ parole_disc_get_drives (ParoleDisc *disc)
g_free (device);
}
}
-
+
g_list_foreach (list, (GFunc) g_object_unref, NULL);
g_list_free (list);
}
@@ -495,7 +495,7 @@ static void
parole_disc_monitor_changed_cb (GVolumeMonitor *monitor, gpointer *device, ParoleDisc *disc)
{
parole_disc_set_kind(disc, PAROLE_DISC_UNKNOWN);
-
+
disc->priv->needs_update = TRUE;
}
@@ -509,18 +509,18 @@ static void
parole_disc_class_init (ParoleDiscClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- signals[DISC_SELECTED] =
+
+ 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_NONE, 2,
G_TYPE_STRING, G_TYPE_STRING);
- signals[LABEL_CHANGED] =
+ signals[LABEL_CHANGED] =
g_signal_new ("label-changed",
PAROLE_TYPE_DISC,
G_SIGNAL_RUN_LAST,
@@ -528,7 +528,7 @@ parole_disc_class_init (ParoleDiscClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
-
+
object_class->finalize = parole_disc_finalize;
g_type_class_add_private (klass, sizeof (ParoleDiscPrivate));
@@ -537,47 +537,47 @@ parole_disc_class_init (ParoleDiscClass *klass)
/**
* parole_disc_init:
* @disc : the #ParoleDisc to initialize.
- *
+ *
* Initialize the disc monitor.
**/
static void
parole_disc_init (ParoleDisc *disc)
{
GtkBuilder *builder;
-
+
disc->priv = PAROLE_DISC_GET_PRIVATE (disc);
-
+
builder = parole_builder_get_main_interface ();
-
+
disc->priv->array = g_ptr_array_new ();
disc->priv->needs_update = TRUE;
-
+
disc->priv->monitor = g_volume_monitor_get ();
-
+
/* Connect the various disc signals */
g_signal_connect (G_OBJECT (disc->priv->monitor), "volume-added",
G_CALLBACK (parole_disc_monitor_changed_cb), disc);
-
+
g_signal_connect (G_OBJECT (disc->priv->monitor), "volume-removed",
G_CALLBACK (parole_disc_monitor_changed_cb), disc);
-
+
g_signal_connect (G_OBJECT (disc->priv->monitor), "mount-added",
G_CALLBACK (parole_disc_monitor_changed_cb), disc);
-
+
g_signal_connect (G_OBJECT (disc->priv->monitor), "mount-removed",
G_CALLBACK (parole_disc_monitor_changed_cb), disc);
-
+
g_signal_connect (G_OBJECT (disc->priv->monitor), "drive-disconnected",
G_CALLBACK (parole_disc_monitor_changed_cb), disc);
-
+
g_signal_connect (G_OBJECT (disc->priv->monitor), "drive-eject-button",
G_CALLBACK (parole_disc_monitor_changed_cb), 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"), "select",
G_CALLBACK (parole_disc_select_cb), disc);
-
+
g_object_unref (builder);
}
@@ -593,9 +593,9 @@ parole_disc_finalize (GObject *object)
ParoleDisc *disc;
disc = PAROLE_DISC (object);
-
+
g_object_unref (disc->priv->monitor);
-
+
g_ptr_array_foreach (disc->priv->array, (GFunc) free_mount_data, NULL);
g_ptr_array_free (disc->priv->array, TRUE);
diff --git a/src/parole-disc.h b/src/parole-disc.h
index 2cf20ed..f31d997 100644
--- a/src/parole-disc.h
+++ b/src/parole-disc.h
@@ -40,30 +40,30 @@ typedef enum
PAROLE_DISC_VCD,
PAROLE_DISC_SVCD,
PAROLE_DISC_DVD
-
+
} ParoleDiscKind;
typedef struct
{
GObject parent;
ParoleDiscPrivate *priv;
-
+
} ParoleDisc;
typedef struct
{
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);
-
+
} ParoleDiscClass;
GType parole_disc_get_type (void) G_GNUC_CONST;
diff --git a/src/parole-mediachooser.c b/src/parole-mediachooser.c
index 586c62d..7fe60a7 100644
--- a/src/parole-mediachooser.c
+++ b/src/parole-mediachooser.c
@@ -54,8 +54,8 @@ void parole_media_chooser_close_clicked (GtkWidget *widget,
void parole_media_chooser_destroy_cb (GtkWidget *widget,
ParoleMediaChooser *chooser);
-
-void media_chooser_folder_changed_cb (GtkWidget *widget,
+
+void media_chooser_folder_changed_cb (GtkWidget *widget,
ParoleMediaChooser *chooser);
void media_chooser_file_activate_cb (GtkFileChooser *filechooser,
@@ -64,20 +64,20 @@ void media_chooser_file_activate_cb (GtkFileChooser *filechooser,
struct ParoleMediaChooser
{
GObject parent;
-
+
ParoleConf *conf;
GtkWidget *window;
GtkWidget *spinner;
-
+
};
struct ParoleMediaChooserClass
{
GObjectClass parent_class;
-
+
void (*media_files_opened) (ParoleMediaChooser *chooser,
GSList *list);
-
+
void (*iso_opened) (ParoleMediaChooser *chooser,
gchar *filename);
};
@@ -98,7 +98,7 @@ media_chooser_folder_changed_cb (GtkWidget *widget, ParoleMediaChooser *chooser)
{
gchar *folder;
folder = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (widget));
-
+
if ( folder )
{
g_object_set (G_OBJECT (chooser->conf),
@@ -119,19 +119,19 @@ parole_media_chooser_add (ParoleMediaChooser *chooser, GtkWidget *file_chooser)
gchar *file;
guint i;
guint len;
-
+
files = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (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);
-
+
len = g_slist_length (files);
-
+
for ( i = 0; i < len; i++)
{
file = g_slist_nth_data (files, i);
@@ -142,20 +142,20 @@ parole_media_chooser_add (ParoleMediaChooser *chooser, GtkWidget *file_chooser)
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);
g_slist_free (media_files);
-
+
g_slist_foreach (files, (GFunc) g_free, NULL);
g_slist_free (files);
}
@@ -165,15 +165,15 @@ parole_media_chooser_add_idle (gpointer data)
{
ParoleMediaChooser *chooser;
GtkWidget *file_chooser;
-
+
chooser = PAROLE_MEDIA_CHOOSER (data);
-
+
file_chooser = GTK_WIDGET (g_object_get_data (G_OBJECT (chooser), "file-chooser"));
-
+
parole_media_chooser_add (chooser, file_chooser);
-
+
gtk_widget_destroy (chooser->window);
-
+
return FALSE;
}
@@ -183,7 +183,7 @@ parole_media_chooser_open (ParoleMediaChooser *chooser)
parole_window_busy_cursor (gtk_widget_get_window(GTK_WIDGET(chooser->window)));
gtk_widget_show( chooser->spinner );
-
+
g_idle_add ((GSourceFunc) parole_media_chooser_add_idle, chooser);
}
@@ -221,15 +221,15 @@ parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser)
const gchar *folder;
builder = parole_builder_new_from_string (mediachooser_ui, mediachooser_ui_length);
-
+
media_chooser->window = GTK_WIDGET (gtk_builder_get_object (builder, "chooser"));
media_chooser->spinner = GTK_WIDGET (gtk_builder_get_object (builder, "spinner"));
-
+
gtk_widget_hide( media_chooser->spinner );
-
+
file_chooser = GTK_WIDGET (gtk_builder_get_object (builder, "filechooserwidget"));
-
- /* Set filters for the filechooser */
+
+ /* Set filters for the filechooser */
filter = parole_get_supported_files_filter();
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 );
@@ -252,10 +252,10 @@ parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser)
g_object_get (G_OBJECT (media_chooser->conf),
"media-chooser-folder", &folder,
NULL);
-
+
if ( 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 */
@@ -264,14 +264,14 @@ parole_media_chooser_open_internal (ParoleMediaChooser *media_chooser)
"replace-playlist", &replace_playlist,
"play-opened-files", &play,
NULL);
-
+
recursive = GTK_WIDGET (gtk_builder_get_object (builder, "recursive"));
-
+
g_object_set_data (G_OBJECT (media_chooser), "file-chooser", file_chooser);
g_object_set_data (G_OBJECT (media_chooser), "recursive", recursive);
-
+
gtk_builder_connect_signals (builder, media_chooser);
-
+
g_object_unref (builder);
}
@@ -279,14 +279,14 @@ static void
parole_media_chooser_finalize (GObject *object)
{
ParoleMediaChooser *chooser;
-
+
chooser = PAROLE_MEDIA_CHOOSER (object);
-
+
g_object_unref (chooser->conf);
-
+
if ( chooser->window )
gtk_widget_destroy (chooser->window);
-
+
G_OBJECT_CLASS (parole_media_chooser_parent_class)->finalize (object);
}
@@ -295,24 +295,24 @@ parole_media_chooser_class_init (ParoleMediaChooserClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- signals[MEDIA_FILES_OPENED] =
+ 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_NONE, 1,
G_TYPE_POINTER);
-
- signals[ISO_OPENED] =
+
+ 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_NONE, 1,
G_TYPE_POINTER);
object_class->finalize = parole_media_chooser_finalize;
@@ -327,16 +327,16 @@ parole_media_chooser_init (ParoleMediaChooser *chooser)
ParoleMediaChooser *parole_media_chooser_open_local (GtkWidget *parent)
{
ParoleMediaChooser *chooser;
-
+
chooser = g_object_new (PAROLE_TYPE_MEDIA_CHOOSER, NULL);
-
+
parole_media_chooser_open_internal (chooser);
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_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 17f0b32..d029f86 100644
--- a/src/parole-mediachooser.h
+++ b/src/parole-mediachooser.h
@@ -40,7 +40,7 @@ typedef struct ParoleMediaChooserClass ParoleMediaChooserClass;
GType parole_media_chooser_get_type (void) G_GNUC_CONST;
ParoleMediaChooser *parole_media_chooser_open_local (GtkWidget *parent);
-
+
G_END_DECLS
#endif /* __PAROLE_MEDIA_CHOOSER_H */
diff --git a/src/parole-module.c b/src/parole-module.c
index fc325cb..21ed666 100644
--- a/src/parole-module.c
+++ b/src/parole-module.c
@@ -77,9 +77,9 @@ static gboolean
parole_module_load (GTypeModule *gtype_module)
{
ParoleProviderModule *module;
-
+
module = PAROLE_PROVIDER_MODULE (gtype_module);
-
+
module->library = g_module_open (gtype_module->name, G_MODULE_BIND_LOCAL);
if ( G_UNLIKELY (module->library == NULL) )
@@ -87,22 +87,22 @@ parole_module_load (GTypeModule *gtype_module)
g_critical ("Failed to load plugin : %s", g_module_error ());
return FALSE;
}
-
- if ( !g_module_symbol (module->library, "parole_plugin_initialize", (gpointer) &module->initialize) ||
+
+ 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;
}
-
+
TRACE ("Loading module %s", gtype_module->name);
-
+
module->provider_type = (*module->initialize) (module);
module->active = TRUE;
-
+
TRACE ("Finished loading module %s", gtype_module->name);
-
+
return TRUE;
}
@@ -110,27 +110,27 @@ static void
parole_module_unload (GTypeModule *gtype_module)
{
ParoleProviderModule *module;
-
+
module = PAROLE_PROVIDER_MODULE (gtype_module);
TRACE ("Unloading module %s", gtype_module->name);
(*module->shutdown) ();
-
+
g_module_close (module->library);
module->initialize = NULL;
module->shutdown = NULL;
module->library = NULL;
module->provider_type = G_TYPE_INVALID;
module->active = FALSE;
-
+
}
static void
parole_provider_module_class_init (ParoleProviderModuleClass *klass)
{
GTypeModuleClass *gtype_module_class;
-
+
gtype_module_class = G_TYPE_MODULE_CLASS (klass);
gtype_module_class->load = parole_module_load;
@@ -141,12 +141,12 @@ static gboolean
parole_provider_module_get_is_configurable (ParoleProviderPlugin *plugin)
{
ParoleProviderModule *module;
-
+
module = PAROLE_PROVIDER_MODULE (plugin);
-
+
if ( module->instance )
return parole_provider_plugin_get_is_configurable (module->instance);
-
+
return FALSE;
}
@@ -154,14 +154,14 @@ static void
parole_provider_module_configure (ParoleProviderPlugin *plugin, GtkWidget *parent)
{
ParoleProviderModule *module;
-
+
module = PAROLE_PROVIDER_MODULE (plugin);
-
+
if ( module->instance )
parole_provider_plugin_configure (module->instance, parent);
}
-static void
+static void
parole_provider_module_plugin_init (ParoleProviderPluginIface *iface)
{
iface->get_is_configurable = parole_provider_module_get_is_configurable;
@@ -179,7 +179,7 @@ parole_provider_module_init (ParoleProviderModule *module)
module->instance = NULL;
module->desktop_file = NULL;
module->provider_type = G_TYPE_INVALID;
-
+
module->player = NULL;
}
@@ -187,13 +187,13 @@ ParoleProviderModule *
parole_provider_module_new (const gchar *filename, const gchar *desktop_file, const gchar *library_name)
{
ParoleProviderModule *module = NULL;
-
+
module = g_object_new (PAROLE_TYPE_PROVIDER_MODULE, NULL);
-
+
g_type_module_set_name (G_TYPE_MODULE (module), filename);
-
+
module->desktop_file = g_strdup (desktop_file);
- g_object_set_data_full (G_OBJECT (module), "desktop-file",
+ g_object_set_data_full (G_OBJECT (module), "desktop-file",
module->desktop_file, (GDestroyNotify) g_free);
module->library_name = g_strdup (library_name);
@@ -212,9 +212,9 @@ parole_provider_module_new (const gchar *filename, const gchar *desktop_file, co
gboolean parole_provider_module_new_plugin (ParoleProviderModule *module)
{
TRACE ("start");
-
+
g_return_val_if_fail (PAROLE_IS_PROVIDER_MODULE (module), FALSE);
-
+
#ifdef debug
g_return_val_if_fail (module->active == TRUE, FALSE);
g_return_val_if_fail (module->instance == NULL, FALSE);
@@ -226,22 +226,22 @@ gboolean parole_provider_module_new_plugin (ParoleProviderModule *module)
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)
{
TRACE ("start");
-
+
g_return_if_fail (PAROLE_IS_PROVIDER_MODULE (module));
-
+
if ( module->instance )
{
g_object_unref (module->instance);
module->instance = NULL;
}
-
+
if ( module->player )
{
g_object_unref (module->player);
@@ -253,6 +253,6 @@ gboolean
parole_provider_module_get_is_active (ParoleProviderModule *module)
{
g_return_val_if_fail (PAROLE_IS_PROVIDER_MODULE (module), FALSE);
-
+
return module->active;
}
diff --git a/src/parole-module.h b/src/parole-module.h
index 3ca6697..a216226 100644
--- a/src/parole-module.h
+++ b/src/parole-module.h
@@ -43,15 +43,15 @@ typedef struct _ParoleProviderModule ParoleProviderModule;
struct _ParoleProviderModule
{
GTypeModule parent;
-
+
GModule *library;
gchar *library_name;
ParolePluginPlayer *player;
-
+
GType (*initialize) (ParoleProviderModule *module);
void (*shutdown) (void);
-
+
GType provider_type;
gboolean active;
gpointer instance;
diff --git a/src/parole-open-location.c b/src/parole-open-location.c
index 791091f..72f5653 100644
--- a/src/parole-open-location.c
+++ b/src/parole-open-location.c
@@ -41,14 +41,14 @@ static void parole_open_location_finalize (GObject *object);
struct ParoleOpenLocation
{
GObject parent;
-
+
GtkWidget *entry;
};
struct ParoleOpenLocationClass
{
GObjectClass parent_class;
-
+
void (*location_opened) (ParoleOpenLocation *self,
const gchar *address);
};
@@ -74,14 +74,14 @@ static void
parole_open_location_response_cb (GtkDialog *dialog, gint response_id, ParoleOpenLocation *self)
{
const gchar *location;
-
+
if ( response_id == 0 )
return;
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;
@@ -103,11 +103,11 @@ parole_open_location_get_completion_model (void)
GtkTreeIter iter;
gchar **lines = NULL;
guint i;
-
+
store = gtk_list_store_new (N_COLS, G_TYPE_STRING);
-
+
lines = parole_get_history ();
-
+
if ( lines )
{
for ( i = 0; lines[i]; i++)
@@ -120,7 +120,7 @@ parole_open_location_get_completion_model (void)
-1);
}
}
-
+
g_strfreev (lines);
}
return GTK_TREE_MODEL (store);
@@ -132,8 +132,8 @@ parole_open_location_class_init (ParoleOpenLocationClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = parole_open_location_finalize;
-
- signals[LOCATION_OPENED] =
+
+ signals[LOCATION_OPENED] =
g_signal_new("location-opened",
PAROLE_TYPE_OPEN_LOCATION,
G_SIGNAL_RUN_LAST,
@@ -169,37 +169,37 @@ ParoleOpenLocation *parole_open_location (GtkWidget *parent)
GtkWidget *dialog;
GtkTreeModel *model;
GtkBuilder *builder;
-
+
self = g_object_new (PAROLE_TYPE_OPEN_LOCATION, NULL);
-
+
builder = parole_builder_new_from_string (open_location_ui, open_location_ui_length);
-
+
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_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ON_PARENT);
-
+
self->entry = GTK_WIDGET (gtk_builder_get_object (builder, "entry"));
model = parole_open_location_get_completion_model ();
-
+
gtk_combo_box_set_model(GTK_COMBO_BOX(self->entry), model);
-
+
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);
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_signal_connect (dialog, "response",
G_CALLBACK (parole_open_location_response_cb), self);
-
+
gtk_widget_show_all (dialog);
g_object_unref (builder);
-
+
return self;
}
diff --git a/src/parole-plugin-player.h b/src/parole-plugin-player.h
index c90b65a..81d3f12 100644
--- a/src/parole-plugin-player.h
+++ b/src/parole-plugin-player.h
@@ -37,13 +37,13 @@ typedef struct
{
GObject parent;
ParolePluginPlayerPrivate *priv;
-
+
} ParolePluginPlayer;
typedef struct
{
GObjectClass parent_class;
-
+
} ParolePluginPlayerClass;
GType parole_plugin_player_get_type (void) G_GNUC_CONST;
diff --git a/src/parole-plugins-manager.h b/src/parole-plugins-manager.h
index 302b195..7d8b976 100644
--- a/src/parole-plugins-manager.h
+++ b/src/parole-plugins-manager.h
@@ -38,13 +38,13 @@ typedef struct
{
GObject parent;
ParolePluginsManagerPrivate *priv;
-
+
} ParolePluginsManager;
typedef struct
{
GObjectClass parent_class;
-
+
} ParolePluginsManagerClass;
GType parole_plugins_manager_get_type (void) G_GNUC_CONST;
@@ -55,8 +55,8 @@ ParolePluginsManager *parole_plugins_manager_get (void);
void parole_plugins_manager_load (ParolePluginsManager *manager);
-void parole_plugins_manager_pack (ParolePluginsManager *manager,
- GtkWidget *widget,
+void parole_plugins_manager_pack (ParolePluginsManager *manager,
+ GtkWidget *widget,
const gchar *title,
ParolePluginContainer container);
diff --git a/src/parole-subtitle-encoding.c b/src/parole-subtitle-encoding.c
index 9b0d97b..8398a13 100644
--- a/src/parole-subtitle-encoding.c
+++ b/src/parole-subtitle-encoding.c
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2001-2006 Bastien Nocera <hadess at hadess.net>
*
* encoding list copied from gnome-terminal/encoding.c
@@ -495,7 +495,7 @@ parole_subtitle_encoding_get_selected (GtkComboBox * combo)
}
if (index_i == -1)
return NULL;
-
+
return subtitle_encoding_get_charset (index_i);
}
@@ -510,10 +510,10 @@ parole_subtitle_encoding_set (GtkComboBox * combo, const char *encoding)
model = gtk_combo_box_get_model (combo);
index_i = subtitle_encoding_get_index (encoding);
-
+
if (gtk_tree_model_get_iter_first (model, &iter))
{
-
+
do {
if (!gtk_tree_model_iter_has_child (model, &iter))
continue;
diff --git a/src/parole-subtitle-encoding.h b/src/parole-subtitle-encoding.h
index dd430e9..79fb9c9 100644
--- a/src/parole-subtitle-encoding.h
+++ b/src/parole-subtitle-encoding.h
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (C) 2001-2006 Bastien Nocera <hadess at hadess.net>
*
* encoding list copied from gnome-terminal/encoding.c
diff --git a/src/parole-vis.c b/src/parole-vis.c
index e258312..8f57207 100644
--- a/src/parole-vis.c
+++ b/src/parole-vis.c
@@ -37,15 +37,15 @@ static gboolean
parole_vis_filter (GstPluginFeature *feature, gpointer data)
{
GstElementFactory *factory;
-
+
if ( !GST_IS_ELEMENT_FACTORY (feature) )
return FALSE;
-
+
factory = GST_ELEMENT_FACTORY (feature);
-
+
if ( !g_strrstr (gst_element_factory_get_klass (factory), "Visualization"))
return FALSE;
-
+
return TRUE;
}
@@ -59,9 +59,9 @@ GHashTable *parole_vis_get_plugins (void)
{
GList *plugins = NULL;
GHashTable *hash;
-
+
hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
-
+
#if GST_CHECK_VERSION(1, 0, 0)
plugins = gst_registry_feature_filter (gst_registry_get (),
#else
@@ -70,10 +70,10 @@ GHashTable *parole_vis_get_plugins (void)
parole_vis_filter,
FALSE,
NULL);
-
+
g_list_foreach (plugins, (GFunc) parole_vis_get_name, &hash);
-
+
gst_plugin_feature_list_free (plugins);
-
+
return hash;
}
diff --git a/src/plugins/mpris2/Makefile.am b/src/plugins/mpris2/Makefile.am
index 1e5e8d5..1de02d1 100644
--- a/src/plugins/mpris2/Makefile.am
+++ b/src/plugins/mpris2/Makefile.am
@@ -45,6 +45,6 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
EXTRA_DIST = \
$(desktop_in_files)
-
+
DISTCLEANFILES = \
$(desktop_DATA)
diff --git a/src/plugins/mpris2/mpris2-plugin.c b/src/plugins/mpris2/mpris2-plugin.c
index 245e3c2..8d0b7dc 100644
--- a/src/plugins/mpris2/mpris2-plugin.c
+++ b/src/plugins/mpris2/mpris2-plugin.c
@@ -29,7 +29,7 @@
#include "mpris2-provider.h"
G_MODULE_EXPORT GType parole_plugin_initialize (ParoleProviderPlugin *plugin);
-
+
G_MODULE_EXPORT void parole_plugin_shutdown (void);
G_MODULE_EXPORT GType
@@ -43,5 +43,5 @@ parole_plugin_initialize (ParoleProviderPlugin *plugin)
G_MODULE_EXPORT void
parole_plugin_shutdown (void)
{
-
+
}
diff --git a/src/plugins/mpris2/mpris2-provider.c b/src/plugins/mpris2/mpris2-provider.c
index d1ab6f3..13a2a2f 100644
--- a/src/plugins/mpris2/mpris2-provider.c
+++ b/src/plugins/mpris2/mpris2-provider.c
@@ -60,10 +60,10 @@ struct _Mpris2Provider
ParoleState state;
};
-PAROLE_DEFINE_TYPE_WITH_CODE (Mpris2Provider,
- mpris2_provider,
+PAROLE_DEFINE_TYPE_WITH_CODE (Mpris2Provider,
+ mpris2_provider,
G_TYPE_OBJECT,
- PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
+ PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
mpris2_provider_iface_init));
static const gchar mpris2xml[] =
@@ -349,9 +349,9 @@ static void mpris_Player_Seek (GDBusMethodInvocation *invocation, GVariant* para
curr_pos = parole_provider_player_get_stream_position (player);
seek = (curr_pos + param) / GST_MSECOND;
-
+
g_object_get (G_OBJECT (stream), "duration", &duration, NULL);
-
+
seek = CLAMP (seek, 0, duration);
parole_provider_player_seek (player, seek);
@@ -381,7 +381,7 @@ static void mpris_Player_SetPosition (GDBusMethodInvocation *invocation, GVarian
seek = param / GST_MSECOND;
g_object_get (G_OBJECT (stream), "duration", &duration, NULL);
-
+
seek = CLAMP (seek, 0, duration);
parole_provider_player_seek (player, seek);
@@ -524,7 +524,7 @@ static void handle_get_metadata (const ParoleStream *stream, GVariantBuilder *b)
"bitrate", &bitrate,
"has-video", &has_video,
NULL);
-
+
if (has_video)
{
g_free(image_uri);
@@ -585,10 +585,10 @@ static gdouble handle_get_volume (Mpris2Provider *provider)
{
gint volume_int = 0;
gdouble volume_double;
-
+
g_object_get (G_OBJECT (provider->conf), "volume", &volume_int, NULL);
volume_double = (double)volume_int / 100.0;
-
+
return volume_double;
}
@@ -985,7 +985,7 @@ on_name_lost (GDBusConnection *connection,
}
static gboolean
-on_window_state_event (GtkWidget *widget,
+on_window_state_event (GtkWidget *widget,
GdkEventWindowState *event,
Mpris2Provider *provider)
{
@@ -1008,7 +1008,7 @@ mpris2_provider_set_player (ParoleProviderPlugin *plugin, ParoleProviderPlayer *
Mpris2Provider *provider;
GtkWidget *window;
provider = MPRIS2_PROVIDER (plugin);
-
+
provider->player = player;
provider->saved_fullscreen = FALSE;
@@ -1026,7 +1026,7 @@ mpris2_provider_set_player (ParoleProviderPlugin *plugin, ParoleProviderPlayer *
g_signal_connect (player, "state_changed",
G_CALLBACK (state_changed_cb), plugin);
-
+
g_signal_connect (player, "seeked",
G_CALLBACK (seeked_cb), plugin);
@@ -1034,17 +1034,17 @@ mpris2_provider_set_player (ParoleProviderPlugin *plugin, ParoleProviderPlayer *
g_signal_connect (provider->conf, "notify::repeat",
G_CALLBACK (conf_changed_cb), plugin);
-
+
g_signal_connect (provider->conf, "notify::shuffle",
G_CALLBACK (conf_changed_cb), plugin);
g_signal_connect (provider->conf, "notify::volume",
G_CALLBACK (conf_changed_cb), plugin);
-
+
window = parole_provider_player_get_main_window(provider->player);
- g_signal_connect( G_OBJECT(window),
- "window-state-event",
- G_CALLBACK(on_window_state_event),
+ g_signal_connect( G_OBJECT(window),
+ "window-state-event",
+ G_CALLBACK(on_window_state_event),
provider );
}
@@ -1058,7 +1058,7 @@ mpris2_provider_iface_init (ParoleProviderPluginIface *iface)
static void mpris2_provider_class_init (Mpris2ProviderClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
+
gobject_class->finalize = mpris2_provider_finalize;
}
diff --git a/src/plugins/notify/Makefile.am b/src/plugins/notify/Makefile.am
index 1b9a679..f609958 100644
--- a/src/plugins/notify/Makefile.am
+++ b/src/plugins/notify/Makefile.am
@@ -46,6 +46,6 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
EXTRA_DIST = \
$(desktop_in_files)
-
+
DISTCLEANFILES = \
$(desktop_DATA)
diff --git a/src/plugins/notify/notify-plugin.c b/src/plugins/notify/notify-plugin.c
index d1d814e..15b4a4c 100644
--- a/src/plugins/notify/notify-plugin.c
+++ b/src/plugins/notify/notify-plugin.c
@@ -29,21 +29,21 @@
#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)
{
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
-
+
notify_provider_register_type (plugin);
-
+
return NOTIFY_TYPE_PROVIDER;
}
G_MODULE_EXPORT void
parole_plugin_shutdown (void)
{
-
+
}
diff --git a/src/plugins/sample/sample-plugin.c b/src/plugins/sample/sample-plugin.c
index ba8d0a4..5a3cd35 100644
--- a/src/plugins/sample/sample-plugin.c
+++ b/src/plugins/sample/sample-plugin.c
@@ -29,7 +29,7 @@
#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
@@ -43,5 +43,5 @@ parole_plugin_initialize (ParoleProviderPlugin *plugin)
G_MODULE_EXPORT void
parole_plugin_shutdown (void)
{
-
+
}
diff --git a/src/plugins/sample/sample-provider.c b/src/plugins/sample/sample-provider.c
index 6958cbf..7c2ca34 100644
--- a/src/plugins/sample/sample-provider.c
+++ b/src/plugins/sample/sample-provider.c
@@ -41,12 +41,12 @@ struct _SampleProvider
ParoleProviderPlayer *player;
};
-PAROLE_DEFINE_TYPE_WITH_CODE (SampleProvider,
- sample_provider,
+PAROLE_DEFINE_TYPE_WITH_CODE (SampleProvider,
+ sample_provider,
G_TYPE_OBJECT,
- PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
+ PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
sample_provider_iface_init));
-
+
static gboolean sample_provider_is_configurable (ParoleProviderPlugin *plugin)
{
return FALSE;
@@ -57,7 +57,7 @@ sample_provider_set_player (ParoleProviderPlugin *plugin, ParoleProviderPlayer *
{
SampleProvider *provider;
provider = SAMPLE_PROVIDER (plugin);
-
+
provider->player = player;
}
@@ -71,7 +71,7 @@ sample_provider_iface_init (ParoleProviderPluginIface *iface)
static void sample_provider_class_init (SampleProviderClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
+
gobject_class->finalize = sample_provider_finalize;
}
diff --git a/src/plugins/tray/Makefile.am b/src/plugins/tray/Makefile.am
index fd076c4..cdbb01f 100644
--- a/src/plugins/tray/Makefile.am
+++ b/src/plugins/tray/Makefile.am
@@ -46,6 +46,6 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
EXTRA_DIST = \
$(desktop_in_files)
-
+
DISTCLEANFILES = \
$(desktop_DATA)
diff --git a/src/plugins/tray/tray-plugin.c b/src/plugins/tray/tray-plugin.c
index b483415..bf41136 100644
--- a/src/plugins/tray/tray-plugin.c
+++ b/src/plugins/tray/tray-plugin.c
@@ -29,21 +29,21 @@
#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)
{
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
-
+
tray_provider_register_type (plugin);
-
+
return TRAY_TYPE_PROVIDER;
}
G_MODULE_EXPORT void
parole_plugin_shutdown (void)
{
-
+
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list