[Xfce4-commits] <thunar:master> Remove deprecated functions (bug #7795).

Nick Schermer noreply at xfce.org
Tue Sep 25 21:10:01 CEST 2012


Updating branch refs/heads/master
         to 8732210f0ed171d2b8a55e3d69e64d88b0de15bd (commit)
       from 2e0fe9b4c2a6e5ad66b52e85880c26f2ad2dba0c (commit)

commit 8732210f0ed171d2b8a55e3d69e64d88b0de15bd
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Sep 25 21:08:14 2012 +0200

    Remove deprecated functions (bug #7795).

 plugins/thunar-sbr/thunar-sbr-number-renamer.c  |    2 +-
 plugins/thunar-sbr/thunar-sbr-remove-renamer.c  |    2 +-
 plugins/thunar-sbr/thunar-sbr-replace-renamer.c |    2 +-
 thunar/thunar-abstract-dialog.c                 |    2 +-
 thunar/thunar-chooser-dialog.c                  |   11 ++---
 thunar/thunar-column-editor.c                   |    3 +-
 thunar/thunar-create-dialog.c                   |    3 +-
 thunar/thunar-dialogs.c                         |    2 +-
 thunar/thunar-dnd.c                             |    4 +-
 thunar/thunar-emblem-chooser.c                  |    2 +-
 thunar/thunar-icon-renderer.c                   |    4 +-
 thunar/thunar-location-button.c                 |    4 +-
 thunar/thunar-location-buttons.c                |   14 +++---
 thunar/thunar-location-dialog.c                 |    1 -
 thunar/thunar-path-entry.c                      |    8 ++--
 thunar/thunar-preferences-dialog.c              |   55 +++++++++++------------
 thunar/thunar-progress-dialog.c                 |    4 +-
 thunar/thunar-properties-dialog.c               |    3 +-
 thunar/thunar-renamer-dialog.c                  |   11 ++---
 thunar/thunar-standard-view.c                   |    4 +-
 thunar/thunar-text-renderer.c                   |   10 ++--
 thunar/thunar-tree-view.c                       |    4 +-
 thunar/thunar-util.c                            |    2 +-
 thunar/thunar-window.c                          |    6 +-
 thunarx/thunarx-property-page.c                 |    4 +-
 25 files changed, 80 insertions(+), 87 deletions(-)

diff --git a/plugins/thunar-sbr/thunar-sbr-number-renamer.c b/plugins/thunar-sbr/thunar-sbr-number-renamer.c
index 18e1783..5cec044 100644
--- a/plugins/thunar-sbr/thunar-sbr-number-renamer.c
+++ b/plugins/thunar-sbr/thunar-sbr-number-renamer.c
@@ -488,7 +488,7 @@ thunar_sbr_number_renamer_update (ThunarSbrNumberRenamer *number_renamer)
     }
 
   /* check if the start entry is realized */
-  if (GTK_WIDGET_REALIZED (number_renamer->start_entry))
+  if (gtk_widget_get_realized (number_renamer->start_entry))
     {
       /* check if the "start" value is valid */
       if (G_UNLIKELY (invalid))
diff --git a/plugins/thunar-sbr/thunar-sbr-remove-renamer.c b/plugins/thunar-sbr/thunar-sbr-remove-renamer.c
index 0761814..4738abc 100644
--- a/plugins/thunar-sbr/thunar-sbr-remove-renamer.c
+++ b/plugins/thunar-sbr/thunar-sbr-remove-renamer.c
@@ -374,7 +374,7 @@ thunar_sbr_remove_renamer_update (ThunarSbrRemoveRenamer *remove_renamer)
   guint    end_offset;
 
   /* check if the renamer is realized */
-  if (GTK_WIDGET_REALIZED (remove_renamer))
+  if (gtk_widget_get_realized (GTK_WIDGET (remove_renamer)))
     {
       /* check if start and end offset make sense */
       end_offset = (remove_renamer->end_offset_mode == THUNAR_SBR_OFFSET_MODE_LEFT)
diff --git a/plugins/thunar-sbr/thunar-sbr-replace-renamer.c b/plugins/thunar-sbr/thunar-sbr-replace-renamer.c
index ef51512..0b2aca4 100644
--- a/plugins/thunar-sbr/thunar-sbr-replace-renamer.c
+++ b/plugins/thunar-sbr/thunar-sbr-replace-renamer.c
@@ -614,7 +614,7 @@ thunar_sbr_replace_renamer_pcre_update (ThunarSbrReplaceRenamer *replace_renamer
       g_free (message);
 
       /* check if the entry is realized */
-      if (GTK_WIDGET_REALIZED (replace_renamer->pattern_entry))
+      if (gtk_widget_get_realized (replace_renamer->pattern_entry))
         {
           /* if GTK+ wouldn't be that stupid with style properties and 
            * type plugins, this would be themable, but unfortunately
diff --git a/thunar/thunar-abstract-dialog.c b/thunar/thunar-abstract-dialog.c
index ee0e51d..031e869 100644
--- a/thunar/thunar-abstract-dialog.c
+++ b/thunar/thunar-abstract-dialog.c
@@ -65,7 +65,7 @@ thunar_abstract_dialog_close (GtkDialog *dialog)
   GdkEvent *event;
 
   /* verify that dialog is realized */
-  if (G_LIKELY (GTK_WIDGET_REALIZED (dialog)))
+  if (G_LIKELY (gtk_widget_get_realized (GTK_WIDGET (dialog))))
     {
       /* send a delete event to the dialog */
       event = gdk_event_new (GDK_DELETE);
diff --git a/thunar/thunar-chooser-dialog.c b/thunar/thunar-chooser-dialog.c
index a7fe4bb..7d298ef 100644
--- a/thunar/thunar-chooser-dialog.c
+++ b/thunar/thunar-chooser-dialog.c
@@ -179,7 +179,6 @@ thunar_chooser_dialog_init (ThunarChooserDialog *dialog)
   GtkWidget         *swin;
 
   /* setup basic window properties */
-  gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
   gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
   gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
   gtk_window_set_title (GTK_WINDOW (dialog), _("Open With"));
@@ -626,7 +625,7 @@ thunar_chooser_dialog_update_header (ThunarChooserDialog *dialog)
   gchar       *text;
 
   _thunar_return_if_fail (THUNAR_IS_CHOOSER_DIALOG (dialog));
-  _thunar_return_if_fail (GTK_WIDGET_REALIZED (dialog));
+  _thunar_return_if_fail (gtk_widget_get_realized (GTK_WIDGET (dialog)));
 
   /* check if we have a valid file set */
   if (G_UNLIKELY (dialog->file == NULL))
@@ -942,11 +941,11 @@ thunar_chooser_dialog_expand (ThunarChooserDialog *dialog)
     }
 
   /* reset the cursor */
-  if (G_LIKELY (GTK_WIDGET_REALIZED (dialog)))
+  if (G_LIKELY (gtk_widget_get_realized (GTK_WIDGET (dialog))))
     gdk_window_set_cursor (GTK_WIDGET (dialog)->window, NULL);
 
   /* grab focus to the tree view widget */
-  if (G_LIKELY (GTK_WIDGET_REALIZED (dialog->tree_view)))
+  if (G_LIKELY (gtk_widget_get_realized (dialog->tree_view)))
     gtk_widget_grab_focus (dialog->tree_view);
 }
 
@@ -1128,7 +1127,7 @@ thunar_chooser_dialog_set_file (ThunarChooserDialog *dialog,
     }
 
   /* update the header */
-  if (GTK_WIDGET_REALIZED (dialog))
+  if (gtk_widget_get_realized (GTK_WIDGET (dialog)))
     thunar_chooser_dialog_update_header (dialog);
 
   /* notify listeners */
@@ -1234,7 +1233,7 @@ thunar_show_chooser_dialog (gpointer    parent,
                          NULL);
 
   /* check if we have a toplevel window */
-  if (G_LIKELY (window != NULL && GTK_WIDGET_TOPLEVEL (window)))
+  if (G_LIKELY (window != NULL && gtk_widget_get_toplevel (window)))
     {
       /* dialog is transient for toplevel window and modal */
       gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
diff --git a/thunar/thunar-column-editor.c b/thunar/thunar-column-editor.c
index 75149e2..7458c6c 100644
--- a/thunar/thunar-column-editor.c
+++ b/thunar/thunar-column-editor.c
@@ -117,7 +117,6 @@ thunar_column_editor_init (ThunarColumnEditor *column_editor)
   /* setup the dialog */
   gtk_dialog_add_button (GTK_DIALOG (column_editor), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
   gtk_dialog_set_default_response (GTK_DIALOG (column_editor), GTK_RESPONSE_CLOSE);
-  gtk_dialog_set_has_separator (GTK_DIALOG (column_editor), FALSE);
   gtk_window_set_resizable (GTK_WINDOW (column_editor), FALSE);
   gtk_window_set_title (GTK_WINDOW (column_editor), _("Configure Columns in the Detailed List View"));
 
@@ -572,7 +571,7 @@ thunar_show_column_editor (gpointer parent)
   dialog = thunar_column_editor_new ();
 
   /* check if we have a toplevel window */
-  if (G_LIKELY (window != NULL && GTK_WIDGET_TOPLEVEL (window)))
+  if (G_LIKELY (window != NULL && gtk_widget_get_toplevel (window)))
     {
       /* dialog is transient for toplevel window and modal */
       gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
diff --git a/thunar/thunar-create-dialog.c b/thunar/thunar-create-dialog.c
index 055ac17..64a7bc2 100644
--- a/thunar/thunar-create-dialog.c
+++ b/thunar/thunar-create-dialog.c
@@ -137,7 +137,6 @@ thunar_create_dialog_init (ThunarCreateDialog *dialog)
                           _("C_reate"), GTK_RESPONSE_OK,
                           NULL);
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
-  gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
   gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE);
   gtk_window_set_default_size (GTK_WINDOW (dialog), 300, -1);
 
@@ -405,7 +404,7 @@ thunar_create_dialog_set_content_type (ThunarCreateDialog *dialog,
   dialog->content_type = g_strdup (content_type);
 
   /* update the image if we're already realized */
-  if (GTK_WIDGET_REALIZED (dialog))
+  if (gtk_widget_get_realized (GTK_WIDGET (dialog)))
     thunar_create_dialog_update_image (dialog);
 
   /* notify listeners */
diff --git a/thunar/thunar-dialogs.c b/thunar/thunar-dialogs.c
index 666f4d6..dc8b903 100644
--- a/thunar/thunar-dialogs.c
+++ b/thunar/thunar-dialogs.c
@@ -454,7 +454,7 @@ thunar_dialogs_show_job_ask (GtkWindow        *parent,
         }
 
       button = gtk_button_new_with_mnemonic (mnemonic);
-      GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+      gtk_widget_set_can_default (button, TRUE);
       gtk_dialog_add_action_widget (GTK_DIALOG (message), button, response);
       gtk_widget_show (button);
 
diff --git a/thunar/thunar-dnd.c b/thunar/thunar-dnd.c
index 9871eb0..950d656 100644
--- a/thunar/thunar-dnd.c
+++ b/thunar/thunar-dnd.c
@@ -120,7 +120,7 @@ thunar_dnd_ask (GtkWidget    *widget,
 
   /* determine the toplevel window the widget belongs to */
   window = gtk_widget_get_toplevel (widget);
-  if (G_LIKELY (window != NULL && GTK_WIDGET_TOPLEVEL (window)))
+  if (G_LIKELY (window != NULL && gtk_widget_get_toplevel (window)))
     {
       /* check if we can resolve all paths */
       for (lp = path_list; lp != NULL; lp = lp->next)
@@ -218,7 +218,7 @@ thunar_dnd_perform (GtkWidget    *widget,
 
   _thunar_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
   _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
-  _thunar_return_val_if_fail (GTK_WIDGET_REALIZED (widget), FALSE);
+  _thunar_return_val_if_fail (gtk_widget_get_realized (widget), FALSE);
 
   /* query a reference on the application object */
   application = thunar_application_get ();
diff --git a/thunar/thunar-emblem-chooser.c b/thunar/thunar-emblem-chooser.c
index 8220fdd..d58a11a 100644
--- a/thunar/thunar-emblem-chooser.c
+++ b/thunar/thunar-emblem-chooser.c
@@ -466,7 +466,7 @@ thunar_emblem_chooser_create_button (ThunarEmblemChooser *chooser,
 
   /* allocate the button */
   button = gtk_check_button_new ();
-  GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
+  gtk_widget_set_can_focus (button, FALSE);
   g_object_set_data_full (G_OBJECT (button), I_("thunar-emblem"), g_strdup (emblem), g_free);
   g_signal_connect (G_OBJECT (button), "toggled", G_CALLBACK (thunar_emblem_chooser_button_toggled), chooser);
 
diff --git a/thunar/thunar-icon-renderer.c b/thunar/thunar-icon-renderer.c
index 4356499..a42ed77 100644
--- a/thunar/thunar-icon-renderer.c
+++ b/thunar/thunar-icon-renderer.c
@@ -404,7 +404,7 @@ thunar_icon_renderer_render (GtkCellRenderer     *renderer,
         {
           if ((flags & GTK_CELL_RENDERER_SELECTED) != 0)
             {
-              state = GTK_WIDGET_HAS_FOCUS (widget) ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE;
+              state = gtk_widget_has_focus (widget) ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE;
               temp = exo_gdk_pixbuf_colorize (icon, &widget->style->base[state]);
               g_object_unref (G_OBJECT (icon));
               icon = temp;
@@ -419,7 +419,7 @@ thunar_icon_renderer_render (GtkCellRenderer     *renderer,
         }
 
       /* check if we should render an insensitive icon */
-      if (G_UNLIKELY (GTK_WIDGET_STATE (widget) == GTK_STATE_INSENSITIVE || !renderer->sensitive))
+      if (G_UNLIKELY (gtk_widget_get_state (widget) == GTK_STATE_INSENSITIVE || !renderer->sensitive))
         {
           /* allocate an icon source */
           icon_source = gtk_icon_source_new ();
diff --git a/thunar/thunar-location-button.c b/thunar/thunar-location-button.c
index a942d3b..5ffd83e 100644
--- a/thunar/thunar-location-button.c
+++ b/thunar/thunar-location-button.c
@@ -263,7 +263,7 @@ thunar_location_button_init (ThunarLocationButton *location_button)
 
   /* create the toggle button */
   button = gtk_toggle_button_new ();
-  GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
+  gtk_widget_set_can_focus (button, FALSE);
   g_signal_connect_swapped (G_OBJECT (button), "clicked", G_CALLBACK (thunar_location_button_clicked), location_button);
   exo_mutual_binding_new (G_OBJECT (location_button), "active", G_OBJECT (button), "active");
   gtk_container_add (GTK_CONTAINER (location_button), button);
@@ -968,7 +968,7 @@ thunar_location_button_set_file (ThunarLocationButton *location_button,
       g_signal_connect_swapped (G_OBJECT (file), "destroy", G_CALLBACK (thunar_location_button_file_destroy), location_button);
 
       /* update our internal state for the new file (if realized) */
-      if (GTK_WIDGET_REALIZED (location_button))
+      if (gtk_widget_get_realized (GTK_WIDGET (location_button)))
         thunar_location_button_file_changed (location_button, file);
     }
 
diff --git a/thunar/thunar-location-buttons.c b/thunar/thunar-location-buttons.c
index 148ce7d..77c93dc 100644
--- a/thunar/thunar-location-buttons.c
+++ b/thunar/thunar-location-buttons.c
@@ -267,7 +267,7 @@ thunar_location_buttons_init (ThunarLocationButtons *buttons)
   gtk_action_group_set_translation_domain (buttons->action_group, GETTEXT_PACKAGE);
   gtk_action_group_add_actions (buttons->action_group, action_entries, G_N_ELEMENTS (action_entries), buttons);
 
-  GTK_WIDGET_SET_FLAGS (buttons, GTK_NO_WINDOW);
+  gtk_widget_set_has_window (GTK_WIDGET (buttons), FALSE);
   gtk_widget_set_redraw_on_allocate (GTK_WIDGET (buttons), FALSE);
 
   buttons->left_slider = gtk_button_new ();
@@ -766,7 +766,7 @@ static void
 thunar_location_buttons_state_changed (GtkWidget   *widget,
                                        GtkStateType previous_state)
 {
-  if (!GTK_WIDGET_IS_SENSITIVE (widget))
+  if (!gtk_widget_is_sensitive (widget))
     thunar_location_buttons_stop_scrolling (THUNAR_LOCATION_BUTTONS (widget));
 }
 
@@ -884,7 +884,7 @@ static void
 thunar_location_buttons_remove_1 (GtkContainer *container,
                                   GtkWidget    *widget)
 {
-  gboolean need_resize = GTK_WIDGET_VISIBLE (widget);
+  gboolean need_resize = gtk_widget_get_visible (widget);
   gtk_widget_unparent (widget);
   if (G_LIKELY (need_resize))
     gtk_widget_queue_resize (GTK_WIDGET (container));
@@ -899,9 +899,9 @@ thunar_location_buttons_scroll_timeout (gpointer user_data)
 
   GDK_THREADS_ENTER ();
 
-  if (GTK_WIDGET_HAS_FOCUS (buttons->left_slider))
+  if (gtk_widget_has_focus (buttons->left_slider))
     thunar_location_buttons_scroll_left (buttons->left_slider, buttons);
-  else if (GTK_WIDGET_HAS_FOCUS (buttons->right_slider))
+  else if (gtk_widget_has_focus (buttons->right_slider))
     thunar_location_buttons_scroll_right (buttons->right_slider, buttons);
 
   GDK_THREADS_LEAVE ();
@@ -966,7 +966,7 @@ thunar_location_buttons_slider_button_press (GtkWidget             *button,
                                              GdkEventButton        *event,
                                              ThunarLocationButtons *buttons)
 {
-  if (!GTK_WIDGET_HAS_FOCUS (button))
+  if (!gtk_widget_has_focus (button))
     gtk_widget_grab_focus (button);
 
   if (event->type != GDK_BUTTON_PRESS || event->button != 1)
@@ -1431,7 +1431,7 @@ thunar_location_buttons_action_properties (GtkAction             *action,
     {
       /* determine the toplevel window */
       toplevel = gtk_widget_get_toplevel (GTK_WIDGET (buttons));
-      if (G_LIKELY (toplevel != NULL && GTK_WIDGET_TOPLEVEL (toplevel)))
+      if (G_LIKELY (toplevel != NULL && gtk_widget_get_toplevel (toplevel)))
         {
           /* popup the properties dialog */
           dialog = thunar_properties_dialog_new (GTK_WINDOW (toplevel));
diff --git a/thunar/thunar-location-dialog.c b/thunar/thunar-location-dialog.c
index 272f8cd..19d09b4 100644
--- a/thunar/thunar-location-dialog.c
+++ b/thunar/thunar-location-dialog.c
@@ -61,7 +61,6 @@ thunar_location_dialog_init (ThunarLocationDialog *location_dialog)
 
   gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (location_dialog)->vbox), 2);
   gtk_container_set_border_width (GTK_CONTAINER (location_dialog), 5);
-  gtk_dialog_set_has_separator (GTK_DIALOG (location_dialog), FALSE);
   gtk_window_set_default_size (GTK_WINDOW (location_dialog), 350, -1);
   gtk_window_set_title (GTK_WINDOW (location_dialog), _("Open Location"));
 
diff --git a/thunar/thunar-path-entry.c b/thunar/thunar-path-entry.c
index e0a241e..8f4624e 100644
--- a/thunar/thunar-path-entry.c
+++ b/thunar/thunar-path-entry.c
@@ -429,7 +429,7 @@ thunar_path_entry_size_allocate (GtkWidget     *widget,
 
   (*GTK_WIDGET_CLASS (thunar_path_entry_parent_class)->size_allocate) (widget, allocation);
 
-  if (GTK_WIDGET_REALIZED (widget))
+  if (gtk_widget_get_realized (widget))
     {
       gdk_window_move_resize (GTK_ENTRY (path_entry)->text_area,
                               text_allocation.x,
@@ -490,7 +490,7 @@ thunar_path_entry_realize (GtkWidget *widget)
 
   path_entry->icon_area = gdk_window_new (widget->window, &attributes, attributes_mask);
   gdk_window_set_user_data (path_entry->icon_area, widget);
-  gdk_window_set_background (path_entry->icon_area, &widget->style->base[GTK_WIDGET_STATE (widget)]);
+  gdk_window_set_background (path_entry->icon_area, &widget->style->base[gtk_widget_get_state (widget)]);
   gdk_window_show (path_entry->icon_area);
 
   gtk_widget_queue_resize (widget);
@@ -530,7 +530,7 @@ thunar_path_entry_focus (GtkWidget       *widget,
   control_pressed = (gtk_get_current_event_state (&state) && (state & GDK_CONTROL_MASK) != 0);
 
   /* evil hack, but works for GtkFileChooserEntry, so who cares :-) */
-  if ((direction == GTK_DIR_TAB_FORWARD) && (GTK_WIDGET_HAS_FOCUS (widget)) && !control_pressed)
+  if ((direction == GTK_DIR_TAB_FORWARD) && (gtk_widget_has_focus (widget)) && !control_pressed)
     {
       /* if we don't have a completion and the cursor is at the end of the line, we just insert the common prefix */
       if (!path_entry->has_completion && gtk_editable_get_position (GTK_EDITABLE (path_entry)) == GTK_ENTRY (path_entry)->text_length)
@@ -568,7 +568,7 @@ thunar_path_entry_expose_event (GtkWidget      *widget,
       gdk_drawable_get_size (GDK_DRAWABLE (path_entry->icon_area), &width, &height);
 
       gtk_paint_flat_box (widget->style, path_entry->icon_area,
-                          GTK_WIDGET_STATE (widget), GTK_SHADOW_NONE,
+                          gtk_widget_get_state (widget), GTK_SHADOW_NONE,
                           NULL, widget, "entry_bg",
                           0, 0, width, height);
 
diff --git a/thunar/thunar-preferences-dialog.c b/thunar/thunar-preferences-dialog.c
index fd944f1..0ef2ec0 100644
--- a/thunar/thunar-preferences-dialog.c
+++ b/thunar/thunar-preferences-dialog.c
@@ -185,7 +185,6 @@ thunar_preferences_dialog_init (ThunarPreferencesDialog *dialog)
   dialog->preferences = thunar_preferences_get ();
 
   /* configure the dialog properties */
-  gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
   gtk_window_set_icon_name (GTK_WINDOW (dialog), "system-file-manager");
   gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
   gtk_window_set_title (GTK_WINDOW (dialog), _("File Manager Preferences"));
@@ -231,11 +230,11 @@ thunar_preferences_dialog_init (ThunarPreferencesDialog *dialog)
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (label);
 
-  combo = gtk_combo_box_new_text ();
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Icon View"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Detailed List View"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Compact List View"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Last Active View"));
+  combo = gtk_combo_box_text_new ();
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Icon View"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Detailed List View"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Compact List View"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Last Active View"));
   exo_mutual_binding_new_full (G_OBJECT (dialog->preferences), "default-view", G_OBJECT (combo), "active",
                                transform_view_string_to_index, transform_view_index_to_string, NULL, NULL);
   gtk_table_attach (GTK_TABLE (table), combo, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
@@ -299,11 +298,11 @@ thunar_preferences_dialog_init (ThunarPreferencesDialog *dialog)
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (label);
 
-  combo = gtk_combo_box_new_text ();
+  combo = gtk_combo_box_text_new ();
   for (date_style = THUNAR_DATE_STYLE_SIMPLE; date_style <= THUNAR_DATE_STYLE_ISO; ++date_style)
     {
       date = thunar_util_humanize_file_time (time (NULL), date_style);
-      gtk_combo_box_append_text (GTK_COMBO_BOX (combo), date);
+      gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), date);
       g_free (date);
     }
   exo_mutual_binding_new (G_OBJECT (dialog->preferences), "misc-date-style", G_OBJECT (combo), "active");
@@ -342,14 +341,14 @@ thunar_preferences_dialog_init (ThunarPreferencesDialog *dialog)
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (label);
 
-  combo = gtk_combo_box_new_text ();
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Very Small"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Smaller"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Small"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Normal"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Large"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Larger"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Very Large"));
+  combo = gtk_combo_box_text_new ();
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Very Small"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Smaller"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Small"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Normal"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Large"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Larger"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Very Large"));
   exo_mutual_binding_new_full (G_OBJECT (dialog->preferences), "shortcuts-icon-size", G_OBJECT (combo), "active",
                                transform_icon_size_to_index, transform_index_to_icon_size, NULL, NULL);
   gtk_table_attach (GTK_TABLE (table), combo, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
@@ -384,14 +383,14 @@ thunar_preferences_dialog_init (ThunarPreferencesDialog *dialog)
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (label);
 
-  combo = gtk_combo_box_new_text ();
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Very Small"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Smaller"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Small"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Normal"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Large"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Larger"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Very Large"));
+  combo = gtk_combo_box_text_new ();
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Very Small"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Smaller"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Small"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Normal"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Large"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Larger"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Very Large"));
   exo_mutual_binding_new_full (G_OBJECT (dialog->preferences), "tree-icon-size", G_OBJECT (combo), "active",
                                transform_icon_size_to_index, transform_index_to_icon_size, NULL, NULL);
   gtk_table_attach (GTK_TABLE (table), combo, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
@@ -539,10 +538,10 @@ thunar_preferences_dialog_init (ThunarPreferencesDialog *dialog)
   gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (label);
 
-  combo = gtk_combo_box_new_text ();
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Ask everytime"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Apply to Folder Only"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Apply to Folder and Contents"));
+  combo = gtk_combo_box_text_new ();
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Ask everytime"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Apply to Folder Only"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Apply to Folder and Contents"));
   exo_mutual_binding_new (G_OBJECT (dialog->preferences), "misc-recursive-permissions", G_OBJECT (combo), "active");
   gtk_table_attach (GTK_TABLE (table), combo, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
   thunar_gtk_label_set_a11y_relation (GTK_LABEL (label), combo);
diff --git a/thunar/thunar-progress-dialog.c b/thunar/thunar-progress-dialog.c
index dd70231..473a8f9 100644
--- a/thunar/thunar-progress-dialog.c
+++ b/thunar/thunar-progress-dialog.c
@@ -188,7 +188,7 @@ thunar_progress_dialog_toggled (ThunarProgressDialog *dialog,
   _thunar_return_val_if_fail (GTK_IS_STATUS_ICON (status_icon), FALSE);
 
   /* check if the window is visible and has the focus */
-  if (GTK_WIDGET_VISIBLE (GTK_WIDGET (dialog)) 
+  if (gtk_widget_get_visible (GTK_WIDGET (dialog)) 
       && gtk_window_is_active (GTK_WINDOW (dialog)))
     {
       /* remember the position of the dialog */
@@ -200,7 +200,7 @@ thunar_progress_dialog_toggled (ThunarProgressDialog *dialog,
   else
     {
       /* check if the dialog is invisible */
-      if (!GTK_WIDGET_VISIBLE (GTK_WIDGET (dialog)))
+      if (!gtk_widget_get_visible (GTK_WIDGET (dialog)))
         {
           /* restore its previous position before presenting it */
           gtk_window_move (GTK_WINDOW (dialog), dialog->x, dialog->y);
diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c
index fe0468d..142d514 100644
--- a/thunar/thunar-properties-dialog.c
+++ b/thunar/thunar-properties-dialog.c
@@ -230,7 +230,6 @@ thunar_properties_dialog_init (ThunarPropertiesDialog *dialog)
                           GTK_STOCK_HELP, GTK_RESPONSE_HELP,
                           GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
                           NULL);
-  gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
   gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 430);
 
   dialog->notebook = gtk_notebook_new ();
@@ -717,7 +716,7 @@ thunar_properties_dialog_name_activate (GtkWidget              *entry,
   _thunar_return_if_fail (THUNAR_IS_PROPERTIES_DIALOG (dialog));
 
   /* check if we still have a valid file and if the user is allowed to rename */
-  if (G_UNLIKELY (!GTK_WIDGET_SENSITIVE (dialog->name_entry)
+  if (G_UNLIKELY (!gtk_widget_get_sensitive (dialog->name_entry)
       || g_list_length (dialog->files) != 1))
     return;
 
diff --git a/thunar/thunar-renamer-dialog.c b/thunar/thunar-renamer-dialog.c
index 02c7813..905a951 100644
--- a/thunar/thunar-renamer-dialog.c
+++ b/thunar/thunar-renamer-dialog.c
@@ -336,7 +336,6 @@ thunar_renamer_dialog_init (ThunarRenamerDialog *renamer_dialog)
   g_list_free (providers);
 
   /* initialize the dialog */
-  gtk_dialog_set_has_separator (GTK_DIALOG (renamer_dialog), FALSE);
   gtk_window_set_default_size (GTK_WINDOW (renamer_dialog), 510, 490);
   gtk_window_set_title (GTK_WINDOW (renamer_dialog), _("Rename Multiple Files"));
 
@@ -480,9 +479,9 @@ thunar_renamer_dialog_init (ThunarRenamerDialog *renamer_dialog)
       xfce_rc_set_group (rc, "Configuration");
 
       /* create the renamer combo box for the renamer selection */
-      rcombo = gtk_combo_box_new_text ();
+      rcombo = gtk_combo_box_text_new ();
       for (lp = renamers; lp != NULL; lp = lp->next)
-        gtk_combo_box_append_text (GTK_COMBO_BOX (rcombo), thunarx_renamer_get_name (lp->data));
+        gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rcombo), thunarx_renamer_get_name (lp->data));
       gtk_box_pack_start (GTK_BOX (rbox), rcombo, FALSE, FALSE, 0);
       gtk_widget_show (rcombo);
 
@@ -498,14 +497,14 @@ thunar_renamer_dialog_init (ThunarRenamerDialog *renamer_dialog)
       gtk_widget_show (image);
 
       /* create the name/suffix/both combo box */
-      mcombo = gtk_combo_box_new_text ();
+      mcombo = gtk_combo_box_text_new ();
       klass = g_type_class_ref (THUNAR_TYPE_RENAMER_MODE);
       active_str = xfce_rc_read_entry_untranslated (rc, "LastActiveMode", "");
       for (active = 0, n = 0; n < klass->n_values; ++n)
         {
           if (exo_str_is_equal (active_str, klass->values[n].value_name))
             active = n;
-          gtk_combo_box_append_text (GTK_COMBO_BOX (mcombo), _(klass->values[n].value_nick));
+          gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (mcombo), _(klass->values[n].value_nick));
         }
       exo_mutual_binding_new (G_OBJECT (renamer_dialog->model), "mode", G_OBJECT (mcombo), "active");
       gtk_box_pack_end (GTK_BOX (rbox), mcombo, FALSE, FALSE, 0);
@@ -1872,7 +1871,7 @@ thunar_show_renamer_dialog (gpointer     parent,
     gtk_window_set_startup_id (GTK_WINDOW (dialog), startup_id);
 
   /* check if we have a toplevel window */
-  if (G_LIKELY (window != NULL && GTK_WIDGET_TOPLEVEL (window)))
+  if (G_LIKELY (window != NULL && gtk_widget_get_toplevel (window)))
     {
       /* dialog is transient for toplevel window, but not modal */
       gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index c931c7f..49c3530 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -2875,7 +2875,7 @@ thunar_standard_view_drag_data_received (GtkWidget          *view,
 
                       /* determine the toplevel window */
                       toplevel = gtk_widget_get_toplevel (view);
-                      if (toplevel != NULL && GTK_WIDGET_TOPLEVEL (toplevel))
+                      if (toplevel != NULL && gtk_widget_is_toplevel (toplevel))
                         {
 #if defined(GDK_WINDOWING_X11)
                           /* on X11, we can supply the parent window id here */
@@ -3350,7 +3350,7 @@ thunar_standard_view_drag_scroll_timer (gpointer user_data)
   GDK_THREADS_ENTER ();
 
   /* verify that we are realized */
-  if (G_LIKELY (GTK_WIDGET_REALIZED (standard_view)))
+  if (G_LIKELY (gtk_widget_get_realized (GTK_WIDGET (standard_view))))
     {
       /* determine pointer location and window geometry */
       gdk_window_get_pointer (GTK_BIN (standard_view)->child->window, &x, &y, NULL);
diff --git a/thunar/thunar-text-renderer.c b/thunar/thunar-text-renderer.c
index f40f424..5f41f19 100644
--- a/thunar/thunar-text-renderer.c
+++ b/thunar/thunar-text-renderer.c
@@ -469,19 +469,19 @@ thunar_text_renderer_render (GtkCellRenderer     *renderer,
 
   if ((flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED)
     {
-      if (GTK_WIDGET_HAS_FOCUS (widget))
+      if (gtk_widget_has_focus (widget))
         state = GTK_STATE_SELECTED;
       else
         state = GTK_STATE_ACTIVE;
     }
   else if ((flags & GTK_CELL_RENDERER_PRELIT) == GTK_CELL_RENDERER_PRELIT
-        && GTK_WIDGET_STATE (widget) == GTK_STATE_PRELIGHT)
+        && gtk_widget_get_state (widget) == GTK_STATE_PRELIGHT)
     {
       state = GTK_STATE_PRELIGHT;
     }
   else
     {
-      if (GTK_WIDGET_STATE (widget) == GTK_STATE_INSENSITIVE)
+      if (gtk_widget_get_state (widget) == GTK_STATE_INSENSITIVE)
         state = GTK_STATE_INSENSITIVE;
       else
         state = GTK_STATE_NORMAL;
@@ -556,7 +556,7 @@ thunar_text_renderer_render (GtkCellRenderer     *renderer,
   /* draw the focus indicator */
   if (text_renderer->follow_state && (flags & GTK_CELL_RENDERER_FOCUSED) != 0)
     {
-      gtk_paint_focus (widget->style, window, GTK_WIDGET_STATE (widget), NULL, widget, "icon_view",
+      gtk_paint_focus (widget->style, window, gtk_widget_get_state (widget), NULL, widget, "icon_view",
                        cell_area->x + x_offset, cell_area->y + y_offset, text_width, text_height);
     }
 
@@ -802,7 +802,7 @@ thunar_text_renderer_entry_menu_popdown_timer (gpointer user_data)
   GDK_THREADS_ENTER ();
 
   /* check if we still have the keyboard focus */
-  if (G_UNLIKELY (!GTK_WIDGET_HAS_FOCUS (text_renderer->entry)))
+  if (G_UNLIKELY (!gtk_widget_has_focus (text_renderer->entry)))
     thunar_text_renderer_editing_done (GTK_CELL_EDITABLE (text_renderer->entry), text_renderer);
 
   GDK_THREADS_LEAVE ();
diff --git a/thunar/thunar-tree-view.c b/thunar/thunar-tree-view.c
index 5f21349..f3b0bd3 100644
--- a/thunar/thunar-tree-view.c
+++ b/thunar/thunar-tree-view.c
@@ -2124,7 +2124,7 @@ thunar_tree_view_action_properties (ThunarTreeView *view)
     {
       /* determine the toplevel window */
       toplevel = gtk_widget_get_toplevel (GTK_WIDGET (view));
-      if (G_LIKELY (toplevel != NULL && GTK_WIDGET_TOPLEVEL (toplevel)))
+      if (G_LIKELY (toplevel != NULL && gtk_widget_is_toplevel (toplevel)))
         {
           /* popup the properties dialog */
           dialog = thunar_properties_dialog_new (GTK_WINDOW (toplevel));
@@ -2344,7 +2344,7 @@ thunar_tree_view_drag_scroll_timer (gpointer user_data)
   GDK_THREADS_ENTER ();
 
   /* verify that we are realized */
-  if (GTK_WIDGET_REALIZED (view))
+  if (gtk_widget_get_realized (GTK_WIDGET (view)))
     {
       /* determine pointer location and window geometry */
       gdk_window_get_pointer (GTK_WIDGET (view)->window, NULL, &y, NULL);
diff --git a/thunar/thunar-util.c b/thunar/thunar-util.c
index 7b97414..a728bae 100644
--- a/thunar/thunar-util.c
+++ b/thunar/thunar-util.c
@@ -309,7 +309,7 @@ thunar_util_parse_parent (gpointer    parent,
     {
       /* parent is a widget, so let's determine the toplevel window */
       window = gtk_widget_get_toplevel (GTK_WIDGET (parent));
-      if (GTK_WIDGET_TOPLEVEL (window))
+      if (gtk_widget_is_toplevel (window))
         {
           /* make sure the toplevel window is shown */
           gtk_widget_show_now (window);
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index cd2d355..0b83674 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -1214,7 +1214,7 @@ thunar_window_configure_event (GtkWidget         *widget,
         g_source_remove (window->save_geometry_timer_id);
 
       /* check if we should schedule another save timer */
-      if (GTK_WIDGET_VISIBLE (widget))
+      if (gtk_widget_get_visible (widget))
         {
           /* save the geometry one second after the last configure event */
           window->save_geometry_timer_id = g_timeout_add_full (G_PRIORITY_LOW, 1000, thunar_window_save_geometry_timer,
@@ -2585,7 +2585,7 @@ thunar_window_notify_loading (ThunarView   *view,
   _thunar_return_if_fail (THUNAR_IS_WINDOW (window));
   _thunar_return_if_fail (THUNAR_VIEW (window->view) == view);
 
-  if (GTK_WIDGET_REALIZED (window))
+  if (gtk_widget_get_realized (GTK_WIDGET (window)))
     {
       /* setup the proper cursor */
       if (thunar_view_get_loading (view))
@@ -2681,7 +2681,7 @@ thunar_window_save_geometry_timer (gpointer user_data)
   if (G_LIKELY (remember_geometry))
     {
       /* check if the window is still visible */
-      if (GTK_WIDGET_VISIBLE (window))
+      if (gtk_widget_get_visible (GTK_WIDGET (window)))
         {
           /* determine the current state of the window */
           state = gdk_window_get_state (GTK_WIDGET (window)->window);
diff --git a/thunarx/thunarx-property-page.c b/thunarx/thunarx-property-page.c
index 68bae2b..f2247e4 100644
--- a/thunarx/thunarx-property-page.c
+++ b/thunarx/thunarx-property-page.c
@@ -204,7 +204,7 @@ thunarx_property_page_size_request (GtkWidget      *widget,
 {
   GtkBin *bin = GTK_BIN (widget);
 
-  if (G_LIKELY (bin->child != NULL && GTK_WIDGET_VISIBLE (bin->child)))
+  if (G_LIKELY (bin->child != NULL && gtk_widget_get_visible (bin->child)))
     {
       gtk_widget_size_request (bin->child, requisition);
     }
@@ -231,7 +231,7 @@ thunarx_property_page_size_allocate (GtkWidget     *widget,
   widget->allocation = *allocation;
 
   /* apply the child allocation if we have a child */
-  if (G_LIKELY (bin->child != NULL && GTK_WIDGET_VISIBLE (bin->child)))
+  if (G_LIKELY (bin->child != NULL && gtk_widget_get_visible (bin->child)))
     {
       /* calculate the allocation for the child widget */
       child_allocation.x = allocation->x + GTK_CONTAINER (bin)->border_width + widget->style->xthickness;


More information about the Xfce4-commits mailing list