[gnac/devel] Code cleanup
- From: Benoît Dupasquier <bdupasqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnac/devel] Code cleanup
- Date: Mon, 11 Oct 2010 15:52:44 +0000 (UTC)
commit 875e3cc85512a178f3ba84a518797c2f6d7a1f5a
Author: Benoît Dupasquier <bdupasqu src gnome org>
Date: Mon Oct 11 16:52:37 2010 +0100
Code cleanup
src/gnac-main.c | 5 ++---
src/gnac-properties.c | 2 +-
src/gnac-ui.c | 2 +-
src/profiles/gnac-profiles-manager.c | 16 ++++++++--------
src/profiles/gnac-profiles-properties.c | 10 +++++-----
src/profiles/gnac-profiles-utils.c | 18 +++++++++---------
6 files changed, 26 insertions(+), 27 deletions(-)
---
diff --git a/src/gnac-main.c b/src/gnac-main.c
index c99467f..e1a33d0 100644
--- a/src/gnac-main.c
+++ b/src/gnac-main.c
@@ -63,7 +63,6 @@ static guint timeout_id;
static gboolean continue_files_action;
static gboolean quit_app = FALSE;
static GThread *file_action_thread = NULL;
-/* TODO add an option overwrite in gnac-prefs? */
static gboolean overwrite = FALSE;
static gboolean remember_overwrite = FALSE;
gint nb_files_total;
@@ -457,7 +456,7 @@ gnac_on_ui_destroy_cb(GtkWidget *widget,
if (!gnac_confirm_exit()) return TRUE;
libgnac_converter_stop(converter, &error);
if (error) {
- libgnac_debug("Error: %s\n", error->message);
+ libgnac_debug("Error: %s", error->message);
g_clear_error(&error);
}
break;
@@ -866,7 +865,7 @@ gnac_on_ui_convert_cb(GtkWidget *widget,
}
if (error) {
- libgnac_debug("Error: %s\n", error->message);
+ libgnac_debug("Error: %s", error->message);
g_clear_error(&error);
}
}
diff --git a/src/gnac-properties.c b/src/gnac-properties.c
index 8a41400..adc34c3 100644
--- a/src/gnac-properties.c
+++ b/src/gnac-properties.c
@@ -326,7 +326,7 @@ gnac_properties_set_entry(const gchar *entry_name,
default:
gtk_entry_set_text(GTK_ENTRY(entry),
g_strdup_value_contents(entry_value));
- libgnac_debug("%s has an unknown type: %s\n",
+ libgnac_debug("%s has an unknown type: %s",
entry_name, g_type_name(type));
return;
}
diff --git a/src/gnac-ui.c b/src/gnac-ui.c
index b7e7892..21618fc 100644
--- a/src/gnac-ui.c
+++ b/src/gnac-ui.c
@@ -835,7 +835,7 @@ gnac_ui_message_received_cb(UniqueApp *app,
break;
default:
- libgnac_debug("Received unknown libunique command: %d\n", command);
+ libgnac_debug("Received unknown libunique command: %d", command);
break;
}
diff --git a/src/profiles/gnac-profiles-manager.c b/src/profiles/gnac-profiles-manager.c
index a283d93..980f2d6 100644
--- a/src/profiles/gnac-profiles-manager.c
+++ b/src/profiles/gnac-profiles-manager.c
@@ -351,7 +351,7 @@ gnac_profiles_mgr_populate(void)
if (!g_file_query_exists(dir, NULL)) {
if (!g_file_make_directory_with_parents(dir, NULL, &error)) {
const gchar *msg = N_("Unable to create the profiles directory");
- libgnac_warning("%s %s: %s\n",
+ libgnac_warning("%s %s: %s",
msg,
_("You may not be able to save your profiles"),
error->message);
@@ -385,7 +385,7 @@ gnac_profiles_mgr_populate(void)
if (profile != NULL) {
gnac_profiles_mgr_insert(profile);
} else if (error) {
- libgnac_warning("%s\n",error->message);
+ libgnac_warning("%s", error->message);
g_clear_error(&error);
}
/* Cleanup */
@@ -398,7 +398,7 @@ gnac_profiles_mgr_populate(void)
} else {
const gchar *msg = N_("Unable to browse the profiles directory");
- libgnac_warning("%s: %s\n", msg, error->message);
+ libgnac_warning("%s: %s", msg, error->message);
gnac_profiles_mgr_display_status_message(NULL, msg);
g_error_free(error);
return;
@@ -428,7 +428,7 @@ gnac_profiles_mgr_import_default_profiles(void)
dir = g_file_new_for_path(PKGDATADIR "/profiles/default");
if (!g_file_query_exists(dir, NULL)) {
- libgnac_warning("%s: %s\n",
+ libgnac_warning("%s: %s",
_("Unable to find the default profiles directory"),
error->message);
g_error_free(error);
@@ -454,7 +454,7 @@ gnac_profiles_mgr_import_default_profiles(void)
if (profile != NULL) {
gnac_profiles_properties_save_profile(profile);
} else if (error) {
- libgnac_warning("%s\n",error->message);
+ libgnac_warning("%s", error->message);
g_clear_error(&error);
}
@@ -466,7 +466,7 @@ gnac_profiles_mgr_import_default_profiles(void)
g_object_unref(G_OBJECT(file_info));
}
} else {
- libgnac_warning("%s: %s\n",
+ libgnac_warning("%s: %s",
_("Unable to browse the default profiles directory"),
error->message);
g_error_free(error);
@@ -905,7 +905,7 @@ gnac_profiles_mgr_copy_and_load_files(gpointer data)
G_FILE_ATTRIBUTE_STANDARD_TYPE,
G_FILE_QUERY_INFO_NONE, NULL, &error);
if (error) {
- libgnac_warning("%s\n",error->message);
+ libgnac_warning("%s", error->message);
++profiles_error;
g_clear_error(&error);
} else {
@@ -959,7 +959,7 @@ gnac_profiles_mgr_copy_and_load_files(gpointer data)
©_data, &error);
if (error) {
- libgnac_warning("%s\n", error->message);
+ libgnac_warning("%s", error->message);
g_clear_error(&error);
++profiles_error;
} else {
diff --git a/src/profiles/gnac-profiles-properties.c b/src/profiles/gnac-profiles-properties.c
index a792e52..9e81c28 100644
--- a/src/profiles/gnac-profiles-properties.c
+++ b/src/profiles/gnac-profiles-properties.c
@@ -301,7 +301,7 @@ gnac_profiles_properties_init_modules(void)
while (temp != NULL) {
module = g_module_open(temp->data, G_MODULE_BIND_LAZY);
if (module == NULL) {
- libgnac_warning(_("Impossible to load format module %s\n"),
+ libgnac_warning(_("Impossible to load format module %s"),
(gchar*) temp->data);
} else {
FormatModule *format_module;
@@ -400,7 +400,7 @@ gnac_profiles_properties_init_modules(void)
} else {
libgnac_warning(
- "Impossible to find format module init function for module %s\n",
+ "Impossible to find format module init function for module %s",
(gchar*) temp->data);
}
}
@@ -424,7 +424,7 @@ gnac_profiles_properties_find_modules(void)
dir = g_file_new_for_path(PLUGINDIR);
if (!g_file_query_exists(dir, NULL)) {
- libgnac_warning(_("The format modules directory does not exist\n"));
+ libgnac_warning(_("The format modules directory does not exist"));
g_error_free(error);
}
@@ -462,8 +462,8 @@ gnac_profiles_properties_find_modules(void)
g_object_unref(file_info);
}
} else {
- libgnac_warning("%s:%s\n",
- _("Unable to browse to format directory\n"),
+ libgnac_warning("%s: %s",
+ _("Unable to browse to format directory"),
error->message);
g_error_free(error);
}
diff --git a/src/profiles/gnac-profiles-utils.c b/src/profiles/gnac-profiles-utils.c
index 7a28c18..8fce7c4 100755
--- a/src/profiles/gnac-profiles-utils.c
+++ b/src/profiles/gnac-profiles-utils.c
@@ -95,7 +95,7 @@ gnac_profiles_utils_all_in_one_for_combo(BasicFormatInfo *bfi,
gnac_profiles_utils_register_combo(widget, bfi->doc, xpath_query,
call_back, NULL);
} else {
- libgnac_warning("Combo %s not found\n", combo_name);
+ libgnac_warning("Combo %s not found", combo_name);
}
return widget;
@@ -115,7 +115,7 @@ gnac_profiles_utils_all_in_one_for_slider(BasicFormatInfo *bfi,
gnac_profiles_utils_register_slider(widget, bfi->doc, xpath_query,
call_back, NULL);
} else {
- libgnac_warning("Slider %s not found\n", slider_name);
+ libgnac_warning("Slider %s not found", slider_name);
}
return widget;
@@ -135,7 +135,7 @@ gnac_profiles_utils_all_in_one_for_check(BasicFormatInfo *bfi,
gnac_profiles_utils_register_check(widget, bfi->doc, xpath_query,
call_back, NULL);
} else {
- libgnac_warning("Check %s not found\n", check_name);
+ libgnac_warning("Check %s not found", check_name);
}
return widget;
@@ -174,7 +174,7 @@ gnac_profiles_utils_register_combo(GtkWidget *widget,
g_object_set_data(G_OBJECT(widget), "combo-values", combo);
g_signal_connect(G_OBJECT(widget), "changed", call_back, user_data);
} else {
- libgnac_warning("Impossible to register combo with xpath query %s\n",
+ libgnac_warning("Impossible to register combo with xpath query %s",
xpath_query);
g_free(combo);
}
@@ -206,7 +206,7 @@ gnac_profiles_utils_register_slider(GtkWidget *widget,
//g_signal_connect(G_OBJECT(widget), "leave-notify-event",
// call_back, user_data);
} else {
- libgnac_warning("Impossible to register slider with xpath query %s\n",
+ libgnac_warning("Impossible to register slider with xpath query %s",
xpath_query);
g_free(slider);
}
@@ -231,7 +231,7 @@ gnac_profiles_utils_register_check(GtkWidget *widget,
g_object_set_data(G_OBJECT(widget), "check-values", check);
g_signal_connect(G_OBJECT(widget), "toggled", call_back, user_data);
} else {
- libgnac_warning("Impossible to register check with xpath query %s\n",
+ libgnac_warning("Impossible to register check with xpath query %s",
xpath_query);
g_free(check);
}
@@ -253,7 +253,7 @@ gnac_profiles_utils_register_advanced_channels(GtkBuilder *builder,
gnac_profiles_utils_register_combo(widget, doc,
"//variable[ id='channels']/*", call_back, user_data);
} else {
- libgnac_warning("Impossible to find widget %s\n", "combo-channels");
+ libgnac_warning("Impossible to find widget %s", "combo-channels");
}
return widget;
@@ -273,7 +273,7 @@ gnac_profiles_utils_register_advanced_sample_rate(GtkBuilder *builder,
gnac_profiles_utils_register_combo(widget, doc,
"//variable[ id='sample-rate']/*", call_back, user_data);
} else {
- libgnac_warning("Impossible to find widget %s\n", "combo-sample-rate");
+ libgnac_warning("Impossible to find widget %s", "combo-sample-rate");
}
return widget;
@@ -701,7 +701,7 @@ gnac_profiles_utils_add_description_tooltip(BasicFormatInfo *bfi,
}
g_free(description);
} else {
- libgnac_warning("Impossible to find description in %s\n", xpath_query);
+ libgnac_warning("Impossible to find description in %s", xpath_query);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]