[Xfce4-commits] [apps/xfburn] 05/42: Prepare xfburn for the gtk3 migration

noreply at xfce.org noreply at xfce.org
Tue Oct 15 02:21:48 CEST 2019


This is an automated email from the git hooks/post-receive script.

k   a   t   a   n   a   s   t   e   e   l       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfburn.

commit 0db14cd856a815c37fae62c27b3a52aae09174a3
Author: Romain B <skunnyk at alteroot.org>
Date:   Sun Nov 12 23:16:25 2017 +0100

    Prepare xfburn for the gtk3 migration
    
    - Allow build with CFLAGS+="-DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE"
    - Bump gtk2 to 2.24
    - Use accessor functions instead of direct access.
    - Remove usage of deprecated functions
    - This works will ease the gtk3 migration
---
 configure.ac.in                                   |  4 ++--
 xfburn/xfburn-audio-composition.c                 | 14 +++++++-------
 xfburn/xfburn-blank-dialog.c                      |  4 ++--
 xfburn/xfburn-burn-audio-cd-composition-dialog.c  |  4 ++--
 xfburn/xfburn-burn-data-composition-base-dialog.c |  4 ++--
 xfburn/xfburn-burn-image-dialog.c                 |  7 ++++---
 xfburn/xfburn-compositions-notebook.c             |  4 ++--
 xfburn/xfburn-copy-cd-dialog.c                    |  2 +-
 xfburn/xfburn-copy-dvd-dialog.c                   |  2 +-
 xfburn/xfburn-data-composition.c                  | 19 ++++++++++---------
 xfburn/xfburn-device-box.c                        |  6 +++---
 xfburn/xfburn-disc-usage.c                        |  4 ++--
 xfburn/xfburn-preferences-dialog.c                |  5 ++---
 xfburn/xfburn-progress-dialog.c                   |  6 +++---
 xfburn/xfburn-utils.c                             |  2 +-
 15 files changed, 44 insertions(+), 43 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index e20703b..7ddd082 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -34,9 +34,9 @@ dnl check for required packages
 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([GTK], [gtk+-2.0], [2.24.0])
 XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.32])
-XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.12.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/xfburn-audio-composition.c b/xfburn/xfburn-audio-composition.c
index 6490a70..77dee39 100644
--- a/xfburn/xfburn-audio-composition.c
+++ b/xfburn/xfburn-audio-composition.c
@@ -1590,7 +1590,7 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
   GtkTreeIter *iter_where_insert;
 
   g_return_if_fail (sd);
-  g_return_if_fail (sd->data);
+  g_return_if_fail (gtk_selection_data_get_data(sd));
   
   model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
 
@@ -1614,7 +1614,7 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
   xfburn_busy_cursor (priv->content);
 
   /* move a selection inside of the composition window */
-  if (sd->target == gdk_atom_intern ("XFBURN_TREE_PATHS", FALSE)) {
+  if (gtk_selection_data_get_target(sd) == gdk_atom_intern ("XFBURN_TREE_PATHS", FALSE)) {
     GList *row = NULL, *selected_rows = NULL;
     GtkTreeIter *iter = NULL;
     GtkTreeIter *iter_prev = NULL;
@@ -1622,7 +1622,7 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
     
     xfburn_adding_progress_show (XFBURN_ADDING_PROGRESS (priv->progress));
 
-    row = selected_rows = *((GList **) sd->data);
+    row = selected_rows = *((GList **) gtk_selection_data_get_data(sd));
     
     if (path_where_insert) {
       iter_where_insert = g_new0 (GtkTreeIter, 1);
@@ -1682,7 +1682,7 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
       if ((iter = copy_entry_to (composition, &iter_src, iter_prev, position)) != NULL) {
         GtkTreePath *path_parent = gtk_tree_path_copy (path_src);
         
-        if (dc->action == GDK_ACTION_MOVE) {
+        if (gdk_drag_context_get_actions(dc) == GDK_ACTION_MOVE) {
           /* remove source entry */
           /*
            * This shouldn't be able to happen anymore w/o folders
@@ -1730,7 +1730,7 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
     xfburn_default_cursor (priv->content);
   }
   /* drag from the file selector */
-  else if (sd->target == gdk_atom_intern ("text/plain;charset=utf-8", FALSE)) {
+  else if (gtk_selection_data_get_target(sd) == gdk_atom_intern ("text/plain;charset=utf-8", FALSE)) {
     ThreadAddFilesDragParams *params;
     gchar **files = NULL;
     gboolean ret = FALSE;
@@ -1801,7 +1801,7 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
       cb_adding_done (XFBURN_ADDING_PROGRESS (priv->progress), composition);
     }
   } 
-  else if (sd->target == gdk_atom_intern ("text/uri-list", FALSE)) {
+  else if (gtk_selection_data_get_target(sd) == gdk_atom_intern ("text/uri-list", FALSE)) {
     GList *vfs_paths = NULL;
     GList *vfs_path;
     GList *lp;
@@ -1810,7 +1810,7 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
     gsize   n;
     gboolean ret = FALSE;
 
-    uris = g_uri_list_extract_uris ((gchar *) sd->data);
+    uris = g_uri_list_extract_uris ((gchar *) gtk_selection_data_get_data(sd));
 
     for (n = 0; uris != NULL && uris[n] != NULL; ++n)
       vfs_paths = g_list_append (vfs_paths, g_file_new_for_uri (uris[n]));
diff --git a/xfburn/xfburn-blank-dialog.c b/xfburn/xfburn-blank-dialog.c
index bfa6456..2a8732d 100644
--- a/xfburn/xfburn-blank-dialog.c
+++ b/xfburn/xfburn-blank-dialog.c
@@ -185,7 +185,7 @@ static void
 xfburn_blank_dialog_init (XfburnBlankDialog * obj)
 {
   XfburnBlankDialogPrivate *priv = XFBURN_BLANK_DIALOG_GET_PRIVATE (obj);
-  GtkBox *box = GTK_BOX (GTK_DIALOG (obj)->vbox);
+  GtkBox *box = GTK_BOX (gtk_dialog_get_content_area((GTK_DIALOG (obj))));
   GdkPixbuf *icon = NULL;
   GtkWidget *frame;
   GtkWidget *vbox;
@@ -247,7 +247,7 @@ xfburn_blank_dialog_init (XfburnBlankDialog * obj)
   button = xfce_gtk_button_new_mixed ("stock_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);
+  gtk_widget_set_can_default (button, TRUE);
   gtk_widget_grab_focus (button);
   gtk_widget_grab_default (button);
   priv->button_blank = button;
diff --git a/xfburn/xfburn-burn-audio-cd-composition-dialog.c b/xfburn/xfburn-burn-audio-cd-composition-dialog.c
index 5213d5d..73d5ba4 100644
--- a/xfburn/xfburn-burn-audio-cd-composition-dialog.c
+++ b/xfburn/xfburn-burn-audio-cd-composition-dialog.c
@@ -143,7 +143,7 @@ xfburn_burn_audio_cd_composition_dialog_constructor (GType type, guint n_constru
   gobj = G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_properties, construct_properties);
   obj = XFBURN_BURN_AUDIO_CD_COMPOSITION_DIALOG (gobj);
   priv = XFBURN_BURN_AUDIO_CD_COMPOSITION_DIALOG_GET_PRIVATE (obj);
-  box = GTK_BOX (GTK_DIALOG (obj)->vbox);
+  box = GTK_BOX (gtk_dialog_get_content_area((GTK_DIALOG (obj))));
 
   gtk_window_set_title (GTK_WINDOW (obj), _("Burn Composition"));
   gtk_window_set_destroy_with_parent (GTK_WINDOW (obj), TRUE);
@@ -224,7 +224,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_OK);
   //gtk_box_pack_start (GTK_BOX (GTK_DIALOG(obj)->action_area), button, TRUE, TRUE, 0);
-  GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+  gtk_widget_set_can_default (button, TRUE);
   gtk_widget_grab_focus (button);
   gtk_widget_grab_default (button);
 
diff --git a/xfburn/xfburn-burn-data-composition-base-dialog.c b/xfburn/xfburn-burn-data-composition-base-dialog.c
index 818d5d2..786dab6 100644
--- a/xfburn/xfburn-burn-data-composition-base-dialog.c
+++ b/xfburn/xfburn-burn-data-composition-base-dialog.c
@@ -180,7 +180,7 @@ xfburn_burn_data_composition_base_dialog_constructor (GType type, guint n_constr
   gobj = G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_properties, construct_properties);
   obj = XFBURN_BURN_DATA_COMPOSITION_BASE_DIALOG (gobj);
   priv = XFBURN_BURN_DATA_COMPOSITION_BASE_DIALOG_GET_PRIVATE (obj);
-  box = GTK_BOX (GTK_DIALOG (obj)->vbox);
+  box = GTK_BOX (gtk_dialog_get_content_area((GTK_DIALOG (obj))));
 
   gtk_window_set_title (GTK_WINDOW (obj), _("Burn Composition"));
   gtk_window_set_destroy_with_parent (GTK_WINDOW (obj), TRUE);
@@ -299,7 +299,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_OK);
   //gtk_box_pack_start (GTK_BOX (GTK_DIALOG(obj)->action_area), button, TRUE, TRUE, 0);
-  GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+  gtk_widget_set_can_default (button, TRUE);
   gtk_widget_grab_focus (button);
   gtk_widget_grab_default (button);
 
diff --git a/xfburn/xfburn-burn-image-dialog.c b/xfburn/xfburn-burn-image-dialog.c
index 76cc26b..fd3c8d7 100644
--- a/xfburn/xfburn-burn-image-dialog.c
+++ b/xfburn/xfburn-burn-image-dialog.c
@@ -27,6 +27,7 @@
 #include <fcntl.h>
 
 #include <gtk/gtk.h>
+#include <exo/exo.h>
 
 #include "xfburn-global.h"
 #include "xfburn-utils.h"
@@ -150,7 +151,7 @@ xfburn_burn_image_dialog_class_init (XfburnBurnImageDialogClass * klass)
 static void
 xfburn_burn_image_dialog_init (XfburnBurnImageDialog * obj)
 {
-  GtkBox *box = GTK_BOX (GTK_DIALOG (obj)->vbox);
+  GtkBox *box = GTK_BOX (gtk_dialog_get_content_area(GTK_DIALOG (obj)));
   XfburnBurnImageDialogPrivate *priv = XFBURN_BURN_IMAGE_DIALOG_GET_PRIVATE (obj);
   
   GdkPixbuf *icon = NULL;
@@ -249,9 +250,9 @@ xfburn_burn_image_dialog_init (XfburnBurnImageDialog * obj)
   priv->burn_button = xfce_gtk_button_new_mixed ("stock_xfburn", _("_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);
+  gtk_container_add (GTK_CONTAINER( GTK_DIALOG(exo_gtk_dialog_get_action_area(GTK_DIALOG(obj)))), priv->burn_button);
   //gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_OK);
-  GTK_WIDGET_SET_FLAGS (priv->burn_button, GTK_CAN_DEFAULT);
+  gtk_widget_set_can_default (priv->burn_button, TRUE);
   gtk_widget_grab_focus (priv->burn_button);
   gtk_widget_grab_default (priv->burn_button);
 
diff --git a/xfburn/xfburn-compositions-notebook.c b/xfburn/xfburn-compositions-notebook.c
index e3f2389..70d0818 100644
--- a/xfburn/xfburn-compositions-notebook.c
+++ b/xfburn/xfburn-compositions-notebook.c
@@ -48,7 +48,7 @@ static void xfburn_compositions_notebook_finalize (GObject * object);
 
 
 /* internals */
-static void cb_switch_page (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, 
+static void cb_switch_page (GtkNotebook *notebook, GtkWidget *page, guint page_num, 
                             XfburnCompositionsNotebookPrivate *priv);
 static void cb_composition_close (XfburnNotebookTab *tab, GtkNotebook *notebook);
 static void cb_composition_name_changed (XfburnComposition *composition, const gchar * name, XfburnCompositionsNotebook *notebook);
@@ -125,7 +125,7 @@ xfburn_compositions_notebook_init (XfburnCompositionsNotebook * notebook)
 /* internals */
 /*************/
 static void
-cb_switch_page (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, XfburnCompositionsNotebookPrivate *priv)
+cb_switch_page (GtkNotebook *notebook, GtkWidget *page, guint page_num, XfburnCompositionsNotebookPrivate *priv)
 {
 
 }
diff --git a/xfburn/xfburn-copy-cd-dialog.c b/xfburn/xfburn-copy-cd-dialog.c
index d99b7ad..1dc8c34 100644
--- a/xfburn/xfburn-copy-cd-dialog.c
+++ b/xfburn/xfburn-copy-cd-dialog.c
@@ -195,7 +195,7 @@ xfburn_copy_cd_dialog_init (XfburnCopyCdDialog * obj)
   button = xfce_create_mixed_button ("xfburn-data-copy", _("_Copy CD"));
   gtk_widget_show (button);
   gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_OK);
-  GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+  gtk_widget_set_can_default (button, GTK_CAN_DEFAULT);
   gtk_widget_grab_focus (button);
   gtk_widget_grab_default (button);
 
diff --git a/xfburn/xfburn-copy-dvd-dialog.c b/xfburn/xfburn-copy-dvd-dialog.c
index d965a77..77f4918 100644
--- a/xfburn/xfburn-copy-dvd-dialog.c
+++ b/xfburn/xfburn-copy-dvd-dialog.c
@@ -195,7 +195,7 @@ xfburn_copy_dvd_dialog_init (XfburnCopyDvdDialog * obj)
   button = xfce_create_mixed_button ("xfburn-data-copy", _("_Copy DVD"));
   gtk_widget_show (button);
   gtk_dialog_add_action_widget (GTK_DIALOG (obj), button, GTK_RESPONSE_OK);
-  GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+  gtk_widget_set_can_default (button, GTK_CAN_DEFAULT);
   gtk_widget_grab_focus (button);
   gtk_widget_grab_default (button);
 
diff --git a/xfburn/xfburn-data-composition.c b/xfburn/xfburn-data-composition.c
index 4e65faf..a62f58e 100644
--- a/xfburn/xfburn-data-composition.c
+++ b/xfburn/xfburn-data-composition.c
@@ -1605,7 +1605,7 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
   GtkTreeIter iter_where_insert;
 
   g_return_if_fail (sd);
-  g_return_if_fail (sd->data);
+  g_return_if_fail (gtk_selection_data_get_data (sd));
   
   model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
   
@@ -1614,14 +1614,14 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
   xfburn_busy_cursor (priv->content);
 
   /* move a selection inside of the composition window */
-  if (sd->target == gdk_atom_intern ("XFBURN_TREE_PATHS", FALSE)) {
+  if (gtk_selection_data_get_target(sd) == gdk_atom_intern ("XFBURN_TREE_PATHS", FALSE)) {
     GList *row = NULL, *selected_rows = NULL;
     GtkTreeIter *iter = NULL;
     DataCompositionEntryType type_dest = -1;
     
     xfburn_adding_progress_show (XFBURN_ADDING_PROGRESS (priv->progress));
 
-    row = selected_rows = *((GList **) sd->data);
+    row = selected_rows = *((GList **) gtk_selection_data_get_data(sd));
     
     if (path_where_insert) {      
       gtk_tree_model_get_iter (model, &iter_where_insert, path_where_insert);
@@ -1700,7 +1700,7 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
           g_free (parent_humansize);
         }
           
-        if (dc->action == GDK_ACTION_MOVE) {       
+        if (gdk_drag_context_get_actions(dc) == GDK_ACTION_MOVE) {       
           /* remove source entry */
           if (gtk_tree_path_up (path_parent) && path_where_insert && 
               !gtk_tree_path_is_descendant (path_where_insert, path_parent)) {
@@ -1742,7 +1742,7 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
     xfburn_default_cursor (priv->content);
   }
   /* drag from the file selector, or nautilus */
-  else if (sd->target == gdk_atom_intern ("text/plain;charset=utf-8", FALSE)) {
+  else if (gtk_selection_data_get_target(sd) == gdk_atom_intern ("text/plain;charset=utf-8", FALSE)) {
     ThreadAddFilesDragParams *params;
     gchar **files = NULL;
     gchar *full_paths;
@@ -1795,7 +1795,7 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
 
     gtk_drag_finish (dc, TRUE, FALSE, t);
   } 
-  else if (sd->target == gdk_atom_intern ("text/uri-list", FALSE)) {
+  else if (gtk_selection_data_get_target(sd) == gdk_atom_intern ("text/uri-list", FALSE)) {
     GList *vfs_paths = NULL;
     GList *vfs_path;
     GList *lp;
@@ -1803,7 +1803,7 @@ cb_content_drag_data_rcv (GtkWidget * widget, GdkDragContext * dc, guint x, guin
     gchar **uris;
     gsize   n;
 
-    uris = g_uri_list_extract_uris ((gchar *) sd->data);
+    uris = g_uri_list_extract_uris ((gchar *) gtk_selection_data_get_data(sd));
 
     for (n = 0; uris != NULL && uris[n] != NULL; ++n)
       vfs_paths = g_list_append (vfs_paths, g_file_new_for_uri (uris[n]));
@@ -2046,7 +2046,8 @@ generate_iso_image (XfburnDataComposition * dc)
       title = g_strdup_printf ("<b>%s</b>", title);
       gtk_label_set_markup(GTK_LABEL (label), title);
       g_free (title);
-      gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label);
+
+	  gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG(dialog))), label);
 
       textview = gtk_text_view_new ();
       buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview));
@@ -2056,7 +2057,7 @@ generate_iso_image (XfburnDataComposition * dc)
       scrolled = gtk_scrolled_window_new (NULL, NULL);
       gtk_container_add (GTK_CONTAINER (scrolled), textview);
       gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-      gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), scrolled);
+      gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG(dialog))), scrolled);
 
       gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 200);
 
diff --git a/xfburn/xfburn-device-box.c b/xfburn/xfburn-device-box.c
index 95a61d4..9548b46 100644
--- a/xfburn/xfburn-device-box.c
+++ b/xfburn/xfburn-device-box.c
@@ -480,7 +480,7 @@ status_label_update (XfburnDeviceBoxPrivate *priv)
   gchar * text;
   gboolean sensitive;
 
-  sensitive = GTK_WIDGET_SENSITIVE (priv->combo_device);
+  sensitive = gtk_widget_get_sensitive (priv->combo_device);
 
   //DBG ("sensitive = %d", sensitive);
 
@@ -713,7 +713,7 @@ fill_combo_mode (XfburnDeviceBox *box, XfburnDevice *device)
 static void
 cb_volume_change_start (XfburnDeviceList *devlist, gboolean device_changed, XfburnDeviceBox *box)
 {
-  if (GTK_WIDGET_REALIZED (box))
+  if (gtk_widget_get_realized (GTK_WIDGET(box)))
     xfburn_busy_cursor (GTK_WIDGET (box));
 }
 
@@ -728,7 +728,7 @@ cb_volume_change_end (XfburnDeviceList *devlist, gboolean device_changed, Xfburn
 
   refresh_drive_info (box, device);
 
-  if (GTK_WIDGET_REALIZED (box))
+  if (gtk_widget_get_realized (GTK_WIDGET (box)))
     xfburn_default_cursor (GTK_WIDGET (box));
 
   g_signal_emit (box, signals[VOLUME_CHANGED], 0, device_changed, device);
diff --git a/xfburn/xfburn-disc-usage.c b/xfburn/xfburn-disc-usage.c
index 306e98e..614ace7 100644
--- a/xfburn/xfburn-disc-usage.c
+++ b/xfburn/xfburn-disc-usage.c
@@ -152,9 +152,9 @@ xfburn_disc_usage_constructor (GType type, guint n_construct_properties, GObject
   gtk_box_pack_start (GTK_BOX (disc_usage), disc_usage->progress_bar, TRUE, TRUE, BORDER);
   gtk_widget_show (disc_usage->progress_bar);
 
-  disc_usage->combo = gtk_combo_box_new_text ();
+  disc_usage->combo = gtk_combo_box_text_new ();
   for (i = 0; i < class->num_labels; i++) {
-    gtk_combo_box_append_text (GTK_COMBO_BOX (disc_usage->combo), class->labels[i].label);
+    gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (disc_usage->combo), class->labels[i].label);
   }
   gtk_combo_box_set_active (GTK_COMBO_BOX (disc_usage->combo), DEFAULT_DISK_SIZE_LABEL);
   gtk_box_pack_start (GTK_BOX (disc_usage), disc_usage->combo, FALSE, FALSE, BORDER);
diff --git a/xfburn/xfburn-preferences-dialog.c b/xfburn/xfburn-preferences-dialog.c
index 309ed01..20d5bef 100644
--- a/xfburn/xfburn-preferences-dialog.c
+++ b/xfburn/xfburn-preferences-dialog.c
@@ -125,7 +125,7 @@ xfburn_preferences_dialog_class_init (XfburnPreferencesDialogClass * klass)
 static void
 xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj)
 {
-  GtkBox *box = GTK_BOX (GTK_DIALOG (obj)->vbox);
+  GtkBox *box = GTK_BOX (gtk_dialog_get_content_area(GTK_DIALOG (obj)));
   XfburnPreferencesDialogPrivate *priv = XFBURN_PREFERENCES_DIALOG_GET_PRIVATE (obj);
   
   GtkWidget *vbox, *vbox2, *vbox3, *hbox;
@@ -146,7 +146,6 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj)
   gtk_window_set_default_size (GTK_WINDOW (obj), 775, 400);
   gtk_window_set_destroy_with_parent (GTK_WINDOW (obj), TRUE);
   gtk_window_set_icon_name (GTK_WINDOW (obj), "preferences-system");
-  gtk_dialog_set_has_separator (GTK_DIALOG (obj), FALSE);
   
   hbox = gtk_hbox_new (FALSE, 0);
   gtk_box_pack_start (box, hbox, TRUE, TRUE, 0);
@@ -349,7 +348,7 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj)
   button_close = gtk_button_new_from_stock ("gtk-close");
   gtk_widget_show (button_close);
   gtk_dialog_add_action_widget (GTK_DIALOG (obj), button_close, GTK_RESPONSE_CLOSE);
-  GTK_WIDGET_SET_FLAGS (button_close, GTK_CAN_DEFAULT);
+  gtk_widget_set_can_default (button_close, GTK_CAN_DEFAULT);
   gtk_widget_grab_focus (button_close);
   gtk_widget_grab_default (button_close);
 
diff --git a/xfburn/xfburn-progress-dialog.c b/xfburn/xfburn-progress-dialog.c
index 6d0a46d..8373f99 100644
--- a/xfburn/xfburn-progress-dialog.c
+++ b/xfburn/xfburn-progress-dialog.c
@@ -184,7 +184,7 @@ static void
 xfburn_progress_dialog_init (XfburnProgressDialog * obj)
 {
   XfburnProgressDialogPrivate *priv = XFBURN_PROGRESS_DIALOG_GET_PRIVATE (obj);
-  GtkBox *box = GTK_BOX (GTK_DIALOG (obj)->vbox);
+  GtkBox *box = GTK_BOX (gtk_dialog_get_content_area(GTK_DIALOG(obj)));
   GtkWidget *frame;
   GtkWidget *table;
   GtkWidget *label;
@@ -254,7 +254,7 @@ xfburn_progress_dialog_init (XfburnProgressDialog * obj)
   priv->button_close = gtk_button_new_from_stock ("gtk-close");
   gtk_widget_show (priv->button_close);
   gtk_dialog_add_action_widget (GTK_DIALOG (obj), priv->button_close, GTK_RESPONSE_CLOSE);
-  GTK_WIDGET_SET_FLAGS (priv->button_close, GTK_CAN_DEFAULT);
+  gtk_widget_set_can_default (priv->button_close, TRUE);
   gtk_widget_grab_focus (priv->button_close);
   gtk_widget_grab_default (priv->button_close);
   gtk_widget_set_sensitive (priv->button_close, FALSE);
@@ -394,7 +394,7 @@ static gboolean
 cb_dialog_delete (XfburnProgressDialog * dialog, GdkEvent * event, XfburnProgressDialogPrivate * priv)
 {
   xfburn_main_leave_window ();
-  if (!GTK_WIDGET_SENSITIVE (priv->button_close)) {
+  if (!gtk_widget_get_sensitive (priv->button_close)) {
     /* burn process is still ongoing, we need to stop first */
     stop (dialog);
     gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
diff --git a/xfburn/xfburn-utils.c b/xfburn/xfburn-utils.c
index f483e33..591db25 100644
--- a/xfburn/xfburn-utils.c
+++ b/xfburn/xfburn-utils.c
@@ -174,7 +174,7 @@ xfburn_ask_yes_no (GtkMessageType type, const gchar *primary_text, const gchar *
     default:
       ok = FALSE;
   }
-  xfburn_busy_cursor (GTK_DIALOG (dialog)->vbox);
+  xfburn_busy_cursor (gtk_dialog_get_content_area(GTK_DIALOG (dialog)));
   gtk_widget_destroy (GTK_WIDGET (dialog));
 
   return ok;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list