From 9ec901718f9268b90cce820a09cd863355c40955 Mon Sep 17 00:00:00 2001 From: Romain Bouvier Date: Fri, 3 Jun 2011 11:03:53 +0200 Subject: [PATCH] Port xfburn to libxfce4ui (for master, based on bug 7355) --- configure.in.in | 2 +- xfburn/Makefile.am | 4 +- xfburn/xfburn-audio-composition.c | 16 ++-- xfburn/xfburn-audio-disc-usage.c | 1 - xfburn/xfburn-blank-dialog.c | 10 +- xfburn/xfburn-blank-dialog.h | 1 + xfburn/xfburn-burn-audio-cd-composition-dialog.c | 8 +- xfburn/xfburn-burn-audio-cd-composition-dialog.h | 2 +- xfburn/xfburn-burn-data-cd-composition-dialog.h | 2 +- xfburn/xfburn-burn-data-composition-base-dialog.c | 10 +- xfburn/xfburn-burn-data-composition-base-dialog.h | 2 +- xfburn/xfburn-burn-data-dvd-composition-dialog.h | 2 +- xfburn/xfburn-burn-image-dialog.c | 10 +- xfburn/xfburn-burn-image-dialog.h | 2 +- xfburn/xfburn-copy-cd-dialog.h | 2 +- xfburn/xfburn-copy-dvd-dialog.h | 2 +- xfburn/xfburn-data-composition.c | 14 +- xfburn/xfburn-data-disc-usage.c | 1 - xfburn/xfburn-device-box.c | 1 - xfburn/xfburn-directory-browser.c | 1 - xfburn/xfburn-disc-usage.c | 6 +- xfburn/xfburn-file-browser.c | 1 - xfburn/xfburn-fs-browser.c | 1 - xfburn/xfburn-main-window.c | 126 ++++++++++----------- xfburn/xfburn-main.c | 10 +- xfburn/xfburn-perform-burn.h | 2 +- xfburn/xfburn-preferences-dialog.c | 20 ++-- xfburn/xfburn-progress-dialog.c | 4 +- xfburn/xfburn-transcoder-basic.c | 4 +- xfburn/xfburn-transcoder-gst.c | 1 - xfburn/xfburn-udev-manager.c | 4 +- 31 files changed, 128 insertions(+), 144 deletions(-) diff --git a/configure.in.in b/configure.in.in index 7920d2e..88b7a9d 100644 --- a/configure.in.in +++ b/configure.in.in @@ -33,7 +33,7 @@ XDT_CHECK_PACKAGE([LIBBURN], [libburn-1], [0.4.2]) XDT_CHECK_PACKAGE([LIBISOFS], [libisofs-1], [0.6.2]) XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.6.0]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0]) -XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.4.0]) +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0]) XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.4], [], [XDT_CHECK_PACKAGE([EXO], [exo-1], [0.3.100])]) XDT_CHECK_PACKAGE([LIBGIO], [gio-2.0], [2.22.0]) XDT_CHECK_PACKAGE([LIBGIOUNIX], [gio-unix-2.0], [2.16.0]) diff --git a/xfburn/Makefile.am b/xfburn/Makefile.am index 558a3b3..afaf322 100644 --- a/xfburn/Makefile.am +++ b/xfburn/Makefile.am @@ -95,7 +95,7 @@ xfburn_CFLAGS = \ $(GTHREAD_CFLAGS) \ $(LIBBURN_CFLAGS) \ $(LIBISOFS_CFLAGS) \ - $(LIBXFCEGUI4_CFLAGS) \ + $(LIBXFCE4UI_CFLAGS) \ $(EXO_CFLAGS) \ $(GIO_CFLAGS) \ $(GIO_UNIX_CFLAGS) \ @@ -110,7 +110,7 @@ xfburn_LDADD = \ $(GTHREAD_LIBS) \ $(LIBBURN_LIBS) \ $(LIBISOFS_LIBS) \ - $(LIBXFCEGUI4_LIBS) \ + $(LIBXFCE4UI_LIBS) \ $(EXO_LIBS) \ $(GIO_LIBS) \ $(GIO_UNIX_LIBS) \ diff --git a/xfburn/xfburn-audio-composition.c b/xfburn/xfburn-audio-composition.c index 7476b77..9528aee 100644 --- a/xfburn/xfburn-audio-composition.c +++ b/xfburn/xfburn-audio-composition.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include @@ -577,7 +577,7 @@ cb_begin_burn (XfburnDiscUsage * du, XfburnAudioComposition * dc) dialog = xfburn_burn_audio_cd_composition_dialog_new (src); break; case DVD_DISC: - xfce_err (_("Cannot burn audio onto a DVD.")); + xfce_dialog_show_error (NULL, NULL, _("Cannot burn audio onto a DVD.")); return; break; } @@ -1021,7 +1021,7 @@ action_info (GtkAction * action, XfburnAudioComposition * dc) { XfburnAudioCompositionPrivate *priv = XFBURN_AUDIO_COMPOSITION_GET_PRIVATE (dc); - xfce_info (xfburn_transcoder_get_description (priv->trans)); + xfce_dialog_show_info(NULL, NULL, xfburn_transcoder_get_description (priv->trans)); } static void @@ -1089,14 +1089,14 @@ notify_not_adding (XfburnAudioComposition * dc, GError *error) g_assert (error != NULL); if (error->domain != XFBURN_ERROR) { - xfce_warn (error->message); + xfce_dialog_show_warning(NULL, NULL, error->message); return; } if (g_hash_table_lookup (priv->warned_about, GINT_TO_POINTER (error->code)) == NULL) { g_hash_table_insert (priv->warned_about, GINT_TO_POINTER (error->code), did_warn); - xfce_warn (error->message); + xfce_dialog_show_warning(NULL, NULL, error->message); } } @@ -1141,7 +1141,7 @@ thread_add_file_to_list_with_name (const gchar *name, XfburnAudioComposition * d gdk_threads_enter (); if (file_exists_on_same_level (model, tree_path, FALSE, name)) { - xfce_err (_("A file with the same name is already present in the composition.")); + xfce_dialog_show_error (NULL, NULL, _("A file with the same name is already present in the composition.")); gtk_tree_path_free (tree_path); gdk_threads_leave (); @@ -1225,7 +1225,7 @@ thread_add_file_to_list_with_name (const gchar *name, XfburnAudioComposition * d if (g_hash_table_lookup (priv->warned_about, GINT_TO_POINTER (err_code)) == NULL) { g_hash_table_insert (priv->warned_about, GINT_TO_POINTER (err_code), did_warn); gdk_threads_enter (); - xfce_err (_("You can only have a maximum of 99 tracks.")); + xfce_dialog_show_error (NULL, NULL, _("You can only have a maximum of 99 tracks.")); gdk_threads_leave (); } @@ -1475,7 +1475,7 @@ copy_entry_to (XfburnAudioComposition *dc, GtkTreeIter *src, GtkTreeIter *dest, /* if (file_exists_on_same_level (model, path_level, FALSE, name)) { - xfce_warn (_("A file named \"%s\" already exists in this directory, the file hasn't been added."), name); + xfce_dialog_warning(NULL, _("A file named \"%s\" already exists in this directory, the file hasn't been added."), name); goto cleanup; } */ diff --git a/xfburn/xfburn-audio-disc-usage.c b/xfburn/xfburn-audio-disc-usage.c index aaff765..3ee1260 100644 --- a/xfburn/xfburn-audio-disc-usage.c +++ b/xfburn/xfburn-audio-disc-usage.c @@ -22,7 +22,6 @@ #include #include -#include #include "xfburn-disc-usage.h" #include "xfburn-audio-disc-usage.h" diff --git a/xfburn/xfburn-blank-dialog.c b/xfburn/xfburn-blank-dialog.c index 7f1974d..94270eb 100644 --- a/xfburn/xfburn-blank-dialog.c +++ b/xfburn/xfburn-blank-dialog.c @@ -20,7 +20,7 @@ #include #endif /* !HAVE_CONFIG_H */ -#include +#include #include @@ -206,7 +206,7 @@ xfburn_blank_dialog_init (XfburnBlankDialog * obj) g_signal_connect (G_OBJECT (priv->device_box), "volume-changed", G_CALLBACK (cb_volume_changed), obj); gtk_widget_show (priv->device_box); - frame = xfce_create_framebox_with_content (_("Burning device"), priv->device_box); + frame = xfce_gtk_frame_box_new_with_content (_("Burning device"), priv->device_box); gtk_widget_show (frame); gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER); @@ -219,7 +219,7 @@ xfburn_blank_dialog_init (XfburnBlankDialog * obj) gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (priv->combo_type), cell, "text", BLANK_COMBO_NAME_COLUMN, NULL); gtk_widget_show (priv->combo_type); - frame = xfce_create_framebox_with_content (_("Blank mode"), priv->combo_type); + frame = xfce_gtk_frame_box_new_with_content (_("Blank mode"), priv->combo_type); gtk_widget_show (frame); gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER); @@ -227,7 +227,7 @@ xfburn_blank_dialog_init (XfburnBlankDialog * obj) vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); - frame = xfce_create_framebox_with_content (_("Options"), vbox); + frame = xfce_gtk_frame_box_new_with_content (_("Options"), vbox); gtk_widget_show (frame); gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER); @@ -241,7 +241,7 @@ xfburn_blank_dialog_init (XfburnBlankDialog * obj) gtk_widget_show (button); gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_CANCEL); - button = xfce_create_mixed_button ("xfburn-blank-cdrw", _("_Blank")); + button = xfce_gtk_button_new_mixed ("xfburn-blank-cdrw", _("_Blank")); gtk_widget_show (button); gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); diff --git a/xfburn/xfburn-blank-dialog.h b/xfburn/xfburn-blank-dialog.h index e4cb246..7d7191d 100644 --- a/xfburn/xfburn-blank-dialog.h +++ b/xfburn/xfburn-blank-dialog.h @@ -26,6 +26,7 @@ #include "xfburn-global.h" #include +#include G_BEGIN_DECLS diff --git a/xfburn/xfburn-burn-audio-cd-composition-dialog.c b/xfburn/xfburn-burn-audio-cd-composition-dialog.c index b015703..c8ce193 100644 --- a/xfburn/xfburn-burn-audio-cd-composition-dialog.c +++ b/xfburn/xfburn-burn-audio-cd-composition-dialog.c @@ -156,7 +156,7 @@ xfburn_burn_audio_cd_composition_dialog_constructor (GType type, guint n_constru g_signal_connect (G_OBJECT (priv->device_box), "volume-changed", G_CALLBACK (cb_volume_changed), obj); gtk_widget_show (priv->device_box); - priv->frame_device = xfce_create_framebox_with_content (_("Burning device"), priv->device_box); + priv->frame_device = xfce_gtk_frame_box_new_with_content (_("Burning device"), priv->device_box); gtk_widget_show (priv->frame_device); gtk_box_pack_start (box, priv->frame_device, FALSE, FALSE, BORDER); @@ -168,7 +168,7 @@ xfburn_burn_audio_cd_composition_dialog_constructor (GType type, guint n_constru vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); - frame = xfce_create_framebox_with_content (_("Composition name"), vbox); + frame = xfce_gtk_frame_box_new_with_content (_("Composition name"), vbox); gtk_widget_show (frame); gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER); @@ -190,7 +190,7 @@ xfburn_burn_audio_cd_composition_dialog_constructor (GType type, guint n_constru vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); - frame = xfce_create_framebox_with_content (_("Options"), vbox); + frame = xfce_gtk_frame_box_new_with_content (_("Options"), vbox); gtk_widget_show (frame); gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER); @@ -218,7 +218,7 @@ xfburn_burn_audio_cd_composition_dialog_constructor (GType type, guint n_constru gtk_widget_show (button); gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_CANCEL); - priv->button_proceed = button = xfce_create_mixed_button ("xfburn-burn-cd", _("_Burn Composition")); + priv->button_proceed = button = xfce_gtk_button_new_mixed ("xfburn-burn-cd", _("_Burn Composition")); gtk_widget_show (button); gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_OK); diff --git a/xfburn/xfburn-burn-audio-cd-composition-dialog.h b/xfburn/xfburn-burn-audio-cd-composition-dialog.h index 495d095..6083e8d 100644 --- a/xfburn/xfburn-burn-audio-cd-composition-dialog.h +++ b/xfburn/xfburn-burn-audio-cd-composition-dialog.h @@ -24,7 +24,7 @@ #endif /* !HAVE_CONFIG_H */ #include -#include +#include #include diff --git a/xfburn/xfburn-burn-data-cd-composition-dialog.h b/xfburn/xfburn-burn-data-cd-composition-dialog.h index 10f1b56..723aa41 100644 --- a/xfburn/xfburn-burn-data-cd-composition-dialog.h +++ b/xfburn/xfburn-burn-data-cd-composition-dialog.h @@ -24,7 +24,7 @@ #endif /* !HAVE_CONFIG_H */ #include -#include +#include #include #include "xfburn-burn-data-composition-base-dialog.h" diff --git a/xfburn/xfburn-burn-data-composition-base-dialog.c b/xfburn/xfburn-burn-data-composition-base-dialog.c index e05a9b9..ab11281 100644 --- a/xfburn/xfburn-burn-data-composition-base-dialog.c +++ b/xfburn/xfburn-burn-data-composition-base-dialog.c @@ -192,7 +192,7 @@ xfburn_burn_data_composition_base_dialog_constructor (GType type, guint n_constr g_signal_connect (G_OBJECT (priv->device_box), "volume-changed", G_CALLBACK (cb_volume_changed), obj); - priv->frame_device = xfce_create_framebox_with_content (_("Burning device"), priv->device_box); + priv->frame_device = xfce_gtk_frame_box_new_with_content (_("Burning device"), priv->device_box); gtk_widget_show (priv->frame_device); gtk_box_pack_start (box, priv->frame_device, FALSE, FALSE, BORDER); @@ -203,7 +203,7 @@ xfburn_burn_data_composition_base_dialog_constructor (GType type, guint n_constr vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); - frame = xfce_create_framebox_with_content (_("Composition name"), vbox); + frame = xfce_gtk_frame_box_new_with_content (_("Composition name"), vbox); gtk_widget_show (frame); gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER); @@ -224,7 +224,7 @@ xfburn_burn_data_composition_base_dialog_constructor (GType type, guint n_constr vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); - frame = xfce_create_framebox_with_content (_("Options"), vbox); + frame = xfce_gtk_frame_box_new_with_content (_("Options"), vbox); gtk_widget_show (frame); gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER); @@ -280,7 +280,7 @@ xfburn_burn_data_composition_base_dialog_constructor (GType type, guint n_constr gtk_widget_show (button); gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_CANCEL); - priv->button_proceed = button = xfce_create_mixed_button ("xfburn-burn-cd", _("_Burn Composition")); + priv->button_proceed = button = xfce_gtk_button_new_mixed ("xfburn-burn-cd", _("_Burn Composition")); /* * Disabled: change button_proceed functionality button = create_proceed_button (obj, "xfburn-burn-cd", ""); @@ -650,7 +650,7 @@ cb_dialog_response (XfburnBurnDataCompositionBaseDialog * dialog, gint response_ if (iso_image_create_burn_source (priv->image, write_opts, &src) < 0) { /* could not create source */ - xfce_err (_("Could not create ISO source structure.")); + xfce_dialog_show_error (NULL, NULL, _("Could not create ISO source structure.")); return; } diff --git a/xfburn/xfburn-burn-data-composition-base-dialog.h b/xfburn/xfburn-burn-data-composition-base-dialog.h index 82260e0..4380daa 100644 --- a/xfburn/xfburn-burn-data-composition-base-dialog.h +++ b/xfburn/xfburn-burn-data-composition-base-dialog.h @@ -24,7 +24,7 @@ #endif /* !HAVE_CONFIG_H */ #include -#include +#include #include diff --git a/xfburn/xfburn-burn-data-dvd-composition-dialog.h b/xfburn/xfburn-burn-data-dvd-composition-dialog.h index 9c4c0d6..263b9a1 100644 --- a/xfburn/xfburn-burn-data-dvd-composition-dialog.h +++ b/xfburn/xfburn-burn-data-dvd-composition-dialog.h @@ -24,7 +24,7 @@ #endif /* !HAVE_CONFIG_H */ #include -#include +#include #include #include "xfburn-burn-data-composition-base-dialog.h" diff --git a/xfburn/xfburn-burn-image-dialog.c b/xfburn/xfburn-burn-image-dialog.c index 2a78ad3..1fb36f5 100644 --- a/xfburn/xfburn-burn-image-dialog.c +++ b/xfburn/xfburn-burn-image-dialog.c @@ -173,7 +173,7 @@ xfburn_burn_image_dialog_init (XfburnBurnImageDialog * obj) gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (priv->chooser_image), filter); gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (priv->chooser_image), filter); - frame = xfce_create_framebox_with_content (_("Image to burn"), priv->chooser_image); + frame = xfce_gtk_frame_box_new_with_content (_("Image to burn"), priv->chooser_image); gtk_widget_show (frame); gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER); @@ -188,7 +188,7 @@ xfburn_burn_image_dialog_init (XfburnBurnImageDialog * obj) priv->device_box = xfburn_device_box_new (SHOW_CD_WRITERS | SHOW_CDRW_WRITERS | SHOW_DVD_WRITERS | SHOW_MODE_SELECTION | SHOW_SPEED_SELECTION); gtk_widget_show (priv->device_box); - frame = xfce_create_framebox_with_content (_("Burning device"), priv->device_box); + frame = xfce_gtk_frame_box_new_with_content (_("Burning device"), priv->device_box); gtk_widget_show (frame); gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER); @@ -196,7 +196,7 @@ xfburn_burn_image_dialog_init (XfburnBurnImageDialog * obj) vbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox); - frame = xfce_create_framebox_with_content (_("Options"), vbox); + frame = xfce_gtk_frame_box_new_with_content (_("Options"), vbox); gtk_widget_show (frame); gtk_box_pack_start (box, frame, FALSE, FALSE, BORDER); @@ -219,7 +219,7 @@ xfburn_burn_image_dialog_init (XfburnBurnImageDialog * obj) gtk_widget_show (button); gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_CANCEL); - priv->burn_button = xfce_create_mixed_button ("xfburn-burn-cd", _("_Burn image")); + priv->burn_button = xfce_gtk_button_new_mixed ("xfburn-burn-cd", _("_Burn image")); gtk_widget_show (priv->burn_button); g_signal_connect (G_OBJECT (priv->burn_button), "clicked", G_CALLBACK (cb_clicked_ok), obj); gtk_container_add (GTK_CONTAINER( GTK_DIALOG(obj)->action_area), priv->burn_button); @@ -400,7 +400,7 @@ thread_burn_iso (ThreadBurnIsoParams * params) void burn_image_dialog_error (XfburnBurnImageDialog * dialog, const gchar * msg_error) { - xfce_err (msg_error); + xfce_dialog_show_error (NULL, NULL, msg_error); } static void diff --git a/xfburn/xfburn-burn-image-dialog.h b/xfburn/xfburn-burn-image-dialog.h index d08073a..570bf6b 100644 --- a/xfburn/xfburn-burn-image-dialog.h +++ b/xfburn/xfburn-burn-image-dialog.h @@ -25,7 +25,7 @@ #include -#include +#include #include "xfburn-global.h" diff --git a/xfburn/xfburn-copy-cd-dialog.h b/xfburn/xfburn-copy-cd-dialog.h index 671e9b0..65cbb1d 100644 --- a/xfburn/xfburn-copy-cd-dialog.h +++ b/xfburn/xfburn-copy-cd-dialog.h @@ -25,7 +25,7 @@ #include -#include +#include G_BEGIN_DECLS diff --git a/xfburn/xfburn-copy-dvd-dialog.h b/xfburn/xfburn-copy-dvd-dialog.h index 807f15a..5fa0501 100644 --- a/xfburn/xfburn-copy-dvd-dialog.h +++ b/xfburn/xfburn-copy-dvd-dialog.h @@ -25,7 +25,7 @@ #include -#include +#include G_BEGIN_DECLS diff --git a/xfburn/xfburn-data-composition.c b/xfburn/xfburn-data-composition.c index 55faa8e..d1c5974 100644 --- a/xfburn/xfburn-data-composition.c +++ b/xfburn/xfburn-data-composition.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include @@ -671,7 +671,7 @@ cb_cell_file_edited (GtkCellRenderer * renderer, gchar * path, gchar * newtext, GtkTreePath *real_path; if (strlen (newtext) == 0) { - xfce_err (_("You must give a name to the file.")); + xfce_dialog_show_error (NULL, NULL, _("You must give a name to the file.")); return; } @@ -680,7 +680,7 @@ cb_cell_file_edited (GtkCellRenderer * renderer, gchar * path, gchar * newtext, if (gtk_tree_model_get_iter (model, &iter, real_path)) { if (file_exists_on_same_level (model, real_path, TRUE, newtext)) { - xfce_err (_("A file with the same name is already present in the composition.")); + xfce_dialog_show_error (NULL, NULL, _("A file with the same name is already present in the composition.")); } else { gtk_tree_store_set (GTK_TREE_STORE (model), &iter, DATA_COMPOSITION_COLUMN_CONTENT, newtext, -1); @@ -1116,7 +1116,7 @@ thread_add_file_to_list_with_name (const gchar *name, XfburnDataComposition * dc gdk_threads_enter (); if (file_exists_on_same_level (model, tree_path, FALSE, name)) { - xfce_err (_("A file with the same name is already present in the composition.")); + xfce_dialog_show_error (NULL, NULL, _("A file with the same name is already present in the composition.")); gtk_tree_path_free (tree_path); gdk_threads_leave (); @@ -1195,7 +1195,7 @@ thread_add_file_to_list_with_name (const gchar *name, XfburnDataComposition * dc if (s.st_size > MAXIMUM_ISO_FILE_SIZE) { gdk_threads_enter (); - xfce_err (_("%s cannot be added to the composition, because it exceeds the maximum allowed file size for iso9660."), path); + xfce_dialog_show_error (NULL, NULL, _("%s cannot be added to the composition, because it exceeds the maximum allowed file size for iso9660."), path); gdk_threads_leave (); return FALSE; @@ -1448,7 +1448,7 @@ copy_entry_to (XfburnDataComposition *dc, GtkTreeIter *src, GtkTreeIter *dest, G } if (file_exists_on_same_level (model, path_level, FALSE, name)) { - xfce_warn (_("A file named \"%s\" already exists in this directory, the file hasn't been added."), name); + xfce_dialog_show_warning(NULL, NULL, _("A file named \"%s\" already exists in this directory, the file hasn't been added."), name); goto cleanup; } @@ -1861,7 +1861,7 @@ fill_image_with_composition (GtkTreeModel *model, IsoImage *image, IsoDir * pare if (r == 0) { /* The first string is the renamed name, the second one the original name */ - xfce_warn (_("Duplicate filename '%s' for '%s'"), name, src); + xfce_dialog_show_warning(NULL, NULL, _("Duplicate filename '%s' for '%s'"), name, src); g_free (basename); g_free (name); diff --git a/xfburn/xfburn-data-disc-usage.c b/xfburn/xfburn-data-disc-usage.c index d9fd177..a4d5cf4 100644 --- a/xfburn/xfburn-data-disc-usage.c +++ b/xfburn/xfburn-data-disc-usage.c @@ -22,7 +22,6 @@ #include #include -#include #include "xfburn-disc-usage.h" #include "xfburn-data-disc-usage.h" diff --git a/xfburn/xfburn-device-box.c b/xfburn/xfburn-device-box.c index a7ce7e6..49b7d36 100644 --- a/xfburn/xfburn-device-box.c +++ b/xfburn/xfburn-device-box.c @@ -23,7 +23,6 @@ #include #include -#include #include "xfburn-device-list.h" #include "xfburn-device-box.h" diff --git a/xfburn/xfburn-directory-browser.c b/xfburn/xfburn-directory-browser.c index 09778cd..af6ba8c 100644 --- a/xfburn/xfburn-directory-browser.c +++ b/xfburn/xfburn-directory-browser.c @@ -26,7 +26,6 @@ #include #include -#include #include diff --git a/xfburn/xfburn-disc-usage.c b/xfburn/xfburn-disc-usage.c index b94db7d..8bb67b9 100644 --- a/xfburn/xfburn-disc-usage.c +++ b/xfburn/xfburn-disc-usage.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include "xfburn-disc-usage.h" #include "xfburn-global.h" @@ -160,7 +160,7 @@ xfburn_disc_usage_constructor (GType type, guint n_construct_properties, GObject gtk_box_pack_start (GTK_BOX (disc_usage), disc_usage->combo, FALSE, FALSE, BORDER); gtk_widget_show (disc_usage->combo); - disc_usage->button = xfce_create_mixed_button (XFBURN_STOCK_BURN_CD, _("Proceed to Burn")); + disc_usage->button = xfce_gtk_button_new_mixed (XFBURN_STOCK_BURN_CD, _("Proceed to Burn")); gtk_box_pack_start (GTK_BOX (disc_usage), disc_usage->button, FALSE, FALSE, BORDER); gtk_widget_set_sensitive (disc_usage->button, FALSE); gtk_widget_show (disc_usage->button); @@ -200,7 +200,7 @@ cb_button_clicked (GtkButton *button, XfburnDiscUsage *du) if (du->size <= class->labels[gtk_combo_box_get_active (GTK_COMBO_BOX (du->combo))].size) { g_signal_emit (G_OBJECT (du), signals[BEGIN_BURN], 0); } else { - xfce_err (_("You are trying to burn more onto the disc than it can hold.")); + xfce_dialog_show_error (NULL, NULL, _("You are trying to burn more onto the disc than it can hold.")); } } diff --git a/xfburn/xfburn-file-browser.c b/xfburn/xfburn-file-browser.c index 04d5596..4d3b182 100644 --- a/xfburn/xfburn-file-browser.c +++ b/xfburn/xfburn-file-browser.c @@ -26,7 +26,6 @@ #include #include -#include #include "xfburn-file-browser.h" #include "xfburn-fs-browser.h" diff --git a/xfburn/xfburn-fs-browser.c b/xfburn/xfburn-fs-browser.c index 54bc734..221e288 100644 --- a/xfburn/xfburn-fs-browser.c +++ b/xfburn/xfburn-fs-browser.c @@ -24,7 +24,6 @@ #include #endif -#include #include #include "xfburn-fs-browser.h" diff --git a/xfburn/xfburn-main-window.c b/xfburn/xfburn-main-window.c index 3451ac0..4b3b40c 100644 --- a/xfburn/xfburn-main-window.c +++ b/xfburn/xfburn-main-window.c @@ -22,7 +22,7 @@ #include #include -#include +#include #include @@ -479,79 +479,69 @@ action_quit (GtkAction * action, XfburnMainWindow * window) static void action_about (GtkAction * action, XfburnMainWindow * window) { - XfceAboutInfo *info; - GtkWidget *dialog; gint x, y; - GdkPixbuf *icon; - guint n; - - static const struct - { - gchar *name, *email, *language; - } translators[] = { - {"Mohamed Magdy", "mohamed.m.k@gmail.com", "ar",}, - {"Pau Rul lan Ferragut", "paurullan@bulma.net", "ca",}, - {"Michal Várady", "miko.vaji@gmail.com", "cs",}, - {"Enrico Tröger", "enrico.troeger@uvena.de", "de",}, - {"Fabian Nowak", "timstery@arcor.de", "de",}, - {"Nico Schümann", "nico@prog.nico22.de", "de",}, - {"Stavros Giannouris", "stavrosg2002@freemail.gr", "el",}, - {"Jeff Bailes", "thepizzaking@gmail.com", "en_GB",}, - {"Diego Rodriguez", "dieymir@yahoo.es", "es",}, - {"Kristjan Siimson", "kristjan.siimson@gmail.com", "et",}, - {"Piarres Beobide", "pi@beobide.net", "eu",}, - {"Jari Rahkonen", "jari.rahkonen@pp1.inet.fi", "fi",}, - {"Etienne Collet", "xanaxlnx@gmail.com", "fr",}, - {"Maximilian Schleiss", "maximilian@xfce.org", "fr",}, - {"Attila Szervác", "sas@321.hu", "hu",}, - {"Daichi Kawahata", "daichi@xfce.org", "ja",}, - {"ByungHyun Choi", "byunghyun.choi@debianusers.org", "kr",}, - {"Mantas", "mantaz@users.sourceforge.net", "lt",}, - {"Rihards Prieditis", "RPrieditis@inbox.lv", "lv",}, - {"Terje Uriansrud", "ter@operamail.com", "nb_NO",}, - {"Stephan Arts", "psybsd@gmail.com", "nl",}, - {"Szymon Kałasz", "szymon_maestro@gazeta.pl", "pl",}, - {"Fábio Nogueira", "deb-user-ba@ubuntu.com", "pt_BR",}, - {"Og Maciel", "omaciel@xfce.org", "pt_BR",}, - {"Nuno Miguel", "nunis@netcabo.pt", "pt_PT",}, - {"Sergey Fedoseev", "fedoseev.sergey@gmail.com", "ru",}, - {"Besnik Bleta", "besnik@programeshqip.org", "sq",}, - {"Maxim V. Dziumanenko", "mvd@mylinux.com.ua", "uk",}, - {"Dmitry Nikitin", "", "uk",}, - {"ﻢﺤﻣﺩ ﻊﻠﻳ ﺎﻠﻤﻜﻳ", "makki.ma@gmail.com", "ur",}, - {"正龙 赵", "longer.zhao@gmail.com", "zh_CN",}, - {"Cosmo Chene", "cosmolax@gmail.com", "zh_TW",}, - }; + GdkPixbuf *icon = NULL; + const gchar *auth[] = { "David Mohr david@mcbf.net Author/Maintainer", + "Mario Đanić mario@libburnia-project.org Author/Maintainer", + "Jean-François Wauthy pollux@xfce.org Retired author/maintainer", + NULL }; + const gchar *translators = + "Mohamed Magdy mohamed.m.k@gmail.com ar\n" + "Pau Rul lan Ferragut paurullan@bulma.net ca\n" + "Michal Várady miko.vaji@gmail.com cs\n" + "Enrico Tröger enrico.troeger@uvena.de de\n" + "Fabian Nowak timstery@arcor.de de\n" + "Nico Schümann nico@prog.nico22.de de\n" + "Stavros Giannouris stavrosg2002@freemail.gr el\n" + "Jeff Bailes thepizzaking@gmail.com en_GB\n" + "Diego Rodriguez dieymir@yahoo.es es\n" + "Kristjan Siimson kristjan.siimson@gmail.com et\n" + "Piarres Beobide pi@beobide.net eu\n" + "Jari Rahkonen jari.rahkonen@pp1.inet.fi fi\n" + "Etienne Collet xanaxlnx@gmail.com fr\n" + "Maximilian Schleiss maximilian@xfce.org fr\n" + "Attila Szervác sas@321.hu hu\n" + "Daichi Kawahata daichi@xfce.org ja\n" + "ByungHyun Choi byunghyun.choi@debianusers.org kr\n" + "Mantas mantaz@users.sourceforge.net lt\n" + "Rihards Prieditis RPrieditis@inbox.lv lv\n" + "Terje Uriansrud ter@operamail.com nb_NO\n" + "Stephan Arts psybsd@gmail.com nl\n" + "Szymon Kałasz szymon_maestro@gazeta.pl pl\n" + "Fábio Nogueira deb-user-ba@ubuntu.com pt_BR\n" + "Og Maciel omaciel@xfce.org pt_BR\n" + "Nuno Miguel nunis@netcabo.pt pt_PT\n" + "Sergey Fedoseev fedoseev.sergey@gmail.com ru\n" + "Besnik Bleta besnik@programeshqip.org sq\n" + "Maxim V. Dziumanenko mvd@mylinux.com.ua uk\n" + "Dmitry Nikitin uk\n" + "ﻢﺤﻣﺩ ﻊﻠﻳ ﺎﻠﻤﻜﻳ makki.ma@gmail.com ur\n" + "正龙 赵 longer.zhao@gmail.com zh_CN\n" + "Cosmo Chene cosmolax@gmail.com zh_TW\n"; gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &x, &y); - icon = xfce_themed_icon_load ("media-optical", x); + icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "media-optical", x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL); if (!icon) - icon = xfce_themed_icon_load ("media-cdrom", x); + icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "media-cdrom", x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL); if (!icon) - icon = xfce_themed_icon_load (GTK_STOCK_CDROM, x); - - info = xfce_about_info_new ("Xfburn", VERSION, _("Another cd burning GUI"), - XFCE_COPYRIGHT_TEXT ("2005-2008", "David Mohr, Mario Đanić, Jean-François Wauthy"), XFCE_LICENSE_GPL); - xfce_about_info_set_homepage (info, "http://www.xfce.org/projects/xfburn"); - xfce_about_info_add_credit (info, "David Mohr", "david@mcbf.net", _("Author/Maintainer")); - xfce_about_info_add_credit (info, "Mario Đanić", "mario@libburnia-project.org", _("Author/Maintainer")); - xfce_about_info_add_credit (info, "Jean-François Wauthy", "pollux@xfce.org", _("Retired author/maintainer")); - - - for (n = 0; n < G_N_ELEMENTS (translators); ++n) { - gchar *s; - - s = g_strdup_printf (_("Translator (%s)"), translators[n].language); - xfce_about_info_add_credit (info, translators[n].name, translators[n].email, s); - g_free (s); - } - - dialog = xfce_about_dialog_new_with_values (GTK_WINDOW (window), info, icon); - gtk_widget_set_size_request (GTK_WIDGET (dialog), 400, 300); - gtk_dialog_run (GTK_DIALOG (dialog)); - gtk_widget_destroy (dialog); + icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), GTK_STOCK_CDROM, x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL); + +#if !GTK_CHECK_VERSION (2, 18, 0) + gtk_about_dialog_set_email_hook (exo_gtk_url_about_dialog_hook, NULL, NULL); + gtk_about_dialog_set_url_hook (exo_gtk_url_about_dialog_hook, NULL, NULL); +#endif + gtk_show_about_dialog(GTK_WINDOW (window), + "logo", icon, + "program-name", "Xfburn", + "license", xfce_get_license_text (XFCE_LICENSE_TEXT_GPL), + "version", VERSION, + "comments", _("Another cd burning GUI"), + "website", "http://www.xfce.org/projects/xfburn", + "copyright", "2005-2008 David Mohr, Mario Đanić, Jean-François Wauthy", + "authors", auth, + "translator-credits", translators, + NULL); - xfce_about_info_free (info); if (G_LIKELY (icon != NULL)) g_object_unref (G_OBJECT (icon)); } diff --git a/xfburn/xfburn-main.c b/xfburn/xfburn-main.c index b9e7db0..bd1168c 100644 --- a/xfburn/xfburn-main.c +++ b/xfburn/xfburn-main.c @@ -29,7 +29,7 @@ #include #include -#include +#include #ifdef HAVE_GST #include @@ -217,7 +217,7 @@ main (int argc, char **argv) if (!burn_initialize ()) { g_critical ("Unable to initialize libburn"); - xfce_err (_("Unable to initialize the burning backend.")); + xfce_dialog_show_error (NULL, NULL, _("Unable to initialize the burning backend.")); gdk_threads_leave (); return EXIT_FAILURE; } @@ -274,7 +274,7 @@ main (int argc, char **argv) #ifdef HAVE_GUDEV error_msg = xfburn_udev_manager_create_global (); if (error_msg) { - xfce_err (error_msg); + xfce_dialog_show_error (NULL, NULL, error_msg); gdk_threads_leave (); burn_finish (); return EXIT_FAILURE; @@ -328,7 +328,7 @@ main (int argc, char **argv) } if (!xfburn_transcoder_is_initialized (transcoder, &error)) { - xfce_warn (_("Failed to initialize %s transcoder: %s\n\t(falling back to basic implementation)"), xfburn_transcoder_get_name (transcoder), error->message); + xfce_dialog_show_warning(NULL, NULL, _("Failed to initialize %s transcoder: %s\n\t(falling back to basic implementation)"), xfburn_transcoder_get_name (transcoder), error->message); g_error_free (error); g_object_unref (transcoder); transcoder = XFBURN_TRANSCODER (xfburn_transcoder_basic_new ()); @@ -361,7 +361,7 @@ main (int argc, char **argv) if (g_file_test (image_fullname, G_FILE_TEST_EXISTS)) xfburn_burn_image_dialog_set_filechooser_name (dialog, image_fullname); else - xfce_err ( g_strdup_printf ( _("Image file '%s' does not exist."), image_fullname)); + xfce_dialog_show_error (NULL, NULL, g_strdup_printf ( _("Image file '%s' does not exist."), image_fullname)); } gtk_dialog_run (GTK_DIALOG (dialog)); diff --git a/xfburn/xfburn-perform-burn.h b/xfburn/xfburn-perform-burn.h index d3504d4..b077a9e 100644 --- a/xfburn/xfburn-perform-burn.h +++ b/xfburn/xfburn-perform-burn.h @@ -25,7 +25,7 @@ #endif #include -#include +#include #include diff --git a/xfburn/xfburn-preferences-dialog.c b/xfburn/xfburn-preferences-dialog.c index 6e9d025..dee0002 100644 --- a/xfburn/xfburn-preferences-dialog.c +++ b/xfburn/xfburn-preferences-dialog.c @@ -20,7 +20,7 @@ #include #endif /* !HAVE_CONFIG_H */ -#include +#include #include #include "xfburn-preferences-dialog.h" @@ -185,7 +185,7 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj) vbox2 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox2); - frame = xfce_create_framebox_with_content (_("Temporary directory"), vbox2); + frame = xfce_gtk_frame_box_new_with_content (_("Temporary directory"), vbox2); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, BORDER); gtk_widget_show (frame); @@ -200,7 +200,7 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj) vbox2 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox2); - frame = xfce_create_framebox_with_content (_("File browser"), vbox2); + frame = xfce_gtk_frame_box_new_with_content (_("File browser"), vbox2); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, BORDER); gtk_widget_show (frame); @@ -240,7 +240,7 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj) vbox2 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox2); - frame = xfce_create_framebox_with_content (_("Detected devices"), vbox2); + frame = xfce_gtk_frame_box_new_with_content (_("Detected devices"), vbox2); gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, BORDER); gtk_widget_show (frame); @@ -292,17 +292,17 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj) gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, BORDER); gtk_widget_show (hbox); - priv->button_scan = xfce_create_mixed_button (GTK_STOCK_CDROM, _("Sc_an for devices")); + priv->button_scan = xfce_gtk_button_new_mixed (GTK_STOCK_CDROM, _("Sc_an for devices")); gtk_box_pack_end (GTK_BOX (hbox), priv->button_scan, FALSE, FALSE, BORDER); g_signal_connect (G_OBJECT (priv->button_scan), "clicked", G_CALLBACK (scan_button_clicked_cb), obj); gtk_widget_show (priv->button_scan); gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &x, &y); - icon = xfce_themed_icon_load ("media-optical", x); + icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "media-optical", x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL); if (!icon) - icon = xfce_themed_icon_load ("media-cdrom", x); + icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "media-cdrom", x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL); if (!icon) - icon = xfce_themed_icon_load (GTK_STOCK_CDROM, x); + icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), GTK_STOCK_CDROM, x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL); gtk_list_store_append (icon_store, &iter); @@ -326,7 +326,7 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj) vbox3 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox3); - frame = xfce_create_framebox_with_content (_("FIFO buffer size (in kb)"), vbox3); + frame = xfce_gtk_frame_box_new_with_content (_("FIFO buffer size (in kb)"), vbox3); gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, BORDER); gtk_widget_show (frame); @@ -460,7 +460,7 @@ scan_button_clicked_cb (GtkWidget * button, gpointer user_data) static void cb_show_hidden_clicked (GtkButton * Button, gpointer user_data) { - xfce_warn (_("Changing this setting only takes full effect after a program restart.")); + xfce_dialog_show_warning(NULL, NULL, _("Changing this setting only takes full effect after a program restart.")); } /* public */ diff --git a/xfburn/xfburn-progress-dialog.c b/xfburn/xfburn-progress-dialog.c index b3a145b..2b5ecc3 100644 --- a/xfburn/xfburn-progress-dialog.c +++ b/xfburn/xfburn-progress-dialog.c @@ -30,7 +30,7 @@ #include -#include +#include #include "xfburn-progress-dialog.h" #include "xfburn-global.h" @@ -603,7 +603,7 @@ xfburn_progress_dialog_burning_failed (XfburnProgressDialog * dialog, const gcha xfburn_progress_dialog_set_status_with_text (dialog, XFBURN_PROGRESS_DIALOG_STATUS_FAILED, _("Failure")); gdk_threads_enter (); - xfce_err (msg_error); + xfce_dialog_show_error (NULL, NULL, msg_error); gdk_threads_leave (); } diff --git a/xfburn/xfburn-transcoder-basic.c b/xfburn/xfburn-transcoder-basic.c index d9aeb4d..3796c8f 100644 --- a/xfburn/xfburn-transcoder-basic.c +++ b/xfburn/xfburn-transcoder-basic.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include @@ -235,7 +235,7 @@ is_valid_wav (const gchar *path) fd = open (path, 0); if (fd == -1) { - xfce_warn (_("Could not open %s."), path); + xfce_dialog_show_warning(NULL, _("Could not open %s."), path); return FALSE; } diff --git a/xfburn/xfburn-transcoder-gst.c b/xfburn/xfburn-transcoder-gst.c index da17d6f..b0955cf 100644 --- a/xfburn/xfburn-transcoder-gst.c +++ b/xfburn/xfburn-transcoder-gst.c @@ -36,7 +36,6 @@ #include #include -#include #include diff --git a/xfburn/xfburn-udev-manager.c b/xfburn/xfburn-udev-manager.c index c09668d..5de2daa 100644 --- a/xfburn/xfburn-udev-manager.c +++ b/xfburn/xfburn-udev-manager.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include "xfburn-global.h" #include "xfburn-progress-dialog.h" @@ -514,7 +514,7 @@ xfburn_udev_manager_check_ask_umount (XfburnUdevManager *udevman, XfburnDevice * if (unmounted) g_message ("Unmounted '%s'", mp); else { - xfce_err ("Failed to unmount '%s'. Drive cannot be used for burning.", mp); + xfce_dialog_show_error (NULL, NULL, "Failed to unmount '%s'. Drive cannot be used for burning.", mp); DBG ("Failed to unmount '%s'", mp); } -- 1.7.5.2