[gnac/devel] Code cleanup
- From: Benoît Dupasquier <bdupasqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnac/devel] Code cleanup
- Date: Sat, 6 Nov 2010 17:37:42 +0000 (UTC)
commit 7e7dcd3a50eb217b521b48e5fd65dd65456cff4a
Author: Benoît Dupasquier <bdupasqu src gnome org>
Date: Sat Nov 6 17:37:35 2010 +0000
Code cleanup
libgnac/libgnac-gst.c | 8 ++++----
man/gnac.1 | 8 ++++----
src/gnac-main.c | 22 ++++++++++++----------
src/gnac-options.c | 8 ++++----
4 files changed, 24 insertions(+), 22 deletions(-)
---
diff --git a/libgnac/libgnac-gst.c b/libgnac/libgnac-gst.c
index e761381..ef44ddd 100644
--- a/libgnac/libgnac-gst.c
+++ b/libgnac/libgnac-gst.c
@@ -40,7 +40,7 @@
void
libgnac_gst_run(LibgnacMediaItem *item,
- GError **error)
+ GError **error)
{
g_return_if_fail(!error || !*error);
@@ -50,7 +50,7 @@ libgnac_gst_run(LibgnacMediaItem *item,
void
libgnac_gst_pause(LibgnacMediaItem *item,
- GError **error)
+ GError **error)
{
g_return_if_fail(!error || !*error);
@@ -60,7 +60,7 @@ libgnac_gst_pause(LibgnacMediaItem *item,
void
libgnac_gst_stop(LibgnacMediaItem *item,
- GError **error)
+ GError **error)
{
g_return_if_fail(!error || !*error);
@@ -155,7 +155,7 @@ libgnac_gst_get_audio_bin(LibgnacMediaItem *item,
static GstElement *
libgnac_gst_get_video_bin(LibgnacMediaItem *item,
LibgnacProfile *profile,
- GError **error)
+ GError **error)
{
GstElement *bin;
GstElement *conv;
diff --git a/man/gnac.1 b/man/gnac.1
index 48798bb..b002c73 100644
--- a/man/gnac.1
+++ b/man/gnac.1
@@ -15,7 +15,7 @@
.\" along with GNAC; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin St, Fifth Floor,
.\" Boston, MA 02110-1301 USA
-.TH gnac 1 "2010\-10\-02" "GNOME"
+.TH gnac 1 "2010\-11\-06" "GNOME"
.SH NAME
Gnac \- Audio converter for GNOME
@@ -38,12 +38,12 @@ Use audio profile 'name'
.B \-l, \-\-list-profiles
List available profiles and exit
.TP
-.B \-\-debug
-Show debugging information
-.TP
.B \-\-verbose
Enable verbose output
.TP
+.B \-\-debug
+Show debugging information
+.TP
.B \-\-version
Show the version of the program and exit
.TP
diff --git a/src/gnac-main.c b/src/gnac-main.c
index 00c7429..57b588e 100644
--- a/src/gnac-main.c
+++ b/src/gnac-main.c
@@ -130,7 +130,7 @@ gnac_change_state(GnacState new_state)
default:
/* does nothing */
- break;
+ break;
}
}
@@ -160,7 +160,9 @@ gnac_add(GFile *file)
break;
case G_FILE_TYPE_DIRECTORY:
- enumerator = g_file_enumerate_children(file, "standard::type,standard::name",
+ enumerator = g_file_enumerate_children(file,
+ G_FILE_ATTRIBUTE_STANDARD_TYPE ","
+ G_FILE_ATTRIBUTE_STANDARD_NAME,
G_FILE_QUERY_INFO_NONE,
NULL, &error);
@@ -305,10 +307,10 @@ gnac_add_file(GFile *file)
return;
}
- filter_info.contains = GTK_FILE_FILTER_MIME_TYPE;
+ filter_info.contains = GTK_FILE_FILTER_MIME_TYPE;
filter_info.mime_type = g_file_info_get_content_type(info);
- if (filter_info.mime_type != NULL) {
+ if (filter_info.mime_type) {
/* Check whether we have a playlist */
if (gnac_playlist_is_mime_playlist(filter_info.mime_type)) {
gnac_playlist_parse(file, filter_info.mime_type);
@@ -320,6 +322,7 @@ gnac_add_file(GFile *file)
libgnac_converter_add(converter, file, &error);
}
}
+
g_free(uri);
g_object_unref(info);
}
@@ -522,17 +525,16 @@ static void
gnac_on_converter_file_removed_cb(LibgnacConverter *converter,
const gchar *uri)
{
- gnac_file_list_remove_row(uri);
- if (!gnac_file_list_count_rows() > 0) {
- gnac_change_state(GNAC_AUDIO_EMPTY_STATE);
- }
+ gnac_file_list_remove_row(uri);
+ if (!gnac_file_list_count_rows() > 0) {
+ gnac_change_state(GNAC_AUDIO_EMPTY_STATE);
+ }
}
static void
gnac_on_converter_file_started_cb(LibgnacConverter *converter,
- const gchar *input,
- const gchar *output)
+ const gchar *input)
{
gnac_file_list_remove_visual_error(input);
gnac_file_list_select_uri_and_follow(input);
diff --git a/src/gnac-options.c b/src/gnac-options.c
index 7386c83..88c6549 100644
--- a/src/gnac-options.c
+++ b/src/gnac-options.c
@@ -77,14 +77,14 @@ const GOptionEntry all_options[] = {
G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
gnac_options_list_profiles_cb,
N_("List available profiles and exit"), NULL },
- { "debug", '\0',
- G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
- gnac_options_debug_cb,
- N_("Show debugging information"), NULL },
{ "verbose", '\0',
G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
gnac_options_verbose_cb,
N_("Enable verbose output"), NULL },
+ { "debug", '\0',
+ G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
+ gnac_options_debug_cb,
+ N_("Show debugging information"), NULL },
{ "version", '\0',
G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
gnac_options_version_cb,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]