[Xfce4-commits] <thunar:nick/gtk3> some more porting
Stephan Arts
noreply at xfce.org
Mon May 7 18:22:02 CEST 2012
Updating branch refs/heads/nick/gtk3
to a6875c3c8fca1195103297848f7c9207bc8ce962 (commit)
from 21c5884f51370caef1228099e1816d34029821bf (commit)
commit a6875c3c8fca1195103297848f7c9207bc8ce962
Author: Stephan Arts <stephan at xfce.org>
Date: Mon May 7 18:20:01 2012 +0200
some more porting
thunar/sexy-url-label.c | 27 +++++++++++++---------
thunar/thunar-abstract-dialog.c | 11 +++++---
thunar/thunar-abstract-icon-view.c | 44 +++++++++++++++++++++++++----------
thunar/thunar-chooser-dialog.c | 17 ++++++-------
thunar/thunar-clipboard-manager.c | 13 ++++++----
thunar/thunar-column-editor.c | 9 +++----
thunar/thunar-compact-view.c | 6 ++--
thunar/thunar-create-dialog.c | 5 +--
thunar/thunar-file.c | 12 +++++-----
thunar/thunar-settings | 14 -----------
10 files changed, 85 insertions(+), 73 deletions(-)
diff --git a/thunar/sexy-url-label.c b/thunar/sexy-url-label.c
index 0be9e1d..19ffb42 100644
--- a/thunar/sexy-url-label.c
+++ b/thunar/sexy-url-label.c
@@ -340,8 +340,7 @@ static void
update_wrap_width(SexyUrlLabel *url_label, size_t wrap_width)
{
SexyUrlLabelPrivate *priv = SEXY_URL_LABEL_GET_PRIVATE(url_label);
- LabelWrapWidth *wrap_width_data;
- GtkStyle *style;
+ LabelWrapWidth *wrap_width_data = NULL;
if (wrap_width == 0 || !gtk_label_get_line_wrap(GTK_LABEL(url_label)))
return;
@@ -350,17 +349,17 @@ update_wrap_width(SexyUrlLabel *url_label, size_t wrap_width)
pango_layout_set_width(gtk_label_get_layout(GTK_LABEL(url_label)),
wrap_width * PANGO_SCALE);
#endif
+/*
style = GTK_WIDGET(url_label)->style;
wrap_width_data = g_object_get_data(G_OBJECT(style),
"gtk-label-wrap-width");
+*/
if (wrap_width_data != NULL &&
(size_t) wrap_width_data->width != wrap_width * PANGO_SCALE)
{
wrap_width_data->width = wrap_width * PANGO_SCALE;
priv->wrap_width = wrap_width;
- g_object_unref(GTK_LABEL(url_label)->layout);
- GTK_LABEL(url_label)->layout = NULL;
gtk_label_get_layout(GTK_LABEL(url_label));
gtk_widget_queue_resize(GTK_WIDGET(url_label));
}
@@ -373,14 +372,17 @@ sexy_url_label_realize(GtkWidget *widget)
SexyUrlLabelPrivate *priv = SEXY_URL_LABEL_GET_PRIVATE(url_label);
GdkWindowAttr attributes;
gint attributes_mask;
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation (widget, &allocation);
GTK_WIDGET_CLASS(sexy_url_label_parent_class)->realize(widget);
attributes.window_type = GDK_WINDOW_CHILD;
- attributes.x = widget->allocation.x;
- attributes.y = widget->allocation.y;
- attributes.width = widget->allocation.width;
- attributes.height = widget->allocation.height;
+ attributes.x = allocation.x;
+ attributes.y = allocation.y;
+ attributes.width = allocation.width;
+ attributes.height = allocation.height;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_ONLY;
attributes.event_mask = gtk_widget_get_events(widget);
@@ -460,7 +462,7 @@ sexy_url_label_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
pango_layout_set_width(gtk_label_get_layout(GTK_LABEL(url_label)),
allocation->width * PANGO_SCALE);
- if (GTK_WIDGET_REALIZED(widget))
+ if (gtk_widget_get_realized (widget))
{
gdk_window_move_resize(priv->event_window,
allocation->x, allocation->y,
@@ -544,6 +546,9 @@ sexy_url_label_rescan_label(SexyUrlLabel *url_label)
PangoAttrList *list = pango_layout_get_attributes(layout);
PangoAttrIterator *iter;
GList *url_list;
+ GtkAllocation label_allocation;
+
+ gtk_widget_get_allocation (GTK_WIDGET (url_label), &label_allocation);
sexy_url_label_clear_links(url_label);
@@ -555,8 +560,8 @@ sexy_url_label_rescan_label(SexyUrlLabel *url_label)
gtk_label_get_layout_offsets(GTK_LABEL(url_label),
&priv->layout_x, &priv->layout_y);
- priv->layout_x -= GTK_WIDGET(url_label)->allocation.x;
- priv->layout_y -= GTK_WIDGET(url_label)->allocation.y;
+ priv->layout_x -= label_allocation.x;
+ priv->layout_y -= label_allocation.y;
url_list = priv->urls;
diff --git a/thunar/thunar-abstract-dialog.c b/thunar/thunar-abstract-dialog.c
index ee0e51d..d146076 100644
--- a/thunar/thunar-abstract-dialog.c
+++ b/thunar/thunar-abstract-dialog.c
@@ -46,8 +46,8 @@ thunar_abstract_dialog_class_init (ThunarAbstractDialogClass *klass)
/* connect additional key bindings to the GtkDialog::close action signal */
binding_set = gtk_binding_set_by_class (klass);
- gtk_binding_entry_add_signal (binding_set, GDK_w, GDK_CONTROL_MASK, "close", 0);
- gtk_binding_entry_add_signal (binding_set, GDK_W, GDK_CONTROL_MASK, "close", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_w, GDK_CONTROL_MASK, "close", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_W, GDK_CONTROL_MASK, "close", 0);
}
@@ -65,12 +65,15 @@ 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);
- event->any.window = g_object_ref (GTK_WIDGET (dialog)->window);
+ event->any.window = gtk_widget_get_window (GTK_WIDGET (dialog));
event->any.send_event = TRUE;
+
+ g_object_ref (event->any.window);
+
gtk_main_do_event (event);
gdk_event_free (event);
}
diff --git a/thunar/thunar-abstract-icon-view.c b/thunar/thunar-abstract-icon-view.c
index b2f3164..2ad3ab6 100644
--- a/thunar/thunar-abstract-icon-view.c
+++ b/thunar/thunar-abstract-icon-view.c
@@ -256,8 +256,8 @@ thunar_abstract_icon_view_style_set (GtkWidget *widget,
gtk_widget_style_get (widget, "column-spacing", &column_spacing, "row-spacing", &row_spacing, NULL);
/* apply the column/row spacing to the icon view */
- exo_icon_view_set_column_spacing (EXO_ICON_VIEW (GTK_BIN (widget)->child), column_spacing);
- exo_icon_view_set_row_spacing (EXO_ICON_VIEW (GTK_BIN (widget)->child), row_spacing);
+ exo_icon_view_set_column_spacing (EXO_ICON_VIEW (gtk_bin_get_child (GTK_BIN (widget))), column_spacing);
+ exo_icon_view_set_row_spacing (EXO_ICON_VIEW (gtk_bin_get_child (GTK_BIN (widget))), row_spacing);
/* call the parent handler */
(*GTK_WIDGET_CLASS (thunar_abstract_icon_view_parent_class)->style_set) (widget, previous_style);
@@ -295,7 +295,7 @@ thunar_abstract_icon_view_disconnect_ui_manager (ThunarStandardView *standard_vi
static GList*
thunar_abstract_icon_view_get_selected_items (ThunarStandardView *standard_view)
{
- return exo_icon_view_get_selected_items (EXO_ICON_VIEW (GTK_BIN (standard_view)->child));
+ return exo_icon_view_get_selected_items (EXO_ICON_VIEW (gtk_bin_get_child (GTK_BIN (standard_view))));
}
@@ -304,7 +304,7 @@ static void
thunar_abstract_icon_view_select_all (ThunarStandardView *standard_view)
{
_thunar_return_if_fail (THUNAR_IS_ABSTRACT_ICON_VIEW (standard_view));
- exo_icon_view_select_all (EXO_ICON_VIEW (GTK_BIN (standard_view)->child));
+ exo_icon_view_select_all (EXO_ICON_VIEW (gtk_bin_get_child (GTK_BIN (standard_view))));
}
@@ -313,7 +313,7 @@ static void
thunar_abstract_icon_view_unselect_all (ThunarStandardView *standard_view)
{
_thunar_return_if_fail (THUNAR_IS_ABSTRACT_ICON_VIEW (standard_view));
- exo_icon_view_unselect_all (EXO_ICON_VIEW (GTK_BIN (standard_view)->child));
+ exo_icon_view_unselect_all (EXO_ICON_VIEW (gtk_bin_get_child (GTK_BIN (standard_view))));
}
@@ -323,7 +323,7 @@ thunar_abstract_icon_view_select_path (ThunarStandardView *standard_view,
GtkTreePath *path)
{
_thunar_return_if_fail (THUNAR_IS_ABSTRACT_ICON_VIEW (standard_view));
- exo_icon_view_select_path (EXO_ICON_VIEW (GTK_BIN (standard_view)->child), path);
+ exo_icon_view_select_path (EXO_ICON_VIEW (gtk_bin_get_child (GTK_BIN (standard_view))), path);
}
@@ -333,19 +333,25 @@ thunar_abstract_icon_view_set_cursor (ThunarStandardView *standard_view,
GtkTreePath *path,
gboolean start_editing)
{
+#if 0
GtkCellRendererMode mode;
+#endif
_thunar_return_if_fail (THUNAR_IS_ABSTRACT_ICON_VIEW (standard_view));
/* make sure the name renderer is editable */
+#if 0
mode = standard_view->name_renderer->mode;
standard_view->name_renderer->mode = GTK_CELL_RENDERER_MODE_EDITABLE;
+#endif
/* tell the abstract_icon view to start editing the given item */
- exo_icon_view_set_cursor (EXO_ICON_VIEW (GTK_BIN (standard_view)->child), path, standard_view->name_renderer, start_editing);
+ exo_icon_view_set_cursor (EXO_ICON_VIEW (gtk_bin_get_child (GTK_BIN (standard_view))), path, standard_view->name_renderer, start_editing);
/* reset the name renderer mode */
+#if 0
standard_view->name_renderer->mode = mode;
+#endif
}
@@ -358,7 +364,7 @@ thunar_abstract_icon_view_scroll_to_path (ThunarStandardView *standard_view,
gfloat col_align)
{
_thunar_return_if_fail (THUNAR_IS_ABSTRACT_ICON_VIEW (standard_view));
- exo_icon_view_scroll_to_path (EXO_ICON_VIEW (GTK_BIN (standard_view)->child), path, use_align, row_align, col_align);
+ exo_icon_view_scroll_to_path (EXO_ICON_VIEW (gtk_bin_get_child (GTK_BIN (standard_view))), path, use_align, row_align, col_align);
}
@@ -369,7 +375,8 @@ thunar_abstract_icon_view_get_path_at_pos (ThunarStandardView *standard_view,
gint y)
{
_thunar_return_val_if_fail (THUNAR_IS_ABSTRACT_ICON_VIEW (standard_view), NULL);
- return exo_icon_view_get_path_at_pos (EXO_ICON_VIEW (GTK_BIN (standard_view)->child), x, y);
+ return exo_icon_view_get_path_at_pos (EXO_ICON_VIEW (gtk_bin_get_child
+(GTK_BIN (standard_view))), x, y);
}
@@ -380,7 +387,7 @@ thunar_abstract_icon_view_get_visible_range (ThunarStandardView *standard_view,
GtkTreePath **end_path)
{
_thunar_return_val_if_fail (THUNAR_IS_ABSTRACT_ICON_VIEW (standard_view), FALSE);
- return exo_icon_view_get_visible_range (EXO_ICON_VIEW (GTK_BIN (standard_view)->child), start_path, end_path);
+ return exo_icon_view_get_visible_range (EXO_ICON_VIEW (gtk_bin_get_child (GTK_BIN (standard_view))), start_path, end_path);
}
@@ -390,7 +397,7 @@ thunar_abstract_icon_view_highlight_path (ThunarStandardView *standard_view,
GtkTreePath *path)
{
_thunar_return_if_fail (THUNAR_IS_ABSTRACT_ICON_VIEW (standard_view));
- exo_icon_view_set_drag_dest_item (EXO_ICON_VIEW (GTK_BIN (standard_view)->child), path, EXO_ICON_VIEW_DROP_INTO);
+ exo_icon_view_set_drag_dest_item (EXO_ICON_VIEW (gtk_bin_get_child (GTK_BIN (standard_view))), path, EXO_ICON_VIEW_DROP_INTO);
}
@@ -606,7 +613,9 @@ thunar_abstract_icon_view_expose_event (ExoIconView *view,
{
GtkIconSet *stock_icon_set;
GtkAction *action = NULL;
+#if 0
GdkPixbuf *stock_icon = NULL;
+#endif
gchar *stock_id;
GdkColor bg;
cairo_t *cr;
@@ -619,7 +628,9 @@ thunar_abstract_icon_view_expose_event (ExoIconView *view,
/* shade the abstract_icon view content while performing mouse gestures */
cr = gdk_cairo_create (event->window);
+#if 0
bg = GTK_WIDGET (view)->style->base[GTK_STATE_NORMAL];
+#endif
cairo_set_source_rgba (cr, bg.red / 65535.0, bg.green / 65535.0, bg.blue / 65535.0, 0.7);
cairo_rectangle (cr, event->area.x, event->area.y, event->area.width, event->area.height);
cairo_clip (cr);
@@ -634,15 +645,20 @@ thunar_abstract_icon_view_expose_event (ExoIconView *view,
g_object_get (G_OBJECT (action), "stock-id", &stock_id, NULL);
/* lookup the abstract_icon set for the stock abstract_icon */
+#if 0
stock_icon_set = gtk_style_lookup_icon_set (GTK_WIDGET (view)->style, stock_id);
+#endif
if (G_LIKELY (stock_icon_set != NULL))
{
+#if 0
stock_icon = gtk_icon_set_render_icon (stock_icon_set, GTK_WIDGET (view)->style,
gtk_widget_get_direction (GTK_WIDGET (view)),
gtk_action_is_sensitive (action) ? 0 : GTK_STATE_INSENSITIVE,
GTK_ICON_SIZE_DND, GTK_WIDGET (view), NULL);
+#endif
}
+#if 0
/* draw the rendered icon */
if (G_LIKELY (stock_icon != NULL))
{
@@ -656,6 +672,7 @@ thunar_abstract_icon_view_expose_event (ExoIconView *view,
/* release the stock abstract_icon */
g_object_unref (G_OBJECT (stock_icon));
}
+#endif
/* release the stock id */
g_free (stock_id);
@@ -672,7 +689,7 @@ thunar_abstract_icon_view_key_press_event (ExoIconView *view,
ThunarAbstractIconView *abstract_icon_view)
{
/* popup context menu if "Menu" or "<Shift>F10" is pressed */
- if (event->keyval == GDK_Menu || ((event->state & GDK_SHIFT_MASK) != 0 && event->keyval == GDK_F10))
+ if (event->keyval == GDK_KEY_Menu || ((event->state & GDK_SHIFT_MASK) != 0 && event->keyval == GDK_KEY_F10))
{
thunar_standard_view_context_menu (THUNAR_STANDARD_VIEW (abstract_icon_view), 0, event->time);
return TRUE;
@@ -770,7 +787,8 @@ thunar_abstract_icon_view_zoom_level_changed (ThunarAbstractIconView *abstract_i
_thunar_return_if_fail (THUNAR_IS_ABSTRACT_ICON_VIEW (abstract_icon_view));
/* we use the same trick as with ThunarDetailsView here, simply because its simple :-) */
- gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (GTK_BIN (abstract_icon_view)->child),
+ gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (gtk_bin_get_child
+(GTK_BIN (abstract_icon_view))),
THUNAR_STANDARD_VIEW (abstract_icon_view)->icon_renderer,
NULL, NULL, NULL);
}
diff --git a/thunar/thunar-chooser-dialog.c b/thunar/thunar-chooser-dialog.c
index a7fe4bb..84562f2 100644
--- a/thunar/thunar-chooser-dialog.c
+++ b/thunar/thunar-chooser-dialog.c
@@ -179,14 +179,13 @@ 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"));
/* create the main widget box */
vbox = g_object_new (GTK_TYPE_VBOX, "border-width", 6, "spacing", 12, NULL);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
/* create the header box */
@@ -230,7 +229,7 @@ thunar_chooser_dialog_init (ThunarChooserDialog *dialog)
/* append the tree view column */
column = g_object_new (GTK_TYPE_TREE_VIEW_COLUMN, "expand", TRUE, NULL);
- renderer = g_object_new (EXO_TYPE_CELL_RENDERER_ICON, "follow-state", FALSE, "size", 24, NULL);
+ renderer = g_object_new (GTK_TYPE_CELL_RENDERER_PIXBUF, "follow-state", FALSE, "size", 24, NULL);
gtk_tree_view_column_pack_start (column, renderer, FALSE);
gtk_tree_view_column_set_attributes (column, renderer,
"gicon", THUNAR_CHOOSER_MODEL_COLUMN_ICON,
@@ -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)))
- gdk_window_set_cursor (GTK_WIDGET (dialog)->window, NULL);
+ if (G_LIKELY (gtk_widget_get_realized (GTK_WIDGET (dialog))))
+ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (dialog)), NULL);
/* grab focus to the tree view widget */
- if (G_LIKELY (GTK_WIDGET_REALIZED (dialog->tree_view)))
+ if (G_LIKELY (gtk_widget_get_realized (GTK_WIDGET (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_is_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-clipboard-manager.c b/thunar/thunar-clipboard-manager.c
index 747ef03..001dee4 100644
--- a/thunar/thunar-clipboard-manager.c
+++ b/thunar/thunar-clipboard-manager.c
@@ -297,13 +297,16 @@ thunar_clipboard_manager_contents_received (GtkClipboard *clipboard,
gboolean path_copy = TRUE;
GList *file_list = NULL;
gchar *data;
+ gint selection_length;
+
+ selection_length = gtk_selection_data_get_length (selection_data);
/* check whether the retrieval worked */
- if (G_LIKELY (selection_data->length > 0))
+ if (G_LIKELY (selection_length) > 0)
{
/* be sure the selection data is zero-terminated */
- data = (gchar *) selection_data->data;
- data[selection_data->length] = '\0';
+ data = (gchar *) gtk_selection_data_get_data (selection_data);
+ data[selection_length] = '\0';
/* check whether to copy or move */
if (g_ascii_strncasecmp (data, "copy\n", 5) == 0)
@@ -429,12 +432,12 @@ thunar_clipboard_manager_get_callback (GtkClipboard *clipboard,
{
case TARGET_GNOME_COPIED_FILES:
data = g_strconcat (manager->files_cutted ? "cut\n" : "copy\n", string_list, NULL);
- gtk_selection_data_set (selection_data, selection_data->target, 8, (guchar *) data, strlen (data));
+ gtk_selection_data_set (selection_data, gtk_selection_data_get_target (selection_data), 8, (guchar *) data, strlen (data));
g_free (data);
break;
case TARGET_UTF8_STRING:
- gtk_selection_data_set (selection_data, selection_data->target, 8, (guchar *) string_list, strlen (string_list));
+ gtk_selection_data_set (selection_data, gtk_selection_data_get_target(selection_data), 8, (guchar *) string_list, strlen (string_list));
break;
default:
diff --git a/thunar/thunar-column-editor.c b/thunar/thunar-column-editor.c
index 75149e2..f8e4fb2 100644
--- a/thunar/thunar-column-editor.c
+++ b/thunar/thunar-column-editor.c
@@ -117,20 +117,19 @@ 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"));
/* add the "Help" button */
button = gtk_button_new_from_stock (GTK_STOCK_HELP);
g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (thunar_column_editor_help_clicked), column_editor);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (column_editor)->action_area), button, FALSE, FALSE, 0);
- gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (GTK_DIALOG (column_editor)->action_area), button, TRUE);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (column_editor))), button, FALSE, FALSE, 0);
+ gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (gtk_dialog_get_action_area (GTK_DIALOG (column_editor))), button, TRUE);
gtk_widget_show (button);
vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (column_editor)->vbox), vbox, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (column_editor))), vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
frame = g_object_new (GTK_TYPE_FRAME, "border-width", 0, "shadow-type", GTK_SHADOW_NONE, NULL);
@@ -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_is_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-compact-view.c b/thunar/thunar-compact-view.c
index 68d1473..dc0c696 100644
--- a/thunar/thunar-compact-view.c
+++ b/thunar/thunar-compact-view.c
@@ -68,9 +68,9 @@ static void
thunar_compact_view_init (ThunarCompactView *compact_view)
{
/* initialize the icon view properties */
- exo_icon_view_set_margin (EXO_ICON_VIEW (GTK_BIN (compact_view)->child), 3);
- exo_icon_view_set_layout_mode (EXO_ICON_VIEW (GTK_BIN (compact_view)->child), EXO_ICON_VIEW_LAYOUT_COLS);
- exo_icon_view_set_orientation (EXO_ICON_VIEW (GTK_BIN (compact_view)->child), GTK_ORIENTATION_HORIZONTAL);
+ exo_icon_view_set_margin (EXO_ICON_VIEW (gtk_bin_get_child (GTK_BIN (compact_view))), 3);
+ exo_icon_view_set_layout_mode (EXO_ICON_VIEW (gtk_bin_get_child (GTK_BIN (compact_view))), EXO_ICON_VIEW_LAYOUT_COLS);
+ exo_icon_view_set_orientation (EXO_ICON_VIEW (gtk_bin_get_child (GTK_BIN (compact_view))), GTK_ORIENTATION_HORIZONTAL);
/* setup the icon renderer */
g_object_set (G_OBJECT (THUNAR_STANDARD_VIEW (compact_view)->icon_renderer),
diff --git a/thunar/thunar-create-dialog.c b/thunar/thunar-create-dialog.c
index 055ac17..307d893 100644
--- a/thunar/thunar-create-dialog.c
+++ b/thunar/thunar-create-dialog.c
@@ -137,12 +137,11 @@ 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);
table = g_object_new (GTK_TYPE_TABLE, "border-width", 6, "column-spacing", 6, "row-spacing", 3, NULL);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), table, TRUE, TRUE, 0);
gtk_widget_show (table);
dialog->image = g_object_new (GTK_TYPE_IMAGE, "xpad", 6, "ypad", 6, NULL);
@@ -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-file.c b/thunar/thunar-file.c
index 9509600..0cc3124 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -3296,8 +3296,8 @@ thunar_file_compare_by_name (const ThunarFile *file_a,
const gchar *bp;
const gchar *filename_a;
const gchar *filename_b;
- guchar ac;
- guchar bc;
+ gunichar ac;
+ gunichar bc;
#ifdef G_ENABLE_DEBUG
/* probably too expensive to do the instance check every time
@@ -3322,8 +3322,8 @@ thunar_file_compare_by_name (const ThunarFile *file_a,
for (;; ++ap, ++bp)
{
/* check if the characters differ or we have a non-ASCII char */
- ac = *((const guchar *)ap);
- bc = *((const guchar *)bp);
+ ac = *((const gunichar *)ap);
+ bc = *((const gunichar *)bp);
if (ac != bc || ac == 0 || ac > 127)
break;
}
@@ -3347,8 +3347,8 @@ thunar_file_compare_by_name (const ThunarFile *file_a,
for (;; ++ap, ++bp)
{
/* check if the characters differ or we have a non-ASCII char */
- ac = *((const guchar *)ap);
- bc = *((const guchar *)bp);
+ ac = *((const gunichar *)ap);
+ bc = *((const gunichar *)bp);
if (g_ascii_tolower (ac) != g_ascii_tolower (bc) || ac == 0 || ac > 127)
break;
}
diff --git a/thunar/thunar-settings b/thunar/thunar-settings
deleted file mode 100755
index 02b4cb0..0000000
--- a/thunar/thunar-settings
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-#
-# vi:set et ai sw=2 sts=2 ts=2: */
-
-test "x$DISPLAY" != "x" || DISPLAY=:0
-
-output=`dbus-send --session --print-reply --dest=org.xfce.FileManager \
- /org/xfce/FileManager org.xfce.FileManager.DisplayPreferencesDialog \
- "string:$DISPLAY" "string:$DESKTOP_STARTUP_ID"`
-
-if ! [ $? -eq 0 ]; then
- echo $output
- exit 1
-fi
More information about the Xfce4-commits
mailing list