[Xfce4-commits] <xfburn:master> Fixing the remaining new compiler warnings
David Mohr
noreply at xfce.org
Tue Oct 20 09:50:02 CEST 2009
Updating branch refs/heads/master
to 3c289d525f8c02dfba2698a9343dcbc5ae85ffd9 (commit)
from c1bf3559cc137037a5f22cf2d0f32172e8768678 (commit)
commit 3c289d525f8c02dfba2698a9343dcbc5ae85ffd9
Author: David Mohr <squisher at xfce.org>
Date: Tue Oct 20 01:43:17 2009 -0600
Fixing the remaining new compiler warnings
xfburn/Makefile.am | 4 ++-
xfburn/xfburn-audio-composition.c | 7 ++--
xfburn/xfburn-burn-audio-cd-composition-dialog.c | 22 +++++++-------
xfburn/xfburn-burn-data-composition-base-dialog.c | 2 +-
xfburn/xfburn-data-composition.c | 7 ++--
xfburn/xfburn-device-box.c | 3 +-
xfburn/xfburn-device-list.c | 1 -
xfburn/xfburn-directory-browser.c | 2 +-
xfburn/xfburn-disc-usage.c | 1 -
xfburn/xfburn-fs-browser.c | 2 +-
xfburn/xfburn-hal-manager.c | 34 +++++++++++----------
xfburn/xfburn-main-window.c | 2 +-
xfburn/xfburn-main.c | 11 ++++--
xfburn/xfburn-preferences-dialog.c | 10 +++---
xfburn/xfburn-settings.c | 34 ++++++++++----------
xfburn/xfburn-transcoder-gst.c | 2 +-
xfburn/xfburn-utils.c | 10 +++---
17 files changed, 81 insertions(+), 73 deletions(-)
diff --git a/xfburn/Makefile.am b/xfburn/Makefile.am
index a96ba38..e606f56 100644
--- a/xfburn/Makefile.am
+++ b/xfburn/Makefile.am
@@ -126,7 +126,9 @@ xfburn-cclosure-marshal.h: xfburn-cclosure-marshal.list
glib-genmarshal --header --prefix=xfburn_cclosure_marshal $< > $@
xfburn-cclosure-marshal.c: xfburn-cclosure-marshal.list
- glib-genmarshal --body --prefix=xfburn_cclosure_marshal $< > $@
+ glib-genmarshal --body --prefix=xfburn_cclosure_marshal $< \
+ | awk 'BEGIN { print "#include \"$(patsubst %.c,%.h, $@)\"" } { print; }' > $@
+
BUILT_SOURCES = \
xfburn-cclosure-marshal.h \
diff --git a/xfburn/xfburn-audio-composition.c b/xfburn/xfburn-audio-composition.c
index 6a9d014..eb9c624 100644
--- a/xfburn/xfburn-audio-composition.c
+++ b/xfburn/xfburn-audio-composition.c
@@ -148,7 +148,7 @@ static void cb_cell_title_edited (GtkCellRenderer * renderer, gchar * path, gcha
static void cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guint y, GtkSelectionData * sd,
guint info, guint t, XfburnAudioComposition * composition);
static void cb_content_drag_data_get (GtkWidget * widget, GdkDragContext * dc, GtkSelectionData * data, guint info,
- guint time, XfburnAudioComposition * content);
+ guint timestamp, XfburnAudioComposition * content);
static void cb_adding_done (XfburnAddingProgress *progress, XfburnAudioComposition *dc);
/* thread entry points */
@@ -162,6 +162,7 @@ static gboolean thread_add_file_to_list_with_name (const gchar *name, XfburnAudi
GtkTreeIter * insertion, GtkTreeViewDropPosition position);
static gboolean thread_add_file_to_list (XfburnAudioComposition * dc, GtkTreeModel * model, const gchar * path,
GtkTreeIter * iter, GtkTreeIter * insertion, GtkTreeViewDropPosition position);
+static gboolean show_add_home_question_dialog (void);
typedef struct
{
@@ -1027,7 +1028,7 @@ action_info (GtkAction * action, XfburnAudioComposition * dc)
static void
cb_content_drag_data_get (GtkWidget * widget, GdkDragContext * dc,
- GtkSelectionData * data, guint info, guint time, XfburnAudioComposition * content)
+ GtkSelectionData * data, guint info, guint timestamp, XfburnAudioComposition * content)
{
if (info == AUDIO_COMPOSITION_DND_TARGET_INSIDE) {
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
@@ -1309,7 +1310,7 @@ thread_add_files_cli (ThreadAddFilesCLIParams *params)
}
static gboolean
-show_add_home_question_dialog ()
+show_add_home_question_dialog (void)
{
gboolean ok = TRUE;
diff --git a/xfburn/xfburn-burn-audio-cd-composition-dialog.c b/xfburn/xfburn-burn-audio-cd-composition-dialog.c
index e352d0d..197b0f8 100644
--- a/xfburn/xfburn-burn-audio-cd-composition-dialog.c
+++ b/xfburn/xfburn-burn-audio-cd-composition-dialog.c
@@ -367,7 +367,7 @@ thread_burn_composition (ThreadBurnCompositionParams * params)
int i,j;
GSList *track_list;
int *track_sectors;
- gboolean abort = FALSE;
+ gboolean abort_burn = FALSE;
XfburnTranscoder *trans;
GError *error = NULL;
@@ -390,7 +390,7 @@ thread_burn_composition (ThreadBurnCompositionParams * params)
if (tracks[i] == NULL) {
xfburn_progress_dialog_burning_failed (XFBURN_PROGRESS_DIALOG (dialog_progress), error->message);
g_error_free (error);
- abort = TRUE;
+ abort_burn = TRUE;
break;
}
srcs[i] = atrack->src;
@@ -400,15 +400,15 @@ thread_burn_composition (ThreadBurnCompositionParams * params)
track_list = g_slist_next (track_list);
}
- if (!abort) {
+ if (!abort_burn) {
if (!xfburn_transcoder_prepare (trans, &error)) {
xfburn_progress_dialog_burning_failed (XFBURN_PROGRESS_DIALOG (dialog_progress), error->message);
g_error_free (error);
- abort = TRUE;
+ abort_burn = TRUE;
}
}
- if (!abort) {
+ if (!abort_burn) {
if (!xfburn_device_grab (params->device, &drive_info)) {
xfburn_progress_dialog_burning_failed (XFBURN_PROGRESS_DIALOG (dialog_progress), _("Unable to grab the drive."));
} else {
@@ -441,6 +441,12 @@ cb_dialog_response (XfburnBurnAudioCdCompositionDialog * dialog, gint response_i
if (response_id == GTK_RESPONSE_OK) {
GtkWidget *dialog_progress;
+ ThreadBurnCompositionParams *params = NULL;
+ XfburnDevice *device;
+ gint speed;
+ XfburnWriteMode write_mode;
+ //struct burn_source * src_fifo = NULL;
+
/* If the name was the default, update the image volume id and volset id */
/*
if (priv->entry != NULL) {
@@ -456,12 +462,6 @@ cb_dialog_response (XfburnBurnAudioCdCompositionDialog * dialog, gint response_i
gtk_widget_show (dialog_progress);
- ThreadBurnCompositionParams *params = NULL;
- XfburnDevice *device;
- gint speed;
- XfburnWriteMode write_mode;
- //struct burn_source * src_fifo = NULL;
-
device = xfburn_device_box_get_selected_device (XFBURN_DEVICE_BOX (priv->device_box));
speed = xfburn_device_box_get_speed (XFBURN_DEVICE_BOX (priv->device_box));
/* cdrskin burns audio with SAO */
diff --git a/xfburn/xfburn-burn-data-composition-base-dialog.c b/xfburn/xfburn-burn-data-composition-base-dialog.c
index d6732c4..35d8a94 100644
--- a/xfburn/xfburn-burn-data-composition-base-dialog.c
+++ b/xfburn/xfburn-burn-data-composition-base-dialog.c
@@ -500,8 +500,8 @@ thread_write_iso (ThreadWriteIsoParams * params)
i++;
if (i >= 1000) {
- i = 0;
gdouble percent = 0;
+ i = 0;
percent = ((gdouble) written / (gdouble) size);
diff --git a/xfburn/xfburn-data-composition.c b/xfburn/xfburn-data-composition.c
index 54c1a97..031dca6 100644
--- a/xfburn/xfburn-data-composition.c
+++ b/xfburn/xfburn-data-composition.c
@@ -130,7 +130,7 @@ static void cb_cell_file_edited (GtkCellRenderer * renderer, gchar * path, gchar
static void cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guint y, GtkSelectionData * sd,
guint info, guint t, XfburnDataComposition * composition);
static void cb_content_drag_data_get (GtkWidget * widget, GdkDragContext * dc, GtkSelectionData * data, guint info,
- guint time, XfburnDataComposition * content);
+ guint timestamp, XfburnDataComposition * content);
static void cb_adding_done (XfburnAddingProgress *progress, XfburnDataComposition *dc);
/* thread entry points */
@@ -145,6 +145,7 @@ static gboolean thread_add_file_to_list_with_name (const gchar *name, XfburnData
static gboolean thread_add_file_to_list (XfburnDataComposition * dc, GtkTreeModel * model, const gchar * path,
GtkTreeIter * iter, GtkTreeIter * insertion, GtkTreeViewDropPosition position);
static IsoImage * generate_iso_image (XfburnDataComposition * dc);
+static gboolean show_add_home_question_dialog (void);
typedef struct
{
@@ -999,7 +1000,7 @@ action_clear (GtkAction * action, XfburnDataComposition * dc)
static void
cb_content_drag_data_get (GtkWidget * widget, GdkDragContext * dc,
- GtkSelectionData * data, guint info, guint time, XfburnDataComposition * content)
+ GtkSelectionData * data, guint info, guint timestamp, XfburnDataComposition * content)
{
if (info == DATA_COMPOSITION_DND_TARGET_INSIDE) {
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
@@ -1283,7 +1284,7 @@ thread_add_files_cli (ThreadAddFilesCLIParams *params)
}
static gboolean
-show_add_home_question_dialog ()
+show_add_home_question_dialog (void)
{
gboolean ok = TRUE;
diff --git a/xfburn/xfburn-device-box.c b/xfburn/xfburn-device-box.c
index ad209af..c751d4d 100644
--- a/xfburn/xfburn-device-box.c
+++ b/xfburn/xfburn-device-box.c
@@ -114,6 +114,7 @@ static void fill_combo_mode (XfburnDeviceBox *box, XfburnDevice *device);
static void cb_volume_change_start (XfburnDeviceList *devlist, gboolean device_changed, XfburnDeviceBox *box);
static void cb_volume_change_end (XfburnDeviceList *devlist, gboolean device_changed, XfburnDevice *device, XfburnDeviceBox *box);
+static void empty_speed_list_dialog (void);
/* globals */
static GtkVBoxClass *parent_class = NULL;
@@ -376,7 +377,7 @@ xfburn_device_box_set_property (GObject *object, guint prop_id, const GValue *va
/*************/
static void
-empty_speed_list_dialog ()
+empty_speed_list_dialog (void)
{
GtkDialog *dialog;
GtkWidget *label;
diff --git a/xfburn/xfburn-device-list.c b/xfburn/xfburn-device-list.c
index 6dcf3b1..2318e46 100644
--- a/xfburn/xfburn-device-list.c
+++ b/xfburn/xfburn-device-list.c
@@ -317,7 +317,6 @@ get_libburn_device_list (XfburnDeviceList *devlist)
XfburnDevice *device = xfburn_device_new ();
const gchar *name;
char addr[BURN_DRIVE_ADR_LEN];;
- gint ret = 0;
name = xfburn_device_set_name (device, drives[i].vendor, drives[i].product);
diff --git a/xfburn/xfburn-directory-browser.c b/xfburn/xfburn-directory-browser.c
index 0191cd3..f88a3f6 100644
--- a/xfburn/xfburn-directory-browser.c
+++ b/xfburn/xfburn-directory-browser.c
@@ -202,7 +202,7 @@ directory_tree_sortfunc (GtkTreeModel * model, GtkTreeIter * a, GtkTreeIter * b,
static void
cb_browser_drag_data_get (GtkWidget * widget, GdkDragContext * dc,
- GtkSelectionData * data, guint info, guint time, gpointer user_data)
+ GtkSelectionData * data, guint info, guint timestamp, gpointer user_data)
{
if (info == DATA_COMPOSITION_DND_TARGET_TEXT_PLAIN) {
gchar *full_paths = NULL;
diff --git a/xfburn/xfburn-disc-usage.c b/xfburn/xfburn-disc-usage.c
index 08b1c16..b94db7d 100644
--- a/xfburn/xfburn-disc-usage.c
+++ b/xfburn/xfburn-disc-usage.c
@@ -86,7 +86,6 @@ static guint signals[LAST_SIGNAL];
/*******************************/
/* XfburnDiscUsage class */
/*******************************/
-static guint signals[LAST_SIGNAL];
GType
xfburn_disc_usage_get_type (void)
diff --git a/xfburn/xfburn-fs-browser.c b/xfburn/xfburn-fs-browser.c
index 58d37b0..54bc734 100644
--- a/xfburn/xfburn-fs-browser.c
+++ b/xfburn/xfburn-fs-browser.c
@@ -222,7 +222,7 @@ cb_browser_row_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewC
static void
cb_browser_drag_data_get (GtkWidget * widget, GdkDragContext * dc,
- GtkSelectionData * data, guint info, guint time, XfburnFsBrowser *browser)
+ GtkSelectionData * data, guint info, guint timestamp, XfburnFsBrowser *browser)
{
if (info == DATA_COMPOSITION_DND_TARGET_TEXT_PLAIN) {
gchar *full_path = NULL;
diff --git a/xfburn/xfburn-hal-manager.c b/xfburn/xfburn-hal-manager.c
index 014b2c2..803ce11 100644
--- a/xfburn/xfburn-hal-manager.c
+++ b/xfburn/xfburn-hal-manager.c
@@ -47,6 +47,8 @@ static void xfburn_hal_manager_class_init (XfburnHalManagerClass * klass);
static void xfburn_hal_manager_init (XfburnHalManager * obj);
static void xfburn_hal_manager_finalize (GObject * object);
+static GObject * xfburn_hal_manager_new (void);
+
static void hal_finalize (LibHalContext *hal_context);
static void cb_device_added (LibHalContext *ctx, const char *udi);
static void cb_device_removed (LibHalContext *ctx, const char *udi);
@@ -70,7 +72,7 @@ typedef struct {
#endif
} XfburnHalManagerPrivate;
-static XfburnHalManager *halman = NULL;
+static XfburnHalManager *instance = NULL;
/*********************/
/* class declaration */
@@ -131,7 +133,7 @@ xfburn_hal_manager_init (XfburnHalManager * obj)
DBusConnection *dbus_connection;
priv->error = NULL;
- //if (halman != NULL)
+ //if (instance != NULL)
// g_error ("The HAL context was already there when trying to create a hal-manager!");
/* dbus & hal init code taken from exo */
@@ -212,7 +214,7 @@ xfburn_hal_manager_finalize (GObject * object)
hal_finalize (priv->hal_context);
G_OBJECT_CLASS (parent_class)->finalize (object);
- halman = NULL;
+ instance = NULL;
}
/* */
@@ -235,13 +237,13 @@ hal_finalize (LibHalContext *hal_context)
static void cb_device_added (LibHalContext *ctx, const char *udi)
{
DBG ("HAL: device added");
- g_signal_emit (halman, signals[VOLUME_CHANGED], 0);
+ g_signal_emit (instance, signals[VOLUME_CHANGED], 0);
}
static void cb_device_removed (LibHalContext *ctx, const char *udi)
{
DBG ("HAL: device removed");
- g_signal_emit (halman, signals[VOLUME_CHANGED], 0);
+ g_signal_emit (instance, signals[VOLUME_CHANGED], 0);
}
static void cb_prop_modified (LibHalContext *ctx, const char *udi,
@@ -251,14 +253,14 @@ static void cb_prop_modified (LibHalContext *ctx, const char *udi,
* way too many of these get triggered when a disc is
* inserted or removed!
DBG ("HAL: property modified");
- g_signal_emit (halman, signals[VOLUME_CHANGED], 0);
+ g_signal_emit (instance, signals[VOLUME_CHANGED], 0);
*/
}
-GObject *
+static GObject *
xfburn_hal_manager_new (void)
{
- if (G_UNLIKELY (halman != NULL))
+ if (G_UNLIKELY (instance != NULL))
g_error ("Trying to create a second instance of hal manager!");
return g_object_new (XFBURN_TYPE_HAL_MANAGER, NULL);
}
@@ -272,9 +274,9 @@ xfburn_hal_manager_create_global (void)
{
XfburnHalManagerPrivate *priv;
- halman = XFBURN_HAL_MANAGER (xfburn_hal_manager_new ());
+ instance = XFBURN_HAL_MANAGER (xfburn_hal_manager_new ());
- priv = XFBURN_HAL_MANAGER_GET_PRIVATE (halman);
+ priv = XFBURN_HAL_MANAGER_GET_PRIVATE (instance);
if (priv->error) {
gchar *error_msg, *ret;
@@ -291,25 +293,25 @@ xfburn_hal_manager_create_global (void)
XfburnHalManager *
xfburn_hal_manager_get_global (void)
{
- if (G_UNLIKELY (halman == NULL))
+ if (G_UNLIKELY (instance == NULL))
g_error ("There is no instance of a hal manager!");
- return halman;
+ return instance;
}
void
xfburn_hal_manager_shutdown (void)
{
- if (G_UNLIKELY (halman == NULL))
+ if (G_UNLIKELY (instance == NULL))
g_error ("There is no instance of a hal manager!");
- g_object_unref (halman);
- halman = NULL;
+ g_object_unref (instance);
+ instance = NULL;
}
void
xfburn_hal_manager_send_volume_changed (void)
{
//gdk_threads_enter ();
- g_signal_emit (halman, signals[VOLUME_CHANGED], 0);
+ g_signal_emit (instance, signals[VOLUME_CHANGED], 0);
//gdk_threads_leave ();
}
diff --git a/xfburn/xfburn-main-window.c b/xfburn/xfburn-main-window.c
index 76f6b00..bb6ba99 100644
--- a/xfburn/xfburn-main-window.c
+++ b/xfburn/xfburn-main-window.c
@@ -682,7 +682,7 @@ xfburn_main_window_new (void)
}
XfburnMainWindow *
-xfburn_main_window_get_instance ()
+xfburn_main_window_get_instance (void)
{
if (!instance)
g_warning ("No existing instance of XfburnMainWindow");
diff --git a/xfburn/xfburn-main.c b/xfburn/xfburn-main.c
index 068f18a..a3bd942 100644
--- a/xfburn/xfburn-main.c
+++ b/xfburn/xfburn-main.c
@@ -39,6 +39,7 @@
#include <gst/gst.h>
#endif
+#include "xfburn-main.h"
#include "xfburn-global.h"
#include "xfburn-device-list.h"
#include "xfburn-utils.h"
@@ -55,6 +56,8 @@
/* internal prototypes */
static gboolean parse_option (const gchar *option_name, const gchar *value,
gpointer data, GError **error);
+static void xfburn_main_enter_main_window (void);
+static void print_available_transcoders (void);
/* globals */
static int window_counter = 0;
@@ -118,8 +121,8 @@ xfburn_main_leave_window (void)
g_idle_add ((GSourceFunc) gtk_main_quit, NULL );
}
-void
-xfburn_main_enter_main_window ()
+static void
+xfburn_main_enter_main_window (void)
{
/* mark the window_counter as having a main window */
window_counter = -42;
@@ -169,8 +172,8 @@ static gboolean parse_option (const gchar *option_name, const gchar *value,
}
-void
-print_available_transcoders ()
+static void
+print_available_transcoders (void)
{
g_print ("Valid transcoders are:\n");
g_print ("\tbasic\tCan only burn uncompressed CD quality .wav files.\n");
diff --git a/xfburn/xfburn-preferences-dialog.c b/xfburn/xfburn-preferences-dialog.c
index 31e6322..6e9d025 100644
--- a/xfburn/xfburn-preferences-dialog.c
+++ b/xfburn/xfburn-preferences-dialog.c
@@ -136,7 +136,7 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj)
GtkTreeViewColumn *column_name;
GtkCellRenderer *cell_icon, *cell_name;
GtkWidget *button_close;
- gint index;
+ gint idx;
gtk_window_set_title (GTK_WINDOW (obj), _("Preferences"));
xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (obj), _("Tune how Xfburn behaves"));
@@ -179,7 +179,7 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj)
/* general tab */
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), BORDER);
- index = gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), vbox, NULL);
+ idx = gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), vbox, NULL);
gtk_widget_show (vbox);
vbox2 = gtk_vbox_new (FALSE, 0);
@@ -221,14 +221,14 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj)
gtk_list_store_set (icon_store, &iter,
SETTINGS_LIST_PIXBUF_COLUMN, icon,
SETTINGS_LIST_TEXT_COLUMN, _("General"),
- SETTINGS_LIST_INDEX_COLUMN, index,
+ SETTINGS_LIST_INDEX_COLUMN, idx,
-1);
g_object_unref (G_OBJECT (icon));
/* devices tab */
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), BORDER);
- index = gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), vbox, NULL);
+ idx = gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), vbox, NULL);
gtk_widget_show (vbox);
label = gtk_label_new (_("Devices"));
@@ -309,7 +309,7 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj)
gtk_list_store_set (icon_store, &iter,
SETTINGS_LIST_PIXBUF_COLUMN, icon,
SETTINGS_LIST_TEXT_COLUMN, _("Devices"),
- SETTINGS_LIST_INDEX_COLUMN, index,
+ SETTINGS_LIST_INDEX_COLUMN, idx,
-1);
if (icon)
g_object_unref (G_OBJECT (icon));
diff --git a/xfburn/xfburn-settings.c b/xfburn/xfburn-settings.c
index 5003c5a..061ca5d 100644
--- a/xfburn/xfburn-settings.c
+++ b/xfburn/xfburn-settings.c
@@ -327,7 +327,7 @@ value_destroy (Setting * val)
}
static XfburnSettings*
-get_instance ()
+get_instance (void)
{
if (G_LIKELY (instance))
return instance;
@@ -360,8 +360,8 @@ xfburn_settings_init (void)
void
xfburn_settings_flush (void)
{
- XfburnSettings *instance = get_instance ();
- XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (instance);
+ XfburnSettings *settings = get_instance ();
+ XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (settings);
save_settings (priv);
}
@@ -369,16 +369,16 @@ xfburn_settings_flush (void)
void
xfburn_settings_free (void)
{
- XfburnSettings *instance = get_instance ();
+ XfburnSettings *settings = get_instance ();
- g_object_unref (instance);
+ g_object_unref (settings);
}
gboolean
xfburn_settings_get_boolean (const gchar * key, gboolean fallback)
{
- XfburnSettings *instance = get_instance ();
- XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (instance);
+ XfburnSettings *settings = get_instance ();
+ XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (settings);
gpointer orig;
gpointer value;
@@ -397,8 +397,8 @@ xfburn_settings_get_boolean (const gchar * key, gboolean fallback)
gint
xfburn_settings_get_int (const gchar * key, gint fallback)
{
- XfburnSettings *instance = get_instance ();
- XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (instance);
+ XfburnSettings *settings = get_instance ();
+ XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (settings);
gpointer orig;
gpointer value;
@@ -417,8 +417,8 @@ xfburn_settings_get_int (const gchar * key, gint fallback)
gchar *
xfburn_settings_get_string (const gchar * key, const gchar * fallback)
{
- XfburnSettings *instance = get_instance ();
- XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (instance);
+ XfburnSettings *settings = get_instance ();
+ XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (settings);
gpointer orig;
gpointer value;
@@ -437,8 +437,8 @@ xfburn_settings_get_string (const gchar * key, const gchar * fallback)
void
xfburn_settings_set_boolean (const gchar * key, gboolean value)
{
- XfburnSettings *instance = get_instance ();
- XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (instance);
+ XfburnSettings *settings = get_instance ();
+ XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (settings);
Setting *setting;
setting = g_new0 (Setting, 1);
@@ -451,8 +451,8 @@ xfburn_settings_set_boolean (const gchar * key, gboolean value)
void
xfburn_settings_set_int (const gchar * key, gint value)
{
- XfburnSettings *instance = get_instance ();
- XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (instance);
+ XfburnSettings *settings = get_instance ();
+ XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (settings);
Setting *setting;
setting = g_new0 (Setting, 1);
@@ -465,8 +465,8 @@ xfburn_settings_set_int (const gchar * key, gint value)
void
xfburn_settings_set_string (const gchar * key, const gchar * value)
{
- XfburnSettings *instance = get_instance ();
- XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (instance);
+ XfburnSettings *settings = get_instance ();
+ XfburnSettingsPrivate *priv = XFBURN_SETTINGS_GET_PRIVATE (settings);
Setting *setting;
setting = g_new0 (Setting, 1);
diff --git a/xfburn/xfburn-transcoder-gst.c b/xfburn/xfburn-transcoder-gst.c
index 363ae70..da17d6f 100644
--- a/xfburn/xfburn-transcoder-gst.c
+++ b/xfburn/xfburn-transcoder-gst.c
@@ -682,7 +682,7 @@ on_pad_added (GstElement *element, GstPad *pad, gboolean last, gpointer data)
gchar *error_msg = "File content has a decoder but is not audio.";
- DBG (error_msg);
+ DBG ("%s", error_msg);
gst_caps_unref (caps);
gst_object_unref (audiopad);
diff --git a/xfburn/xfburn-utils.c b/xfburn/xfburn-utils.c
index 6026d97..9cf052b 100644
--- a/xfburn/xfburn-utils.c
+++ b/xfburn/xfburn-utils.c
@@ -64,16 +64,16 @@ xfburn_default_cursor (GtkWidget * widget)
gchar *
xfburn_humanreadable_filesize (guint64 size)
{
- if (!xfburn_settings_get_boolean ("human-readable-units", TRUE))
- return g_strdup_printf ("%lu B", (long unsigned int) size);
-
- /* copied from GnomeBaker */
-
gchar *ret = NULL;
const gchar *unit_list[5] = { "B ", "KB", "MB", "GB", "TB" };
gint unit = 0;
gdouble human_size = (gdouble) size;
+ if (!xfburn_settings_get_boolean ("human-readable-units", TRUE))
+ return g_strdup_printf ("%lu B", (long unsigned int) size);
+
+ /* copied from GnomeBaker */
+
while (human_size > 1024 && unit < 4) {
human_size = human_size / 1024;
unit++;
More information about the Xfce4-commits
mailing list