[sound-juicer] * configure.in: Update glib req to 2.18.
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Subject: [sound-juicer] * configure.in: Update glib req to 2.18.
- Date: Thu, 7 May 2009 11:28:55 -0400 (EDT)
commit 94eeb5573627ba7b2d49a230355c41ab3fb7aee7
Author: Christian Persch <chpe gnome org>
Date: Thu May 7 17:28:42 2009 +0200
* configure.in: Update glib req to 2.18.
* src/gconf-bridge.c: (error_handler):
* src/sj-extracting.c: (build_filename), (on_error_cb):
* src/sj-main.c: (sj_debug), (reread_cd): Safely printf strings.
Bug #581750.
---
ChangeLog | 8 ++++++++
configure.in | 2 +-
src/gconf-bridge.c | 7 ++-----
src/sj-extracting.c | 11 +++++------
src/sj-main.c | 16 +++++++---------
5 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 78c9228..8be8fe6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-07 Christian Persch <chpe gnome org>
+
+ * configure.in: Update glib req to 2.18.
+ * src/gconf-bridge.c: (error_handler):
+ * src/sj-extracting.c: (build_filename), (on_error_cb):
+ * src/sj-main.c: (sj_debug), (reread_cd): Safely printf strings.
+ Bug #581750.
+
2009-04-10 Ross Burton <ross linux intel com>
* configure.in:
diff --git a/configure.in b/configure.in
index ef501e9..3d0c745 100644
--- a/configure.in
+++ b/configure.in
@@ -36,7 +36,7 @@ AC_CHECK_FUNC(socket,,[AC_CHECK_LIB(socket,socket)])
GNOME_DOC_INIT
# Find GLib and GObject
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.14 gthread-2.0 gobject-2.0)
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.18 gthread-2.0 gobject-2.0)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
diff --git a/src/gconf-bridge.c b/src/gconf-bridge.c
index 2a52936..c17b0ad 100644
--- a/src/gconf-bridge.c
+++ b/src/gconf-bridge.c
@@ -1212,16 +1212,13 @@ error_handler (GConfClient *client,
g_warning ("GConf error:\n %s", error->message);
if (!shown_dialog) {
- char *message;
GtkWidget *dlg;
- message = g_strdup_printf (_("GConf error: %s"),
- error->message);
dlg = gtk_message_dialog_new (NULL, 0,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
- message);
- g_free (message);
+ _("GConf error: %s"),
+ error->message);
gtk_message_dialog_format_secondary_text
(GTK_MESSAGE_DIALOG (dlg),
diff --git a/src/sj-extracting.c b/src/sj-extracting.c
index 5a516f8..e44a589 100644
--- a/src/sj-extracting.c
+++ b/src/sj-extracting.c
@@ -164,7 +164,7 @@ build_filename (const TrackDetails *track, gboolean temp_filename, GError **erro
g_free (scheme);
#endif /* PATH_MAX */
if (max_realfile <= 0) {
- g_set_error (error, SJ_ERROR, SJ_ERROR_INTERNAL_ERROR, g_strdup (_("Name too long")));
+ g_set_error_literal (error, SJ_ERROR, SJ_ERROR_INTERNAL_ERROR, _("Name too long"));
return NULL;
}
realfile = filepath_parse_pattern (file_pattern, track);
@@ -683,15 +683,14 @@ static void
on_error_cb (SjExtractor *extractor, GError *error, gpointer data)
{
GtkWidget *dialog;
- char *text;
- /* Display a nice dialog */
- text = g_strdup_printf (_("Sound Juicer could not extract this CD.\nReason: %s"), error->message);
+ /* Display a nice dialog */
dialog = gtk_message_dialog_new (GTK_WINDOW (main_window), 0,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
- text);
- g_free (text);
+ "%s", _("Sound Juicer could not extract this CD."));
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+ "%s: %s", _("Reason"), error->message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
diff --git a/src/sj-main.c b/src/sj-main.c
index 787b1e5..e7a44ee 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -153,7 +153,7 @@ void sj_debug (SjDebugDomain domain, const gchar* format, ...)
va_start (args, format);
string = g_strdup_vprintf (format, args);
va_end (args);
- g_printerr (string);
+ g_printerr ("%s", string);
g_free (string);
}
}
@@ -921,18 +921,16 @@ static void reread_cd (gboolean ignore_no_media)
if (error && !(error->code == SJ_ERROR_CD_NO_MEDIA && ignore_no_media)) {
GtkWidget *dialog;
- char *text = g_strdup_printf ("<b>%s</b>\n\n%s\n%s: %s",
- _("Could not read the CD"),
- _("Sound Juicer could not read the track listing on this CD."),
- _("Reason"),
- error->message);
dialog = gtk_message_dialog_new (realized ? GTK_WINDOW (main_window) : NULL, 0,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
- text);
-
- g_free (text);
+ "%s", _("Could not read the CD"));
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+ "%s\n%s: %s",
+ _("Sound Juicer could not read the track listing on this CD."),
+ _("Reason"),
+ error->message);
gtk_label_set_use_markup (GTK_LABEL (GTK_MESSAGE_DIALOG (dialog)->label), TRUE);
gtk_dialog_run (GTK_DIALOG (dialog));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]