- Update to 2.31.6

This commit is contained in:
Tomas Bzatek 2010-08-12 15:50:52 +02:00
parent f343f4e385
commit ce274de4f0
77 changed files with 96 additions and 8003 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
nautilus-2.31.5.tar.bz2
nautilus-2.31.6.tar.bz2

View File

@ -1,37 +0,0 @@
From 0187296a18d2e30f5f30fab4528e42de42f7692a Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Wed, 23 Jun 2010 18:31:25 +0100
Subject: [PATCH] Update pkg-config files for GTK+ 3.x
---
.../libnautilus-extension-uninstalled.pc.in | 2 +-
libnautilus-extension/libnautilus-extension.pc.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libnautilus-extension/libnautilus-extension-uninstalled.pc.in b/libnautilus-extension/libnautilus-extension-uninstalled.pc.in
index 77d93d3..f0bcdc1 100644
--- a/libnautilus-extension/libnautilus-extension-uninstalled.pc.in
+++ b/libnautilus-extension/libnautilus-extension-uninstalled.pc.in
@@ -7,6 +7,6 @@ extensiondir=@libdir@/nautilus/extensions-2.0
Name: libnautilus-extension
Description: A library to create Nautilus view extensions
Version: @VERSION@
-Requires: glib-2.0 gtk+-2.0
+Requires: glib-2.0 gtk+-3.0
Libs: ${pc_top_builddir}/${pcfiledir}/libnautilus-extension.la
Cflags: -I${pc_top_builddir}/${pcfiledir}/..
diff --git a/libnautilus-extension/libnautilus-extension.pc.in b/libnautilus-extension/libnautilus-extension.pc.in
index c46ff23..65f8e4b 100644
--- a/libnautilus-extension/libnautilus-extension.pc.in
+++ b/libnautilus-extension/libnautilus-extension.pc.in
@@ -7,6 +7,6 @@ extensiondir=@libdir@/nautilus/extensions-2.0
Name: libnautilus-extension
Description: A library to create Nautilus view extensions
Version: @VERSION@
-Requires: glib-2.0 gio-2.0 gtk+-2.0
+Requires: glib-2.0 gio-2.0 gtk+-3.0
Libs: -L${libdir} -lnautilus-extension
Cflags: -I${includedir}/nautilus
--
1.7.0.1

View File

@ -1,42 +0,0 @@
From 8f77b22b6091f87986abbd42d7637edf17e473a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpeters@0d.be>
Date: Sun, 20 Jun 2010 09:45:08 +0200
Subject: [PATCH] [build] link against gail-3.0 (GNOME bug 622155)
---
configure.in | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/configure.in b/configure.in
index 4fb6849..60b8038 100644
--- a/configure.in
+++ b/configure.in
@@ -10,7 +10,6 @@ m4_define(xml_minver, 2.4.7)
m4_define(exif_minver, 0.5.12)
m4_define(exempi_minver, 1.99.2)
m4_define(exempi_minver_newapi, 1.99.5)
-m4_define(gail_minver, 0.16)
dnl 1. If the library code has changed at all since last release, then increment revision.
@@ -67,7 +66,7 @@ PKG_CHECK_MODULES(ALL, [
pango >= pango_minver
gtk+-3.0 >= gtk_minver
libxml-2.0 >= xml_minver
- gail >= gail_minver
+ gail-3.0 >= gtk_minver
])
dnl ==========================================================================
@@ -335,7 +334,7 @@ LIBNAUTILUS_EXTENSION_LIBS="`$PKG_CONFIG --libs $LIBNAUTILUS_EXTENSION_MODULES`"
AC_SUBST(LIBNAUTILUS_EXTENSION_LIBS)
dnl core nautilus
-CORE_MODULES="glib-2.0 gnome-desktop-3.0 gthread-2.0 gio-2.0 gio-unix-2.0 gail gconf-2.0 libxml-2.0 $EXTRA_CORE_MODULES"
+CORE_MODULES="glib-2.0 gnome-desktop-3.0 gthread-2.0 gio-2.0 gio-unix-2.0 gail-3.0 gconf-2.0 libxml-2.0 $EXTRA_CORE_MODULES"
CORE_CFLAGS="`$PKG_CONFIG --cflags $CORE_MODULES` $x_cflags"
AC_SUBST(CORE_CFLAGS)
CORE_LIBS="`$PKG_CONFIG --libs $CORE_MODULES` $x_libs"
--
1.7.1

View File

@ -1,25 +0,0 @@
From d104160104f50a3b2fd5e311578314e927ea73ca Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:05:46 +0200
Subject: [PATCH 013/249] [eel] GSEAL eel-accessibility.
---
eel/eel-accessibility.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/eel/eel-accessibility.c b/eel/eel-accessibility.c
index 71fd776..5e3fd5a 100644
--- a/eel/eel-accessibility.c
+++ b/eel/eel-accessibility.c
@@ -225,7 +225,7 @@ get_simple_text (gpointer object)
EelAccessibleTextIface *aif;
if (GTK_IS_ACCESSIBLE (object)) {
- gobject = G_OBJECT (GTK_ACCESSIBLE (object)->widget);
+ gobject = G_OBJECT (gtk_accessible_get_widget (GTK_ACCESSIBLE (object)));
} else {
gobject = eel_accessibility_get_gobject (object);
}
--
1.7.2

View File

@ -1,43 +0,0 @@
From dae50fa5b6aeb4f811fb0d8e35da999138653cd9 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:06:17 +0200
Subject: [PATCH 014/249] [eel] GSEAL eel-alert-dialog.
---
eel/eel-alert-dialog.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eel/eel-alert-dialog.c b/eel/eel-alert-dialog.c
index 9813fd9..59b5a1e 100644
--- a/eel/eel-alert-dialog.c
+++ b/eel/eel-alert-dialog.c
@@ -199,7 +199,7 @@ eel_alert_dialog_init (EelAlertDialog *dialog)
FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), hbox,
FALSE, FALSE, 0);
gtk_widget_show_all (hbox);
@@ -352,7 +352,7 @@ eel_alert_dialog_new (GtkWindow *parent,
dialog = GTK_DIALOG (widget);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_dialog_set_has_separator (dialog, FALSE);
@@ -451,7 +451,7 @@ eel_alert_dialog_style_set (GtkWidget *widget,
border_width = 0;
- parent = GTK_WIDGET (EEL_ALERT_DIALOG (widget)->details->image->parent);
+ parent = GTK_WIDGET (gtk_widget_get_parent (EEL_ALERT_DIALOG (widget)->details->image));
if (parent != NULL) {
gtk_widget_style_get (widget, "alert_border",
--
1.7.2

View File

@ -1,53 +0,0 @@
From c357d232dd5cbfd7fdb3014dfff4034d01f8e66e Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:06:45 +0200
Subject: [PATCH 015/249] [eel] GSEAL eel-art-gtk-extensions.
---
eel/eel-art-gtk-extensions.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/eel/eel-art-gtk-extensions.c b/eel/eel-art-gtk-extensions.c
index 73d9207..32a7c82 100644
--- a/eel/eel-art-gtk-extensions.c
+++ b/eel/eel-art-gtk-extensions.c
@@ -139,12 +139,14 @@ eel_gdk_window_get_screen_relative_bounds (GdkWindow *gdk_window)
EelIRect
eel_gtk_widget_get_bounds (GtkWidget *gtk_widget)
{
+ GtkAllocation allocation;
g_return_val_if_fail (GTK_IS_WIDGET (gtk_widget), eel_irect_empty);
-
- return eel_irect_assign (gtk_widget->allocation.x,
- gtk_widget->allocation.y,
- (int) gtk_widget->allocation.width,
- (int) gtk_widget->allocation.height);
+
+ gtk_widget_get_allocation (gtk_widget, &allocation);
+ return eel_irect_assign (allocation.x,
+ allocation.y,
+ (int) allocation.width,
+ (int) allocation.height);
}
/**
@@ -158,11 +160,13 @@ EelDimensions
eel_gtk_widget_get_dimensions (GtkWidget *gtk_widget)
{
EelDimensions dimensions;
+ GtkAllocation allocation;
g_return_val_if_fail (GTK_IS_WIDGET (gtk_widget), eel_dimensions_empty);
-
- dimensions.width = (int) gtk_widget->allocation.width;
- dimensions.height = (int) gtk_widget->allocation.height;
+
+ gtk_widget_get_allocation (gtk_widget, &allocation);
+ dimensions.width = (int) allocation.width;
+ dimensions.height = (int) allocation.height;
return dimensions;
}
--
1.7.2

View File

@ -1,25 +0,0 @@
From 24cff3dc16b71105d1c096451357e6df6347b9d1 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:07:01 +0200
Subject: [PATCH 016/249] [eel] GSEAL eel-background-box.
---
eel/eel-background-box.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/eel/eel-background-box.c b/eel/eel-background-box.c
index a577beb..09fbe37 100644
--- a/eel/eel-background-box.c
+++ b/eel/eel-background-box.c
@@ -40,7 +40,7 @@ eel_background_box_expose_event (GtkWidget *widget,
eel_background_expose (widget, event);
gtk_container_propagate_expose (GTK_CONTAINER (widget),
- GTK_BIN (widget)->child,
+ gtk_bin_get_child (GTK_BIN (widget)),
event);
return TRUE;
--
1.7.2

View File

@ -1,143 +0,0 @@
From a63c3afa5c19083558c365fe6374ab5d85db3c98 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:07:55 +0200
Subject: [PATCH 017/249] [eel] GSEAL eel-background-box.
---
eel/eel-background.c | 41 +++++++++++++++++++++++++----------------
1 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/eel/eel-background.c b/eel/eel-background.c
index 2edbc31..4b79249 100644
--- a/eel/eel-background.c
+++ b/eel/eel-background.c
@@ -469,19 +469,21 @@ eel_background_expose (GtkWidget *widget,
GdkGC *gc;
GdkGCValues gc_values;
GdkGCValuesMask value_mask;
+ GdkWindow *widget_window;
EelBackground *background;
-
- if (event->window != widget->window) {
+
+ widget_window = gtk_widget_get_window (widget);
+ if (event->window != widget_window) {
return;
}
background = eel_get_widget_background (widget);
- drawable_get_adjusted_size (background, widget->window, &window_width, &window_height);
+ drawable_get_adjusted_size (background, widget_window, &window_width, &window_height);
pixmap = eel_background_get_pixmap_and_color (background,
- widget->window,
+ widget_window,
&color);
if (pixmap) {
@@ -497,11 +499,11 @@ eel_background_expose (GtkWidget *widget,
value_mask = GDK_GC_FILL | GDK_GC_FOREGROUND;
}
- gc = gdk_gc_new_with_values (widget->window, &gc_values, value_mask);
+ gc = gdk_gc_new_with_values (widget_window, &gc_values, value_mask);
gdk_gc_set_clip_rectangle (gc, &event->area);
- gdk_draw_rectangle (widget->window, gc, TRUE, 0, 0, window_width, window_height);
+ gdk_draw_rectangle (widget_window, gc, TRUE, 0, 0, window_width, window_height);
g_object_unref (gc);
@@ -748,16 +750,18 @@ eel_background_set_up_widget (EelBackground *background, GtkWidget *widget)
int window_height;
GdkWindow *window;
+ GdkWindow *widget_window;
gboolean in_fade;
if (!gtk_widget_get_realized (widget)) {
return;
}
- drawable_get_adjusted_size (background, widget->window, &window_width, &window_height);
+ widget_window = gtk_widget_get_window (widget);
+ drawable_get_adjusted_size (background, widget_window, &window_width, &window_height);
pixmap = eel_background_get_pixmap_and_color (background,
- widget->window,
+ widget_window,
&color);
style = gtk_widget_get_style (widget);
@@ -765,9 +769,9 @@ eel_background_set_up_widget (EelBackground *background, GtkWidget *widget)
gdk_rgb_find_color (style->colormap, &color);
if (EEL_IS_CANVAS (widget)) {
- window = GTK_LAYOUT (widget)->bin_window;
+ window = gtk_layout_get_bin_window (GTK_LAYOUT (widget));
} else {
- window = widget->window;
+ window = widget_window;
}
if (background->details->fade != NULL) {
@@ -822,13 +826,15 @@ init_fade (EelBackground *background, GtkWidget *widget)
}
if (background->details->fade == NULL) {
+ GdkWindow *window;
int old_width, old_height, width, height;
/* If this was the result of a screen size change,
* we don't want to crossfade
*/
- gdk_drawable_get_size (widget->window, &old_width, &old_height);
- drawable_get_adjusted_size (background, widget->window,
+ window = gtk_widget_get_window (widget);
+ gdk_drawable_get_size (window, &old_width, &old_height);
+ drawable_get_adjusted_size (background, window,
&width, &height);
if (old_width == width && old_height == height) {
background->details->fade = gnome_bg_crossfade_new (width, height);
@@ -1075,17 +1081,19 @@ eel_background_receive_dropped_color (EelBackground *background,
char *color_spec;
char *new_gradient_spec;
int left_border, right_border, top_border, bottom_border;
+ GtkAllocation allocation;
g_return_if_fail (EEL_IS_BACKGROUND (background));
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (selection_data != NULL);
/* Convert the selection data into a color spec. */
- if (selection_data->length != 8 || selection_data->format != 16) {
+ if (gtk_selection_data_get_length ((GtkSelectionData *) selection_data) != 8 ||
+ gtk_selection_data_get_format ((GtkSelectionData *) selection_data) != 16) {
g_warning ("received invalid color data");
return;
}
- channels = (guint16 *) selection_data->data;
+ channels = (guint16 *) gtk_selection_data_get_data ((GtkSelectionData *) selection_data);
color_spec = g_strdup_printf ("#%02X%02X%02X",
channels[0] >> 8,
channels[1] >> 8,
@@ -1095,10 +1103,11 @@ eel_background_receive_dropped_color (EelBackground *background,
For the moment, this is hard-wired, but later the widget will have to have some
say in where the borders are.
*/
+ gtk_widget_get_allocation (widget, &allocation);
left_border = 32;
- right_border = widget->allocation.width - 32;
+ right_border = allocation.width - 32;
top_border = 32;
- bottom_border = widget->allocation.height - 32;
+ bottom_border = allocation.height - 32;
if (drop_location_x < left_border && drop_location_x <= right_border) {
new_gradient_spec = eel_gradient_set_left_color_spec (background->details->color, color_spec);
} else if (drop_location_x >= left_border && drop_location_x > right_border) {
--
1.7.2

View File

@ -1,37 +0,0 @@
From 191f491c9f0877c1e2c174e435898ba1e717c352 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:08:17 +0200
Subject: [PATCH 018/249] [eel] GSEAL eel-canvas-rect-ellipse.
---
eel/eel-canvas-rect-ellipse.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/eel/eel-canvas-rect-ellipse.c b/eel/eel-canvas-rect-ellipse.c
index 84a1034..96e76fe 100644
--- a/eel/eel-canvas-rect-ellipse.c
+++ b/eel/eel-canvas-rect-ellipse.c
@@ -678,9 +678,9 @@ eel_canvas_re_realize (EelCanvasItem *item)
if (re_parent_class->realize)
(* re_parent_class->realize) (item);
- re->fill_gc = gdk_gc_new (item->canvas->layout.bin_window);
+ re->fill_gc = gdk_gc_new (gtk_layout_get_bin_window (&item->canvas->layout));
re->fill_pixel = eel_canvas_get_color_pixel (item->canvas, re->fill_color);
- re->outline_gc = gdk_gc_new (item->canvas->layout.bin_window);
+ re->outline_gc = gdk_gc_new (gtk_layout_get_bin_window (&item->canvas->layout));
re->outline_pixel = eel_canvas_get_color_pixel (item->canvas, re->outline_color);
set_colors_and_stipples (re);
@@ -840,7 +840,7 @@ eel_canvas_rect_realize (EelCanvasItem *item)
priv = EEL_CANVAS_RECT (item)->priv;
- dpy = gdk_x11_drawable_get_xdisplay (GTK_WIDGET (item->canvas)->window);
+ dpy = gdk_x11_drawable_get_xdisplay (gtk_widget_get_window (GTK_WIDGET (item->canvas)));
priv->use_render = XRenderQueryExtension (dpy, &event_base, &error_base);
if (priv->use_render) {
--
1.7.2

View File

@ -1,815 +0,0 @@
From e07b688a3b8ec257a14087b696b3a02090f289ab Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:09:11 +0200
Subject: [PATCH 019/249] [eel] GSEAL eel-canvas.
---
eel/eel-canvas.c | 273 ++++++++++++++++++++++++++++++------------------------
eel/eel-canvas.h | 3 +
2 files changed, 155 insertions(+), 121 deletions(-)
diff --git a/eel/eel-canvas.c b/eel/eel-canvas.c
index 3778b68..0bdf451 100644
--- a/eel/eel-canvas.c
+++ b/eel/eel-canvas.c
@@ -148,7 +148,7 @@ eel_canvas_item_get_type (void)
static void
eel_canvas_item_init (EelCanvasItem *item)
{
- item->object.flags |= EEL_CANVAS_ITEM_VISIBLE;
+ item->flags |= EEL_CANVAS_ITEM_VISIBLE;
}
/**
@@ -246,7 +246,7 @@ eel_canvas_item_get_property (GObject *gobject, guint param_id,
switch (param_id) {
case ITEM_PROP_VISIBLE:
- g_value_set_boolean (value, item->object.flags & EEL_CANVAS_ITEM_VISIBLE);
+ g_value_set_boolean (value, item->flags & EEL_CANVAS_ITEM_VISIBLE);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, param_id, pspec);
@@ -282,7 +282,7 @@ eel_canvas_item_construct (EelCanvasItem *item, EelCanvasGroup *parent,
static void
redraw_and_repick_if_mapped (EelCanvasItem *item)
{
- if (item->object.flags & EEL_CANVAS_ITEM_MAPPED) {
+ if (item->flags & EEL_CANVAS_ITEM_MAPPED) {
eel_canvas_item_request_redraw (item);
item->canvas->need_repick = TRUE;
}
@@ -324,10 +324,10 @@ eel_canvas_item_dispose (GObject *object)
/* Normal destroy stuff */
- if (item->object.flags & EEL_CANVAS_ITEM_MAPPED)
+ if (item->flags & EEL_CANVAS_ITEM_MAPPED)
(* EEL_CANVAS_ITEM_GET_CLASS (item)->unmap) (item);
- if (item->object.flags & EEL_CANVAS_ITEM_REALIZED)
+ if (item->flags & EEL_CANVAS_ITEM_REALIZED)
(* EEL_CANVAS_ITEM_GET_CLASS (item)->unrealize) (item);
if (item->parent)
@@ -344,13 +344,13 @@ eel_canvas_item_dispose (GObject *object)
static void
eel_canvas_item_realize (EelCanvasItem *item)
{
- if (item->parent && !(item->parent->object.flags & EEL_CANVAS_ITEM_REALIZED))
+ if (item->parent && !(item->parent->flags & EEL_CANVAS_ITEM_REALIZED))
(* EEL_CANVAS_ITEM_GET_CLASS (item->parent)->realize) (item->parent);
if (item->parent == NULL && !gtk_widget_get_realized (GTK_WIDGET (item->canvas)))
gtk_widget_realize (GTK_WIDGET (item->canvas));
-
- GTK_OBJECT_SET_FLAGS (item, EEL_CANVAS_ITEM_REALIZED);
+
+ item->flags |= EEL_CANVAS_ITEM_REALIZED;
eel_canvas_item_request_update (item);
}
@@ -359,32 +359,32 @@ eel_canvas_item_realize (EelCanvasItem *item)
static void
eel_canvas_item_unrealize (EelCanvasItem *item)
{
- if (item->object.flags & EEL_CANVAS_ITEM_MAPPED)
+ if (item->flags & EEL_CANVAS_ITEM_MAPPED)
(* EEL_CANVAS_ITEM_GET_CLASS (item)->unmap) (item);
-
- GTK_OBJECT_UNSET_FLAGS (item, EEL_CANVAS_ITEM_REALIZED);
+
+ item->flags &= ~(EEL_CANVAS_ITEM_REALIZED);
}
/* Map handler for canvas items */
static void
eel_canvas_item_map (EelCanvasItem *item)
{
- GTK_OBJECT_SET_FLAGS (item, EEL_CANVAS_ITEM_MAPPED);
+ item->flags |= EEL_CANVAS_ITEM_MAPPED;
}
/* Unmap handler for canvas items */
static void
eel_canvas_item_unmap (EelCanvasItem *item)
{
- GTK_OBJECT_UNSET_FLAGS (item, EEL_CANVAS_ITEM_MAPPED);
+ item->flags &= ~(EEL_CANVAS_ITEM_MAPPED);
}
/* Update handler for canvas items */
static void
eel_canvas_item_update (EelCanvasItem *item, double i2w_dx, double i2w_dy, int flags)
{
- GTK_OBJECT_UNSET_FLAGS (item, EEL_CANVAS_ITEM_NEED_UPDATE);
- GTK_OBJECT_UNSET_FLAGS (item, EEL_CANVAS_ITEM_NEED_DEEP_UPDATE);
+ item->flags &= ~(EEL_CANVAS_ITEM_NEED_UPDATE);
+ item->flags &= ~(EEL_CANVAS_ITEM_NEED_DEEP_UPDATE);
}
/*
@@ -413,10 +413,10 @@ eel_canvas_item_invoke_update (EelCanvasItem *item,
/* apply object flags to child flags */
child_flags &= ~EEL_CANVAS_UPDATE_REQUESTED;
- if (item->object.flags & EEL_CANVAS_ITEM_NEED_UPDATE)
+ if (item->flags & EEL_CANVAS_ITEM_NEED_UPDATE)
child_flags |= EEL_CANVAS_UPDATE_REQUESTED;
- if (item->object.flags & EEL_CANVAS_ITEM_NEED_DEEP_UPDATE)
+ if (item->flags & EEL_CANVAS_ITEM_NEED_DEEP_UPDATE)
child_flags |= EEL_CANVAS_UPDATE_DEEP;
if (child_flags & GCI_UPDATE_MASK) {
@@ -426,7 +426,7 @@ eel_canvas_item_invoke_update (EelCanvasItem *item,
/* If this fail you probably forgot to chain up to
* EelCanvasItem::update from a derived class */
- g_return_if_fail (!(item->object.flags & EEL_CANVAS_ITEM_NEED_UPDATE));
+ g_return_if_fail (!(item->flags & EEL_CANVAS_ITEM_NEED_UPDATE));
}
/*
@@ -515,11 +515,11 @@ eel_canvas_item_move (EelCanvasItem *item, double dx, double dy)
(* EEL_CANVAS_ITEM_GET_CLASS (item)->translate) (item, dx, dy);
- if (item->object.flags & EEL_CANVAS_ITEM_MAPPED)
+ if (item->flags & EEL_CANVAS_ITEM_MAPPED)
item->canvas->need_repick = TRUE;
- if (!(item->object.flags & EEL_CANVAS_ITEM_NEED_DEEP_UPDATE)) {
- item->object.flags |= EEL_CANVAS_ITEM_NEED_DEEP_UPDATE;
+ if (!(item->flags & EEL_CANVAS_ITEM_NEED_DEEP_UPDATE)) {
+ item->flags |= EEL_CANVAS_ITEM_NEED_DEEP_UPDATE;
if (item->parent != NULL)
eel_canvas_item_request_update (item->parent);
else
@@ -767,18 +767,18 @@ eel_canvas_item_show (EelCanvasItem *item)
{
g_return_if_fail (EEL_IS_CANVAS_ITEM (item));
- if (!(item->object.flags & EEL_CANVAS_ITEM_VISIBLE)) {
- item->object.flags |= EEL_CANVAS_ITEM_VISIBLE;
+ if (!(item->flags & EEL_CANVAS_ITEM_VISIBLE)) {
+ item->flags |= EEL_CANVAS_ITEM_VISIBLE;
- if (!(item->object.flags & EEL_CANVAS_ITEM_REALIZED))
+ if (!(item->flags & EEL_CANVAS_ITEM_REALIZED))
(* EEL_CANVAS_ITEM_GET_CLASS (item)->realize) (item);
if (item->parent != NULL) {
- if (!(item->object.flags & EEL_CANVAS_ITEM_MAPPED) &&
- item->parent->object.flags & EEL_CANVAS_ITEM_MAPPED)
+ if (!(item->flags & EEL_CANVAS_ITEM_MAPPED) &&
+ item->parent->flags & EEL_CANVAS_ITEM_MAPPED)
(* EEL_CANVAS_ITEM_GET_CLASS (item)->map) (item);
} else {
- if (!(item->object.flags & EEL_CANVAS_ITEM_MAPPED) &&
+ if (!(item->flags & EEL_CANVAS_ITEM_MAPPED) &&
gtk_widget_get_mapped (GTK_WIDGET (item->canvas)))
(* EEL_CANVAS_ITEM_GET_CLASS (item)->map) (item);
}
@@ -800,12 +800,12 @@ eel_canvas_item_hide (EelCanvasItem *item)
{
g_return_if_fail (EEL_IS_CANVAS_ITEM (item));
- if (item->object.flags & EEL_CANVAS_ITEM_VISIBLE) {
- item->object.flags &= ~EEL_CANVAS_ITEM_VISIBLE;
+ if (item->flags & EEL_CANVAS_ITEM_VISIBLE) {
+ item->flags &= ~EEL_CANVAS_ITEM_VISIBLE;
redraw_and_repick_if_mapped (item);
- if (item->object.flags & EEL_CANVAS_ITEM_MAPPED)
+ if (item->flags & EEL_CANVAS_ITEM_MAPPED)
(* EEL_CANVAS_ITEM_GET_CLASS (item)->unmap) (item);
/* No need to unrealize when we just want to hide */
@@ -843,10 +843,10 @@ eel_canvas_item_grab (EelCanvasItem *item, guint event_mask, GdkCursor *cursor,
if (item->canvas->grabbed_item)
return GDK_GRAB_ALREADY_GRABBED;
- if (!(item->object.flags & EEL_CANVAS_ITEM_MAPPED))
+ if (!(item->flags & EEL_CANVAS_ITEM_MAPPED))
return GDK_GRAB_NOT_VIEWABLE;
- retval = gdk_pointer_grab (item->canvas->layout.bin_window,
+ retval = gdk_pointer_grab (gtk_layout_get_bin_window (&item->canvas->layout),
FALSE,
event_mask,
NULL,
@@ -1016,7 +1016,7 @@ eel_canvas_item_grab_focus (EelCanvasItem *item)
if (focused_item) {
ev.focus_change.type = GDK_FOCUS_CHANGE;
- ev.focus_change.window = GTK_LAYOUT (item->canvas)->bin_window;
+ ev.focus_change.window = gtk_layout_get_bin_window (GTK_LAYOUT (item->canvas));
ev.focus_change.send_event = FALSE;
ev.focus_change.in = FALSE;
@@ -1028,7 +1028,7 @@ eel_canvas_item_grab_focus (EelCanvasItem *item)
if (focused_item) {
ev.focus_change.type = GDK_FOCUS_CHANGE;
- ev.focus_change.window = GTK_LAYOUT (item->canvas)->bin_window;
+ ev.focus_change.window = gtk_layout_get_bin_window (GTK_LAYOUT (item->canvas));
ev.focus_change.send_event = FALSE;
ev.focus_change.in = TRUE;
@@ -1093,10 +1093,10 @@ eel_canvas_item_request_update (EelCanvasItem *item)
g_return_if_fail (!item->canvas->doing_update);
- if (item->object.flags & EEL_CANVAS_ITEM_NEED_UPDATE)
+ if (item->flags & EEL_CANVAS_ITEM_NEED_UPDATE)
return;
- item->object.flags |= EEL_CANVAS_ITEM_NEED_UPDATE;
+ item->flags |= EEL_CANVAS_ITEM_NEED_UPDATE;
if (item->parent != NULL) {
/* Recurse up the tree */
@@ -1117,7 +1117,7 @@ eel_canvas_item_request_update (EelCanvasItem *item)
void
eel_canvas_item_request_redraw (EelCanvasItem *item)
{
- if (item->object.flags & EEL_CANVAS_ITEM_MAPPED)
+ if (item->flags & EEL_CANVAS_ITEM_MAPPED)
eel_canvas_request_redraw (item->canvas,
item->x1, item->y1,
item->x2 + 1, item->y2 + 1);
@@ -1294,7 +1294,7 @@ eel_canvas_group_set_property (GObject *gobject, guint param_id,
}
if (moved) {
- item->object.flags |= EEL_CANVAS_ITEM_NEED_DEEP_UPDATE;
+ item->flags |= EEL_CANVAS_ITEM_NEED_DEEP_UPDATE;
if (item->parent != NULL)
eel_canvas_item_request_update (item->parent);
else
@@ -1408,13 +1408,13 @@ eel_canvas_group_unrealize (EelCanvasItem *item)
group = EEL_CANVAS_GROUP (item);
/* Unmap group before children to avoid flash */
- if (item->object.flags & EEL_CANVAS_ITEM_MAPPED)
+ if (item->flags & EEL_CANVAS_ITEM_MAPPED)
(* EEL_CANVAS_ITEM_GET_CLASS (item)->unmap) (item);
for (list = group->item_list; list; list = list->next) {
i = list->data;
- if (i->object.flags & EEL_CANVAS_ITEM_REALIZED)
+ if (i->flags & EEL_CANVAS_ITEM_REALIZED)
(* EEL_CANVAS_ITEM_GET_CLASS (i)->unrealize) (i);
}
@@ -1434,9 +1434,9 @@ eel_canvas_group_map (EelCanvasItem *item)
for (list = group->item_list; list; list = list->next) {
i = list->data;
- if (i->object.flags & EEL_CANVAS_ITEM_VISIBLE &&
- !(i->object.flags & EEL_CANVAS_ITEM_MAPPED)) {
- if (!(i->object.flags & EEL_CANVAS_ITEM_REALIZED))
+ if (i->flags & EEL_CANVAS_ITEM_VISIBLE &&
+ !(i->flags & EEL_CANVAS_ITEM_MAPPED)) {
+ if (!(i->flags & EEL_CANVAS_ITEM_REALIZED))
(* EEL_CANVAS_ITEM_GET_CLASS (i)->realize) (i);
(* EEL_CANVAS_ITEM_GET_CLASS (i)->map) (i);
@@ -1459,7 +1459,7 @@ eel_canvas_group_unmap (EelCanvasItem *item)
for (list = group->item_list; list; list = list->next) {
i = list->data;
- if (i->object.flags & EEL_CANVAS_ITEM_MAPPED)
+ if (i->flags & EEL_CANVAS_ITEM_MAPPED)
(* EEL_CANVAS_ITEM_GET_CLASS (i)->unmap) (i);
}
@@ -1480,7 +1480,7 @@ eel_canvas_group_draw (EelCanvasItem *item, GdkDrawable *drawable,
for (list = group->item_list; list; list = list->next) {
child = list->data;
- if ((child->object.flags & EEL_CANVAS_ITEM_MAPPED) &&
+ if ((child->flags & EEL_CANVAS_ITEM_MAPPED) &&
(EEL_CANVAS_ITEM_GET_CLASS (child)->draw)) {
GdkRectangle child_rect;
@@ -1531,7 +1531,7 @@ eel_canvas_group_point (EelCanvasItem *item, double x, double y, int cx, int cy,
point_item = NULL; /* cater for incomplete item implementations */
- if ((child->object.flags & EEL_CANVAS_ITEM_MAPPED)
+ if ((child->flags & EEL_CANVAS_ITEM_MAPPED)
&& EEL_CANVAS_ITEM_GET_CLASS (child)->point) {
dist = eel_canvas_item_invoke_point (child, gx, gy, cx, cy, &point_item);
has_point = TRUE;
@@ -1583,7 +1583,7 @@ eel_canvas_group_bounds (EelCanvasItem *item, double *x1, double *y1, double *x2
for (list = group->item_list; list; list = list->next) {
child = list->data;
- if (child->object.flags & EEL_CANVAS_ITEM_MAPPED) {
+ if (child->flags & EEL_CANVAS_ITEM_MAPPED) {
set = TRUE;
eel_canvas_item_get_bounds (child, &minx, &miny, &maxx, &maxy);
break;
@@ -1604,7 +1604,7 @@ eel_canvas_group_bounds (EelCanvasItem *item, double *x1, double *y1, double *x2
for (; list; list = list->next) {
child = list->data;
- if (!(child->object.flags & EEL_CANVAS_ITEM_MAPPED))
+ if (!(child->flags & EEL_CANVAS_ITEM_MAPPED))
continue;
eel_canvas_item_get_bounds (child, &tx1, &ty1, &tx2, &ty2);
@@ -1654,12 +1654,12 @@ group_add (EelCanvasGroup *group, EelCanvasItem *item)
} else
group->item_list_end = g_list_append (group->item_list_end, item)->next;
- if (item->object.flags & EEL_CANVAS_ITEM_VISIBLE &&
- group->item.object.flags & EEL_CANVAS_ITEM_MAPPED) {
- if (!(item->object.flags & EEL_CANVAS_ITEM_REALIZED))
+ if (item->flags & EEL_CANVAS_ITEM_VISIBLE &&
+ group->item.flags & EEL_CANVAS_ITEM_MAPPED) {
+ if (!(item->flags & EEL_CANVAS_ITEM_REALIZED))
(* EEL_CANVAS_ITEM_GET_CLASS (item)->realize) (item);
- if (!(item->object.flags & EEL_CANVAS_ITEM_MAPPED))
+ if (!(item->flags & EEL_CANVAS_ITEM_MAPPED))
(* EEL_CANVAS_ITEM_GET_CLASS (item)->map) (item);
}
}
@@ -1675,10 +1675,10 @@ group_remove (EelCanvasGroup *group, EelCanvasItem *item)
for (children = group->item_list; children; children = children->next)
if (children->data == item) {
- if (item->object.flags & EEL_CANVAS_ITEM_MAPPED)
+ if (item->flags & EEL_CANVAS_ITEM_MAPPED)
(* EEL_CANVAS_ITEM_GET_CLASS (item)->unmap) (item);
- if (item->object.flags & EEL_CANVAS_ITEM_REALIZED)
+ if (item->flags & EEL_CANVAS_ITEM_REALIZED)
(* EEL_CANVAS_ITEM_GET_CLASS (item)->unrealize) (item);
/* Unparent the child */
@@ -1825,11 +1825,11 @@ eel_canvas_accessible_initialize (AtkObject *obj,
ATK_OBJECT_CLASS (accessible_parent_class)->initialize (obj, data);
canvas = EEL_CANVAS (data);
- g_signal_connect (canvas->layout.hadjustment,
+ g_signal_connect (gtk_layout_get_hadjustment (&canvas->layout),
"value_changed",
G_CALLBACK (eel_canvas_accessible_adjustment_changed),
obj);
- g_signal_connect (canvas->layout.vadjustment,
+ g_signal_connect (gtk_layout_get_vadjustment (&canvas->layout),
"value_changed",
G_CALLBACK (eel_canvas_accessible_adjustment_changed),
obj);
@@ -1846,7 +1846,7 @@ eel_canvas_accessible_get_n_children (AtkObject* obj)
EelCanvasGroup *root_group;
accessible = GTK_ACCESSIBLE (obj);
- widget = accessible->widget;
+ widget = gtk_accessible_get_widget (accessible);
if (widget == NULL) {
/* State is defunct */
return 0;
@@ -1876,7 +1876,7 @@ eel_canvas_accessible_ref_child (AtkObject *obj,
}
accessible = GTK_ACCESSIBLE (obj);
- widget = accessible->widget;
+ widget = gtk_accessible_get_widget (accessible);
if (widget == NULL) {
/* State is defunct */
return NULL;
@@ -2072,14 +2072,17 @@ panic_root_destroyed (GtkObject *object, gpointer data)
static void
eel_canvas_init (EelCanvas *canvas)
{
- GTK_WIDGET_SET_FLAGS (canvas, GTK_CAN_FOCUS);
+ guint width, height;
+ gtk_widget_set_can_focus (GTK_WIDGET (canvas), TRUE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (canvas), FALSE);
canvas->scroll_x1 = 0.0;
canvas->scroll_y1 = 0.0;
- canvas->scroll_x2 = canvas->layout.width;
- canvas->scroll_y2 = canvas->layout.height;
+ gtk_layout_get_size (&canvas->layout,
+ &width, &height);
+ canvas->scroll_x2 = width;
+ canvas->scroll_y2 = height;
canvas->pixels_per_unit = 1.0;
@@ -2205,8 +2208,8 @@ eel_canvas_map (GtkWidget *widget)
/* Map items */
- if (canvas->root->object.flags & EEL_CANVAS_ITEM_VISIBLE &&
- !(canvas->root->object.flags & EEL_CANVAS_ITEM_MAPPED) &&
+ if (canvas->root->flags & EEL_CANVAS_ITEM_VISIBLE &&
+ !(canvas->root->flags & EEL_CANVAS_ITEM_MAPPED) &&
EEL_CANVAS_ITEM_GET_CLASS (canvas->root)->map)
(* EEL_CANVAS_ITEM_GET_CLASS (canvas->root)->map) (canvas->root);
}
@@ -2249,8 +2252,8 @@ eel_canvas_realize (GtkWidget *widget)
canvas = EEL_CANVAS (widget);
- gdk_window_set_events (canvas->layout.bin_window,
- (gdk_window_get_events (canvas->layout.bin_window)
+ gdk_window_set_events (gtk_layout_get_bin_window (&canvas->layout),
+ (gdk_window_get_events (gtk_layout_get_bin_window (&canvas->layout))
| GDK_EXPOSURE_MASK
| GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
@@ -2263,7 +2266,7 @@ eel_canvas_realize (GtkWidget *widget)
/* Create our own temporary pixmap gc and realize all the items */
- canvas->pixmap_gc = gdk_gc_new (canvas->layout.bin_window);
+ canvas->pixmap_gc = gdk_gc_new (gtk_layout_get_bin_window (&canvas->layout));
(* EEL_CANVAS_ITEM_GET_CLASS (canvas->root)->realize) (canvas->root);
}
@@ -2302,9 +2305,13 @@ scroll_to (EelCanvas *canvas, int cx, int cy)
int old_zoom_xofs, old_zoom_yofs;
int changed_x = FALSE, changed_y = FALSE;
int canvas_width, canvas_height;
+ GtkAllocation allocation;
+ GtkAdjustment *vadjustment, *hadjustment;
+ guint width, height;
- canvas_width = GTK_WIDGET (canvas)->allocation.width;
- canvas_height = GTK_WIDGET (canvas)->allocation.height;
+ gtk_widget_get_allocation (GTK_WIDGET (canvas), &allocation);
+ canvas_width = allocation.width;
+ canvas_height = allocation.height;
scroll_width = floor ((canvas->scroll_x2 - canvas->scroll_x1) * canvas->pixels_per_unit + 0.5);
scroll_height = floor ((canvas->scroll_y2 - canvas->scroll_y1) * canvas->pixels_per_unit + 0.5);
@@ -2353,32 +2360,36 @@ scroll_to (EelCanvas *canvas, int cx, int cy)
/* This can only occur, if either canvas size or widget size changes */
/* So I think we can request full redraw here */
/* More stuff - we have to mark root as needing fresh affine (Lauris) */
- if (!(canvas->root->object.flags & EEL_CANVAS_ITEM_NEED_DEEP_UPDATE)) {
- canvas->root->object.flags |= EEL_CANVAS_ITEM_NEED_DEEP_UPDATE;
+ if (!(canvas->root->flags & EEL_CANVAS_ITEM_NEED_DEEP_UPDATE)) {
+ canvas->root->flags |= EEL_CANVAS_ITEM_NEED_DEEP_UPDATE;
eel_canvas_request_update (canvas);
}
gtk_widget_queue_draw (GTK_WIDGET (canvas));
}
- if (((int) canvas->layout.hadjustment->value) != cx) {
- canvas->layout.hadjustment->value = cx;
+ hadjustment = gtk_layout_get_hadjustment (&canvas->layout);
+ vadjustment = gtk_layout_get_vadjustment (&canvas->layout);
+
+ if (((int) gtk_adjustment_get_value (hadjustment)) != cx) {
+ gtk_adjustment_set_value (hadjustment, cx);
changed_x = TRUE;
}
- if (((int) canvas->layout.vadjustment->value) != cy) {
- canvas->layout.vadjustment->value = cy;
+ if (((int) gtk_adjustment_get_value (vadjustment)) != cy) {
+ gtk_adjustment_set_value (vadjustment, cy);
changed_y = TRUE;
}
- if ((scroll_width != (int) canvas->layout.width) || (scroll_height != (int) canvas->layout.height)) {
+ gtk_layout_get_size (&canvas->layout, &width, &height);
+ if ((scroll_width != (int) width )|| (scroll_height != (int) height)) {
gtk_layout_set_size (GTK_LAYOUT (canvas), scroll_width, scroll_height);
}
/* Signal GtkLayout that it should do a redraw. */
if (changed_x)
- g_signal_emit_by_name (G_OBJECT (canvas->layout.hadjustment), "value_changed");
+ g_signal_emit_by_name (hadjustment, "value_changed");
if (changed_y)
- g_signal_emit_by_name (G_OBJECT (canvas->layout.vadjustment), "value_changed");
+ g_signal_emit_by_name (vadjustment, "value_changed");
}
/* Size allocation handler for the canvas */
@@ -2386,6 +2397,7 @@ static void
eel_canvas_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
EelCanvas *canvas;
+ GtkAdjustment *vadjustment, *hadjustment;
g_return_if_fail (EEL_IS_CANVAS (widget));
g_return_if_fail (allocation != NULL);
@@ -2397,18 +2409,21 @@ eel_canvas_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
/* Recenter the view, if appropriate */
- canvas->layout.hadjustment->page_size = allocation->width;
- canvas->layout.hadjustment->page_increment = allocation->width / 2;
+ hadjustment = gtk_layout_get_hadjustment (&canvas->layout);
+ vadjustment = gtk_layout_get_vadjustment (&canvas->layout);
+
+ gtk_adjustment_set_page_size (hadjustment, allocation->width);
+ gtk_adjustment_set_page_increment (hadjustment, allocation->width / 2);
- canvas->layout.vadjustment->page_size = allocation->height;
- canvas->layout.vadjustment->page_increment = allocation->height / 2;
+ gtk_adjustment_set_page_size (vadjustment, allocation->height);
+ gtk_adjustment_set_page_increment (vadjustment, allocation->height / 2);
scroll_to (canvas,
- canvas->layout.hadjustment->value,
- canvas->layout.vadjustment->value);
+ gtk_adjustment_get_value (hadjustment),
+ gtk_adjustment_get_value (vadjustment));
- g_signal_emit_by_name (G_OBJECT (canvas->layout.hadjustment), "changed");
- g_signal_emit_by_name (G_OBJECT (canvas->layout.vadjustment), "changed");
+ g_signal_emit_by_name (hadjustment, "changed");
+ g_signal_emit_by_name (vadjustment, "changed");
}
/* Emits an event for an item in the canvas, be it the current item, grabbed
@@ -2634,7 +2649,7 @@ pick_current_item (EelCanvas *canvas, GdkEvent *event)
eel_canvas_c2w (canvas, cx, cy, &x, &y);
/* find the closest item */
- if (canvas->root->object.flags & EEL_CANVAS_ITEM_MAPPED)
+ if (canvas->root->flags & EEL_CANVAS_ITEM_MAPPED)
eel_canvas_item_invoke_point (canvas->root, x, y, cx, cy,
&canvas->new_current_item);
else
@@ -2709,7 +2724,7 @@ eel_canvas_button (GtkWidget *widget, GdkEventButton *event)
* dispatch normally regardless of the event's window if an item has
* has a pointer grab in effect
*/
- if (!canvas->grabbed_item && event->window != canvas->layout.bin_window)
+ if (!canvas->grabbed_item && event->window != gtk_layout_get_bin_window (&canvas->layout))
return retval;
switch (event->button) {
@@ -2775,7 +2790,7 @@ eel_canvas_motion (GtkWidget *widget, GdkEventMotion *event)
canvas = EEL_CANVAS (widget);
- if (event->window != canvas->layout.bin_window)
+ if (event->window != gtk_layout_get_bin_window (&canvas->layout))
return FALSE;
canvas->state = event->state;
@@ -2814,7 +2829,7 @@ eel_canvas_crossing (GtkWidget *widget, GdkEventCrossing *event)
canvas = EEL_CANVAS (widget);
- if (event->window != canvas->layout.bin_window)
+ if (event->window != gtk_layout_get_bin_window (&canvas->layout))
return FALSE;
canvas->state = event->state;
@@ -2827,8 +2842,6 @@ eel_canvas_focus_in (GtkWidget *widget, GdkEventFocus *event)
{
EelCanvas *canvas;
- GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
-
canvas = EEL_CANVAS (widget);
if (canvas->focused_item)
@@ -2843,8 +2856,6 @@ eel_canvas_focus_out (GtkWidget *widget, GdkEventFocus *event)
{
EelCanvas *canvas;
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
-
canvas = EEL_CANVAS (widget);
if (canvas->focused_item)
@@ -2861,7 +2872,7 @@ eel_canvas_expose (GtkWidget *widget, GdkEventExpose *event)
canvas = EEL_CANVAS (widget);
- if (!gtk_widget_is_drawable (widget) || (event->window != canvas->layout.bin_window)) return FALSE;
+ if (!gtk_widget_is_drawable (widget) || (event->window != gtk_layout_get_bin_window (&canvas->layout))) return FALSE;
#ifdef VERBOSE
g_print ("Expose\n");
@@ -2892,9 +2903,9 @@ eel_canvas_expose (GtkWidget *widget, GdkEventExpose *event)
event->area.x, event->area.y,
event->area.width, event->area.height);
- if (canvas->root->object.flags & EEL_CANVAS_ITEM_MAPPED)
+ if (canvas->root->flags & EEL_CANVAS_ITEM_MAPPED)
(* EEL_CANVAS_ITEM_GET_CLASS (canvas->root)->draw) (canvas->root,
- canvas->layout.bin_window,
+ gtk_layout_get_bin_window (&canvas->layout),
event);
@@ -2911,8 +2922,8 @@ eel_canvas_draw_background (EelCanvas *canvas,
{
/* By default, we use the style background. */
gdk_gc_set_foreground (canvas->pixmap_gc,
- &GTK_WIDGET (canvas)->style->bg[GTK_STATE_NORMAL]);
- gdk_draw_rectangle (canvas->layout.bin_window,
+ &gtk_widget_get_style (GTK_WIDGET (canvas))->bg[GTK_STATE_NORMAL]);
+ gdk_draw_rectangle (gtk_layout_get_bin_window (&canvas->layout),
canvas->pixmap_gc,
TRUE,
x, y,
@@ -3023,6 +3034,7 @@ eel_canvas_set_scroll_region (EelCanvas *canvas, double x1, double y1, double x2
{
double wxofs, wyofs;
int xofs, yofs;
+ GtkAdjustment *vadjustment, *hadjustment;
g_return_if_fail (EEL_IS_CANVAS (canvas));
@@ -3035,10 +3047,12 @@ eel_canvas_set_scroll_region (EelCanvas *canvas, double x1, double y1, double x2
* Set the new scrolling region. If possible, do not move the visible contents of the
* canvas.
*/
+ hadjustment = gtk_layout_get_hadjustment (GTK_LAYOUT (canvas));
+ vadjustment = gtk_layout_get_vadjustment (GTK_LAYOUT (canvas));
eel_canvas_c2w (canvas,
- GTK_LAYOUT (canvas)->hadjustment->value + canvas->zoom_xofs,
- GTK_LAYOUT (canvas)->vadjustment->value + canvas->zoom_yofs,
+ gtk_adjustment_get_value (hadjustment) + canvas->zoom_xofs,
+ gtk_adjustment_get_value (vadjustment) + canvas->zoom_yofs,
/*canvas->zoom_xofs,
canvas->zoom_yofs,*/
&wxofs, &wyofs);
@@ -3054,8 +3068,8 @@ eel_canvas_set_scroll_region (EelCanvas *canvas, double x1, double y1, double x2
canvas->need_repick = TRUE;
- if (!(canvas->root->object.flags & EEL_CANVAS_ITEM_NEED_DEEP_UPDATE)) {
- canvas->root->object.flags |= EEL_CANVAS_ITEM_NEED_DEEP_UPDATE;
+ if (!(canvas->root->flags & EEL_CANVAS_ITEM_NEED_DEEP_UPDATE)) {
+ canvas->root->flags |= EEL_CANVAS_ITEM_NEED_DEEP_UPDATE;
eel_canvas_request_update (canvas);
}
}
@@ -3093,13 +3107,18 @@ void
eel_canvas_set_center_scroll_region (EelCanvas *canvas,
gboolean center_scroll_region)
{
+ GtkAdjustment *vadjustment, *hadjustment;
+
g_return_if_fail (EEL_IS_CANVAS (canvas));
canvas->center_scroll_region = center_scroll_region != 0;
+ hadjustment = gtk_layout_get_hadjustment (&canvas->layout);
+ vadjustment = gtk_layout_get_vadjustment (&canvas->layout);
+
scroll_to (canvas,
- canvas->layout.hadjustment->value,
- canvas->layout.vadjustment->value);
+ gtk_adjustment_get_value (hadjustment),
+ gtk_adjustment_get_value (vadjustment));
}
@@ -3121,18 +3140,23 @@ eel_canvas_set_pixels_per_unit (EelCanvas *canvas, double n)
GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
+ GtkAllocation allocation;
+ GtkAdjustment *vadjustment, *hadjustment;
g_return_if_fail (EEL_IS_CANVAS (canvas));
g_return_if_fail (n > EEL_CANVAS_EPSILON);
widget = GTK_WIDGET (canvas);
- center_x = widget->allocation.width / 2;
- center_y = widget->allocation.height / 2;
+ gtk_widget_get_allocation (widget, &allocation);
+ center_x = allocation.width / 2;
+ center_y = allocation.height / 2;
/* Find the coordinates of the screen center in units. */
- cx = (canvas->layout.hadjustment->value + center_x) / canvas->pixels_per_unit + canvas->scroll_x1 + canvas->zoom_xofs;
- cy = (canvas->layout.vadjustment->value + center_y) / canvas->pixels_per_unit + canvas->scroll_y1 + canvas->zoom_yofs;
+ hadjustment = gtk_layout_get_hadjustment (&canvas->layout);
+ vadjustment = gtk_layout_get_vadjustment (&canvas->layout);
+ cx = (gtk_adjustment_get_value (hadjustment) + center_x) / canvas->pixels_per_unit + canvas->scroll_x1 + canvas->zoom_xofs;
+ cy = (gtk_adjustment_get_value (vadjustment) + center_y) / canvas->pixels_per_unit + canvas->scroll_y1 + canvas->zoom_yofs;
/* Now calculate the new offset of the upper left corner. (round not truncate) */
x1 = ((cx - canvas->scroll_x1) * n) - center_x + .5;
@@ -3140,8 +3164,8 @@ eel_canvas_set_pixels_per_unit (EelCanvas *canvas, double n)
canvas->pixels_per_unit = n;
- if (!(canvas->root->object.flags & EEL_CANVAS_ITEM_NEED_DEEP_UPDATE)) {
- canvas->root->object.flags |= EEL_CANVAS_ITEM_NEED_DEEP_UPDATE;
+ if (!(canvas->root->flags & EEL_CANVAS_ITEM_NEED_DEEP_UPDATE)) {
+ canvas->root->flags |= EEL_CANVAS_ITEM_NEED_DEEP_UPDATE;
eel_canvas_request_update (canvas);
}
@@ -3150,11 +3174,13 @@ eel_canvas_set_pixels_per_unit (EelCanvas *canvas, double n)
*/
window = NULL;
if (gtk_widget_get_mapped (widget)) {
+ GtkAllocation allocation;
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;
+ gtk_widget_get_allocation (widget, &allocation);
+ attributes.x = allocation.x;
+ attributes.y = allocation.y;
+ attributes.width = allocation.width;
+ attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
@@ -3219,13 +3245,18 @@ eel_canvas_scroll_to (EelCanvas *canvas, int cx, int cy)
void
eel_canvas_get_scroll_offsets (EelCanvas *canvas, int *cx, int *cy)
{
+ GtkAdjustment *vadjustment, *hadjustment;
+
g_return_if_fail (EEL_IS_CANVAS (canvas));
+ hadjustment = gtk_layout_get_hadjustment (&canvas->layout);
+ vadjustment = gtk_layout_get_vadjustment (&canvas->layout);
+
if (cx)
- *cx = canvas->layout.hadjustment->value;
+ *cx = gtk_adjustment_get_value (hadjustment);
if (cy)
- *cy = canvas->layout.vadjustment->value;
+ *cy = gtk_adjustment_get_value (vadjustment);
}
/**
@@ -3319,7 +3350,7 @@ eel_canvas_request_redraw (EelCanvas *canvas, int x1, int y1, int x2, int y2)
bbox.width = x2 - x1;
bbox.height = y2 - y1;
- gdk_window_invalidate_rect (canvas->layout.bin_window,
+ gdk_window_invalidate_rect (gtk_layout_get_bin_window (&canvas->layout),
&bbox, FALSE);
}
@@ -3637,10 +3668,10 @@ eel_canvas_item_accessible_is_item_in_window (EelCanvasItem *item,
gboolean retval;
widget = GTK_WIDGET (item->canvas);
- if (widget->window) {
+ if (gtk_widget_get_window (widget)) {
int window_width, window_height;
- gdk_window_get_geometry (widget->window, NULL, NULL,
+ gdk_window_get_geometry (gtk_widget_get_window (widget), NULL, NULL,
&window_width, &window_height, NULL);
/*
* Check whether rectangles intersect
@@ -3706,7 +3737,7 @@ eel_canvas_item_accessible_get_extents (AtkComponent *component,
*x = rect.x + window_x;
*y = rect.y + window_y;
if (coord_type == ATK_XY_WINDOW) {
- window = gdk_window_get_toplevel (canvas->window);
+ window = gdk_window_get_toplevel (gtk_widget_get_window (canvas));
gdk_window_get_origin (window, &toplevel_x, &toplevel_y);
*x -= toplevel_x;
*y -= toplevel_y;
@@ -3816,7 +3847,7 @@ eel_canvas_item_accessible_ref_state_set (AtkObject *accessible)
if (item == NULL) {
atk_state_set_add_state (state_set, ATK_STATE_DEFUNCT);
} else {
- if (item->object.flags & EEL_CANVAS_ITEM_VISIBLE) {
+ if (item->flags & EEL_CANVAS_ITEM_VISIBLE) {
atk_state_set_add_state (state_set, ATK_STATE_VISIBLE);
if (eel_canvas_item_accessible_is_item_on_screen (item)) {
diff --git a/eel/eel-canvas.h b/eel/eel-canvas.h
index d440014..75fae93 100644
--- a/eel/eel-canvas.h
+++ b/eel/eel-canvas.h
@@ -120,6 +120,9 @@ struct _EelCanvasItem {
/* Bounding box for this item (in canvas coordinates) */
double x1, y1, x2, y2;
+
+ /* Object flags */
+ guint flags;
};
struct _EelCanvasItemClass {
--
1.7.2

View File

@ -1,72 +0,0 @@
From 3e8a76045a33c778f423befc1c16a5e26929d00e Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:10:00 +0200
Subject: [PATCH 020/249] [eel] GSEAL eel-debug-drawing.
---
eel/eel-debug-drawing.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/eel/eel-debug-drawing.c b/eel/eel-debug-drawing.c
index 8aeb4b9..c25cb72 100644
--- a/eel/eel-debug-drawing.c
+++ b/eel/eel-debug-drawing.c
@@ -100,8 +100,8 @@ debug_pixbuf_viewer_class_init (DebugPixbufViewerClass *pixbuf_viewer_class)
static void
debug_pixbuf_viewer_init (DebugPixbufViewer *viewer)
{
- GTK_WIDGET_UNSET_FLAGS (viewer, GTK_CAN_FOCUS);
- GTK_WIDGET_SET_FLAGS (viewer, GTK_NO_WINDOW);
+ gtk_widget_set_can_focus (GTK_WIDGET (viewer), FALSE);
+ gtk_widget_set_has_window (GTK_WIDGET (viewer), FALSE);
}
static void
@@ -144,10 +144,11 @@ debug_pixbuf_viewer_expose_event (GtkWidget *widget, GdkEventExpose *event)
EelIRect clipped_dirty_area;
EelIRect dirty_area;
EelIRect bounds;
+ GtkAllocation allocation;
g_assert (DEBUG_IS_PIXBUF_VIEWER (widget));
g_assert (event != NULL);
- g_assert (event->window == widget->window);
+ g_assert (event->window == gtk_widget_get_window (widget));
g_assert (gtk_widget_get_realized (widget));
viewer = DEBUG_PIXBUF_VIEWER (widget);
@@ -155,9 +156,10 @@ debug_pixbuf_viewer_expose_event (GtkWidget *widget, GdkEventExpose *event)
if (viewer->pixbuf == NULL) {
return TRUE;
}
-
- bounds.x0 = widget->allocation.x + (widget->allocation.width - gdk_pixbuf_get_width (viewer->pixbuf)) / 2;
- bounds.y0 = widget->allocation.y + (widget->allocation.height - gdk_pixbuf_get_height (viewer->pixbuf)) / 2;
+
+ gtk_widget_get_allocation (widget, &allocation);
+ bounds.x0 = allocation.x + (allocation.width - gdk_pixbuf_get_width (viewer->pixbuf)) / 2;
+ bounds.y0 = allocation.y + (allocation.height - gdk_pixbuf_get_height (viewer->pixbuf)) / 2;
bounds.x1 = bounds.x0 + gdk_pixbuf_get_width (viewer->pixbuf);
bounds.y1 = bounds.y0 + gdk_pixbuf_get_height (viewer->pixbuf);
@@ -176,7 +178,7 @@ debug_pixbuf_viewer_expose_event (GtkWidget *widget, GdkEventExpose *event)
eel_gdk_pixbuf_draw_to_drawable (viewer->pixbuf,
event->window,
- widget->style->white_gc,
+ gtk_widget_get_style (widget)->white_gc,
clipped_bounds.x0 - bounds.x0,
clipped_bounds.y0 - bounds.y0,
clipped_bounds,
@@ -372,7 +374,7 @@ eel_debug_show_pixbuf (GdkPixbuf *pixbuf)
gtk_widget_show (debug_window);
debug_pixbuf_viewer_set_pixbuf (DEBUG_PIXBUF_VIEWER (debug_image), pixbuf);
- gdk_window_clear_area_e (debug_window->window, 0, 0, -1, -1);
+ gdk_window_clear_area_e (gtk_widget_get_window (debug_window), 0, 0, -1, -1);
}
void
--
1.7.2

View File

@ -1,578 +0,0 @@
From f9273be48cb62cd39aa145fa715547ec077c1670 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:10:35 +0200
Subject: [PATCH 021/249] [eel] GSEAL eel-editable-label.
---
eel/eel-editable-label.c | 183 ++++++++++++++++++++++++++--------------------
1 files changed, 103 insertions(+), 80 deletions(-)
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index 31c45ad..b21bfea 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -603,7 +603,7 @@ eel_editable_label_init (EelEditableLabel *label)
label->text[0] = '\0';
label->n_bytes = 0;
- GTK_WIDGET_SET_FLAGS (label, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (GTK_WIDGET (label), TRUE);
/* This object is completely private. No external entity can gain a reference
* to it; so we create it here and destroy it in finalize().
@@ -902,7 +902,7 @@ static gint
get_label_wrap_width (EelEditableLabel *label)
{
PangoLayout *layout;
- GtkStyle *style = GTK_WIDGET (label)->style;
+ GtkStyle *style = gtk_widget_get_style (GTK_WIDGET (label));
LabelWrapWidth *wrap_width = g_object_get_data (G_OBJECT (style), "gtk-label-wrap-width");
if (!wrap_width)
@@ -1092,6 +1092,7 @@ eel_editable_label_size_request (GtkWidget *widget,
gint width, height;
PangoRectangle logical_rect;
gint set_width;
+ gfloat xpad, ypad;
g_assert (EEL_IS_EDITABLE_LABEL (widget));
g_assert (requisition != NULL);
@@ -1116,8 +1117,10 @@ eel_editable_label_size_request (GtkWidget *widget,
eel_editable_label_ensure_layout (label, TRUE);
- width = label->misc.xpad * 2;
- height = label->misc.ypad * 2;
+ gtk_misc_get_alignment (&label->misc,
+ &xpad, &ypad);
+ width = xpad * 2;
+ height = ypad * 2;
pango_layout_get_extents (label->layout, NULL, &logical_rect);
@@ -1173,7 +1176,10 @@ eel_editable_label_style_set (GtkWidget *widget,
*/
if (gtk_widget_get_realized (widget))
{
- gdk_window_set_background (widget->window, &widget->style->base[gtk_widget_get_state (widget)]);
+ GtkStyle *style;
+
+ style = gtk_widget_get_style (widget);
+ gdk_window_set_background (gtk_widget_get_window (widget), &style->base[gtk_widget_get_state (widget)]);
if (label->primary_cursor_gc != NULL)
{
@@ -1189,7 +1195,7 @@ eel_editable_label_style_set (GtkWidget *widget,
label->primary_cursor_gc = make_cursor_gc (widget,
"cursor-color",
- &widget->style->black);
+ &style->black);
label->secondary_cursor_gc = make_cursor_gc (widget,
"secondary-cursor-color",
@@ -1216,26 +1222,28 @@ get_layout_location (EelEditableLabel *label,
{
GtkMisc *misc;
GtkWidget *widget;
- gfloat xalign;
+ gfloat xalign, yalign;
GtkRequisition req;
- gint x, y;
+ gint x, y, xpad, ypad;
+ GtkAllocation allocation;
misc = GTK_MISC (label);
widget = GTK_WIDGET (label);
+ gtk_misc_get_alignment (misc, &xalign, &yalign);
- if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
- xalign = misc->xalign;
- else
- xalign = 1.0 - misc->xalign;
+ if (gtk_widget_get_direction (widget) != GTK_TEXT_DIR_LTR)
+ xalign = 1.0 - xalign;
gtk_widget_get_child_requisition (widget, &req);
-
- x = floor ((gint)misc->xpad
- + ((widget->allocation.width - req.width) * xalign)
+ gtk_misc_get_padding (misc, &xpad, &ypad);
+
+ gtk_widget_get_allocation (widget, &allocation);
+ x = floor (xpad
+ + ((allocation.width - req.width) * xalign)
+ 0.5);
- y = floor ((gint)misc->ypad
- + ((widget->allocation.height - req.height) * misc->yalign)
+ y = floor (ypad
+ + ((allocation.height - req.height) * yalign)
+ 0.5);
if (xp)
@@ -1402,7 +1410,9 @@ make_cursor_gc (GtkWidget *widget,
GdkGCValues gc_values;
GdkGCValuesMask gc_values_mask;
GdkColor *cursor_color;
+ GtkStyle *style;
+ style = gtk_widget_get_style (widget);
gtk_widget_style_get (widget, property_name, &cursor_color, NULL);
gc_values_mask = GDK_GC_FOREGROUND;
@@ -1414,8 +1424,8 @@ make_cursor_gc (GtkWidget *widget,
else
gc_values.foreground = *fallback;
- gdk_rgb_find_color (widget->style->colormap, &gc_values.foreground);
- return gtk_gc_get (widget->style->depth, widget->style->colormap, &gc_values, gc_values_mask);
+ gdk_rgb_find_color (style->colormap, &gc_values.foreground);
+ return gtk_gc_get (style->depth, style->colormap, &gc_values, gc_values_mask);
}
static void
@@ -1550,7 +1560,7 @@ eel_editable_label_draw_cursor (EelEditableLabel *label, gint xoffset, gint yof
cursor_location.width = 0;
cursor_location.height = PANGO_PIXELS (cursor1->height);
- _eel_draw_insertion_cursor (widget, widget->window,
+ _eel_draw_insertion_cursor (widget, gtk_widget_get_window (widget),
label->primary_cursor_gc,
&cursor_location, dir1,
dir2 != GTK_TEXT_DIR_NONE);
@@ -1562,7 +1572,7 @@ eel_editable_label_draw_cursor (EelEditableLabel *label, gint xoffset, gint yof
cursor_location.width = 0;
cursor_location.height = PANGO_PIXELS (cursor2->height);
- _eel_draw_insertion_cursor (widget, widget->window,
+ _eel_draw_insertion_cursor (widget, gtk_widget_get_window (widget),
label->secondary_cursor_gc,
&cursor_location, dir2, TRUE);
}
@@ -1571,7 +1581,7 @@ eel_editable_label_draw_cursor (EelEditableLabel *label, gint xoffset, gint yof
{
GdkRegion *clip;
- gdk_draw_rectangle (widget->window, label->primary_cursor_gc, TRUE,
+ gdk_draw_rectangle (gtk_widget_get_window (widget), label->primary_cursor_gc, TRUE,
xoffset + PANGO_PIXELS (strong_pos.x),
yoffset + PANGO_PIXELS (strong_pos.y),
PANGO_PIXELS (strong_pos.width),
@@ -1589,11 +1599,11 @@ eel_editable_label_draw_cursor (EelEditableLabel *label, gint xoffset, gint yof
gdk_gc_set_clip_region (label->primary_cursor_gc, clip);
- gdk_draw_layout_with_colors (widget->window,
+ gdk_draw_layout_with_colors (gtk_widget_get_window (widget),
label->primary_cursor_gc,
xoffset, yoffset,
label->layout,
- &widget->style->base[GTK_STATE_NORMAL],
+ &gtk_widget_get_style (widget)->base[GTK_STATE_NORMAL],
NULL);
gdk_gc_set_clip_region (label->primary_cursor_gc, NULL);
@@ -1609,12 +1619,14 @@ eel_editable_label_expose (GtkWidget *widget,
GdkEventExpose *event)
{
EelEditableLabel *label;
+ GtkStyle *style;
gint x, y;
g_assert (EEL_IS_EDITABLE_LABEL (widget));
g_assert (event != NULL);
label = EEL_EDITABLE_LABEL (widget);
+ style = gtk_widget_get_style (widget);
eel_editable_label_ensure_layout (label, TRUE);
@@ -1623,8 +1635,8 @@ eel_editable_label_expose (GtkWidget *widget,
{
get_layout_location (label, &x, &y);
- gtk_paint_layout (widget->style,
- widget->window,
+ gtk_paint_layout (style,
+ gtk_widget_get_window (widget),
gtk_widget_get_state (widget),
TRUE,
&event->area,
@@ -1667,33 +1679,36 @@ eel_editable_label_expose (GtkWidget *widget,
* region
*/
- gdk_gc_set_clip_region (widget->style->black_gc, clip);
+ gdk_gc_set_clip_region (style->black_gc, clip);
state = GTK_STATE_SELECTED;
if (!gtk_widget_has_focus (widget))
state = GTK_STATE_ACTIVE;
- gdk_draw_layout_with_colors (widget->window,
- widget->style->black_gc,
+ gdk_draw_layout_with_colors (gtk_widget_get_window (widget),
+ style->black_gc,
x, y,
label->layout,
- &widget->style->text[state],
- &widget->style->base[state]);
+ &style->text[state],
+ &style->base[state]);
- gdk_gc_set_clip_region (widget->style->black_gc, NULL);
+ gdk_gc_set_clip_region (style->black_gc, NULL);
gdk_region_destroy (clip);
}
else if (gtk_widget_has_focus (widget))
eel_editable_label_draw_cursor (label, x, y);
- if (label->draw_outline)
- gdk_draw_rectangle (widget->window,
- widget->style->text_gc [gtk_widget_get_state (widget)],
+ if (label->draw_outline) {
+ GtkAllocation allocation;
+ gtk_widget_get_allocation (widget, &allocation);
+ gdk_draw_rectangle (gtk_widget_get_window (widget),
+ style->text_gc [gtk_widget_get_state (widget)],
FALSE,
0, 0,
- widget->allocation.width - 1,
- widget->allocation.height - 1);
+ allocation.width - 1,
+ allocation.height - 1);
+ }
}
return FALSE;
@@ -1706,16 +1721,20 @@ eel_editable_label_realize (GtkWidget *widget)
GdkWindowAttr attributes;
gint attributes_mask;
static GdkColor gray = { 0, 0x8888, 0x8888, 0x8888 };
+ GtkAllocation allocation;
+ GdkWindow *window;
+ GtkStyle *style;
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
label = EEL_EDITABLE_LABEL (widget);
+ gtk_widget_get_allocation (widget, &allocation);
attributes.wclass = GDK_INPUT_OUTPUT;
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.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
attributes.cursor = gdk_cursor_new (GDK_XTERM);
@@ -1732,21 +1751,23 @@ eel_editable_label_realize (GtkWidget *widget)
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP | GDK_WA_CURSOR;
- widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
- &attributes, attributes_mask);
- gdk_window_set_user_data (widget->window, widget);
+ window = gdk_window_new (gtk_widget_get_parent_window (widget),
+ &attributes, attributes_mask);
+ gtk_widget_set_window (widget, window);
+ gdk_window_set_user_data (window, widget);
gdk_cursor_unref (attributes.cursor);
- widget->style = gtk_style_attach (widget->style, widget->window);
+ style = gtk_style_attach (gtk_widget_get_style (widget) , gtk_widget_get_window (widget));
+ gtk_widget_set_style (widget, style);
- gdk_window_set_background (widget->window, &widget->style->base[gtk_widget_get_state (widget)]);
+ gdk_window_set_background (gtk_widget_get_window (widget), &style->base[gtk_widget_get_state (widget)]);
- gtk_im_context_set_client_window (label->im_context, widget->window);
+ gtk_im_context_set_client_window (label->im_context, gtk_widget_get_window (widget));
label->primary_cursor_gc = make_cursor_gc (widget,
"cursor-color",
- &widget->style->black);
+ &style->black);
label->secondary_cursor_gc = make_cursor_gc (widget,
"secondary-cursor-color",
@@ -1791,7 +1812,7 @@ window_to_layout_coords (EelEditableLabel *label,
{
gint lx, ly;
- /* get layout location in widget->window coords */
+ /* get layout location in gtk_widget_get_window (widget) coords */
get_layout_location (label, &lx, &ly);
if (x)
@@ -1978,7 +1999,7 @@ eel_editable_label_motion (GtkWidget *widget,
if ((event->state & GDK_BUTTON1_MASK) == 0)
return FALSE;
- gdk_window_get_pointer (widget->window,
+ gdk_window_get_pointer (gtk_widget_get_window (widget),
&x, &y, NULL);
get_layout_index (label, x, y, &index);
@@ -3106,19 +3127,21 @@ popup_position_func (GtkMenu *menu,
EelEditableLabel *label;
GtkWidget *widget;
GtkRequisition req;
+ GtkAllocation allocation;
label = EEL_EDITABLE_LABEL (user_data);
widget = GTK_WIDGET (label);
g_assert (gtk_widget_get_realized (widget));
- gdk_window_get_origin (widget->window, x, y);
+ gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
/*gtk_widget_size_request (label->popup_menu, &req);*/
- req = widget->requisition;
+ gtk_widget_get_requisition (widget, &req);
+ gtk_widget_get_allocation (widget, &allocation);
- *x += widget->allocation.width / 2;
- *y += widget->allocation.height;
+ *x += allocation.width / 2;
+ *y += allocation.height;
*x = CLAMP (*x, 0, MAX (0, gdk_screen_width () - req.width));
*y = CLAMP (*y, 0, MAX (0, gdk_screen_height () - req.height));
@@ -3476,7 +3499,7 @@ eel_editable_label_accessible_get_text (AtkText *text,
GtkWidget *widget;
EelEditableLabelAccessiblePrivate *priv;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return NULL;
@@ -3495,7 +3518,7 @@ eel_editable_label_accessible_get_character_at_offset (AtkText *text,
gchar *index;
gunichar unichar;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return '\0';
@@ -3528,7 +3551,7 @@ eel_editable_label_accessible_get_text_before_offset (AtkText *text,
EelEditableLabel *label;
EelEditableLabelAccessiblePrivate *priv;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return NULL;
@@ -3554,7 +3577,7 @@ eel_editable_label_accessible_get_text_at_offset (AtkText *text,
EelEditableLabel *label;
EelEditableLabelAccessiblePrivate *priv;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return NULL;
@@ -3580,7 +3603,7 @@ eel_editable_label_accessible_get_text_after_offset (AtkText *text,
EelEditableLabel *label;
EelEditableLabelAccessiblePrivate *priv;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return NULL;
@@ -3599,7 +3622,7 @@ eel_editable_label_accessible_get_caret_offset (AtkText *text)
{
GtkWidget *widget;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return 0;
@@ -3612,7 +3635,7 @@ eel_editable_label_accessible_set_caret_offset (AtkText *text, gint offset)
{
GtkWidget *widget;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return FALSE;
@@ -3627,7 +3650,7 @@ eel_editable_label_accessible_get_character_count (AtkText *text)
GtkWidget *widget;
EelEditableLabel *label;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return 0;
@@ -3643,7 +3666,7 @@ eel_editable_label_accessible_get_n_selections (AtkText *text)
EelEditableLabel *label;
gint select_start, select_end;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return -1;
@@ -3667,7 +3690,7 @@ eel_editable_label_accessible_get_selection (AtkText *text,
GtkWidget *widget;
EelEditableLabel *label;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return NULL;
@@ -3696,7 +3719,7 @@ eel_editable_label_accessible_add_selection (AtkText *text,
EelEditableLabel *label;
gint select_start, select_end;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return FALSE;
@@ -3725,7 +3748,7 @@ eel_editable_label_accessible_remove_selection (AtkText *text,
EelEditableLabel *label;
gint select_start, select_end, caret_pos;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return FALSE;
@@ -3760,7 +3783,7 @@ eel_editable_label_accessible_set_selection (AtkText *text,
EelEditableLabel *label;
gint select_start, select_end;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return FALSE;
@@ -3795,7 +3818,7 @@ eel_editable_label_accessible_get_run_attributes (AtkText *text,
AtkAttributeSet *at_set = NULL;
GtkTextDirection dir;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return NULL;
@@ -3826,7 +3849,7 @@ eel_editable_label_accessible_get_default_attributes (AtkText *text)
EelEditableLabel *label;
AtkAttributeSet *at_set = NULL;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return NULL;
@@ -3853,7 +3876,7 @@ eel_editable_label_accessible_get_character_extents (AtkText *text,
PangoRectangle char_rect;
gint index, cursor_index, x_layout, y_layout;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return;
@@ -3880,7 +3903,7 @@ eel_editable_label_accessible_get_offset_at_point (AtkText *text,
EelEditableLabel *label;
gint index, cursor_index, x_layout, y_layout;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return -1;
@@ -3943,7 +3966,7 @@ eel_editable_label_accessible_set_text_contents (AtkEditableText *text,
GtkWidget *widget;
EelEditableLabel *label;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return;
@@ -3963,7 +3986,7 @@ eel_editable_label_accessible_insert_text (AtkEditableText *text,
EelEditableLabel *label;
GtkEditable *editable;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return;
@@ -3984,7 +4007,7 @@ eel_editable_label_accessible_copy_text (AtkEditableText *text,
GtkEditable *editable;
gchar *str;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return;
@@ -4005,7 +4028,7 @@ eel_editable_label_accessible_cut_text (AtkEditableText *text,
GtkEditable *editable;
gchar *str;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return;
@@ -4026,7 +4049,7 @@ eel_editable_label_accessible_delete_text (AtkEditableText *text,
EelEditableLabel *label;
GtkEditable *editable;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return;
@@ -4059,7 +4082,7 @@ eel_editable_label_accessible_paste_text (AtkEditableText *text,
GtkEditable *editable;
EelEditableLabelAccessiblePaste paste_struct;
- widget = GTK_ACCESSIBLE (text)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
/* State is defunct */
return;
@@ -4278,7 +4301,7 @@ eel_editable_label_accessible_get_name (AtkObject *accessible)
{
GtkWidget *widget;
- widget = GTK_ACCESSIBLE (accessible)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
if (widget == NULL)
/* State is defunct */
return NULL;
@@ -4295,7 +4318,7 @@ eel_editable_label_accessible_ref_state_set (AtkObject *accessible)
GtkWidget *widget;
state_set = a11y_parent_class->ref_state_set (accessible);
- widget = GTK_ACCESSIBLE (accessible)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
if (widget == NULL)
return state_set;
--
1.7.2

View File

@ -1,52 +0,0 @@
From 239c62774c44ef6e192301379db19ad53c382742 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:10:49 +0200
Subject: [PATCH 022/249] [eel] GSEAL eel-gtk-container.
---
eel/eel-gtk-container.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/eel/eel-gtk-container.c b/eel/eel-gtk-container.c
index 08056d9..8d25aea 100644
--- a/eel/eel-gtk-container.c
+++ b/eel/eel-gtk-container.c
@@ -75,7 +75,7 @@ eel_gtk_container_child_map (GtkContainer *container,
return;
}
- g_return_if_fail (child->parent == GTK_WIDGET (container));
+ g_return_if_fail (gtk_widget_get_parent (child) == GTK_WIDGET (container));
if (gtk_widget_get_visible (child) && !gtk_widget_get_mapped (child)) {
gtk_widget_map (child);
@@ -101,7 +101,7 @@ eel_gtk_container_child_unmap (GtkContainer *container,
return;
}
- g_return_if_fail (child->parent == GTK_WIDGET (container));
+ g_return_if_fail (gtk_widget_get_parent (child) == GTK_WIDGET (container));
if (gtk_widget_get_visible (child) && gtk_widget_get_mapped (child)) {
gtk_widget_unmap (child);
@@ -163,7 +163,7 @@ eel_gtk_container_child_remove (GtkContainer *container,
g_return_if_fail (GTK_IS_CONTAINER (container));
g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (child->parent == GTK_WIDGET (container));
+ g_return_if_fail (gtk_widget_get_parent (child) == GTK_WIDGET (container));
child_was_visible = gtk_widget_get_visible (child);
@@ -199,7 +199,7 @@ eel_gtk_container_child_size_allocate (GtkContainer *container,
}
g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (child->parent == GTK_WIDGET (container));
+ g_return_if_fail (gtk_widget_get_parent (child) == GTK_WIDGET (container));
if (eel_irect_is_empty (&child_geometry)) {
return;
--
1.7.2

View File

@ -1,209 +0,0 @@
From 6a2110eb0cda5f3c7d47f196b73336ec0227505b Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:11:06 +0200
Subject: [PATCH 023/249] [eel] GSEAL eel-gtk-extensions.
---
eel/eel-gtk-extensions.c | 75 ++++++++++++++++++++++++++-------------------
1 files changed, 43 insertions(+), 32 deletions(-)
diff --git a/eel/eel-gtk-extensions.c b/eel/eel-gtk-extensions.c
index 1bf5800..8c871bb 100644
--- a/eel/eel-gtk-extensions.c
+++ b/eel/eel-gtk-extensions.c
@@ -94,7 +94,7 @@ send_delete_event (GtkWindow *window)
widget = GTK_WIDGET (window);
event.any.type = GDK_DELETE;
- event.any.window = widget->window;
+ event.any.window = gtk_widget_get_window (widget);
event.any.send_event = TRUE;
g_object_ref (event.any.window);
@@ -468,7 +468,7 @@ eel_point_in_allocation (const GtkAllocation *allocation,
&& y < allocation->y + allocation->height;
}
-/* FIXME this function is dangerous, because widget->window coords (or
+/* FIXME this function is dangerous, because gtk_widget_get_window (widget) coords (or
* other window-belonging-to-widget coords) do not need to be in the
* same coordinate system as widget->allocation.
* If you use this function, be aware of that. Someone should probably
@@ -478,11 +478,13 @@ gboolean
eel_point_in_widget (GtkWidget *widget,
int x, int y)
{
+ GtkAllocation allocation;
if (widget == NULL) {
return FALSE;
}
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
- return eel_point_in_allocation (&widget->allocation, x, y);
+ gtk_widget_get_allocation (widget, &allocation);
+ return eel_point_in_allocation (&allocation, x, y);
}
/**
@@ -746,10 +748,12 @@ eel_gtk_adjustment_set_value (GtkAdjustment *adjustment,
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
- upper_page_start = MAX (adjustment->upper - adjustment->page_size, adjustment->lower);
- clamped_value = CLAMP (value, adjustment->lower, upper_page_start);
- if (clamped_value != adjustment->value) {
- adjustment->value = clamped_value;
+ upper_page_start = MAX (gtk_adjustment_get_upper (adjustment) -
+ gtk_adjustment_get_page_size (adjustment),
+ gtk_adjustment_get_lower (adjustment));
+ clamped_value = CLAMP (value, gtk_adjustment_get_lower (adjustment), upper_page_start);
+ if (clamped_value != gtk_adjustment_get_value (adjustment)) {
+ gtk_adjustment_set_value (adjustment, clamped_value);
gtk_adjustment_value_changed (adjustment);
}
}
@@ -760,7 +764,8 @@ eel_gtk_adjustment_clamp_value (GtkAdjustment *adjustment)
{
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
- eel_gtk_adjustment_set_value (adjustment, adjustment->value);
+ eel_gtk_adjustment_set_value (adjustment,
+ gtk_adjustment_get_value (adjustment));
}
/**
@@ -821,27 +826,31 @@ get_layout_location (GtkLabel *label,
{
GtkMisc *misc;
GtkWidget *widget;
- float xalign;
- int x, y;
+ float xalign, yalign;
+ int x, y, xpad, ypad;
int shadow_offset;
+ GtkAllocation allocation;
+ GtkRequisition req;
shadow_offset = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (label),
"eel-label-shadow-offset"));
misc = GTK_MISC (label);
widget = GTK_WIDGET (label);
+ gtk_misc_get_alignment (misc, &xalign, &yalign);
+ gtk_misc_get_padding (misc, &xpad, &ypad);
- if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
- xalign = misc->xalign;
- else
- xalign = 1.0 - misc->xalign;
-
- x = floor (widget->allocation.x + (int)misc->xpad
- + ((widget->allocation.width - widget->requisition.width - shadow_offset) * xalign)
+ if (gtk_widget_get_direction (widget) != GTK_TEXT_DIR_LTR)
+ xalign = 1.0 - xalign;
+
+ gtk_widget_get_allocation (widget, &allocation);
+ gtk_widget_get_requisition (widget, &req);
+ x = floor (allocation.x + xpad
+ + ((allocation.width - req.width - shadow_offset) * xalign)
+ 0.5);
- y = floor (widget->allocation.y + (int)misc->ypad
- + ((widget->allocation.height - widget->requisition.height - shadow_offset) * misc->yalign)
+ y = floor (allocation.y + ypad
+ + ((allocation.height - req.height - shadow_offset) * yalign)
+ 0.5);
@@ -873,26 +882,26 @@ eel_gtk_label_expose_event (GtkLabel *label, GdkEventExpose *event, gpointer use
widget = GTK_WIDGET (label);
if (shadow_offset > 0) {
- gc = gdk_gc_new (widget->window);
+ gc = gdk_gc_new (gtk_widget_get_window (widget));
gdk_gc_set_rgb_fg_color (gc, &color);
gdk_gc_set_clip_rectangle (gc, &event->area);
- gdk_draw_layout (widget->window,
+ gdk_draw_layout (gtk_widget_get_window (widget),
gc,
x + shadow_offset, y + shadow_offset,
- label->layout);
+ gtk_label_get_layout (label));
g_object_unref (gc);
}
- gtk_paint_layout (widget->style,
- widget->window,
+ gtk_paint_layout (gtk_widget_get_style (widget),
+ gtk_widget_get_window (widget),
gtk_widget_get_state (widget),
FALSE,
&event->area,
widget,
"label",
x, y,
- label->layout);
+ gtk_label_get_layout (label));
return TRUE;
}
@@ -987,7 +996,7 @@ eel_gtk_widget_find_windowed_ancestor (GtkWidget *widget)
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
while (widget && !gtk_widget_get_has_window (widget)) {
- widget = widget->parent;
+ widget = gtk_widget_get_parent (widget);
}
return widget;
@@ -1011,7 +1020,7 @@ eel_gtk_get_system_font (void)
gtk_widget_ensure_style (label);
- font = pango_font_description_copy (label->style->font_desc);
+ font = pango_font_description_copy (gtk_widget_get_style (label)->font_desc);
g_object_ref_sink (label);
g_object_unref (label);
@@ -1026,16 +1035,18 @@ eel_gtk_widget_get_button_event_location (GtkWidget *widget,
int *y)
{
int window_x, window_y;
+ GtkAllocation allocation;
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (event != NULL);
gdk_window_get_position (event->window, &window_x, &window_y);
+ gtk_widget_get_allocation (widget, &allocation);
if (x != NULL) {
- *x = event->x + window_x - widget->allocation.x;
+ *x = event->x + window_x - allocation.x;
}
if (y != NULL) {
- *y = event->y + window_y - widget->allocation.y;
+ *y = event->y + window_y - allocation.y;
}
}
@@ -1112,14 +1123,14 @@ eel_gtk_viewport_get_visible_rect (GtkViewport *viewport,
if (gtk_widget_get_realized (GTK_WIDGET (viewport))) {
viewport_rect.x = 0;
viewport_rect.y = 0;
- gdk_drawable_get_size (viewport->view_window,
+ gdk_drawable_get_size (gtk_viewport_get_view_window (viewport),
&viewport_rect.width,
&viewport_rect.height);
- gdk_window_get_position (viewport->bin_window,
+ gdk_window_get_position (gtk_viewport_get_bin_window (viewport),
&child_rect.x,
&child_rect.y);
- gdk_drawable_get_size (viewport->bin_window,
+ gdk_drawable_get_size (gtk_viewport_get_bin_window (viewport),
&child_rect.width,
&child_rect.height);
--
1.7.2

View File

@ -1,25 +0,0 @@
From 963d2dbd1cca1b92bc35f6421ae8789d1b3f4f9d Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:11:21 +0200
Subject: [PATCH 024/249] [eel] GSEAL eel-image-table.
---
eel/eel-image-table.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/eel/eel-image-table.c b/eel/eel-image-table.c
index e781652..f6a3cb9 100644
--- a/eel/eel-image-table.c
+++ b/eel/eel-image-table.c
@@ -181,7 +181,7 @@ eel_image_table_class_init (EelImageTableClass *image_table_class)
static void
eel_image_table_init (EelImageTable *image_table)
{
- GTK_WIDGET_SET_FLAGS (image_table, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (image_table), FALSE);
image_table->details = g_new0 (EelImageTableDetails, 1);
}
--
1.7.2

View File

@ -1,178 +0,0 @@
From 1db88082b3dddef066f718a44dd750a18b201dbd Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:11:39 +0200
Subject: [PATCH 025/249] [eel] GSEAL eel-labeled-image.
---
eel/eel-labeled-image.c | 49 +++++++++++++++++++++++------------------------
1 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/eel/eel-labeled-image.c b/eel/eel-labeled-image.c
index 89e64bb..90df383 100644
--- a/eel/eel-labeled-image.c
+++ b/eel/eel-labeled-image.c
@@ -292,7 +292,7 @@ eel_labeled_image_class_init (EelLabeledImageClass *labeled_image_class)
static void
eel_labeled_image_init (EelLabeledImage *labeled_image)
{
- GTK_WIDGET_SET_FLAGS (labeled_image, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (labeled_image), FALSE);
labeled_image->details = g_new0 (EelLabeledImageDetails, 1);
labeled_image->details->show_label = TRUE;
@@ -514,7 +514,7 @@ eel_labeled_image_size_allocate (GtkWidget *widget,
labeled_image = EEL_LABELED_IMAGE (widget);
- widget->allocation = *allocation;
+ gtk_widget_set_allocation (widget, allocation);
label_bounds = eel_labeled_image_get_label_bounds (labeled_image);
eel_gtk_container_child_size_allocate (GTK_CONTAINER (widget),
@@ -533,6 +533,8 @@ eel_labeled_image_expose_event (GtkWidget *widget,
{
EelLabeledImage *labeled_image;
EelIRect label_bounds;
+ GtkStyle *style;
+ GdkWindow *window;
g_assert (EEL_IS_LABELED_IMAGE (widget));
g_assert (gtk_widget_get_realized (widget));
@@ -540,12 +542,14 @@ eel_labeled_image_expose_event (GtkWidget *widget,
labeled_image = EEL_LABELED_IMAGE (widget);
+ style = gtk_widget_get_style (widget);
+ window = gtk_widget_get_window (widget);
if (gtk_widget_get_state (widget) == GTK_STATE_SELECTED ||
gtk_widget_get_state (widget) == GTK_STATE_ACTIVE) {
label_bounds = eel_labeled_image_get_label_bounds (EEL_LABELED_IMAGE (widget));
- gtk_paint_flat_box (widget->style,
- widget->window,
+ gtk_paint_flat_box (style,
+ window,
gtk_widget_get_state (widget),
GTK_SHADOW_NONE,
&event->area,
@@ -570,7 +574,7 @@ eel_labeled_image_expose_event (GtkWidget *widget,
if (gtk_widget_has_focus (widget)) {
label_bounds = eel_labeled_image_get_image_bounds (EEL_LABELED_IMAGE (widget));
- gtk_paint_focus (widget->style, widget->window,
+ gtk_paint_focus (style, window,
GTK_STATE_NORMAL,
&event->area, widget,
"eel-focusable-labeled-image",
@@ -591,7 +595,7 @@ eel_labeled_image_map (GtkWidget *widget)
labeled_image = EEL_LABELED_IMAGE (widget);
- GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
+ gtk_widget_set_mapped (widget, TRUE);
if (labeled_image_show_label (labeled_image)) {
eel_gtk_container_child_map (GTK_CONTAINER (widget), labeled_image->details->label);
@@ -611,7 +615,7 @@ eel_labeled_image_unmap (GtkWidget *widget)
labeled_image = EEL_LABELED_IMAGE (widget);
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
+ gtk_widget_set_mapped (widget, FALSE);
eel_gtk_container_child_unmap (GTK_CONTAINER (widget), labeled_image->details->label);
eel_gtk_container_child_unmap (GTK_CONTAINER (widget), labeled_image->details->image);
@@ -1028,8 +1032,8 @@ labeled_image_update_alignments (EelLabeledImage *labeled_image)
float y_alignment;
if (labeled_image->details->fill) {
- x_alignment = GTK_MISC (labeled_image->details->label)->xalign;
- y_alignment = GTK_MISC (labeled_image->details->label)->yalign;
+ gtk_misc_get_alignment (GTK_MISC (labeled_image->details->label),
+ &x_alignment, &y_alignment);
/* Only the label is shown */
if (!labeled_image_show_image (labeled_image)) {
@@ -1072,8 +1076,8 @@ labeled_image_update_alignments (EelLabeledImage *labeled_image)
float y_alignment;
if (labeled_image->details->fill) {
- x_alignment = GTK_MISC (labeled_image->details->image)->xalign;
- y_alignment = GTK_MISC (labeled_image->details->image)->yalign;
+ gtk_misc_get_alignment (GTK_MISC (labeled_image->details->image),
+ &x_alignment, &y_alignment);
/* Only the image is shown */
if (!labeled_image_show_label (labeled_image)) {
@@ -1497,7 +1501,7 @@ eel_labeled_image_get_selected (EelLabeledImage *labeled_image)
{
g_return_val_if_fail (EEL_IS_LABELED_IMAGE (labeled_image), FALSE);
- return GTK_WIDGET (labeled_image)->state == GTK_STATE_SELECTED;
+ return gtk_widget_get_state (GTK_WIDGET (labeled_image)) == GTK_STATE_SELECTED;
}
/**
@@ -1934,7 +1938,7 @@ button_leave_callback (GtkWidget *widget,
bounds.x1 += fudge;
bounds.y1 += fudge;
- gtk_widget_queue_draw_area (widget->parent,
+ gtk_widget_queue_draw_area (gtk_widget_get_parent (widget),
bounds.x0,
bounds.y0,
eel_irect_get_width (bounds),
@@ -2109,14 +2113,7 @@ void
eel_labeled_image_set_can_focus (EelLabeledImage *labeled_image,
gboolean can_focus)
{
- if (can_focus) {
- GTK_WIDGET_SET_FLAGS
- (GTK_WIDGET (labeled_image), GTK_CAN_FOCUS);
-
- } else {
- GTK_WIDGET_UNSET_FLAGS
- (GTK_WIDGET (labeled_image), GTK_CAN_FOCUS);
- }
+ gtk_widget_set_can_focus (GTK_WIDGET (labeled_image), can_focus);
}
static AtkObjectClass *a11y_parent_class = NULL;
@@ -2133,12 +2130,12 @@ get_image (gpointer object)
{
GtkWidget *widget;
- if (!(widget = GTK_ACCESSIBLE (object)->widget)) {
+ if (!(widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (object)))) {
return NULL;
}
if (GTK_IS_BUTTON (widget))
- widget = GTK_BIN (widget)->child;
+ widget = gtk_bin_get_child (GTK_BIN (widget));
return EEL_LABELED_IMAGE (widget);
}
@@ -2166,6 +2163,7 @@ eel_labeled_image_accessible_image_get_size (AtkImage *image,
gint *height)
{
EelLabeledImage *labeled_image;
+ GtkAllocation allocation;
labeled_image = get_image (image);
@@ -2174,8 +2172,9 @@ eel_labeled_image_accessible_image_get_size (AtkImage *image,
return;
}
- *width = labeled_image->details->image->allocation.width;
- *height = labeled_image->details->image->allocation.height;
+ gtk_widget_get_allocation (labeled_image->details->image, &allocation);
+ *width = allocation.width;
+ *height = allocation.height;
}
static void
--
1.7.2

View File

@ -1,136 +0,0 @@
From 47947617e14e9e3b676b0f8614bbe294f86dde86 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:11:51 +0200
Subject: [PATCH 026/249] [eel] GSEAL eel-wrap-table.
---
eel/eel-wrap-table.c | 45 ++++++++++++++++++++++++++++-----------------
1 files changed, 28 insertions(+), 17 deletions(-)
diff --git a/eel/eel-wrap-table.c b/eel/eel-wrap-table.c
index 4570428..fd757c6 100644
--- a/eel/eel-wrap-table.c
+++ b/eel/eel-wrap-table.c
@@ -175,7 +175,7 @@ eel_wrap_table_class_init (EelWrapTableClass *wrap_table_class)
static void
eel_wrap_table_init (EelWrapTable *wrap_table)
{
- GTK_WIDGET_SET_FLAGS (wrap_table, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (wrap_table), FALSE);
wrap_table->details = g_new0 (EelWrapTableDetails, 1);
wrap_table->details->x_justification = EEL_JUSTIFICATION_BEGINNING;
@@ -293,7 +293,7 @@ eel_wrap_table_size_request (GtkWidget *widget,
/* The -1 tells Satan to use as much space as is available */
requisition->width = -1;
- requisition->height = content_dimensions.height + GTK_CONTAINER (widget)->border_width * 2;
+ requisition->height = content_dimensions.height + gtk_container_get_border_width (GTK_CONTAINER (widget)) * 2;
}
static void
@@ -307,7 +307,7 @@ eel_wrap_table_size_allocate (GtkWidget *widget,
wrap_table = EEL_WRAP_TABLE (widget);
- widget->allocation = *allocation;
+ gtk_widget_set_allocation (widget, allocation);
wrap_table_layout (wrap_table);
}
@@ -345,7 +345,7 @@ eel_wrap_table_map (GtkWidget *widget)
wrap_table = EEL_WRAP_TABLE (widget);
- GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
+ gtk_widget_set_mapped (widget, TRUE);
for (iterator = wrap_table->details->children; iterator; iterator = iterator->next) {
GtkWidget *item;
@@ -368,7 +368,7 @@ eel_wrap_table_unmap (GtkWidget *widget)
wrap_table = EEL_WRAP_TABLE (widget);
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
+ gtk_widget_set_mapped (widget, FALSE);
for (iterator = wrap_table->details->children; iterator; iterator = iterator->next) {
GtkWidget *item;
@@ -512,6 +512,7 @@ wrap_table_layout (EelWrapTable *wrap_table)
EelDimensions max_child_dimensions;
EelIRect content_bounds;
guint num_cols;
+ GtkAllocation allocation;
g_assert (EEL_IS_WRAP_TABLE (wrap_table));
@@ -520,8 +521,9 @@ wrap_table_layout (EelWrapTable *wrap_table)
pos.x = content_bounds.x0;
pos.y = content_bounds.y0;
- num_cols = wrap_table_get_num_fitting (GTK_WIDGET (wrap_table)->allocation.width -
- GTK_CONTAINER (wrap_table)->border_width * 2,
+ gtk_widget_get_allocation (GTK_WIDGET (wrap_table), &allocation);
+ num_cols = wrap_table_get_num_fitting (allocation.width -
+ gtk_container_get_border_width (GTK_CONTAINER (wrap_table)) * 2,
wrap_table->details->x_spacing,
max_child_dimensions.width);
if (num_cols != wrap_table->details->cols) {
@@ -673,7 +675,7 @@ wrap_table_get_content_dimensions (const EelWrapTable *wrap_table)
max_child_dimensions.height = MAX (max_child_dimensions.height, 1);
num_cols = wrap_table_get_num_fitting (dimensions.width -
- GTK_CONTAINER (wrap_table)->border_width * 2,
+ gtk_container_get_border_width (GTK_CONTAINER (wrap_table)) * 2,
wrap_table->details->x_spacing,
max_child_dimensions.width);
num_rows = num_children / num_cols;
@@ -697,15 +699,17 @@ static EelIRect
wrap_table_get_content_bounds (const EelWrapTable *wrap_table)
{
EelIRect content_bounds;
+ guint border;
g_assert (EEL_IS_WRAP_TABLE (wrap_table));
content_bounds = eel_gtk_widget_get_bounds (GTK_WIDGET (wrap_table));
- content_bounds.x0 += GTK_CONTAINER (wrap_table)->border_width;
- content_bounds.y0 += GTK_CONTAINER (wrap_table)->border_width;
- content_bounds.x1 -= GTK_CONTAINER (wrap_table)->border_width;
- content_bounds.y1 -= GTK_CONTAINER (wrap_table)->border_width;
+ border = gtk_container_get_border_width (GTK_CONTAINER (wrap_table));
+ content_bounds.x0 += border;
+ content_bounds.y0 += border;
+ content_bounds.x1 -= border;
+ content_bounds.y1 -= border;
return content_bounds;
}
@@ -715,11 +719,18 @@ wrap_table_child_focus_in (GtkWidget *widget,
GdkEventFocus *event,
gpointer data)
{
- g_assert (widget->parent && widget->parent->parent);
- g_assert (GTK_IS_VIEWPORT (widget->parent->parent));
-
- eel_gtk_viewport_scroll_to_rect (GTK_VIEWPORT (widget->parent->parent),
- &widget->allocation);
+ GtkWidget *parent, *pparent;
+ GtkAllocation allocation;
+
+ parent = gtk_widget_get_parent (widget);
+ if (parent)
+ pparent = gtk_widget_get_parent (parent);
+ g_assert (parent && pparent);
+ g_assert (GTK_IS_VIEWPORT (pparent));
+
+ gtk_widget_get_allocation (widget, &allocation);
+ eel_gtk_viewport_scroll_to_rect (GTK_VIEWPORT (pparent),
+ &allocation);
return FALSE;
}
--
1.7.2

View File

@ -1,34 +0,0 @@
From 756beaef00e01c686b061ea77d56c7aa6768d32e Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:12:50 +0200
Subject: [PATCH 027/249] [ln-p] GSEAL nautilus-autorun.
---
libnautilus-private/nautilus-autorun.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libnautilus-private/nautilus-autorun.c b/libnautilus-private/nautilus-autorun.c
index 8d57e31..0760622 100644
--- a/libnautilus-private/nautilus-autorun.c
+++ b/libnautilus-private/nautilus-autorun.c
@@ -911,7 +911,7 @@ show_dialog:
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
hbox = gtk_hbox_new (FALSE, 12);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), hbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
icon = g_mount_get_icon (mount);
@@ -1030,7 +1030,7 @@ show_dialog:
data->should_eject = FALSE;
}
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), eject_button, AUTORUN_DIALOG_RESPONSE_EJECT);
- gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (GTK_DIALOG (dialog)->action_area), eject_button, TRUE);
+ gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog))), eject_button, TRUE);
/* show the dialog */
gtk_widget_show_all (dialog);
--
1.7.2

View File

@ -1,25 +0,0 @@
From 3709f641bde70d96fb1feb0288521ced6dba7719 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:13:16 +0200
Subject: [PATCH 028/249] [ln-p] GSEAL nautilus-bookmark.
---
libnautilus-private/nautilus-bookmark.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libnautilus-private/nautilus-bookmark.c b/libnautilus-private/nautilus-bookmark.c
index 7f63324..94009ca 100644
--- a/libnautilus-private/nautilus-bookmark.c
+++ b/libnautilus-private/nautilus-bookmark.c
@@ -579,7 +579,7 @@ nautilus_bookmark_menu_item_new (NautilusBookmark *bookmark)
GtkLabel *label;
menu_item = gtk_image_menu_item_new_with_label (bookmark->details->name);
- label = GTK_LABEL (GTK_BIN (menu_item)->child);
+ label = GTK_LABEL (gtk_bin_get_child (GTK_BIN (menu_item)));
gtk_label_set_use_underline (label, FALSE);
gtk_label_set_ellipsize (label, PANGO_ELLIPSIZE_END);
gtk_label_set_max_width_chars (label, ELLIPSISED_MENU_ITEM_MIN_CHARS);
--
1.7.2

View File

@ -1,117 +0,0 @@
From 392e079433aed213889b972c906d8d0b1b4290d9 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:13:30 +0200
Subject: [PATCH 029/249] [ln-p] GSEAL nautilus-cell-renderer-pixbuf-emblem.
---
.../nautilus-cell-renderer-pixbuf-emblem.c | 48 ++++++++++++-------
1 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/libnautilus-private/nautilus-cell-renderer-pixbuf-emblem.c b/libnautilus-private/nautilus-cell-renderer-pixbuf-emblem.c
index 64f9086..fd17df3 100644
--- a/libnautilus-private/nautilus-cell-renderer-pixbuf-emblem.c
+++ b/libnautilus-private/nautilus-cell-renderer-pixbuf-emblem.c
@@ -343,6 +343,7 @@ nautilus_cell_renderer_pixbuf_emblem_get_size (GtkCellRenderer *cell,
gint pixbuf_height = 0;
gint calc_width;
gint calc_height;
+ gint xpad, ypad;
if (!cellpixbuf->pixbuf && cellinfo->stock_id)
nautilus_cell_renderer_pixbuf_emblem_create_stock_pixbuf (cellpixbuf, widget);
@@ -359,24 +360,28 @@ nautilus_cell_renderer_pixbuf_emblem_get_size (GtkCellRenderer *cell,
pixbuf_width = MAX (pixbuf_width, gdk_pixbuf_get_width (cellpixbuf->pixbuf_expander_closed));
pixbuf_height = MAX (pixbuf_height, gdk_pixbuf_get_height (cellpixbuf->pixbuf_expander_closed));
}
-
- calc_width = (gint) cell->xpad * 2 + pixbuf_width;
- calc_height = (gint) cell->ypad * 2 + pixbuf_height;
+
+ gtk_cell_renderer_get_padding (cell, &xpad, &ypad);
+ calc_width = xpad * 2 + pixbuf_width;
+ calc_height = ypad * 2 + pixbuf_height;
if (x_offset) *x_offset = 0;
if (y_offset) *y_offset = 0;
if (cell_area && pixbuf_width > 0 && pixbuf_height > 0) {
+ gfloat xalign, yalign;
+
+ gtk_cell_renderer_get_alignment (cell, &xalign, &yalign);
if (x_offset) {
*x_offset = (((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ?
- 1.0 - cell->xalign : cell->xalign) *
- (cell_area->width - calc_width - 2 * cell->xpad));
- *x_offset = MAX (*x_offset, 0) + cell->xpad;
+ 1.0 - xalign : xalign) *
+ (cell_area->width - calc_width - 2 * xpad));
+ *x_offset = MAX (*x_offset, 0) + xpad;
}
if (y_offset) {
- *y_offset = (cell->yalign *
- (cell_area->height - calc_height - 2 * cell->ypad));
- *y_offset = MAX (*y_offset, 0) + cell->ypad;
+ *y_offset = (yalign *
+ (cell_area->height - calc_height - 2 * ypad));
+ *y_offset = MAX (*y_offset, 0) + ypad;
}
}
@@ -404,13 +409,19 @@ nautilus_cell_renderer_pixbuf_emblem_render (GtkCellRenderer *cell,
GdkRectangle pix_emblem_rect;
GdkRectangle draw_rect;
gboolean stock_pixbuf = FALSE;
-
+ gint xpad, ypad;
+ gboolean is_expander, is_expanded;
+
pixbuf = cellpixbuf->pixbuf;
- if (cell->is_expander) {
- if (cell->is_expanded &&
+ g_object_get (cell,
+ "is-expander", &is_expander,
+ "is-expanded", &is_expanded,
+ NULL);
+ if (is_expander) {
+ if (is_expanded &&
cellpixbuf->pixbuf_expander_open != NULL) {
pixbuf = cellpixbuf->pixbuf_expander_open;
- } else if (!cell->is_expanded &&
+ } else if (!is_expanded &&
cellpixbuf->pixbuf_expander_closed != NULL) {
pixbuf = cellpixbuf->pixbuf_expander_closed;
}
@@ -430,16 +441,17 @@ nautilus_cell_renderer_pixbuf_emblem_render (GtkCellRenderer *cell,
if (stock_pixbuf)
pixbuf = cellpixbuf->pixbuf;
-
+
+ gtk_cell_renderer_get_padding (cell, &xpad, &ypad);
pix_rect.x += cell_area->x;
pix_rect.y += cell_area->y;
- pix_rect.width -= cell->xpad * 2;
- pix_rect.height -= cell->ypad * 2;
+ pix_rect.width -= xpad * 2;
+ pix_rect.height -= ypad * 2;
if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect) &&
gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect)) {
gdk_draw_pixbuf (window,
- widget->style->black_gc,
+ gtk_widget_get_style (widget)->black_gc,
pixbuf,
/* pixbuf 0, 0 is at pix_rect.x, pix_rect.y */
draw_rect.x - pix_rect.x,
@@ -460,7 +472,7 @@ nautilus_cell_renderer_pixbuf_emblem_render (GtkCellRenderer *cell,
if (gdk_rectangle_intersect (cell_area, &pix_emblem_rect, &draw_rect) &&
gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect)) {
gdk_draw_pixbuf (window,
- widget->style->black_gc,
+ gtk_widget_get_style (widget)->black_gc,
cellpixbuf->pixbuf_emblem,
/* pixbuf 0, 0 is at pix_emblem_rect.x, pix_emblem_rect.y */
draw_rect.x - pix_emblem_rect.x,
--
1.7.2

View File

@ -1,49 +0,0 @@
From fd6f9364d040814346b9995570a558c1d6cb081c Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:13:48 +0200
Subject: [PATCH 030/249] [ln-p] GSEAL nautilus-clipboard-monitor.
---
libnautilus-private/nautilus-clipboard-monitor.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/libnautilus-private/nautilus-clipboard-monitor.c b/libnautilus-private/nautilus-clipboard-monitor.c
index e800d6d..694c01c 100644
--- a/libnautilus-private/nautilus-clipboard-monitor.c
+++ b/libnautilus-private/nautilus-clipboard-monitor.c
@@ -275,11 +275,14 @@ nautilus_get_clipboard_callback (GtkClipboard *clipboard,
GList *l;
int i;
NautilusClipboardInfo *clipboard_info;
+ GdkAtom target;
clipboard_info =
nautilus_clipboard_monitor_get_clipboard_info (nautilus_clipboard_monitor_get ());
- if (gtk_targets_include_uri (&selection_data->target, 1)) {
+ target = gtk_selection_data_get_target (selection_data);
+
+ if (gtk_targets_include_uri (&target, 1)) {
uris = g_malloc ((g_list_length (clipboard_info->files) + 1) * sizeof (char *));
i = 0;
@@ -293,14 +296,14 @@ nautilus_get_clipboard_callback (GtkClipboard *clipboard,
gtk_selection_data_set_uris (selection_data, uris);
g_strfreev (uris);
- } else if (gtk_targets_include_text (&selection_data->target, 1)) {
+ } else if (gtk_targets_include_text (&target, 1)) {
char *str;
gsize len;
str = convert_file_list_to_string (clipboard_info, TRUE, &len);
gtk_selection_data_set_text (selection_data, str, len);
g_free (str);
- } else if (selection_data->target == copied_files_atom) {
+ } else if (target == copied_files_atom) {
char *str;
gsize len;
--
1.7.2

View File

@ -1,40 +0,0 @@
From 3cd134fde66949514eb86b60795394f1aa7a2db6 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:14:13 +0200
Subject: [PATCH 031/249] [ln-p] GSEAL nautilus-clipboard.
---
libnautilus-private/nautilus-clipboard.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/libnautilus-private/nautilus-clipboard.c b/libnautilus-private/nautilus-clipboard.c
index 01b1fb1..947dbba 100644
--- a/libnautilus-private/nautilus-clipboard.c
+++ b/libnautilus-private/nautilus-clipboard.c
@@ -585,17 +585,19 @@ nautilus_clipboard_get_uri_list_from_selection_data (GtkSelectionData *selection
GList *items;
char **lines;
- if (selection_data->type != copied_files_atom
- || selection_data->length <= 0) {
+ if (gtk_selection_data_get_data_type (selection_data) != copied_files_atom
+ || gtk_selection_data_get_length (selection_data) <= 0) {
items = NULL;
} else {
+ guchar *data;
/* Not sure why it's legal to assume there's an extra byte
* past the end of the selection data that it's safe to write
* to. But gtk_editable_selection_received does this, so I
* think it is OK.
*/
- selection_data->data[selection_data->length] = '\0';
- lines = g_strsplit (selection_data->data, "\n", 0);
+ data = (guchar *) gtk_selection_data_get_data (selection_data);
+ data[gtk_selection_data_get_length (selection_data)] = '\0';
+ lines = g_strsplit (data, "\n", 0);
items = convert_lines_to_str_list (lines, cut);
g_strfreev (lines);
}
--
1.7.2

View File

@ -1,197 +0,0 @@
From a22a367740abe58100e8137ad750176ed79f5325 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:14:38 +0200
Subject: [PATCH 032/249] [ln-p] GSEAL nautilus-dnd.
---
libnautilus-private/nautilus-dnd.c | 52 ++++++++++++++++++-----------------
1 files changed, 27 insertions(+), 25 deletions(-)
diff --git a/libnautilus-private/nautilus-dnd.c b/libnautilus-private/nautilus-dnd.c
index 15b6395..2c4051a 100644
--- a/libnautilus-private/nautilus-dnd.c
+++ b/libnautilus-private/nautilus-dnd.c
@@ -198,8 +198,8 @@ nautilus_drag_build_selection_list (GtkSelectionData *data)
int size;
result = NULL;
- oldp = data->data;
- size = data->length;
+ oldp = gtk_selection_data_get_data (data);
+ size = gtk_selection_data_get_length (data);
while (size > 0) {
NautilusDragSelectionItem *item;
@@ -375,15 +375,15 @@ nautilus_drag_default_drop_action_for_netscape_url (GdkDragContext *context)
{
/* Mozilla defaults to copy, but unless thats the
only allowed thing (enforced by ctrl) we want to ASK */
- if (context->suggested_action == GDK_ACTION_COPY &&
- context->actions != GDK_ACTION_COPY) {
+ if (gdk_drag_context_get_suggested_action (context) == GDK_ACTION_COPY &&
+ gdk_drag_context_get_actions (context) != GDK_ACTION_COPY) {
return GDK_ACTION_ASK;
- } else if (context->suggested_action == GDK_ACTION_MOVE) {
+ } else if (gdk_drag_context_get_suggested_action (context) == GDK_ACTION_MOVE) {
/* Don't support move */
return GDK_ACTION_COPY;
}
- return context->suggested_action;
+ return gdk_drag_context_get_suggested_action (context);
}
static gboolean
@@ -446,16 +446,16 @@ nautilus_drag_default_drop_action_for_icons (GdkDragContext *context,
return;
}
- actions = context->actions & (GDK_ACTION_MOVE | GDK_ACTION_COPY);
+ actions = gdk_drag_context_get_actions (context) & (GDK_ACTION_MOVE | GDK_ACTION_COPY);
if (actions == 0) {
/* We can't use copy or move, just go with the suggested action. */
- *action = context->suggested_action;
+ *action = gdk_drag_context_get_suggested_action (context);
return;
}
- if (context->suggested_action == GDK_ACTION_ASK) {
+ if (gdk_drag_context_get_suggested_action (context) == GDK_ACTION_ASK) {
/* Don't override ask */
- *action = context->suggested_action;
+ *action = gdk_drag_context_get_suggested_action (context);
return;
}
@@ -536,13 +536,13 @@ nautilus_drag_default_drop_action_for_icons (GdkDragContext *context,
if (actions & GDK_ACTION_MOVE) {
*action = GDK_ACTION_MOVE;
} else {
- *action = context->suggested_action;
+ *action = gdk_drag_context_get_suggested_action (context);
}
} else {
if (actions & GDK_ACTION_COPY) {
*action = GDK_ACTION_COPY;
} else {
- *action = context->suggested_action;
+ *action = gdk_drag_context_get_suggested_action (context);
}
}
@@ -555,11 +555,11 @@ GdkDragAction
nautilus_drag_default_drop_action_for_uri_list (GdkDragContext *context,
const char *target_uri_string)
{
- if (eel_uri_is_trash (target_uri_string) && (context->actions & GDK_ACTION_MOVE)) {
+ if (eel_uri_is_trash (target_uri_string) && (gdk_drag_context_get_actions (context) & GDK_ACTION_MOVE)) {
/* Only move to Trash */
return GDK_ACTION_MOVE;
} else {
- return context->suggested_action;
+ return gdk_drag_context_get_suggested_action (context);
}
}
@@ -694,7 +694,7 @@ nautilus_drag_drag_data_get (GtkWidget *widget,
}
gtk_selection_data_set (selection_data,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
8, result->str, result->len);
g_string_free (result, TRUE);
@@ -891,11 +891,12 @@ nautilus_drag_autoscroll_in_scroll_region (GtkWidget *widget)
void
nautilus_drag_autoscroll_calculate_delta (GtkWidget *widget, float *x_scroll_delta, float *y_scroll_delta)
{
+ GtkAllocation allocation;
int x, y;
g_assert (GTK_IS_WIDGET (widget));
- gdk_window_get_pointer (widget->window, &x, &y, NULL);
+ gdk_window_get_pointer (gtk_widget_get_window (widget), &x, &y, NULL);
/* Find out if we are anywhere close to the tree view edges
* to see if we need to autoscroll.
@@ -907,7 +908,8 @@ nautilus_drag_autoscroll_calculate_delta (GtkWidget *widget, float *x_scroll_del
*x_scroll_delta = (float)(x - AUTO_SCROLL_MARGIN);
}
- if (x > widget->allocation.width - AUTO_SCROLL_MARGIN) {
+ gtk_widget_get_allocation (widget, &allocation);
+ if (x > allocation.width - AUTO_SCROLL_MARGIN) {
if (*x_scroll_delta != 0) {
/* Already trying to scroll because of being too close to
* the top edge -- must be the window is really short,
@@ -915,14 +917,14 @@ nautilus_drag_autoscroll_calculate_delta (GtkWidget *widget, float *x_scroll_del
*/
return;
}
- *x_scroll_delta = (float)(x - (widget->allocation.width - AUTO_SCROLL_MARGIN));
+ *x_scroll_delta = (float)(x - (allocation.width - AUTO_SCROLL_MARGIN));
}
if (y < AUTO_SCROLL_MARGIN) {
*y_scroll_delta = (float)(y - AUTO_SCROLL_MARGIN);
}
- if (y > widget->allocation.height - AUTO_SCROLL_MARGIN) {
+ if (y > allocation.height - AUTO_SCROLL_MARGIN) {
if (*y_scroll_delta != 0) {
/* Already trying to scroll because of being too close to
* the top edge -- must be the window is really narrow,
@@ -930,7 +932,7 @@ nautilus_drag_autoscroll_calculate_delta (GtkWidget *widget, float *x_scroll_del
*/
return;
}
- *y_scroll_delta = (float)(y - (widget->allocation.height - AUTO_SCROLL_MARGIN));
+ *y_scroll_delta = (float)(y - (allocation.height - AUTO_SCROLL_MARGIN));
}
if (*x_scroll_delta == 0 && *y_scroll_delta == 0) {
@@ -1195,18 +1197,18 @@ slot_proxy_handle_drop (GtkWidget *widget,
nautilus_view_drop_proxy_received_uris (target_view,
uri_list,
target_uri,
- context->action);
+ gdk_drag_context_get_selected_action (context));
eel_g_list_free_deep (uri_list);
} else if (drag_info->info == NAUTILUS_ICON_DND_URI_LIST) {
nautilus_view_drop_proxy_received_uris (target_view,
drag_info->data.uri_list,
target_uri,
- context->action);
+ gdk_drag_context_get_selected_action (context));
} if (drag_info->info == NAUTILUS_ICON_DND_NETSCAPE_URL) {
nautilus_view_drop_proxy_received_netscape_url (target_view,
drag_info->data.netscape_url,
target_uri,
- context->action);
+ gdk_drag_context_get_selected_action (context));
}
@@ -1244,7 +1246,7 @@ slot_proxy_drag_data_received (GtkWidget *widget,
drag_info->have_data = TRUE;
drag_info->info = info;
- if (data->length < 0) {
+ if (gtk_selection_data_get_length (data) < 0) {
drag_info->have_valid_data = FALSE;
return;
}
@@ -1260,7 +1262,7 @@ slot_proxy_drag_data_received (GtkWidget *widget,
drag_info->have_valid_data = drag_info->data.uri_list != NULL;
} else if (info == NAUTILUS_ICON_DND_NETSCAPE_URL) {
- drag_info->data.netscape_url = g_strdup ((char *) data->data);
+ drag_info->data.netscape_url = g_strdup ((char *) gtk_selection_data_get_data (data));
drag_info->have_valid_data = drag_info->data.netscape_url != NULL;
}
--
1.7.2

View File

@ -1,34 +0,0 @@
From 0ea1e03d74713bcac0ad90a03092d8ed6d7d2528 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:14:56 +0200
Subject: [PATCH 033/249] [ln-p] GSEAL nautilus-entry.
---
libnautilus-private/nautilus-entry.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libnautilus-private/nautilus-entry.c b/libnautilus-private/nautilus-entry.c
index 737044e..9c484f9 100644
--- a/libnautilus-private/nautilus-entry.c
+++ b/libnautilus-private/nautilus-entry.c
@@ -83,7 +83,7 @@ nautilus_entry_new_with_max_length (guint16 max)
GtkWidget *widget;
widget = gtk_widget_new (NAUTILUS_TYPE_ENTRY, NULL);
- GTK_ENTRY (widget)->text_max_length = max;
+ gtk_entry_set_max_length (GTK_ENTRY (widget), max);
return widget;
}
@@ -352,7 +352,7 @@ nautilus_entry_selection_clear (GtkWidget *widget,
{
g_assert (NAUTILUS_IS_ENTRY (widget));
- if (gdk_selection_owner_get (event->selection) == widget->window) {
+ if (gdk_selection_owner_get (event->selection) == gtk_widget_get_window (widget)) {
return FALSE;
}
--
1.7.2

View File

@ -1,25 +0,0 @@
From dddf609f373f472bca41070296a54be7e67b7adf Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:15:07 +0200
Subject: [PATCH 034/249] [ln-p] GSEAL nautilus-file-conflict-dialog.
---
.../nautilus-file-conflict-dialog.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libnautilus-private/nautilus-file-conflict-dialog.c b/libnautilus-private/nautilus-file-conflict-dialog.c
index ff64933..e6874a5 100644
--- a/libnautilus-private/nautilus-file-conflict-dialog.c
+++ b/libnautilus-private/nautilus-file-conflict-dialog.c
@@ -556,7 +556,7 @@ nautilus_file_conflict_dialog_init (NautilusFileConflictDialog *fcd)
/* Setup HIG properties */
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (dialog->vbox), 14);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (dialog)), 14);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_dialog_set_has_separator (dialog, FALSE);
--
1.7.2

View File

@ -1,25 +0,0 @@
From 2206f6c82c5a49769ccdede84d74bf595a0a57c1 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:15:20 +0200
Subject: [PATCH 035/249] [ln-p] GSEAL nautilus-file-operations.
---
libnautilus-private/nautilus-file-operations.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index 52bc77f..1e13778 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -2204,7 +2204,7 @@ prompt_empty_trash (GtkWindow *parent_window)
/* Make transient for the window group */
gtk_widget_realize (dialog);
if (screen != NULL) {
- gdk_window_set_transient_for (GTK_WIDGET (dialog)->window,
+ gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (dialog)),
gdk_screen_get_root_window (screen));
}
--
1.7.2

View File

@ -1,87 +0,0 @@
From 92d8c2a24dbf5a1a902efef0da86dd23e43208db Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:15:36 +0200
Subject: [PATCH 036/249] [ln-p] GSEAL nautilus-horizontal-splitter.
---
libnautilus-private/nautilus-horizontal-splitter.c | 26 ++++++++++----------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/libnautilus-private/nautilus-horizontal-splitter.c b/libnautilus-private/nautilus-horizontal-splitter.c
index 717d763..fa09d87 100644
--- a/libnautilus-private/nautilus-horizontal-splitter.c
+++ b/libnautilus-private/nautilus-horizontal-splitter.c
@@ -109,7 +109,7 @@ splitter_hide (NautilusHorizontalSplitter *splitter)
parent = GTK_PANED (splitter);
- gtk_widget_hide (parent->child1);
+ gtk_widget_hide (gtk_paned_get_child1 (parent));
}
static void
@@ -119,7 +119,7 @@ splitter_show (NautilusHorizontalSplitter *splitter)
parent = GTK_PANED (splitter);
- gtk_widget_show (parent->child1);
+ gtk_widget_show (gtk_paned_get_child1 (parent));
}
static gboolean
@@ -129,7 +129,7 @@ splitter_is_hidden (NautilusHorizontalSplitter *splitter)
parent = GTK_PANED (splitter);
- return gtk_widget_get_visible (parent->child1);
+ return gtk_widget_get_visible (gtk_paned_get_child1 (parent));
}
void
@@ -234,33 +234,33 @@ nautilus_horizontal_splitter_size_allocate (GtkWidget *widget,
GtkRequisition child_requisition;
paned = GTK_PANED (widget);
- border_width = GTK_CONTAINER (paned)->border_width;
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (paned));
- widget->allocation = *allocation;
+ gtk_widget_set_allocation (widget, allocation);
- if (paned->child2 != NULL && gtk_widget_get_visible (paned->child2)) {
+ if (gtk_paned_get_child2 (paned) != NULL && gtk_widget_get_visible (gtk_paned_get_child2 (paned))) {
EEL_CALL_PARENT (GTK_WIDGET_CLASS, size_allocate,
(widget, allocation));
- } else if (paned->child1 && gtk_widget_get_visible (paned->child1)) {
+ } else if (gtk_paned_get_child1 (paned) && gtk_widget_get_visible (gtk_paned_get_child1 (paned))) {
if (gtk_widget_get_realized (widget)) {
- gdk_window_hide (paned->handle);
+ gdk_window_hide (gtk_paned_get_handle_window (paned));
}
- gtk_widget_get_child_requisition (paned->child1,
+ gtk_widget_get_child_requisition (gtk_paned_get_child1 (paned),
&child_requisition);
- child_allocation.x = widget->allocation.x + border_width;
- child_allocation.y = widget->allocation.y + border_width;
+ child_allocation.x = allocation->x + border_width;
+ child_allocation.y = allocation->y + border_width;
child_allocation.width = MIN (child_requisition.width,
allocation->width - 2 * border_width);
child_allocation.height = MIN (child_requisition.height,
allocation->height - 2 * border_width);
- gtk_widget_size_allocate (paned->child1, &child_allocation);
+ gtk_widget_size_allocate (gtk_paned_get_child1 (paned), &child_allocation);
} else
if (gtk_widget_get_realized (widget)) {
- gdk_window_hide (paned->handle);
+ gdk_window_hide (gtk_paned_get_handle_window (paned));
}
}
--
1.7.2

View File

@ -1,85 +0,0 @@
From 028a80a630e17df3ba23a6778459122b2e18da0b Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Jun 2010 13:15:50 +0200
Subject: [PATCH 037/249] [ln-p] GSEAL nautilus-icon-canvas-item.
---
libnautilus-private/nautilus-icon-canvas-item.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/libnautilus-private/nautilus-icon-canvas-item.c b/libnautilus-private/nautilus-icon-canvas-item.c
index f6c0b93..a31623a 100644
--- a/libnautilus-private/nautilus-icon-canvas-item.c
+++ b/libnautilus-private/nautilus-icon-canvas-item.c
@@ -550,7 +550,7 @@ nautilus_icon_canvas_item_get_image (NautilusIconCanvasItem *item,
pixmap = gdk_pixmap_new (gdk_screen_get_root_window (screen),
width, height,
- gdk_colormap_get_visual (colormap)->depth);
+ gdk_visual_get_depth (gdk_colormap_get_visual (colormap)));
gdk_drawable_set_colormap (GDK_DRAWABLE (pixmap), colormap);
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
@@ -1345,7 +1345,7 @@ draw_label_text (NautilusIconCanvasItem *item,
(details->is_prelit ||
details->is_highlighted_as_keyboard_focus)) {
/* clear the underlying icons, where the text or overlaps them. */
- gdk_window_clear_area (EEL_CANVAS (container)->layout.bin_window,
+ gdk_window_clear_area (gtk_layout_get_bin_window (&EEL_CANVAS (container)->layout),
text_rect.x0,
text_rect.y0,
text_rect.x1 - text_rect.x0,
@@ -1417,7 +1417,7 @@ draw_label_text (NautilusIconCanvasItem *item,
}
if (!create_mask && item->details->is_highlighted_as_keyboard_focus) {
- gtk_paint_focus (GTK_WIDGET (EEL_CANVAS_ITEM (item)->canvas)->style,
+ gtk_paint_focus (gtk_widget_get_style (GTK_WIDGET (EEL_CANVAS_ITEM (item)->canvas)),
drawable,
needs_highlight ? GTK_STATE_SELECTED : GTK_STATE_NORMAL,
NULL,
@@ -1501,12 +1501,14 @@ draw_stretch_handles (NautilusIconCanvasItem *item, GdkDrawable *drawable,
GdkPixbuf *knob_pixbuf;
GdkBitmap *stipple;
int knob_width, knob_height;
+ GtkStyle *style;
if (!item->details->show_stretch_handles) {
return;
}
widget = GTK_WIDGET (EEL_CANVAS_ITEM (item)->canvas);
+ style = gtk_widget_get_style (widget);
gc = gdk_gc_new (drawable);
knob_pixbuf = get_knob_pixbuf ();
@@ -1517,7 +1519,7 @@ draw_stretch_handles (NautilusIconCanvasItem *item, GdkDrawable *drawable,
gdk_drawable_get_screen (GDK_DRAWABLE (drawable)));
/* first draw the box */
- gdk_gc_set_rgb_fg_color (gc, &widget->style->white);
+ gdk_gc_set_rgb_fg_color (gc, &style->white);
gdk_draw_rectangle
(drawable, gc, FALSE,
rect->x0,
@@ -1525,7 +1527,7 @@ draw_stretch_handles (NautilusIconCanvasItem *item, GdkDrawable *drawable,
rect->x1 - rect->x0 - 1,
rect->y1 - rect->y0 - 1);
- gdk_gc_set_rgb_fg_color (gc, &widget->style->black);
+ gdk_gc_set_rgb_fg_color (gc, &style->black);
gdk_gc_set_stipple (gc, stipple);
gdk_gc_set_fill (gc, GDK_STIPPLED);
gdk_draw_rectangle
@@ -2089,7 +2091,7 @@ draw_label_layout (NautilusIconCanvasItem *item,
/* draw a drop shadow */
eel_gdk_draw_layout_with_drop_shadow (drawable, gc,
label_color,
- &GTK_WIDGET (EEL_CANVAS_ITEM (item)->canvas)->style->black,
+ &gtk_widget_get_style (GTK_WIDGET (EEL_CANVAS_ITEM (item)->canvas))->black,
x, y,
layout);
} else {
--
1.7.2

View File

@ -1,732 +0,0 @@
From e57bd6003efc33bfb97fd7aa46166eba105cc2a8 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:16:26 +0200
Subject: [PATCH 038/249] [ln-p] GSEAL nautilus-icon-container.
---
libnautilus-private/nautilus-icon-container.c | 224 ++++++++++++++-----------
libnautilus-private/nautilus-icon-container.h | 4 +-
2 files changed, 127 insertions(+), 101 deletions(-)
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index c554c8c..87a4c7b 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -573,14 +573,14 @@ nautilus_icon_container_scroll (NautilusIconContainer *container,
* where the resulting value got pinned to the adjustment
* min or max.
*/
- old_h_value = hadj->value;
- old_v_value = vadj->value;
+ old_h_value = gtk_adjustment_get_value (hadj);
+ old_v_value = gtk_adjustment_get_value (vadj);
- eel_gtk_adjustment_set_value (hadj, hadj->value + delta_x);
- eel_gtk_adjustment_set_value (vadj, vadj->value + delta_y);
+ eel_gtk_adjustment_set_value (hadj, gtk_adjustment_get_value (hadj) + delta_x);
+ eel_gtk_adjustment_set_value (vadj, gtk_adjustment_get_value (vadj) + delta_y);
/* return TRUE if we did scroll */
- return hadj->value != old_h_value || vadj->value != old_v_value;
+ return gtk_adjustment_get_value (hadj) != old_h_value || gtk_adjustment_get_value (vadj) != old_v_value;
}
static void
@@ -705,7 +705,7 @@ reveal_icon (NautilusIconContainer *container,
NautilusIcon *icon)
{
NautilusIconContainerDetails *details;
- GtkAllocation *allocation;
+ GtkAllocation allocation;
GtkAdjustment *hadj, *vadj;
EelIRect bounds;
@@ -717,7 +717,7 @@ reveal_icon (NautilusIconContainer *container,
set_pending_icon_to_reveal (container, NULL);
details = container->details;
- allocation = &GTK_WIDGET (container)->allocation;
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
hadj = gtk_layout_get_hadjustment (GTK_LAYOUT (container));
vadj = gtk_layout_get_vadjustment (GTK_LAYOUT (container));
@@ -728,18 +728,18 @@ reveal_icon (NautilusIconContainer *container,
} else {
item_get_canvas_bounds (EEL_CANVAS_ITEM (icon->item), &bounds, TRUE);
}
- if (bounds.y0 < vadj->value) {
+ if (bounds.y0 < gtk_adjustment_get_value (vadj)) {
eel_gtk_adjustment_set_value (vadj, bounds.y0);
- } else if (bounds.y1 > vadj->value + allocation->height) {
+ } else if (bounds.y1 > gtk_adjustment_get_value (vadj) + allocation.height) {
eel_gtk_adjustment_set_value
- (vadj, bounds.y1 - allocation->height);
+ (vadj, bounds.y1 - allocation.height);
}
- if (bounds.x0 < hadj->value) {
+ if (bounds.x0 < gtk_adjustment_get_value (hadj)) {
eel_gtk_adjustment_set_value (hadj, bounds.x0);
- } else if (bounds.x1 > hadj->value + allocation->width) {
+ } else if (bounds.x1 > gtk_adjustment_get_value (hadj) + allocation.width) {
eel_gtk_adjustment_set_value
- (hadj, bounds.x1 - allocation->width);
+ (hadj, bounds.x1 - allocation.width);
}
}
@@ -890,7 +890,7 @@ get_icon_bounds_for_canvas_bounds (EelCanvasGroup *group,
for (list = group->item_list; list; list = list->next) {
child = list->data;
- if (child->object.flags & EEL_CANVAS_ITEM_VISIBLE) {
+ if (child->flags & EEL_CANVAS_ITEM_VISIBLE) {
set = TRUE;
if (!NAUTILUS_IS_ICON_CANVAS_ITEM (child) ||
usage == BOUNDS_USAGE_FOR_DISPLAY) {
@@ -922,7 +922,7 @@ get_icon_bounds_for_canvas_bounds (EelCanvasGroup *group,
for (; list; list = list->next) {
child = list->data;
- if (!(child->object.flags & EEL_CANVAS_ITEM_VISIBLE))
+ if (!(child->flags & EEL_CANVAS_ITEM_VISIBLE))
continue;
if (!NAUTILUS_IS_ICON_CANVAS_ITEM (child) ||
@@ -1007,14 +1007,16 @@ canvas_set_scroll_region_include_visible_area (EelCanvas *canvas,
double old_x1, old_y1, old_x2, old_y2;
double old_scroll_x, old_scroll_y;
double height, width;
+ GtkAllocation allocation;
eel_canvas_get_scroll_region (canvas, &old_x1, &old_y1, &old_x2, &old_y2);
+ gtk_widget_get_allocation (GTK_WIDGET (canvas), &allocation);
- width = (GTK_WIDGET (canvas)->allocation.width) / canvas->pixels_per_unit;
- height = (GTK_WIDGET (canvas)->allocation.height) / canvas->pixels_per_unit;
+ width = (allocation.width) / canvas->pixels_per_unit;
+ height = (allocation.height) / canvas->pixels_per_unit;
- old_scroll_x = gtk_layout_get_hadjustment (GTK_LAYOUT (canvas))->value;
- old_scroll_y = gtk_layout_get_vadjustment (GTK_LAYOUT (canvas))->value;
+ old_scroll_x = gtk_adjustment_get_value (GTK_ADJUSTMENT (gtk_layout_get_hadjustment (GTK_LAYOUT (canvas))));
+ old_scroll_y = gtk_adjustment_get_value (GTK_ADJUSTMENT (gtk_layout_get_vadjustment (GTK_LAYOUT (canvas))));
x1 = MIN (x1, old_x1 + old_scroll_x);
y1 = MIN (y1, old_y1 + old_scroll_y);
@@ -1032,23 +1034,23 @@ nautilus_icon_container_update_scroll_region (NautilusIconContainer *container)
double pixels_per_unit;
GtkAdjustment *hadj, *vadj;
float step_increment;
- GtkAllocation *allocation;
gboolean reset_scroll_region;
+ GtkAllocation allocation;
pixels_per_unit = EEL_CANVAS (container)->pixels_per_unit;
if (nautilus_icon_container_get_is_fixed_size (container)) {
/* Set the scroll region to the size of the container allocation */
- allocation = &GTK_WIDGET (container)->allocation;
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
eel_canvas_set_scroll_region
(EEL_CANVAS (container),
(double) - container->details->left_margin / pixels_per_unit,
(double) - container->details->top_margin / pixels_per_unit,
- ((double) (allocation->width - 1)
+ ((double) (allocation.width - 1)
- container->details->left_margin
- container->details->right_margin)
/ pixels_per_unit,
- ((double) (allocation->height - 1)
+ ((double) (allocation.height - 1)
- container->details->top_margin
- container->details->bottom_margin)
/ pixels_per_unit);
@@ -1090,9 +1092,9 @@ nautilus_icon_container_update_scroll_region (NautilusIconContainer *container)
* Then we lay out to the right or to the left, so
* x can be < 0 and > allocation */
if (nautilus_icon_container_is_auto_layout (container)) {
- allocation = &GTK_WIDGET (container)->allocation;
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
x1 = MIN (x1, 0);
- x2 = MAX (x2, allocation->width / pixels_per_unit);
+ x2 = MAX (x2, allocation.width / pixels_per_unit);
y1 = 0;
} else {
/* Otherwise we add the padding that is at the start of the
@@ -1127,12 +1129,12 @@ nautilus_icon_container_update_scroll_region (NautilusIconContainer *container)
/* Scroll by 1/4 icon each time you click. */
step_increment = nautilus_get_icon_size_for_zoom_level
(container->details->zoom_level) / 4;
- if (hadj->step_increment != step_increment) {
- hadj->step_increment = step_increment;
+ if (gtk_adjustment_get_step_increment (hadj) != step_increment) {
+ gtk_adjustment_set_step_increment (hadj, step_increment);
gtk_adjustment_changed (hadj);
}
- if (vadj->step_increment != step_increment) {
- vadj->step_increment = step_increment;
+ if (gtk_adjustment_get_step_increment (vadj) != step_increment) {
+ gtk_adjustment_set_step_increment (vadj, step_increment);
gtk_adjustment_changed (vadj);
}
@@ -1294,6 +1296,7 @@ lay_down_icons_horizontal (NautilusIconContainer *container,
double max_text_width, max_icon_width;
int icon_width;
int i;
+ GtkAllocation allocation;
g_assert (NAUTILUS_IS_ICON_CONTAINER (container));
@@ -1302,10 +1305,11 @@ lay_down_icons_horizontal (NautilusIconContainer *container,
}
positions = g_array_new (FALSE, FALSE, sizeof (IconPositions));
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
/* Lay out icons a line at a time. */
- canvas_width = CANVAS_WIDTH(container);
- canvas_height = CANVAS_HEIGHT(container);
+ canvas_width = CANVAS_WIDTH(container, allocation);
+ canvas_height = CANVAS_HEIGHT(container, allocation);
max_icon_width = max_text_width = 0.0;
@@ -1482,6 +1486,7 @@ lay_down_icons_vertical (NautilusIconContainer *container,
EelDRect icon_bounds;
EelDRect text_bounds;
EelCanvasItem *item;
+ GtkAllocation allocation;
double line_height;
@@ -1506,10 +1511,11 @@ lay_down_icons_vertical (NautilusIconContainer *container,
}
positions = g_array_new (FALSE, FALSE, sizeof (IconPositions));
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
/* Lay out icons a column at a time. */
- canvas_width = CANVAS_WIDTH(container);
- canvas_height = CANVAS_HEIGHT(container);
+ canvas_width = CANVAS_WIDTH(container, allocation);
+ canvas_height = CANVAS_HEIGHT(container, allocation);
max_icon_width = max_text_width = 0.0;
max_icon_height = max_text_height = 0.0;
@@ -1617,13 +1623,15 @@ snap_position (NautilusIconContainer *container,
int total_width;
int total_height;
EelDRect icon_position;
+ GtkAllocation allocation;
icon_position = nautilus_icon_canvas_item_get_icon_rectangle (icon->item);
icon_width = icon_position.x1 - icon_position.x0;
icon_height = icon_position.y1 - icon_position.y0;
- total_width = CANVAS_WIDTH (container);
- total_height = CANVAS_HEIGHT (container);
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
+ total_width = CANVAS_WIDTH (container, allocation);
+ total_height = CANVAS_HEIGHT (container, allocation);
if (nautilus_icon_container_is_layout_rtl (container))
*x = get_mirror_x_position (container, icon, *x);
@@ -1688,10 +1696,12 @@ placement_grid_new (NautilusIconContainer *container, gboolean tight)
int num_columns;
int num_rows;
int i;
+ GtkAllocation allocation;
/* Get container dimensions */
- width = CANVAS_WIDTH(container);
- height = CANVAS_HEIGHT(container);
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
+ width = CANVAS_WIDTH(container, allocation);
+ height = CANVAS_HEIGHT(container, allocation);
num_columns = width / SNAP_SIZE_X;
num_rows = height / SNAP_SIZE_Y;
@@ -1820,10 +1830,12 @@ find_empty_location (NautilusIconContainer *container,
EelIRect icon_position;
EelDRect pixbuf_rect;
gboolean collision;
+ GtkAllocation allocation;
/* Get container dimensions */
- canvas_width = CANVAS_WIDTH(container);
- canvas_height = CANVAS_HEIGHT(container);
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
+ canvas_width = CANVAS_WIDTH(container, allocation);
+ canvas_height = CANVAS_HEIGHT(container, allocation);
icon_get_bounding_box (icon,
&icon_position.x0, &icon_position.y0,
@@ -1935,10 +1947,12 @@ static double
get_mirror_x_position (NautilusIconContainer *container, NautilusIcon *icon, double x)
{
EelDRect icon_bounds;
-
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
icon_bounds = nautilus_icon_canvas_item_get_icon_rectangle (icon->item);
- return CANVAS_WIDTH(container) - x - (icon_bounds.x1 - icon_bounds.x0);
+ return CANVAS_WIDTH(container, allocation) - x - (icon_bounds.x1 - icon_bounds.x0);
}
static void
@@ -1968,10 +1982,12 @@ lay_down_icons_vertical_desktop (NautilusIconContainer *container, GList *icons)
int width, height, max_width, column_width, icon_width, icon_height;
int x, y, x1, x2, y1, y2;
EelDRect icon_rect;
+ GtkAllocation allocation;
/* Get container dimensions */
- width = CANVAS_WIDTH(container);
- height = CANVAS_HEIGHT(container);
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
+ width = CANVAS_WIDTH(container, allocation);
+ height = CANVAS_HEIGHT(container, allocation);
/* Determine which icons have and have not been placed */
placed_icons = NULL;
@@ -2523,6 +2539,7 @@ rubberband_timeout_callback (gpointer data)
int x_scroll, y_scroll;
int adj_x, adj_y;
gboolean adj_changed;
+ GtkAllocation allocation;
EelDRect selection_rect;
@@ -2535,6 +2552,7 @@ rubberband_timeout_callback (gpointer data)
EEL_IS_CANVAS_RECT (band_info->selection_rectangle));
adj_changed = FALSE;
+ gtk_widget_get_allocation (widget, &allocation);
adj_x = gtk_adjustment_get_value (gtk_layout_get_hadjustment (GTK_LAYOUT (container)));
if (adj_x != band_info->last_adj_x) {
@@ -2553,9 +2571,9 @@ rubberband_timeout_callback (gpointer data)
if (x < 0) {
x_scroll = x;
x = 0;
- } else if (x >= widget->allocation.width) {
- x_scroll = x - widget->allocation.width + 1;
- x = widget->allocation.width - 1;
+ } else if (x >= allocation.width) {
+ x_scroll = x - allocation.width + 1;
+ x = allocation.width - 1;
} else {
x_scroll = 0;
}
@@ -2563,9 +2581,9 @@ rubberband_timeout_callback (gpointer data)
if (y < 0) {
y_scroll = y;
y = 0;
- } else if (y >= widget->allocation.height) {
- y_scroll = y - widget->allocation.height + 1;
- y = widget->allocation.height - 1;
+ } else if (y >= allocation.height) {
+ y_scroll = y - allocation.height + 1;
+ y = allocation.height - 1;
} else {
y_scroll = 0;
}
@@ -2642,6 +2660,7 @@ start_rubberbanding (NautilusIconContainer *container,
guchar fill_color_alpha;
GList *p;
NautilusIcon *icon;
+ GtkStyle *style;
details = container->details;
band_info = &details->rubberband_info;
@@ -2664,7 +2683,8 @@ start_rubberbanding (NautilusIconContainer *container,
NULL);
if (!fill_color_gdk) {
- fill_color_gdk = gdk_color_copy (&GTK_WIDGET (container)->style->base[GTK_STATE_SELECTED]);
+ style = gtk_widget_get_style (GTK_WIDGET (container));
+ fill_color_gdk = gdk_color_copy (&style->base[GTK_STATE_SELECTED]);
}
fill_color = eel_gdk_color_to_rgb (fill_color_gdk) << 8 | fill_color_alpha;
@@ -4084,16 +4104,18 @@ size_allocate (GtkWidget *widget,
{
NautilusIconContainer *container;
gboolean need_layout_redone;
+ GtkAllocation wid_allocation;
container = NAUTILUS_ICON_CONTAINER (widget);
need_layout_redone = !container->details->has_been_allocated;
+ gtk_widget_get_allocation (widget, &wid_allocation);
- if (allocation->width != widget->allocation.width) {
+ if (allocation->width != wid_allocation.width) {
need_layout_redone = TRUE;
}
- if (allocation->height != widget->allocation.height) {
+ if (allocation->height != wid_allocation.height) {
need_layout_redone = TRUE;
}
@@ -4115,7 +4137,7 @@ size_allocate (GtkWidget *widget,
}
container->details->size_allocation_count++;
if (container->details->size_allocation_count > 2 &&
- allocation->width >= widget->allocation.width) {
+ allocation->width >= wid_allocation.width) {
need_layout_redone = FALSE;
}
@@ -4150,8 +4172,8 @@ realize (GtkWidget *widget)
setup_label_gcs (container);
- stipple = eel_stipple_bitmap_for_screen (
- gdk_drawable_get_screen (GDK_DRAWABLE (widget->window)));
+ stipple = eel_stipple_bitmap_for_screen
+ (gdk_drawable_get_screen (GDK_DRAWABLE (gtk_widget_get_window (widget))));
nautilus_icon_dnd_set_stipple (container, stipple);
@@ -4475,7 +4497,7 @@ start_stretching (NautilusIconContainer *container)
/* Ensure the window itself is focused.. */
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (container));
if (toplevel != NULL && gtk_widget_get_realized (toplevel)) {
- eel_gdk_window_focus (toplevel->window, GDK_CURRENT_TIME);
+ eel_gdk_window_focus (gtk_widget_get_window (toplevel), GDK_CURRENT_TIME);
}
return TRUE;
@@ -4766,7 +4788,7 @@ nautilus_icon_container_search_position_func (NautilusIconContainer *container,
GdkRectangle monitor;
- cont_window = GTK_WIDGET (container)->window;
+ cont_window = gtk_widget_get_window (GTK_WIDGET (container));
screen = gdk_drawable_get_screen (cont_window);
monitor_num = gdk_screen_get_monitor_at_window (screen, cont_window);
@@ -4841,15 +4863,12 @@ send_focus_change (GtkWidget *widget, gboolean in)
fevent = gdk_event_new (GDK_FOCUS_CHANGE);
g_object_ref (widget);
+ ((GdkEventFocus *) fevent)->in = in;
- if (in) {
- GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
- } else {
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
- }
+ gtk_widget_send_focus_change (widget, fevent);
fevent->focus_change.type = GDK_FOCUS_CHANGE;
- fevent->focus_change.window = g_object_ref (widget->window);
+ fevent->focus_change.window = g_object_ref (gtk_widget_get_window (widget));
fevent->focus_change.in = in;
gtk_widget_event (widget, fevent);
@@ -4896,7 +4915,7 @@ nautilus_icon_container_search_entry_flush_timeout (NautilusIconContainer *conta
* callback.
*/
static void
-nautilus_icon_container_search_preedit_changed (GtkIMContext *im_context,
+nautilus_icon_container_search_preedit_changed (GtkEntry *entry,
NautilusIconContainer *container)
{
container->details->imcontext_changed = 1;
@@ -4940,7 +4959,7 @@ nautilus_icon_container_search_button_press_event (GtkWidget *widget,
nautilus_icon_container_search_dialog_hide (widget, container);
- if (event->window == GTK_LAYOUT (container)->bin_window) {
+ if (event->window == gtk_layout_get_bin_window (GTK_LAYOUT (container))) {
button_press_event (GTK_WIDGET (container), event);
}
@@ -5254,7 +5273,7 @@ nautilus_icon_container_ensure_interactive_directory (NautilusIconContainer *con
g_signal_connect (container->details->search_entry, "activate",
G_CALLBACK (nautilus_icon_container_search_activate),
container);
- g_signal_connect (GTK_ENTRY (container->details->search_entry)->im_context,
+ g_signal_connect (container->details->search_entry,
"preedit-changed",
G_CALLBACK (nautilus_icon_container_search_preedit_changed),
container);
@@ -5477,7 +5496,7 @@ key_press_event (GtkWidget *widget,
old_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (container->details->search_entry)));
new_event = gdk_event_copy ((GdkEvent *) event);
window = ((GdkEventKey *) new_event)->window;
- ((GdkEventKey *) new_event)->window = container->details->search_entry->window;
+ ((GdkEventKey *) new_event)->window = gtk_widget_get_window (container->details->search_entry);
gtk_widget_realize (container->details->search_window);
popup_menu_id = g_signal_connect (container->details->search_entry,
@@ -6552,22 +6571,23 @@ nautilus_icon_container_get_first_visible_icon (NautilusIconContainer *container
{
GList *l;
NautilusIcon *icon, *best_icon;
- GtkAdjustment *hadj, *vadj;
double x, y;
double x1, y1, x2, y2;
double *pos, best_pos;
+ double hadj_v, vadj_v, h_page_size;
gboolean better_icon;
gboolean compare_lt;
- hadj = gtk_layout_get_hadjustment (GTK_LAYOUT (container));
- vadj = gtk_layout_get_vadjustment (GTK_LAYOUT (container));
+ hadj_v = gtk_adjustment_get_value (gtk_layout_get_hadjustment (GTK_LAYOUT (container)));
+ vadj_v = gtk_adjustment_get_value (gtk_layout_get_vadjustment (GTK_LAYOUT (container)));
+ h_page_size = gtk_adjustment_get_page_size (gtk_layout_get_hadjustment (GTK_LAYOUT (container)));
if (nautilus_icon_container_is_layout_rtl (container)) {
- x = hadj->value + hadj->page_size - ICON_PAD_LEFT - 1;
- y = vadj->value;
+ x = hadj_v + h_page_size - ICON_PAD_LEFT - 1;
+ y = vadj_v;
} else {
- x = hadj->value;
- y = vadj->value;
+ x = hadj_v;
+ y = vadj_v;
}
eel_canvas_c2w (EEL_CANVAS (container),
@@ -6629,9 +6649,11 @@ nautilus_icon_container_scroll_to_icon (NautilusIconContainer *container,
GtkAdjustment *hadj, *vadj;
EelCanvasItem *item;
EelIRect bounds;
+ GtkAllocation allocation;
hadj = gtk_layout_get_hadjustment (GTK_LAYOUT (container));
vadj = gtk_layout_get_vadjustment (GTK_LAYOUT (container));
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
/* We need to force a relayout now if there are updates queued
* since we need the final positions */
@@ -6655,7 +6677,7 @@ nautilus_icon_container_scroll_to_icon (NautilusIconContainer *container,
if (nautilus_icon_container_is_layout_vertical (container)) {
if (nautilus_icon_container_is_layout_rtl (container)) {
- eel_gtk_adjustment_set_value (hadj, bounds.x1 - GTK_WIDGET (container)->allocation.width);
+ eel_gtk_adjustment_set_value (hadj, bounds.x1 - allocation.width);
} else {
eel_gtk_adjustment_set_value (hadj, bounds.x0);
}
@@ -6929,15 +6951,17 @@ nautilus_icon_container_update_visible_icons (NautilusIconContainer *container)
GList *node;
NautilusIcon *icon;
gboolean visible;
+ GtkAllocation allocation;
hadj = gtk_layout_get_hadjustment (GTK_LAYOUT (container));
vadj = gtk_layout_get_vadjustment (GTK_LAYOUT (container));
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
- min_x = hadj->value;
- max_x = min_x + GTK_WIDGET (container)->allocation.width;
+ min_x = gtk_adjustment_get_value (hadj);
+ max_x = min_x + allocation.width;
- min_y = vadj->value;
- max_y = min_y + GTK_WIDGET (container)->allocation.height;
+ min_y = gtk_adjustment_get_value (vadj);
+ max_y = min_y + allocation.height;
eel_canvas_c2w (EEL_CANVAS (container),
min_x, min_y, &min_x, &min_y);
@@ -7338,7 +7362,7 @@ nautilus_icon_container_layout_now (NautilusIconContainer *container)
/* Also need to make sure we're properly resized, for instance
* newly added files may trigger a change in the size allocation and
* thus toggle scrollbars on */
- gtk_container_check_resize (GTK_CONTAINER (GTK_WIDGET (container)->parent));
+ gtk_container_check_resize (GTK_CONTAINER (gtk_widget_get_parent (GTK_WIDGET (container))));
}
/**
@@ -8571,7 +8595,7 @@ setup_gc_with_fg (NautilusIconContainer *container, int idx, guint32 color)
gcolor = eel_gdk_rgb_to_color (color);
container->details->label_colors [idx] = gcolor;
- gc = gdk_gc_new (GTK_LAYOUT (container)->bin_window);
+ gc = gdk_gc_new (gtk_layout_get_bin_window (GTK_LAYOUT (container)));
gdk_gc_set_rgb_fg_color (gc, &gcolor);
if (container->details->label_gcs [idx]) {
@@ -8589,6 +8613,7 @@ setup_label_gcs (NautilusIconContainer *container)
GdkColor *light_info_color, *dark_info_color;
guint light_info_value, dark_info_value;
gboolean frame_text;
+ GtkStyle *style;
if (!gtk_widget_get_realized (GTK_WIDGET (container)))
return;
@@ -8604,6 +8629,7 @@ setup_label_gcs (NautilusIconContainer *container)
"light_info_color", &light_info_color,
"dark_info_color", &dark_info_color,
NULL);
+ style = gtk_widget_get_style (widget);
if (light_info_color) {
light_info_value = eel_gdk_color_to_rgb (light_info_color);
@@ -8619,15 +8645,15 @@ setup_label_gcs (NautilusIconContainer *container)
dark_info_value = DEFAULT_DARK_INFO_COLOR;
}
- setup_gc_with_fg (container, LABEL_COLOR_HIGHLIGHT, eel_gdk_color_to_rgb (&widget->style->text[GTK_STATE_SELECTED]));
- setup_gc_with_fg (container, LABEL_COLOR_ACTIVE, eel_gdk_color_to_rgb (&widget->style->text[GTK_STATE_ACTIVE]));
- setup_gc_with_fg (container, LABEL_COLOR_PRELIGHT, eel_gdk_color_to_rgb (&widget->style->text[GTK_STATE_PRELIGHT]));
+ setup_gc_with_fg (container, LABEL_COLOR_HIGHLIGHT, eel_gdk_color_to_rgb (&style->text[GTK_STATE_SELECTED]));
+ setup_gc_with_fg (container, LABEL_COLOR_ACTIVE, eel_gdk_color_to_rgb (&style->text[GTK_STATE_ACTIVE]));
+ setup_gc_with_fg (container, LABEL_COLOR_PRELIGHT, eel_gdk_color_to_rgb (&style->text[GTK_STATE_PRELIGHT]));
setup_gc_with_fg (container,
LABEL_INFO_COLOR_HIGHLIGHT,
- eel_gdk_color_is_dark (&GTK_WIDGET (container)->style->base[GTK_STATE_SELECTED]) ? light_info_value : dark_info_value);
+ eel_gdk_color_is_dark (&style->base[GTK_STATE_SELECTED]) ? light_info_value : dark_info_value);
setup_gc_with_fg (container,
LABEL_INFO_COLOR_ACTIVE,
- eel_gdk_color_is_dark (&GTK_WIDGET (container)->style->base[GTK_STATE_ACTIVE]) ? light_info_value : dark_info_value);
+ eel_gdk_color_is_dark (&style->base[GTK_STATE_ACTIVE]) ? light_info_value : dark_info_value);
/* If NautilusIconContainer::frame_text is set, we can safely
* use the foreground color from the theme, because it will
@@ -8638,10 +8664,10 @@ setup_label_gcs (NautilusIconContainer *container)
if (frame_text || !eel_background_is_set(background)) {
setup_gc_with_fg (container, LABEL_COLOR,
- eel_gdk_color_to_rgb (&widget->style->text[GTK_STATE_NORMAL]));
+ eel_gdk_color_to_rgb (&style->text[GTK_STATE_NORMAL]));
setup_gc_with_fg (container,
LABEL_INFO_COLOR,
- eel_gdk_color_is_dark (&widget->style->base[GTK_STATE_NORMAL]) ? light_info_value : dark_info_value);
+ eel_gdk_color_is_dark (&style->base[GTK_STATE_NORMAL]) ? light_info_value : dark_info_value);
} else {
if (container->details->use_drop_shadows || eel_background_is_dark (background)) {
setup_gc_with_fg (container, LABEL_COLOR, 0xEFEFEF);
@@ -8757,7 +8783,7 @@ nautilus_icon_container_theme_changed (gpointer user_data)
"highlight_alpha", &highlight_alpha,
NULL);
- style = GTK_WIDGET (container)->style;
+ style = gtk_widget_get_style (GTK_WIDGET (container));
container->details->highlight_color_rgba =
EEL_RGBA_COLOR_PACK (style->base[GTK_STATE_SELECTED].red >> 8,
@@ -8997,7 +9023,7 @@ nautilus_icon_container_accessible_do_action (AtkAction *accessible, int i)
g_return_val_if_fail (i < LAST_ACTION, FALSE);
- widget = GTK_ACCESSIBLE (accessible)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
if (!widget) {
return FALSE;
}
@@ -9102,7 +9128,7 @@ nautilus_icon_container_accessible_update_selection (AtkObject *accessible)
GList *l;
NautilusIcon *icon;
- container = NAUTILUS_ICON_CONTAINER (GTK_ACCESSIBLE (accessible)->widget);
+ container = NAUTILUS_ICON_CONTAINER (gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)));
priv = accessible_get_priv (accessible);
@@ -9191,7 +9217,7 @@ nautilus_icon_container_accessible_add_selection (AtkSelection *accessible,
GList *selection;
NautilusIcon *icon;
- widget = GTK_ACCESSIBLE (accessible)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
if (!widget) {
return FALSE;
}
@@ -9220,7 +9246,7 @@ nautilus_icon_container_accessible_clear_selection (AtkSelection *accessible)
GtkWidget *widget;
NautilusIconContainer *container;
- widget = GTK_ACCESSIBLE (accessible)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
if (!widget) {
return FALSE;
}
@@ -9282,7 +9308,7 @@ nautilus_icon_container_accessible_is_child_selected (AtkSelection *accessible,
NautilusIcon *icon;
GtkWidget *widget;
- widget = GTK_ACCESSIBLE (accessible)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
if (!widget) {
return FALSE;
}
@@ -9308,7 +9334,7 @@ nautilus_icon_container_accessible_remove_selection (AtkSelection *accessible,
NautilusIcon *icon;
GtkWidget *widget;
- widget = GTK_ACCESSIBLE (accessible)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
if (!widget) {
return FALSE;
}
@@ -9339,7 +9365,7 @@ nautilus_icon_container_accessible_select_all_selection (AtkSelection *accessibl
NautilusIconContainer *container;
GtkWidget *widget;
- widget = GTK_ACCESSIBLE (accessible)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
if (!widget) {
return FALSE;
}
@@ -9392,7 +9418,7 @@ nautilus_icon_container_accessible_get_n_children (AtkObject *accessible)
GtkWidget *widget;
gint i;
- widget = GTK_ACCESSIBLE (accessible)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
if (!widget) {
return FALSE;
}
@@ -9415,7 +9441,7 @@ nautilus_icon_container_accessible_ref_child (AtkObject *accessible, int i)
NautilusIcon *icon;
GtkWidget *widget;
- widget = GTK_ACCESSIBLE (accessible)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
if (!widget) {
return NULL;
}
@@ -9464,7 +9490,7 @@ nautilus_icon_container_accessible_initialize (AtkObject *accessible,
nautilus_icon_container_accessible_update_selection
(ATK_OBJECT (accessible));
- container = NAUTILUS_ICON_CONTAINER (GTK_ACCESSIBLE (accessible)->widget);
+ container = NAUTILUS_ICON_CONTAINER (gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)));
g_signal_connect (G_OBJECT (container), "selection_changed",
G_CALLBACK (nautilus_icon_container_accessible_selection_changed_cb),
accessible);
diff --git a/libnautilus-private/nautilus-icon-container.h b/libnautilus-private/nautilus-icon-container.h
index b5f0dce..8252172 100644
--- a/libnautilus-private/nautilus-icon-container.h
+++ b/libnautilus-private/nautilus-icon-container.h
@@ -353,12 +353,12 @@ void nautilus_icon_container_widget_to_file_operation_position (Nau
GdkPoint *position);
-#define CANVAS_WIDTH(container) ((GTK_WIDGET (container)->allocation.width \
+#define CANVAS_WIDTH(container,allocation) ((allocation.width \
- container->details->left_margin \
- container->details->right_margin) \
/ EEL_CANVAS (container)->pixels_per_unit)
-#define CANVAS_HEIGHT(container) ((GTK_WIDGET (container)->allocation.height \
+#define CANVAS_HEIGHT(container,allocation) ((allocation.height \
- container->details->top_margin \
- container->details->bottom_margin) \
/ EEL_CANVAS (container)->pixels_per_unit)
--
1.7.2

View File

@ -1,362 +0,0 @@
From 3711a0db65ad8ca432d0359eb11b4cd31f799df6 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:16:41 +0200
Subject: [PATCH 039/249] [ln-p] GSEAL nautilus-icon-dnd.
---
libnautilus-private/nautilus-icon-dnd.c | 108 ++++++++++++++++++-------------
1 files changed, 64 insertions(+), 44 deletions(-)
diff --git a/libnautilus-private/nautilus-icon-dnd.c b/libnautilus-private/nautilus-icon-dnd.c
index 263cd05..a84d52e 100644
--- a/libnautilus-private/nautilus-icon-dnd.c
+++ b/libnautilus-private/nautilus-icon-dnd.c
@@ -100,6 +100,7 @@ create_selection_shadow (NautilusIconContainer *container,
int max_x, max_y;
int min_x, min_y;
GList *p;
+ GtkAllocation allocation;
if (list == NULL) {
return NULL;
@@ -114,15 +115,16 @@ create_selection_shadow (NautilusIconContainer *container,
g_return_val_if_fail (stipple != NULL, NULL);
canvas = EEL_CANVAS (container);
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
/* Creating a big set of rectangles in the canvas can be expensive, so
we try to be smart and only create the maximum number of rectangles
that we will need, in the vertical/horizontal directions. */
- max_x = GTK_WIDGET (container)->allocation.width;
+ max_x = allocation.width;
min_x = -max_x;
- max_y = GTK_WIDGET (container)->allocation.height;
+ max_y = allocation.height;
min_y = -max_y;
/* Create a group, so that it's easier to move all the items around at
@@ -378,8 +380,8 @@ get_direct_save_filename (GdkDragContext *context)
{
guchar *prop_text;
gint prop_len;
-
- if (!gdk_property_get (context->source_window, gdk_atom_intern (NAUTILUS_ICON_DND_XDNDDIRECTSAVE_TYPE, FALSE),
+
+ if (!gdk_property_get (gdk_drag_context_get_source_window (context), gdk_atom_intern (NAUTILUS_ICON_DND_XDNDDIRECTSAVE_TYPE, FALSE),
gdk_atom_intern ("text/plain", FALSE), 0, 1024, FALSE, NULL, NULL,
&prop_len, &prop_text)) {
return NULL;
@@ -431,7 +433,7 @@ set_direct_save_uri (GtkWidget *widget, GdkDragContext *context, NautilusDragInf
g_object_unref (child);
/* Change the uri property */
- gdk_property_change (GDK_DRAWABLE (context->source_window),
+ gdk_property_change (GDK_DRAWABLE (gdk_drag_context_get_source_window (context)),
gdk_atom_intern (NAUTILUS_ICON_DND_XDNDDIRECTSAVE_TYPE, FALSE),
gdk_atom_intern ("text/plain", FALSE), 8,
GDK_PROP_MODE_REPLACE, (const guchar *) uri,
@@ -666,7 +668,7 @@ receive_dropped_tile_image (NautilusIconContainer *container, GdkDragAction acti
eel_background_receive_dropped_background_image
(eel_get_widget_background (GTK_WIDGET (container)),
action,
- data->data);
+ gtk_selection_data_get_data (data));
}
}
@@ -726,7 +728,7 @@ receive_dropped_netscape_url (NautilusIconContainer *container, const char *enco
g_signal_emit_by_name (container, "handle_netscape_url",
encoded_url,
drop_target,
- context->action,
+ gdk_drag_context_get_selected_action (context),
x, y);
g_free (drop_target);
@@ -747,7 +749,7 @@ receive_dropped_uri_list (NautilusIconContainer *container, const char *uri_list
g_signal_emit_by_name (container, "handle_uri_list",
uri_list,
drop_target,
- context->action,
+ gdk_drag_context_get_selected_action (context),
x, y);
g_free (drop_target);
@@ -768,7 +770,7 @@ receive_dropped_text (NautilusIconContainer *container, const char *text, GdkDra
g_signal_emit_by_name (container, "handle_text",
text,
drop_target,
- context->action,
+ gdk_drag_context_get_selected_action (context),
x, y);
g_free (drop_target);
@@ -791,7 +793,7 @@ receive_dropped_raw (NautilusIconContainer *container, const char *raw_data, int
length,
drop_target,
direct_save_uri,
- context->action,
+ gdk_drag_context_get_selected_action (context),
x, y);
g_free (drop_target);
@@ -804,6 +806,7 @@ auto_scroll_timeout_callback (gpointer data)
GtkWidget *widget;
float x_scroll_delta, y_scroll_delta;
GdkRectangle exposed_area;
+ GtkAllocation allocation;
g_assert (NAUTILUS_IS_ICON_CONTAINER (data));
widget = GTK_WIDGET (data);
@@ -844,10 +847,11 @@ auto_scroll_timeout_callback (gpointer data)
* area.
* Calculate the size of the area we need to draw
*/
- exposed_area.x = widget->allocation.x;
- exposed_area.y = widget->allocation.y;
- exposed_area.width = widget->allocation.width;
- exposed_area.height = widget->allocation.height;
+ gtk_widget_get_allocation (widget, &allocation);
+ exposed_area.x = allocation.x;
+ exposed_area.y = allocation.y;
+ exposed_area.width = allocation.width;
+ exposed_area.height = allocation.height;
if (x_scroll_delta > 0) {
exposed_area.x = exposed_area.width - x_scroll_delta;
@@ -862,8 +866,8 @@ auto_scroll_timeout_callback (gpointer data)
}
/* offset it to 0, 0 */
- exposed_area.x -= widget->allocation.x;
- exposed_area.y -= widget->allocation.y;
+ exposed_area.x -= allocation.x;
+ exposed_area.y -= allocation.y;
gtk_widget_queue_draw_area (widget,
exposed_area.x,
@@ -1015,6 +1019,7 @@ handle_nonlocal_move (NautilusIconContainer *container,
GArray *source_item_locations;
gboolean free_target_uri, is_rtl;
int index, item_x;
+ GtkAllocation allocation;
if (container->details->dnd_info->drag_info.selection_list == NULL) {
return;
@@ -1056,7 +1061,8 @@ handle_nonlocal_move (NautilusIconContainer *container,
}
if (is_rtl) {
- x = CANVAS_WIDTH (container) - x;
+ gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
+ x = CANVAS_WIDTH (container, allocation) - x;
}
/* start the copy */
@@ -1064,7 +1070,7 @@ handle_nonlocal_move (NautilusIconContainer *container,
source_uris,
source_item_locations,
target_uri,
- context->action,
+ gdk_drag_context_get_selected_action (context),
x, y);
if (free_target_uri) {
@@ -1195,7 +1201,7 @@ nautilus_icon_container_receive_dropped_icons (NautilusIconContainer *container,
gboolean local_move_only;
double world_x, world_y;
gboolean icon_hit;
- GdkDragAction action;
+ GdkDragAction action, real_action;
NautilusDragSelectionItem *selected_item;
drop_target = NULL;
@@ -1204,7 +1210,9 @@ nautilus_icon_container_receive_dropped_icons (NautilusIconContainer *container,
return;
}
- if (context->action == GDK_ACTION_ASK) {
+ real_action = gdk_drag_context_get_selected_action (context);
+
+ if (real_action == GDK_ACTION_ASK) {
/* FIXME bugzilla.gnome.org 42485: This belongs in FMDirectoryView, not here. */
/* Check for special case items in selection list */
if (nautilus_drag_selection_includes_special_link (container->details->dnd_info->drag_info.selection_list)) {
@@ -1217,20 +1225,20 @@ nautilus_icon_container_receive_dropped_icons (NautilusIconContainer *container,
action |= NAUTILUS_DND_ACTION_SET_AS_BACKGROUND;
}
}
- context->action = nautilus_drag_drop_action_ask
+ real_action = nautilus_drag_drop_action_ask
(GTK_WIDGET (container), action);
}
- if (context->action == NAUTILUS_DND_ACTION_SET_AS_BACKGROUND) {
+ if (real_action == NAUTILUS_DND_ACTION_SET_AS_BACKGROUND) {
selected_item = container->details->dnd_info->drag_info.selection_list->data;
eel_background_receive_dropped_background_image
(eel_get_widget_background (GTK_WIDGET (container)),
- context->action,
+ real_action,
selected_item->uri);
return;
}
- if (context->action > 0) {
+ if (real_action > 0) {
eel_canvas_window_to_world (EEL_CANVAS (container),
x + gtk_adjustment_get_value (gtk_layout_get_hadjustment (GTK_LAYOUT (container))),
y + gtk_adjustment_get_value (gtk_layout_get_vadjustment (GTK_LAYOUT (container))),
@@ -1240,7 +1248,7 @@ nautilus_icon_container_receive_dropped_icons (NautilusIconContainer *container,
context, x, y, &icon_hit, FALSE);
local_move_only = FALSE;
- if (!icon_hit && context->action == GDK_ACTION_MOVE) {
+ if (!icon_hit && real_action == GDK_ACTION_MOVE) {
/* we can just move the icon positions if the move ended up in
* the item's parent container
*/
@@ -1311,7 +1319,7 @@ nautilus_icon_container_get_drop_action (NautilusIconContainer *container,
/* handle emblems by setting the action if we're over an object */
case NAUTILUS_ICON_DND_KEYWORD:
if (icon != NULL) {
- *action = context->suggested_action;
+ *action = gdk_drag_context_get_suggested_action (context);
}
break;
@@ -1323,7 +1331,7 @@ nautilus_icon_container_get_drop_action (NautilusIconContainer *container,
case NAUTILUS_ICON_DND_BGIMAGE:
case NAUTILUS_ICON_DND_RESET_BACKGROUND:
case NAUTILUS_ICON_DND_ROOTWINDOW_DROP:
- *action = context->suggested_action;
+ *action = gdk_drag_context_get_suggested_action (context);
break;
case NAUTILUS_ICON_DND_TEXT:
@@ -1548,17 +1556,17 @@ drag_highlight_expose (GtkWidget *widget,
x = gtk_adjustment_get_value (gtk_layout_get_hadjustment (GTK_LAYOUT (widget)));
y = gtk_adjustment_get_value (gtk_layout_get_vadjustment (GTK_LAYOUT (widget)));
- gdk_drawable_get_size (widget->window, &width, &height);
+ gdk_drawable_get_size (gtk_widget_get_window (widget), &width, &height);
- window = GTK_LAYOUT (widget)->bin_window;
+ window = gtk_layout_get_bin_window (GTK_LAYOUT (widget));
- gtk_paint_shadow (widget->style, window,
+ gtk_paint_shadow (gtk_widget_get_style (widget), window,
GTK_STATE_NORMAL, GTK_SHADOW_OUT,
NULL, widget, "dnd",
x, y, width, height);
gdk_draw_rectangle (window,
- widget->style->black_gc,
+ (gtk_widget_get_style(widget))->black_gc,
FALSE,
x, y, width - 1, height - 1);
@@ -1571,6 +1579,7 @@ dnd_highlight_queue_redraw (GtkWidget *widget)
{
NautilusIconDndInfo *dnd_info;
int width, height;
+ GtkAllocation allocation;
dnd_info = NAUTILUS_ICON_CONTAINER (widget)->details->dnd_info;
@@ -1578,8 +1587,9 @@ dnd_highlight_queue_redraw (GtkWidget *widget)
return;
}
- width = widget->allocation.width;
- height = widget->allocation.height;
+ gtk_widget_get_allocation (widget, &allocation);
+ width = allocation.width;
+ height = allocation.height;
/* we don't know how wide the shadow is exactly,
* so we expose a 10-pixel wide border
@@ -1779,31 +1789,31 @@ drag_data_received_callback (GtkWidget *widget,
case NAUTILUS_ICON_DND_COLOR:
receive_dropped_color (NAUTILUS_ICON_CONTAINER (widget),
x, y,
- context->action,
+ gdk_drag_context_get_selected_action (context),
data);
success = TRUE;
break;
case NAUTILUS_ICON_DND_BGIMAGE:
receive_dropped_tile_image
(NAUTILUS_ICON_CONTAINER (widget),
- context->action,
+ gdk_drag_context_get_selected_action (context),
data);
break;
case NAUTILUS_ICON_DND_KEYWORD:
receive_dropped_keyword
(NAUTILUS_ICON_CONTAINER (widget),
- (char *) data->data, x, y);
+ (char *) gtk_selection_data_get_data (data), x, y);
break;
case NAUTILUS_ICON_DND_NETSCAPE_URL:
receive_dropped_netscape_url
(NAUTILUS_ICON_CONTAINER (widget),
- (char *) data->data, context, x, y);
+ (char *) gtk_selection_data_get_data (data), context, x, y);
success = TRUE;
break;
case NAUTILUS_ICON_DND_URI_LIST:
receive_dropped_uri_list
(NAUTILUS_ICON_CONTAINER (widget),
- (char *) data->data, context, x, y);
+ (char *) gtk_selection_data_get_data (data), context, x, y);
success = TRUE;
break;
case NAUTILUS_ICON_DND_TEXT:
@@ -1834,17 +1844,26 @@ drag_data_received_callback (GtkWidget *widget,
/* Do nothing, everything is done by the sender */
break;
case NAUTILUS_ICON_DND_XDNDDIRECTSAVE:
- if (drag_info->selection_data->format == 8 &&
- drag_info->selection_data->length == 1 &&
- drag_info->selection_data->data[0] == 'F') {
+ {
+ const guchar *selection_data;
+ gint selection_length;
+ gint selection_format;
+
+ selection_data = gtk_selection_data_get_data (drag_info->selection_data);
+ selection_length = gtk_selection_data_get_length (drag_info->selection_data);
+ selection_format = gtk_selection_data_get_format (drag_info->selection_data);
+
+ if (selection_format == 8 &&
+ selection_length == 1 &&
+ selection_data[0] == 'F') {
gtk_drag_get_data (widget, context,
gdk_atom_intern (NAUTILUS_ICON_DND_RAW_TYPE,
FALSE),
time);
return;
- } else if (drag_info->selection_data->format == 8 &&
- drag_info->selection_data->length == 1 &&
- drag_info->selection_data->data[0] == 'S' &&
+ } else if (selection_format == 8 &&
+ selection_length == 1 &&
+ selection_data[0] == 'F' &&
drag_info->direct_save_uri != NULL) {
GdkPoint p;
GFile *location;
@@ -1863,6 +1882,7 @@ drag_data_received_callback (GtkWidget *widget,
success = TRUE;
}
break;
+ } /* NAUTILUS_ICON_DND_XDNDDIRECTSAVE */
}
gtk_drag_finish (context, success, FALSE, time);
--
1.7.2

View File

@ -1,33 +0,0 @@
From 44f222288b33de74464567a1578fbf7ea69725d7 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:16:57 +0200
Subject: [PATCH 040/249] [ln-p] GSEAL nautilus-keep-last-vertical-box.
---
.../nautilus-keep-last-vertical-box.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libnautilus-private/nautilus-keep-last-vertical-box.c b/libnautilus-private/nautilus-keep-last-vertical-box.c
index 5e350e1..2e0c0d5 100644
--- a/libnautilus-private/nautilus-keep-last-vertical-box.c
+++ b/libnautilus-private/nautilus-keep-last-vertical-box.c
@@ -72,14 +72,14 @@ nautilus_keep_last_vertical_box_new (gint spacing)
box = NAUTILUS_KEEP_LAST_VERTICAL_BOX (gtk_widget_new (nautilus_keep_last_vertical_box_get_type (), NULL));
- GTK_BOX (box)->spacing = spacing;
+ gtk_box_set_spacing (GTK_BOX (box), spacing);
/* If homogeneous is TRUE and there are too many items to fit
* naturally, they will be squashed together to fit in the space.
* We want the ones that don't fit to be not shown at all, so
* we set homogeneous to FALSE.
*/
- GTK_BOX (box)->homogeneous = FALSE;
+ gtk_box_set_homogeneous (GTK_BOX (box), FALSE);
return GTK_WIDGET (box);
}
--
1.7.2

View File

@ -1,43 +0,0 @@
From a0d555cf31a6568038fb67c004c1085bec6de8cf Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:17:12 +0200
Subject: [PATCH 041/249] [ln-p] GSEAL nautilus-open-with-dialog.
---
libnautilus-private/nautilus-open-with-dialog.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libnautilus-private/nautilus-open-with-dialog.c b/libnautilus-private/nautilus-open-with-dialog.c
index 914d3f1..357e20c 100644
--- a/libnautilus-private/nautilus-open-with-dialog.c
+++ b/libnautilus-private/nautilus-open-with-dialog.c
@@ -783,7 +783,7 @@ nautilus_open_with_dialog_init (NautilusOpenWithDialog *dialog)
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 2);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
@@ -835,7 +835,7 @@ nautilus_open_with_dialog_init (NautilusOpenWithDialog *dialog)
dialog, 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_all (vbox);
@@ -903,7 +903,7 @@ nautilus_open_with_dialog_init (NautilusOpenWithDialog *dialog)
gtk_widget_show (align);
gtk_widget_show (dialog->details->button);
- GTK_WIDGET_SET_FLAGS (dialog->details->button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (dialog->details->button, TRUE);
gtk_container_add (GTK_CONTAINER (align), hbox);
--
1.7.2

View File

@ -1,25 +0,0 @@
From 8ad542cf15a6a7749c672def06a5198f93a40e12 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:17:24 +0200
Subject: [PATCH 042/249] [ln-p] GSEAL nautilus-progress-info.
---
libnautilus-private/nautilus-progress-info.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libnautilus-private/nautilus-progress-info.c b/libnautilus-private/nautilus-progress-info.c
index ecde2a9..3b8d54c 100644
--- a/libnautilus-private/nautilus-progress-info.c
+++ b/libnautilus-private/nautilus-progress-info.c
@@ -428,7 +428,7 @@ handle_new_progress_info (NautilusProgressInfo *info)
window = get_progress_window ();
progress = progress_widget_new (info);
- gtk_box_pack_start (GTK_BOX (GTK_BIN (window)->child),
+ gtk_box_pack_start (GTK_BOX (gtk_bin_get_child (GTK_BIN (window))),
progress,
FALSE, FALSE, 6);
--
1.7.2

View File

@ -1,199 +0,0 @@
From 8ce136d19d72559a7eeb0665b61607646ecf36d6 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:17:38 +0200
Subject: [PATCH 043/249] [ln-p] GSEAL nautilus-tree-view-drag-dest.
---
libnautilus-private/nautilus-tree-view-drag-dest.c | 63 +++++++++++--------
1 files changed, 36 insertions(+), 27 deletions(-)
diff --git a/libnautilus-private/nautilus-tree-view-drag-dest.c b/libnautilus-private/nautilus-tree-view-drag-dest.c
index d6e6909..70e88b6 100644
--- a/libnautilus-private/nautilus-tree-view-drag-dest.c
+++ b/libnautilus-private/nautilus-tree-view-drag-dest.c
@@ -109,7 +109,7 @@ gtk_tree_view_vertical_autoscroll (GtkTreeView *tree_view)
gdk_window_get_pointer (window, NULL, &y, NULL);
- y += vadjustment->value;
+ y += gtk_adjustment_get_value (vadjustment);
gtk_tree_view_get_visible_rect (tree_view, &visible_rect);
@@ -121,8 +121,8 @@ gtk_tree_view_vertical_autoscroll (GtkTreeView *tree_view)
}
}
- value = CLAMP (vadjustment->value + offset, 0.0,
- vadjustment->upper - vadjustment->page_size);
+ value = CLAMP (gtk_adjustment_get_value (vadjustment) + offset, 0.0,
+ gtk_adjustment_get_upper (vadjustment) - gtk_adjustment_get_page_size (vadjustment));
gtk_adjustment_set_value (vadjustment, value);
}
@@ -187,7 +187,7 @@ highlight_expose (GtkWidget *widget,
gdk_drawable_get_size (bin_window, &width, &height);
- gtk_paint_focus (widget->style,
+ gtk_paint_focus (gtk_widget_get_style (widget),
bin_window,
gtk_widget_get_state (widget),
NULL,
@@ -430,7 +430,7 @@ get_drop_action (NautilusTreeViewDragDest *dest,
g_free (drop_target);
- return context->suggested_action;
+ return gdk_drag_context_get_suggested_action (context);
case NAUTILUS_ICON_DND_TEXT:
case NAUTILUS_ICON_DND_RAW:
@@ -592,19 +592,21 @@ receive_uris (NautilusTreeViewDragDest *dest,
int x, int y)
{
char *drop_target;
- GdkDragAction action;
+ GdkDragAction action, real_action;
drop_target = get_drop_target_uri_at_pos (dest, x, y);
g_assert (drop_target != NULL);
- if (context->action == GDK_ACTION_ASK) {
+ real_action = gdk_drag_context_get_selected_action (context);
+
+ if (real_action == GDK_ACTION_ASK) {
if (nautilus_drag_selection_includes_special_link (dest->details->drag_list)) {
/* We only want to move the trash */
action = GDK_ACTION_MOVE;
} else {
action = GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK;
}
- context->action = nautilus_drag_drop_action_ask
+ real_action = nautilus_drag_drop_action_ask
(GTK_WIDGET (dest->details->tree_view), action);
}
@@ -613,13 +615,13 @@ receive_uris (NautilusTreeViewDragDest *dest,
action = GDK_ACTION_COPY;
}
- if (context->action > 0) {
+ if (real_action > 0) {
if (!nautilus_drag_uris_local (drop_target, source_uris)
- || context->action != GDK_ACTION_MOVE) {
+ || real_action != GDK_ACTION_MOVE) {
g_signal_emit (dest, signals[MOVE_COPY_ITEMS], 0,
source_uris,
drop_target,
- context->action,
+ real_action,
x, y);
}
}
@@ -669,9 +671,9 @@ receive_dropped_uri_list (NautilusTreeViewDragDest *dest,
g_assert (drop_target != NULL);
g_signal_emit (dest, signals[HANDLE_URI_LIST], 0,
- (char*)dest->details->drag_data->data,
+ (char*) gtk_selection_data_get_data (dest->details->drag_data),
drop_target,
- context->action,
+ gdk_drag_context_get_selected_action (context),
x, y);
g_free (drop_target);
@@ -695,7 +697,7 @@ receive_dropped_text (NautilusTreeViewDragDest *dest,
text = gtk_selection_data_get_text (dest->details->drag_data);
g_signal_emit (dest, signals[HANDLE_TEXT], 0,
(char *) text, drop_target,
- context->action,
+ gdk_drag_context_get_selected_action (context),
x, y);
g_free (text);
@@ -720,7 +722,7 @@ receive_dropped_raw (NautilusTreeViewDragDest *dest,
g_signal_emit (dest, signals[HANDLE_RAW], 0,
raw_data, length, drop_target,
dest->details->direct_save_uri,
- context->action,
+ gdk_drag_context_get_selected_action (context),
x, y);
g_free (drop_target);
@@ -741,9 +743,9 @@ receive_dropped_netscape_url (NautilusTreeViewDragDest *dest,
g_assert (drop_target != NULL);
g_signal_emit (dest, signals[HANDLE_NETSCAPE_URL], 0,
- (char*)dest->details->drag_data->data,
+ (char*) gtk_selection_data_get_data (dest->details->drag_data),
drop_target,
- context->action,
+ gdk_drag_context_get_selected_action (context),
x, y);
g_free (drop_target);
@@ -768,7 +770,7 @@ receive_dropped_keyword (NautilusTreeViewDragDest *dest,
if (drop_target_file != NULL) {
nautilus_drag_file_receive_dropped_keyword (drop_target_file,
- (char *) dest->details->drag_data->data);
+ (char *) gtk_selection_data_get_data (dest->details->drag_data));
nautilus_file_unref (drop_target_file);
}
@@ -783,18 +785,25 @@ receive_xds (NautilusTreeViewDragDest *dest,
int x, int y)
{
GFile *location;
+ const guchar *selection_data;
+ gint selection_format;
+ gint selection_length;
+
+ selection_data = gtk_selection_data_get_data (dest->details->drag_data);
+ selection_format = gtk_selection_data_get_format (dest->details->drag_data);
+ selection_length = gtk_selection_data_get_length (dest->details->drag_data);
- if (dest->details->drag_data->format == 8
- && dest->details->drag_data->length == 1
- && dest->details->drag_data->data[0] == 'F') {
+ if (selection_format == 8
+ && selection_length == 1
+ && selection_data[0] == 'F') {
gtk_drag_get_data (widget, context,
gdk_atom_intern (NAUTILUS_ICON_DND_RAW_TYPE,
FALSE),
time);
return FALSE;
- } else if (dest->details->drag_data->format == 8
- && dest->details->drag_data->length == 1
- && dest->details->drag_data->data[0] == 'S') {
+ } else if (selection_format == 8
+ && selection_length == 1
+ && selection_data[0] == 'S') {
g_assert (dest->details->direct_save_uri != NULL);
location = g_file_new_for_uri (dest->details->direct_save_uri);
@@ -891,8 +900,8 @@ get_direct_save_filename (GdkDragContext *context)
{
guchar *prop_text;
gint prop_len;
-
- if (!gdk_property_get (context->source_window, gdk_atom_intern (NAUTILUS_ICON_DND_XDNDDIRECTSAVE_TYPE, FALSE),
+
+ if (!gdk_property_get (gdk_drag_context_get_source_window (context), gdk_atom_intern (NAUTILUS_ICON_DND_XDNDDIRECTSAVE_TYPE, FALSE),
gdk_atom_intern ("text/plain", FALSE), 0, 1024, FALSE, NULL, NULL,
&prop_len, &prop_text)) {
return NULL;
@@ -940,7 +949,7 @@ set_direct_save_uri (NautilusTreeViewDragDest *dest,
g_object_unref (child);
/* Change the property */
- gdk_property_change (GDK_DRAWABLE (context->source_window),
+ gdk_property_change (GDK_DRAWABLE (gdk_drag_context_get_source_window (context)),
gdk_atom_intern (NAUTILUS_ICON_DND_XDNDDIRECTSAVE_TYPE, FALSE),
gdk_atom_intern ("text/plain", FALSE), 8,
GDK_PROP_MODE_REPLACE, (const guchar *) uri,
--
1.7.2

View File

@ -1,34 +0,0 @@
From 0405cc8c808247eff6672a1ae69fd35c6bda841b Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:17:54 +0200
Subject: [PATCH 044/249] [ln-p] GSEAL nautilus-undo.
---
libnautilus-private/nautilus-undo.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libnautilus-private/nautilus-undo.c b/libnautilus-private/nautilus-undo.c
index 2dac0d4..ea8952d 100644
--- a/libnautilus-private/nautilus-undo.c
+++ b/libnautilus-private/nautilus-undo.c
@@ -153,7 +153,7 @@ nautilus_undo_get_undo_manager (GObject *start_object)
/* Check for undo manager up the parent chain. */
if (GTK_IS_WIDGET (start_object)) {
- parent = GTK_WIDGET (start_object)->parent;
+ parent = gtk_widget_get_parent (GTK_WIDGET (start_object));
if (parent != NULL) {
manager = nautilus_undo_get_undo_manager (G_OBJECT (parent));
if (manager != NULL) {
@@ -163,7 +163,7 @@ nautilus_undo_get_undo_manager (GObject *start_object)
/* Check for undo manager in our window's parent. */
if (GTK_IS_WINDOW (start_object)) {
- transient_parent = GTK_WINDOW (start_object)->transient_parent;
+ transient_parent = gtk_window_get_transient_for (GTK_WINDOW (start_object));
if (transient_parent != NULL) {
manager = nautilus_undo_get_undo_manager (G_OBJECT (transient_parent));
if (manager != NULL) {
--
1.7.2

View File

@ -1,57 +0,0 @@
From 8ba99b676c20b359c7b46b9ae4e8432fbbf4ae8f Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:18:15 +0200
Subject: [PATCH 045/249] [file-manager] GSEAL fm-desktop-icon-view.
---
src/file-manager/fm-desktop-icon-view.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c
index f58f1d3..ff39cb5 100644
--- a/src/file-manager/fm-desktop-icon-view.c
+++ b/src/file-manager/fm-desktop-icon-view.c
@@ -115,9 +115,9 @@ static NautilusIconContainer *
get_icon_container (FMDesktopIconView *icon_view)
{
g_return_val_if_fail (FM_IS_DESKTOP_ICON_VIEW (icon_view), NULL);
- g_return_val_if_fail (NAUTILUS_IS_ICON_CONTAINER (GTK_BIN (icon_view)->child), NULL);
+ g_return_val_if_fail (NAUTILUS_IS_ICON_CONTAINER (gtk_bin_get_child (GTK_BIN (icon_view))), NULL);
- return NAUTILUS_ICON_CONTAINER (GTK_BIN (icon_view)->child);
+ return NAUTILUS_ICON_CONTAINER (gtk_bin_get_child (GTK_BIN (icon_view)));
}
static void
@@ -526,7 +526,7 @@ static void
fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view)
{
NautilusIconContainer *icon_container;
- GtkAllocation *allocation;
+ GtkAllocation allocation;
GtkAdjustment *hadj, *vadj;
if (desktop_directory == NULL) {
@@ -558,14 +558,14 @@ fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view)
nautilus_icon_container_set_store_layout_timestamps (icon_container, TRUE);
/* Set allocation to be at 0, 0 */
- allocation = &GTK_WIDGET (icon_container)->allocation;
- allocation->x = 0;
- allocation->y = 0;
+ allocation.x = 0;
+ allocation.y = 0;
+ gtk_widget_set_allocation (GTK_WIDGET (icon_container), &allocation);
gtk_widget_queue_resize (GTK_WIDGET (icon_container));
- hadj = GTK_LAYOUT (icon_container)->hadjustment;
- vadj = GTK_LAYOUT (icon_container)->vadjustment;
+ hadj = gtk_layout_get_hadjustment (GTK_LAYOUT (icon_container));
+ vadj = gtk_layout_get_vadjustment (GTK_LAYOUT (icon_container));
eel_gtk_adjustment_set_value (hadj, 0);
eel_gtk_adjustment_set_value (vadj, 0);
--
1.7.2

View File

@ -1,123 +0,0 @@
From 197a0101f756111b4f8712433586761c356051d3 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:18:38 +0200
Subject: [PATCH 046/249] [file-manager] GSEAL fm-directory-view.
---
src/file-manager/fm-directory-view.c | 44 ++++++++++++++++-----------------
1 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index 24b24a9..5de313c 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -1189,7 +1189,7 @@ select_pattern (FMDirectoryView *view)
GTK_RESPONSE_OK);
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 2);
label = gtk_label_new_with_mnemonic (_("_Pattern:"));
example = gtk_label_new (NULL);
@@ -1224,7 +1224,7 @@ select_pattern (FMDirectoryView *view)
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
gtk_widget_show_all (table);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), table);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), table);
g_object_set_data (G_OBJECT (dialog), "entry", entry);
g_signal_connect (dialog, "response",
G_CALLBACK (pattern_select_response_cb),
@@ -1325,14 +1325,14 @@ action_save_search_as_callback (GtkAction *action,
gtk_dialog_set_default_response (GTK_DIALOG (dialog),
GTK_RESPONSE_OK);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 2);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
table = gtk_table_new (2, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 5);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacings (GTK_TABLE (table), 12);
- 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);
label = gtk_label_new_with_mnemonic (_("Search _name:"));
@@ -1788,7 +1788,7 @@ slot_inactive (NautilusWindowSlot *slot,
FMDirectoryView *view)
{
g_assert (view->details->active ||
- GTK_WIDGET (view)->parent == NULL);
+ gtk_widget_get_parent (GTK_WIDGET (view)) == NULL);
view->details->active = FALSE;
fm_directory_view_unmerge_menus (view);
@@ -6775,11 +6775,11 @@ action_connect_to_server_link_callback (GtkAction *action,
g_object_set_data_full (G_OBJECT (dialog), "link-icon", g_strdup (icon_name), g_free);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 2);
box = gtk_hbox_new (FALSE, 12);
gtk_widget_show (box);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
box, TRUE, TRUE, 0);
label = gtk_label_new_with_mnemonic (_("Link _name:"));
@@ -7357,34 +7357,32 @@ pre_activate (FMDirectoryView *view,
GtkActionGroup *action_group)
{
GdkEvent *event;
- GtkWidget *proxy, *shell;
- gboolean unset_pos;
+ GtkWidget *proxy;
+ gboolean activated_from_popup;
/* check whether action was activated through a popup menu.
* If not, unset the last stored context menu popup position */
- unset_pos = TRUE;
+ activated_from_popup = FALSE;
event = gtk_get_current_event ();
proxy = gtk_get_event_widget (event);
- if (proxy != NULL && GTK_IS_MENU_ITEM (proxy)) {
- shell = proxy->parent;
+ if (proxy != NULL) {
+ GtkWidget *toplevel;
+ GdkWindowTypeHint hint;
- unset_pos = FALSE;
+ toplevel = gtk_widget_get_toplevel (proxy);
- do {
- if (!GTK_IS_MENU (shell)) {
- /* popup menus are GtkMenu-only menu shell hierarchies */
- unset_pos = TRUE;
- break;
- }
+ if (GTK_IS_WINDOW (toplevel)) {
+ hint = gtk_window_get_type_hint (GTK_WINDOW (toplevel));
- shell = GTK_MENU_SHELL (shell)->parent_menu_shell;
- } while (GTK_IS_MENU_SHELL (shell)
- && GTK_MENU_SHELL (shell)->parent_menu_shell != NULL);
+ if (hint == GDK_WINDOW_TYPE_HINT_POPUP_MENU) {
+ activated_from_popup = TRUE;
+ }
+ }
}
- if (unset_pos) {
+ if (!activated_from_popup) {
update_context_menu_position_from_event (view, NULL);
}
}
--
1.7.2

View File

@ -1,34 +0,0 @@
From eea532e7f0cf729c6e9e78744add5c8cde304ba4 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:18:59 +0200
Subject: [PATCH 047/249] [file-manager] GSEAL fm-ditem-page.
---
src/file-manager/fm-ditem-page.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/file-manager/fm-ditem-page.c b/src/file-manager/fm-ditem-page.c
index b8d8071..02542de 100644
--- a/src/file-manager/fm-ditem-page.c
+++ b/src/file-manager/fm-ditem-page.c
@@ -165,7 +165,7 @@ fm_ditem_page_url_drag_data_received (GtkWidget *widget, GdkDragContext *context
gboolean exactly_one;
char *path;
- uris = g_strsplit (selection_data->data, "\r\n", 0);
+ uris = g_strsplit (gtk_selection_data_get_data (selection_data), "\r\n", 0);
exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0');
if (!exactly_one) {
@@ -197,7 +197,7 @@ fm_ditem_page_exec_drag_data_received (GtkWidget *widget, GdkDragContext *contex
GKeyFile *key_file;
char *uri, *type, *exec;
- uris = g_strsplit (selection_data->data, "\r\n", 0);
+ uris = g_strsplit (gtk_selection_data_get_data (selection_data), "\r\n", 0);
exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0');
if (!exactly_one) {
--
1.7.2

View File

@ -1,43 +0,0 @@
From df190cef8cb35e0f5a717d8bd28b810ab8304137 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:19:08 +0200
Subject: [PATCH 048/249] [file-manager] GSEAL fm-icon-view.
---
src/file-manager/fm-icon-view.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c
index 18b5772..0c20df7 100644
--- a/src/file-manager/fm-icon-view.c
+++ b/src/file-manager/fm-icon-view.c
@@ -243,7 +243,7 @@ fm_icon_view_finalize (GObject *object)
static NautilusIconContainer *
get_icon_container (FMIconView *icon_view)
{
- return NAUTILUS_ICON_CONTAINER (GTK_BIN (icon_view)->child);
+ return NAUTILUS_ICON_CONTAINER (gtk_bin_get_child (GTK_BIN (icon_view)));
}
static gboolean
@@ -2767,7 +2767,7 @@ create_icon_container (FMIconView *icon_view)
icon_container = fm_icon_container_new (icon_view);
- GTK_WIDGET_SET_FLAGS (icon_container, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (GTK_WIDGET (icon_container), TRUE);
g_signal_connect_object (icon_container, "focus_in_event",
G_CALLBACK (focus_in_event_callback), icon_view, 0);
@@ -3046,7 +3046,7 @@ fm_icon_view_init (FMIconView *icon_view)
static gboolean setup_sound_preview = FALSE;
NautilusIconContainer *icon_container;
- g_return_if_fail (GTK_BIN (icon_view)->child == NULL);
+ g_return_if_fail (gtk_bin_get_child (GTK_BIN (icon_view)) == NULL);
icon_view->details = g_new0 (FMIconViewDetails, 1);
icon_view->details->sort = &sort_criteria[0];
--
1.7.2

View File

@ -1,25 +0,0 @@
From 8f9b6e75eb8eb5f9ece32963e53a69381fd65336 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:19:16 +0200
Subject: [PATCH 049/249] [file-manager] GSEAL fm-list-model.
---
src/file-manager/fm-list-model.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/file-manager/fm-list-model.c b/src/file-manager/fm-list-model.c
index aad068e..d666f7f 100644
--- a/src/file-manager/fm-list-model.c
+++ b/src/file-manager/fm-list-model.c
@@ -883,7 +883,7 @@ fm_list_model_multi_drag_data_get (EggTreeMultiDragSource *drag_source,
}
if (gtk_target_list_find (drag_target_list,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
&target_info)) {
nautilus_drag_drag_data_get (NULL,
NULL,
--
1.7.2

View File

@ -1,148 +0,0 @@
From 0fe90a931acbef48d8b50b380ee05362ecdf0058 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:19:29 +0200
Subject: [PATCH 050/249] [file-manager] GSEAL fm-list-view.
---
src/file-manager/fm-list-view.c | 43 ++++++++++++++++++++++++++------------
1 files changed, 29 insertions(+), 14 deletions(-)
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index 2ac6fee..5d23d7f 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -74,6 +74,7 @@ struct FMListViewDetails {
GtkCellRendererPixbuf *pixbuf_cell;
GtkCellRendererText *file_name_cell;
GList *cells;
+ GtkCellEditable *editable_widget;
NautilusZoomLevel zoom_level;
@@ -506,9 +507,9 @@ motion_notify_callback (GtkWidget *widget,
if ((old_hover_path != NULL) != (view->details->hover_path != NULL)) {
if (view->details->hover_path != NULL) {
- gdk_window_set_cursor (widget->window, hand_cursor);
+ gdk_window_set_cursor (gtk_widget_get_window (widget), hand_cursor);
} else {
- gdk_window_set_cursor (widget->window, NULL);
+ gdk_window_set_cursor (gtk_widget_get_window (widget), NULL);
}
}
@@ -578,7 +579,7 @@ enter_notify_callback (GtkWidget *widget,
NULL, NULL, NULL);
if (view->details->hover_path != NULL) {
- gdk_window_set_cursor (widget->window, hand_cursor);
+ gdk_window_set_cursor (gtk_widget_get_window (widget), hand_cursor);
}
}
@@ -1142,6 +1143,8 @@ static void
cell_renderer_editing_canceled (GtkCellRendererText *cell,
FMListView *view)
{
+ view->details->editable_widget = NULL;
+
fm_directory_view_unfreeze_updates (FM_DIRECTORY_VIEW (view));
}
@@ -1155,6 +1158,8 @@ cell_renderer_edited (GtkCellRendererText *cell,
NautilusFile *file;
GtkTreeIter iter;
+ view->details->editable_widget = NULL;
+
/* Don't allow a rename with an empty string. Revert to original
* without notifying the user.
*/
@@ -1798,11 +1803,10 @@ stop_cell_editing (FMListView *list_view)
* changes directories without exiting cell edit mode. It also prevents
* the edited handler from being called on the cleared list model.
*/
-
column = list_view->details->file_name_column;
- if (column != NULL && column->editable_widget != NULL &&
- GTK_IS_CELL_EDITABLE (column->editable_widget)) {
- gtk_cell_editable_editing_done (column->editable_widget);
+ if (column != NULL && list_view->details->editable_widget != NULL &&
+ GTK_IS_CELL_EDITABLE (list_view->details->editable_widget)) {
+ gtk_cell_editable_editing_done (list_view->details->editable_widget);
}
}
@@ -2274,7 +2278,7 @@ create_column_editor (FMListView *view)
box = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
gtk_widget_show (box);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (window)->vbox), box);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (window))), box);
label_text = _("Choose the order of information to appear in this folder:");
str = g_strconcat ("<b>", label_text, "</b>", NULL);
@@ -2589,13 +2593,16 @@ fm_list_view_start_renaming_file (FMDirectoryView *view,
GtkTreePath *path;
GtkEntry *entry;
int start_offset, end_offset;
+ gchar *path_str;
+ GdkRectangle cell_area;
+ GdkRectangle background_area;
list_view = FM_LIST_VIEW (view);
/* Select all if we are in renaming mode already */
- if (list_view->details->file_name_column && list_view->details->file_name_column->editable_widget) {
+ if (list_view->details->file_name_column && list_view->details->editable_widget) {
gtk_editable_select_region (
- GTK_EDITABLE (list_view->details->file_name_column->editable_widget),
+ GTK_EDITABLE (list_view->details->editable_widget),
0,
-1);
return;
@@ -2609,13 +2616,21 @@ fm_list_view_start_renaming_file (FMDirectoryView *view,
fm_directory_view_freeze_updates (FM_DIRECTORY_VIEW (view));
path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_view->details->model), &iter);
+ path_str = gtk_tree_path_to_string (path);
+ gtk_tree_view_get_cell_area (list_view->details->tree_view, path,
+ list_view->details->file_name_column, &cell_area);
+ gtk_tree_view_get_background_area (list_view->details->tree_view, path,
+ list_view->details->file_name_column, &background_area);
- /*Make filename-cells editable.*/
+ /* Make filename-cells editable. */
g_object_set (G_OBJECT (list_view->details->file_name_cell),
"editable", TRUE,
NULL);
-
+ list_view->details->editable_widget =
+ gtk_cell_renderer_start_editing (GTK_CELL_RENDERER (list_view->details->file_name_cell),
+ NULL, NULL, path_str, &background_area,
+ &cell_area, 0);
gtk_tree_view_scroll_to_cell (list_view->details->tree_view,
NULL,
list_view->details->file_name_column,
@@ -2625,7 +2640,7 @@ fm_list_view_start_renaming_file (FMDirectoryView *view,
list_view->details->file_name_column,
TRUE);
- entry = GTK_ENTRY (list_view->details->file_name_column->editable_widget);
+ entry = GTK_ENTRY (list_view->details->editable_widget);
/* Free a previously allocated original_name */
g_free (list_view->details->original_name);
@@ -2674,7 +2689,7 @@ fm_list_view_click_policy_changed (FMDirectoryView *directory_view)
tree = view->details->tree_view;
if (gtk_widget_get_realized (GTK_WIDGET (tree))) {
- win = GTK_WIDGET (tree)->window;
+ win = gtk_widget_get_window (GTK_WIDGET (tree));
gdk_window_set_cursor (win, NULL);
display = gtk_widget_get_display (GTK_WIDGET (view));
--
1.7.2

View File

@ -1,285 +0,0 @@
From c764e246da912817929ae33075a3683a22bb3bf6 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:19:39 +0200
Subject: [PATCH 051/249] [file-manager] GSEAL fm-properties-window.
---
src/file-manager/fm-properties-window.c | 96 +++++++++++++++++++------------
1 files changed, 60 insertions(+), 36 deletions(-)
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index 845a7c9..f17e704 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -499,7 +499,7 @@ fm_properties_window_drag_data_received (GtkWidget *widget, GdkDragContext *cont
return;
}
- uris = g_strsplit (selection_data->data, "\r\n", 0);
+ uris = g_strsplit (gtk_selection_data_get_data (selection_data), "\r\n", 0);
exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0');
@@ -2215,10 +2215,13 @@ static guint
append_row (GtkTable *table)
{
guint new_row_count;
+ gint nrows, ncols;
- new_row_count = table->nrows + 1;
+ g_object_get (table, "n-rows", &nrows, "n-columns", &ncols, NULL);
- gtk_table_resize (table, new_row_count, table->ncols);
+ new_row_count = nrows + 1;
+
+ gtk_table_resize (table, new_row_count, ncols);
gtk_table_set_row_spacing (table, new_row_count - 1, ROW_PAD);
return new_row_count - 1;
@@ -2756,13 +2759,16 @@ paint_used_legend (GtkWidget *widget, GdkEventExpose *eev, gpointer data)
FMPropertiesWindow *window;
cairo_t *cr;
gint width, height;
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation (widget, &allocation);
- width = widget->allocation.width;
- height = widget->allocation.height;
+ width = allocation.width;
+ height = allocation.height;
window = FM_PROPERTIES_WINDOW (data);
- cr = gdk_cairo_create (widget->window);
+ cr = gdk_cairo_create (gtk_widget_get_window (widget));
cairo_rectangle (cr,
2,
@@ -2785,12 +2791,14 @@ paint_free_legend (GtkWidget *widget, GdkEventExpose *eev, gpointer data)
FMPropertiesWindow *window;
cairo_t *cr;
gint width, height;
-
+ GtkAllocation allocation;
+
window = FM_PROPERTIES_WINDOW (data);
+ gtk_widget_get_allocation (widget, &allocation);
- width = widget->allocation.width;
- height = widget->allocation.height;
- cr = gdk_cairo_create (widget->window);
+ width = allocation.width;
+ height = allocation.height;
+ cr = gdk_cairo_create (gtk_widget_get_window (widget));
cairo_rectangle (cr,
2,
@@ -2816,11 +2824,13 @@ paint_pie_chart (GtkWidget *widget, GdkEventExpose *eev, gpointer data)
gint width, height;
double free, used;
double angle1, angle2, split, xc, yc, radius;
+ GtkAllocation allocation;
- window = FM_PROPERTIES_WINDOW (data);
-
- width = widget->allocation.width;
- height = widget->allocation.height;
+ window = FM_PROPERTIES_WINDOW (data);
+ gtk_widget_get_allocation (widget, &allocation);
+
+ width = allocation.width;
+ height = allocation.height;
free = (double)window->details->volume_free / (double)window->details->volume_capacity;
@@ -2832,7 +2842,7 @@ paint_pie_chart (GtkWidget *widget, GdkEventExpose *eev, gpointer data)
xc = width / 2;
yc = height / 2;
- cr = gdk_cairo_create (widget->window);
+ cr = gdk_cairo_create (gtk_widget_get_window (widget));
if (width < height) {
radius = width / 2 - 8;
@@ -3475,8 +3485,8 @@ create_emblems_page (FMPropertiesWindow *window)
}
button = eel_labeled_image_check_button_new (label, pixbuf);
- eel_labeled_image_set_fixed_image_height (EEL_LABELED_IMAGE (GTK_BIN (button)->child), STANDARD_EMBLEM_HEIGHT);
- eel_labeled_image_set_spacing (EEL_LABELED_IMAGE (GTK_BIN (button)->child), EMBLEM_LABEL_SPACING);
+ eel_labeled_image_set_fixed_image_height (EEL_LABELED_IMAGE (gtk_bin_get_child (GTK_BIN (button))), STANDARD_EMBLEM_HEIGHT);
+ eel_labeled_image_set_spacing (EEL_LABELED_IMAGE (gtk_bin_get_child (GTK_BIN (button))), EMBLEM_LABEL_SPACING);
g_free (label);
g_object_unref (pixbuf);
@@ -3508,7 +3518,7 @@ start_long_operation (FMPropertiesWindow *window)
GdkCursor * cursor;
cursor = gdk_cursor_new (GDK_WATCH);
- gdk_window_set_cursor (GTK_WIDGET (window)->window, cursor);
+ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), cursor);
gdk_cursor_unref (cursor);
}
window->details->long_operation_underway ++;
@@ -3517,10 +3527,10 @@ start_long_operation (FMPropertiesWindow *window)
static void
end_long_operation (FMPropertiesWindow *window)
{
- if (GTK_WIDGET (window)->window != NULL &&
+ if (gtk_widget_get_window (GTK_WIDGET (window)) != NULL &&
window->details->long_operation_underway == 1) {
/* finished !! */
- gdk_window_set_cursor (GTK_WIDGET (window)->window, NULL);
+ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), NULL);
}
window->details->long_operation_underway--;
}
@@ -4293,15 +4303,19 @@ append_special_execution_checkbox (FMPropertiesWindow *window,
static void
append_special_execution_flags (FMPropertiesWindow *window, GtkTable *table)
{
+ gint nrows;
+
append_special_execution_checkbox
(window, table, _("Set _user ID"), UNIX_PERM_SUID);
- attach_title_field (table, table->nrows - 1, _("Special flags:"));
+ g_object_get (table, "n-rows", &nrows, NULL);
+ attach_title_field (table, nrows - 1, _("Special flags:"));
append_special_execution_checkbox (window, table, _("Set gro_up ID"), UNIX_PERM_SGID);
append_special_execution_checkbox (window, table, _("_Sticky"), UNIX_PERM_STICKY);
- gtk_table_set_row_spacing (table, table->nrows - 1, 18);
+ g_object_get (table, "n-rows", &nrows, NULL);
+ gtk_table_set_row_spacing (table, nrows - 1, 18);
}
static gboolean
@@ -4372,6 +4386,7 @@ create_simple_permissions (FMPropertiesWindow *window, GtkTable *page_table)
GtkComboBox *group_combo_box;
GtkComboBox *owner_combo_box;
guint last_row;
+ gint nrows;
last_row = 0;
@@ -4404,7 +4419,8 @@ create_simple_permissions (FMPropertiesWindow *window, GtkTable *page_table)
PERMISSION_USER, FALSE, !has_directory);
}
- gtk_table_set_row_spacing (page_table, page_table->nrows - 1, 18);
+ g_object_get (page_table, "n-rows", &nrows, NULL);
+ gtk_table_set_row_spacing (page_table, nrows - 1, 18);
if (!is_multi_file_window (window) && nautilus_file_can_set_group (get_target_file (window))) {
last_row = append_title_field (page_table,
@@ -4439,7 +4455,8 @@ create_simple_permissions (FMPropertiesWindow *window, GtkTable *page_table)
!has_directory);
}
- gtk_table_set_row_spacing (page_table, page_table->nrows - 1, 18);
+ g_object_get (page_table, "n-rows", &nrows, NULL);
+ gtk_table_set_row_spacing (page_table, nrows - 1, 18);
append_title_field (page_table,
_("Others"),
@@ -4456,7 +4473,8 @@ create_simple_permissions (FMPropertiesWindow *window, GtkTable *page_table)
!has_directory);
}
- gtk_table_set_row_spacing (page_table, page_table->nrows - 1, 18);
+ g_object_get (page_table, "n-rows", &nrows, NULL);
+ gtk_table_set_row_spacing (page_table, nrows - 1, 18);
last_row = append_title_field (page_table,
_("Execute:"),
@@ -4578,9 +4596,10 @@ create_advanced_permissions (FMPropertiesWindow *window, GtkTable *page_table)
GtkComboBox *group_combo_box;
GtkComboBox *owner_combo_box;
gboolean has_directory, has_file;
-
+ gint nrows;
+
last_row = 0;
-
+
if (!is_multi_file_window (window) && nautilus_file_can_set_owner (get_target_file (window))) {
owner_label = attach_title_field (page_table, last_row, _("_Owner:"));
@@ -4622,7 +4641,8 @@ create_advanced_permissions (FMPropertiesWindow *window, GtkTable *page_table)
FALSE);
}
- gtk_table_set_row_spacing (page_table, page_table->nrows - 1, 18);
+ g_object_get (page_table, "n-rows", &nrows, NULL);
+ gtk_table_set_row_spacing (page_table, nrows - 1, 18);
has_directory = files_has_directory (window);
has_file = files_has_file (window);
@@ -4634,7 +4654,8 @@ create_advanced_permissions (FMPropertiesWindow *window, GtkTable *page_table)
NULL);
}
create_permission_checkboxes (window, page_table, TRUE);
- gtk_table_set_row_spacing (page_table, page_table->nrows - 1, 18);
+ g_object_get (page_table, "n-rows", &nrows, NULL);
+ gtk_table_set_row_spacing (page_table, nrows - 1, 18);
}
@@ -4646,7 +4667,8 @@ create_advanced_permissions (FMPropertiesWindow *window, GtkTable *page_table)
NULL);
}
create_permission_checkboxes (window, page_table, FALSE);
- gtk_table_set_row_spacing (page_table, page_table->nrows - 1, 18);
+ g_object_get (page_table, "n-rows", &nrows, NULL);
+ gtk_table_set_row_spacing (page_table, nrows - 1, 18);
}
append_special_execution_flags (window, page_table);
@@ -4784,6 +4806,7 @@ create_permissions_page (FMPropertiesWindow *window)
char *file_name, *prompt_text;
GList *file_list;
guint last_row;
+ gint nrows;
vbox = create_page_with_vbox (window->details->notebook,
_("Permissions"));
@@ -4818,8 +4841,9 @@ create_permissions_page (FMPropertiesWindow *window)
window->details->advanced_permissions = FALSE;
create_simple_permissions (window, page_table);
}
-
- gtk_table_set_row_spacing (page_table, page_table->nrows - 1, 18);
+
+ g_object_get (page_table, "n-rows", &nrows, NULL);
+ gtk_table_set_row_spacing (page_table, nrows - 1, 18);
#ifdef HAVE_SELINUX
append_title_value_pair
@@ -5183,7 +5207,7 @@ create_properties_window (StartupData *startup_data)
/* Create the notebook tabs. */
window->details->notebook = GTK_NOTEBOOK (gtk_notebook_new ());
gtk_widget_show (GTK_WIDGET (window->details->notebook));
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox),
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))),
GTK_WIDGET (window->details->notebook),
TRUE, TRUE, 0);
@@ -5212,9 +5236,9 @@ create_properties_window (StartupData *startup_data)
/* FIXME - HIGificiation, should be done inside GTK+ */
gtk_widget_ensure_style (GTK_WIDGET (window));
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (window)->vbox), 12);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (window)->action_area), 0);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (window)->vbox), 12);
+ gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (window))), 12);
+ gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (window))), 0);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), 12);
gtk_dialog_set_has_separator (GTK_DIALOG (window), FALSE);
/* Update from initial state */
--
1.7.2

View File

@ -1,36 +0,0 @@
From c76136d88c314c17dbabca9ddd8808d297ceaee0 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:19:50 +0200
Subject: [PATCH 052/249] [file-manager] GSEAL fm-tree-view.
---
src/file-manager/fm-tree-view.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/file-manager/fm-tree-view.c b/src/file-manager/fm-tree-view.c
index fc63502..5bf8f0a 100644
--- a/src/file-manager/fm-tree-view.c
+++ b/src/file-manager/fm-tree-view.c
@@ -665,8 +665,8 @@ clipboard_contents_received_callback (GtkClipboard *clipboard,
view = FM_TREE_VIEW (data);
- if (selection_data->type == copied_files_atom
- && selection_data->length > 0 &&
+ if (gtk_selection_data_get_data_type (selection_data) == copied_files_atom
+ && gtk_selection_data_get_length (selection_data) > 0 &&
view->details->popup != NULL) {
gtk_widget_set_sensitive (view->details->popup_paste, TRUE);
}
@@ -1449,7 +1449,7 @@ parent_set_callback (GtkWidget *widget,
view = FM_TREE_VIEW (callback_data);
- if (widget->parent != NULL && view->details->tree_widget == NULL) {
+ if (gtk_widget_get_parent (widget) != NULL && view->details->tree_widget == NULL) {
create_tree (view);
update_filtering_from_preferences (view);
}
--
1.7.2

View File

@ -1,58 +0,0 @@
From b43e268e738e8754eaa3d0e38a0cb5859f254241 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:20:05 +0200
Subject: [PATCH 053/249] [src] GSEAL nautilus-application.
---
src/nautilus-application.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 06d8509..1f048e3 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -1046,7 +1046,7 @@ get_desktop_manager_selection (GdkDisplay *display, int screen)
if (gtk_selection_owner_set_for_display (display,
selection_widget,
selection_atom,
- gdk_x11_get_server_time (selection_widget->window))) {
+ gdk_x11_get_server_time (gtk_widget_get_window (selection_widget)))) {
g_signal_connect (selection_widget, "selection_get",
G_CALLBACK (selection_get_cb), NULL);
@@ -1860,22 +1860,26 @@ nautilus_application_get_session_data (void)
xmlNewProp (win_node, "type", NAUTILUS_IS_NAVIGATION_WINDOW (window) ? "navigation" : "spatial");
if (NAUTILUS_IS_NAVIGATION_WINDOW (window)) { /* spatial windows store their state as file metadata */
+ GdkWindow *gdk_window;
+
tmp = eel_gtk_window_get_geometry_string (GTK_WINDOW (window));
xmlNewProp (win_node, "geometry", tmp);
g_free (tmp);
- if (GTK_WIDGET (window)->window &&
- gdk_window_get_state (GTK_WIDGET (window)->window) & GDK_WINDOW_STATE_MAXIMIZED) {
+ gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
+
+ if (gdk_window &&
+ gdk_window_get_state (gdk_window) & GDK_WINDOW_STATE_MAXIMIZED) {
xmlNewProp (win_node, "maximized", "TRUE");
}
- if (GTK_WIDGET (window)->window &&
- gdk_window_get_state (GTK_WIDGET (window)->window) & GDK_WINDOW_STATE_STICKY) {
+ if (gdk_window &&
+ gdk_window_get_state (gdk_window) & GDK_WINDOW_STATE_STICKY) {
xmlNewProp (win_node, "sticky", "TRUE");
}
- if (GTK_WIDGET (window)->window &&
- gdk_window_get_state (GTK_WIDGET (window)->window) & GDK_WINDOW_STATE_ABOVE) {
+ if (gdk_window &&
+ gdk_window_get_state (gdk_window) & GDK_WINDOW_STATE_ABOVE) {
xmlNewProp (win_node, "keep-above", "TRUE");
}
}
--
1.7.2

View File

@ -1,113 +0,0 @@
From ac4547b030a3b0b9ed60ff9bb2f783ac10a7d62b Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:20:26 +0200
Subject: [PATCH 054/249] [src] GSEAL nautilus-connect-server-dialog.
---
src/nautilus-connect-server-dialog.c | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/nautilus-connect-server-dialog.c b/src/nautilus-connect-server-dialog.c
index b1fa50d..ac98259 100644
--- a/src/nautilus-connect-server-dialog.c
+++ b/src/nautilus-connect-server-dialog.c
@@ -222,12 +222,12 @@ connect_to_server (NautilusConnectServerDialog *dialog)
g_free (t);
}
- if (dialog->details->port_entry->parent != NULL) {
+ if (gtk_widget_get_parent (dialog->details->port_entry) != NULL) {
free_port = TRUE;
port = gtk_editable_get_chars (GTK_EDITABLE (dialog->details->port_entry), 0, -1);
}
folder = gtk_editable_get_chars (GTK_EDITABLE (dialog->details->folder_entry), 0, -1);
- if (dialog->details->user_entry->parent != NULL) {
+ if (gtk_widget_get_parent (dialog->details->user_entry) != NULL) {
free_user = TRUE;
t = gtk_editable_get_chars (GTK_EDITABLE (dialog->details->user_entry), 0, -1);
@@ -236,7 +236,7 @@ connect_to_server (NautilusConnectServerDialog *dialog)
g_free (t);
}
- if (dialog->details->domain_entry->parent != NULL) {
+ if (gtk_widget_get_parent (dialog->details->domain_entry) != NULL) {
free_domain = TRUE;
domain = gtk_editable_get_chars (GTK_EDITABLE (dialog->details->domain_entry), 0, -1);
@@ -384,39 +384,39 @@ setup_for_type (NautilusConnectServerDialog *dialog)
g_assert (index < G_N_ELEMENTS (methods) && index >= 0);
meth = &(methods[index]);
- if (dialog->details->uri_entry->parent != NULL) {
+ if (gtk_widget_get_parent (dialog->details->uri_entry) != NULL) {
gtk_container_remove (GTK_CONTAINER (dialog->details->table),
dialog->details->uri_entry);
}
- if (dialog->details->server_entry->parent != NULL) {
+ if (gtk_widget_get_parent (dialog->details->server_entry) != NULL) {
gtk_container_remove (GTK_CONTAINER (dialog->details->table),
dialog->details->server_entry);
}
- if (dialog->details->share_entry->parent != NULL) {
+ if (gtk_widget_get_parent (dialog->details->share_entry) != NULL) {
gtk_container_remove (GTK_CONTAINER (dialog->details->table),
dialog->details->share_entry);
}
- if (dialog->details->port_entry->parent != NULL) {
+ if (gtk_widget_get_parent (dialog->details->port_entry) != NULL) {
gtk_container_remove (GTK_CONTAINER (dialog->details->table),
dialog->details->port_entry);
}
- if (dialog->details->folder_entry->parent != NULL) {
+ if (gtk_widget_get_parent (dialog->details->folder_entry) != NULL) {
gtk_container_remove (GTK_CONTAINER (dialog->details->table),
dialog->details->folder_entry);
}
- if (dialog->details->user_entry->parent != NULL) {
+ if (gtk_widget_get_parent (dialog->details->user_entry) != NULL) {
gtk_container_remove (GTK_CONTAINER (dialog->details->table),
dialog->details->user_entry);
}
- if (dialog->details->domain_entry->parent != NULL) {
+ if (gtk_widget_get_parent (dialog->details->domain_entry) != NULL) {
gtk_container_remove (GTK_CONTAINER (dialog->details->table),
dialog->details->domain_entry);
}
- if (dialog->details->bookmark_check->parent != NULL) {
+ if (gtk_widget_get_parent (dialog->details->bookmark_check) != NULL) {
gtk_container_remove (GTK_CONTAINER (dialog->details->table),
dialog->details->bookmark_check);
}
- if (dialog->details->name_entry->parent != NULL) {
+ if (gtk_widget_get_parent (dialog->details->name_entry) != NULL) {
gtk_container_remove (GTK_CONTAINER (dialog->details->table),
dialog->details->name_entry);
}
@@ -763,7 +763,7 @@ port_insert_text (GtkEditable *editable,
if (!g_ascii_isdigit (new_text[pos])) {
GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (editable));
if (toplevel != NULL) {
- gdk_window_beep (toplevel->window);
+ gdk_window_beep (gtk_widget_get_window (toplevel));
}
g_signal_stop_emission_by_name (editable, "insert_text");
return;
@@ -795,12 +795,12 @@ nautilus_connect_server_dialog_init (NautilusConnectServerDialog *dialog)
gtk_window_set_title (GTK_WINDOW (dialog), _("Connect to Server"));
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 2);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
vbox, FALSE, TRUE, 0);
gtk_widget_show (vbox);
--
1.7.2

View File

@ -1,37 +0,0 @@
From 45fc9cc4fae20e69e12ca14b767277d190978c71 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:21:07 +0200
Subject: [PATCH 055/249] [src] GSEAL nautilus-desktop-window.
---
src/nautilus-desktop-window.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/nautilus-desktop-window.c b/src/nautilus-desktop-window.c
index b4219d0..907713f 100644
--- a/src/nautilus-desktop-window.c
+++ b/src/nautilus-desktop-window.c
@@ -156,7 +156,7 @@ map (GtkWidget *widget)
{
/* Chain up to realize our children */
GTK_WIDGET_CLASS (nautilus_desktop_window_parent_class)->map (widget);
- gdk_window_lower (widget->window);
+ gdk_window_lower (gtk_widget_get_window (widget));
}
@@ -229,9 +229,9 @@ realize (GtkWidget *widget)
GTK_WIDGET_CLASS (nautilus_desktop_window_parent_class)->realize (widget);
/* This is the new way to set up the desktop window */
- set_wmspec_desktop_hint (widget->window);
+ set_wmspec_desktop_hint (gtk_widget_get_window (widget));
- set_desktop_window_id (window, widget->window);
+ set_desktop_window_id (window, gtk_widget_get_window (widget));
g_signal_connect (gtk_window_get_screen (GTK_WINDOW (window)), "size_changed",
G_CALLBACK (nautilus_desktop_window_screen_size_changed), window);
--
1.7.2

View File

@ -1,133 +0,0 @@
From 26f5fcc5efe27ca7f63b45d04a773caae6a0becd Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:21:14 +0200
Subject: [PATCH 056/249] [src] GSEAL nautilus-emblem-sidebar.
---
src/nautilus-emblem-sidebar.c | 39 ++++++++++++++++++++++-----------------
1 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/src/nautilus-emblem-sidebar.c b/src/nautilus-emblem-sidebar.c
index c5f3184..8da5aed 100644
--- a/src/nautilus-emblem-sidebar.c
+++ b/src/nautilus-emblem-sidebar.c
@@ -132,7 +132,7 @@ nautilus_emblem_sidebar_drag_data_get_cb (GtkWidget *widget,
g_return_if_fail (keyword != NULL);
- gtk_selection_data_set (data, data->target, 8,
+ gtk_selection_data_set (data, gtk_selection_data_get_target (data), 8,
keyword,
strlen (keyword));
}
@@ -295,7 +295,7 @@ create_rename_emblem_dialog (NautilusEmblemSidebar *emblem_sidebar,
label = gtk_label_new (_("Enter a new name for the displayed emblem:"));
gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label,
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), label,
FALSE, FALSE, 8);
@@ -313,7 +313,7 @@ create_rename_emblem_dialog (NautilusEmblemSidebar *emblem_sidebar,
gtk_widget_grab_focus (entry);
gtk_entry_set_text (GTK_ENTRY (entry), orig_name);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), hbox,
TRUE, TRUE, 8);
@@ -544,7 +544,7 @@ create_add_emblems_dialog (NautilusEmblemSidebar *emblem_sidebar,
}
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
label, FALSE, FALSE, 8);
gtk_widget_show (label);
@@ -584,7 +584,7 @@ create_add_emblems_dialog (NautilusEmblemSidebar *emblem_sidebar,
}
gtk_container_set_border_width (GTK_CONTAINER (dialog), 8);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
scroller, TRUE, TRUE, 8);
gtk_widget_show_all (scroller);
@@ -716,20 +716,25 @@ nautilus_emblem_sidebar_drag_received_cb (GtkWidget *widget,
GFile *f;
int i;
gboolean had_failure;
+ gint data_format, data_length;
+ const guchar *data_data;
had_failure = FALSE;
emblems = NULL;
+ data_format = gtk_selection_data_get_format (data);
+ data_length = gtk_selection_data_get_length (data);
+ data_data = gtk_selection_data_get_data (data);
switch (info) {
case TARGET_URI_LIST:
- if (data->format != 8 ||
- data->length == 0) {
+ if (data_format != 8 ||
+ data_length == 0) {
g_message ("URI list had wrong format (%d) or length (%d)\n",
- data->format, data->length);
+ data_format, data_length);
return;
}
- uris = g_uri_list_extract_uris (data->data);
+ uris = g_uri_list_extract_uris (data_data);
if (uris == NULL) {
break;
}
@@ -774,14 +779,14 @@ nautilus_emblem_sidebar_drag_received_cb (GtkWidget *widget,
break;
case TARGET_URI:
- if (data->format != 8 ||
- data->length == 0) {
+ if (data_format != 8 ||
+ data_length == 0) {
g_warning ("URI had wrong format (%d) or length (%d)\n",
- data->format, data->length);
+ data_format, data_length);
return;
}
- uri = g_strndup (data->data, data->length);
+ uri = g_strndup (data_data, data_length);
f = g_file_new_for_uri (uri);
pixbuf = nautilus_emblem_load_pixbuf_for_emblem (f);
@@ -816,10 +821,10 @@ nautilus_emblem_sidebar_drag_received_cb (GtkWidget *widget,
break;
case TARGET_NETSCAPE_URL:
- if (data->format != 8 ||
- data->length == 0) {
+ if (data_format != 8 ||
+ data_length == 0) {
g_message ("URI had wrong format (%d) or length (%d)\n",
- data->format, data->length);
+ data_format, data_length);
return;
}
@@ -827,7 +832,7 @@ nautilus_emblem_sidebar_drag_received_cb (GtkWidget *widget,
* of identical URIs? Regardless, this seems to work...
*/
- uris = g_uri_list_extract_uris (data->data);
+ uris = g_uri_list_extract_uris (data_data);
if (uris == NULL) {
break;
}
--
1.7.2

View File

@ -1,90 +0,0 @@
From eab92fb34f344fcadaaaf17beb7609a1f2cab0fa Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:21:23 +0200
Subject: [PATCH 057/249] [src] GSEAL nautilus-information-panel.
---
src/nautilus-information-panel.c | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/src/nautilus-information-panel.c b/src/nautilus-information-panel.c
index df8b713..bf8dfbf 100644
--- a/src/nautilus-information-panel.c
+++ b/src/nautilus-information-panel.c
@@ -456,7 +456,7 @@ receive_dropped_uri_list (NautilusInformationPanel *information_panel,
gboolean exactly_one;
GtkWindow *window;
- uris = g_uri_list_extract_uris ((gchar *) selection_data->data);
+ uris = g_uri_list_extract_uris ((gchar *) gtk_selection_data_get_data (selection_data));
exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0');
window = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (information_panel)));
@@ -538,12 +538,13 @@ receive_dropped_color (NautilusInformationPanel *information_panel,
guint16 *channels;
char color_spec[8];
- if (selection_data->length != 8 || selection_data->format != 16) {
+ if (gtk_selection_data_get_length (selection_data) != 8 ||
+ gtk_selection_data_get_format (selection_data) != 16) {
g_warning ("received invalid color data");
return;
}
- channels = (guint16 *) selection_data->data;
+ channels = (guint16 *) gtk_selection_data_get_data (selection_data);
g_snprintf (color_spec, sizeof (color_spec),
"#%02X%02X%02X", channels[0] >> 8, channels[1] >> 8, channels[2] >> 8);
@@ -576,7 +577,8 @@ receive_dropped_keyword (NautilusInformationPanel *information_panel,
int x, int y,
GtkSelectionData *selection_data)
{
- nautilus_drag_file_receive_dropped_keyword (information_panel->details->file, selection_data->data);
+ nautilus_drag_file_receive_dropped_keyword (information_panel->details->file,
+ gtk_selection_data_get_data (selection_data));
/* regenerate the display */
nautilus_information_panel_update_appearance (information_panel);
@@ -598,14 +600,17 @@ nautilus_information_panel_drag_data_received (GtkWidget *widget, GdkDragContext
switch (info) {
case TARGET_GNOME_URI_LIST:
case TARGET_URI_LIST:
- receive_dropped_uri_list (information_panel, context->action, x, y, selection_data);
+ receive_dropped_uri_list (information_panel,
+ gdk_drag_context_get_selected_action (context), x, y, selection_data);
break;
case TARGET_COLOR:
- receive_dropped_color (information_panel, context->action, x, y, selection_data);
+ receive_dropped_color (information_panel,
+ gdk_drag_context_get_selected_action (context), x, y, selection_data);
break;
case TARGET_BGIMAGE:
if (hit_test (information_panel, x, y) == BACKGROUND_PART)
- receive_dropped_uri_list (information_panel, context->action, x, y, selection_data);
+ receive_dropped_uri_list (information_panel,
+ gdk_drag_context_get_selected_action (context), x, y, selection_data);
break;
case TARGET_BACKGROUND_RESET:
background = eel_get_widget_background ( GTK_WIDGET (information_panel));
@@ -628,7 +633,7 @@ nautilus_information_panel_press_event (GtkWidget *widget, GdkEventButton *event
NautilusInformationPanel *information_panel;
GtkWidget *menu;
- if (widget->window != event->window) {
+ if (gtk_widget_get_window (widget) != event->window) {
return FALSE;
}
@@ -827,7 +832,7 @@ add_command_button (NautilusInformationPanel *information_panel, GAppInfo *appli
temp_str = g_strdup_printf (_("Open With %s"), g_app_info_get_display_name (application));
temp_button = gtk_button_new_with_label (temp_str);
- label = GTK_BIN (temp_button)->child;
+ label = gtk_bin_get_child (GTK_BIN (temp_button));
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_START);
g_free (temp_str);
gtk_box_pack_start (GTK_BOX (information_panel->details->button_box),
--
1.7.2

View File

@ -1,67 +0,0 @@
From 4bba151bdacd27a193c100cf771144b7d2501548 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:21:31 +0200
Subject: [PATCH 058/249] [src] GSEAL nautilus-location-bar.
---
src/nautilus-location-bar.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/nautilus-location-bar.c b/src/nautilus-location-bar.c
index ca57e3d..6478018 100644
--- a/src/nautilus-location-bar.c
+++ b/src/nautilus-location-bar.c
@@ -126,7 +126,7 @@ drag_data_received_callback (GtkWidget *widget,
g_assert (data != NULL);
g_assert (callback_data == NULL);
- names = g_uri_list_extract_uris (data->data);
+ names = g_uri_list_extract_uris (gtk_selection_data_get_data (data));
if (names == NULL || *names == NULL) {
g_warning ("No D&D URI's");
@@ -213,7 +213,7 @@ drag_data_get_callback (GtkWidget *widget,
case NAUTILUS_DND_URI_LIST:
case NAUTILUS_DND_TEXT_PLAIN:
gtk_selection_data_set (selection_data,
- selection_data->target,
+ gtk_selection_data_get_target (selection_data),
8, (guchar *) entry_text,
eel_strlen (entry_text));
break;
@@ -234,6 +234,7 @@ style_set_handler (GtkWidget *widget, GtkStyle *previous_style)
{
PangoLayout *layout;
int width, width2;
+ int xpad;
layout = gtk_label_get_layout (GTK_LABEL(widget));
@@ -246,7 +247,10 @@ style_set_handler (GtkWidget *widget, GtkStyle *previous_style)
pango_layout_get_pixel_size (layout, &width2, NULL);
width = MAX (width, width2);
- width += 2 * GTK_MISC (widget)->xpad;
+ gtk_misc_get_padding (GTK_MISC (widget),
+ &xpad, NULL);
+
+ width += 2 * xpad;
gtk_widget_set_size_request (widget, width, -1);
@@ -266,10 +270,10 @@ label_button_pressed_callback (GtkWidget *widget,
return FALSE;
}
- window = nautilus_location_bar_get_window (widget->parent);
+ window = nautilus_location_bar_get_window (gtk_widget_get_parent (widget));
slot = NAUTILUS_WINDOW (window)->details->active_pane->active_slot;
view = slot->content_view;
- label = GTK_BIN (widget)->child;
+ label = gtk_bin_get_child (GTK_BIN (widget));
/* only pop-up if the URI in the entry matches the displayed location */
if (view == NULL ||
strcmp (gtk_label_get_text (GTK_LABEL (label)), LOCATION_LABEL)) {
--
1.7.2

View File

@ -1,34 +0,0 @@
From a0d1ca75e37fd26135fe9c85d8d86dc75e831d86 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:21:45 +0200
Subject: [PATCH 059/249] [src] GSEAL nautilus-location-dialog.
---
src/nautilus-location-dialog.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nautilus-location-dialog.c b/src/nautilus-location-dialog.c
index ce38466..5cd20fa 100644
--- a/src/nautilus-location-dialog.c
+++ b/src/nautilus-location-dialog.c
@@ -168,7 +168,7 @@ nautilus_location_dialog_init (NautilusLocationDialog *dialog)
gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 2);
box = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
@@ -192,7 +192,7 @@ nautilus_location_dialog_init (NautilusLocationDialog *dialog)
gtk_box_pack_start (GTK_BOX (box), dialog->details->entry,
TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
box, FALSE, TRUE, 0);
gtk_dialog_add_button (GTK_DIALOG (dialog),
--
1.7.2

View File

@ -1,25 +0,0 @@
From cb1e2694bdaa8c8fbad8b2541f0efe354d81b1c0 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:21:53 +0200
Subject: [PATCH 060/249] [src] GSEAL nautilus-navigation-window-menus.
---
src/nautilus-navigation-window-menus.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c
index 6ab44a3..cee948f 100644
--- a/src/nautilus-navigation-window-menus.c
+++ b/src/nautilus-navigation-window-menus.c
@@ -398,7 +398,7 @@ connect_proxy_cb (GtkActionGroup *action_group,
if (!GTK_IS_MENU_ITEM (proxy))
return;
- label = GTK_LABEL (GTK_BIN (proxy)->child);
+ label = GTK_LABEL (gtk_bin_get_child (GTK_BIN (proxy)));
gtk_label_set_use_underline (label, FALSE);
gtk_label_set_ellipsize (label, PANGO_ELLIPSIZE_END);
--
1.7.2

View File

@ -1,28 +0,0 @@
From 2b200c5bcaee4018a9fcf82a7b1e0076f2568588 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:22:07 +0200
Subject: [PATCH 061/249] [src] GSEAL nautilus-navigation-window.
---
src/nautilus-navigation-window.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index 35ad221..59d0e9e 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -1101,9 +1101,9 @@ nautilus_navigation_window_save_geometry (NautilusNavigationWindow *window)
g_assert (NAUTILUS_IS_WINDOW (window));
- if (GTK_WIDGET(window)->window) {
+ if (gtk_widget_get_window (GTK_WIDGET (window))) {
geometry_string = eel_gtk_window_get_geometry_string (GTK_WINDOW (window));
- is_maximized = gdk_window_get_state (GTK_WIDGET (window)->window)
+ is_maximized = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (window)))
& GDK_WINDOW_STATE_MAXIMIZED;
if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_NAVIGATION_WINDOW_SAVED_GEOMETRY) &&
--
1.7.2

View File

@ -1,58 +0,0 @@
From 791e4c7cf2f0ee3c5f8bd55b1867daea6d891000 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:22:19 +0200
Subject: [PATCH 062/249] [src] GSEAL nautilus-notebook.
---
src/nautilus-notebook.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/nautilus-notebook.c b/src/nautilus-notebook.c
index 58003b9..4cf6c52 100644
--- a/src/nautilus-notebook.c
+++ b/src/nautilus-notebook.c
@@ -152,10 +152,11 @@ find_tab_num_at_pos (NautilusNotebook *notebook, gint abs_x, gint abs_y)
int page_num = 0;
GtkNotebook *nb = GTK_NOTEBOOK (notebook);
GtkWidget *page;
+ GtkAllocation allocation;
tab_pos = gtk_notebook_get_tab_pos (GTK_NOTEBOOK (notebook));
- if (GTK_NOTEBOOK (notebook)->first_tab == NULL)
+ if (gtk_notebook_get_n_pages (nb) == 0)
{
return AFTER_ALL_TABS;
}
@@ -182,11 +183,12 @@ find_tab_num_at_pos (NautilusNotebook *notebook, gint abs_x, gint abs_y)
continue;
}
- gdk_window_get_origin (GDK_WINDOW (tab->window),
+ gdk_window_get_origin (gtk_widget_get_window (tab),
&x_root, &y_root);
+ gtk_widget_get_allocation (tab, &allocation);
- max_x = x_root + tab->allocation.x + tab->allocation.width;
- max_y = y_root + tab->allocation.y + tab->allocation.height;
+ max_x = x_root + allocation.x + allocation.width;
+ max_y = y_root + allocation.y + allocation.height;
if (((tab_pos == GTK_POS_TOP)
|| (tab_pos == GTK_POS_BOTTOM))
@@ -316,10 +318,10 @@ nautilus_notebook_sync_tab_label (NautilusNotebook *notebook,
* so it covers all of the tab label.
*/
location_name = g_file_get_parse_name (slot->location);
- gtk_widget_set_tooltip_text (label->parent, location_name);
+ gtk_widget_set_tooltip_text (gtk_widget_get_parent (label), location_name);
g_free (location_name);
} else {
- gtk_widget_set_tooltip_text (label->parent, NULL);
+ gtk_widget_set_tooltip_text (gtk_widget_get_parent (label), NULL);
}
}
--
1.7.2

View File

@ -1,237 +0,0 @@
From 61006bd18b748c50bde01efe4abcb038a710ee11 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:22:29 +0200
Subject: [PATCH 063/249] [src] GSEAL nautilus-pathbar.
---
src/nautilus-pathbar.c | 75 ++++++++++++++++++++++++++++++------------------
1 files changed, 47 insertions(+), 28 deletions(-)
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index df39db0..1cb1733 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -287,8 +287,8 @@ static void
nautilus_path_bar_init (NautilusPathBar *path_bar)
{
char *p;
-
- GTK_WIDGET_SET_FLAGS (path_bar, GTK_NO_WINDOW);
+
+ gtk_widget_set_has_window (GTK_WIDGET (path_bar), FALSE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (path_bar), FALSE);
path_bar->spacing = 3;
@@ -466,6 +466,7 @@ nautilus_path_bar_size_request (GtkWidget *widget,
NautilusPathBar *path_bar;
GtkRequisition child_requisition;
GList *list;
+ guint border_width;
path_bar = NAUTILUS_PATH_BAR (widget);
@@ -491,10 +492,12 @@ nautilus_path_bar_size_request (GtkWidget *widget,
gtk_widget_size_request (path_bar->up_slider_button, &child_requisition);
gtk_widget_size_request (path_bar->down_slider_button, &child_requisition);
- requisition->width += GTK_CONTAINER (widget)->border_width * 2;
- requisition->height += GTK_CONTAINER (widget)->border_width * 2;
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
+ requisition->width += border_width * 2;
+ requisition->height += border_width * 2;
- widget->requisition = *requisition;
+ gtk_widget_set_size_request (widget, requisition->width,
+ requisition->height);
}
static void
@@ -543,21 +546,22 @@ nautilus_path_bar_size_allocate (GtkWidget *widget,
gboolean need_sliders;
gint up_slider_offset;
gint down_slider_offset;
+ GtkRequisition requisition;
+ GtkAllocation widget_allocation;
need_sliders = FALSE;
up_slider_offset = 0;
down_slider_offset = 0;
path_bar = NAUTILUS_PATH_BAR (widget);
- widget->allocation = *allocation;
-
+ gtk_widget_set_allocation (widget, allocation);
/* No path is set so we don't have to allocate anything. */
if (path_bar->button_list == NULL) {
return;
}
direction = gtk_widget_get_direction (widget);
- border_width = (gint) GTK_CONTAINER (path_bar)->border_width;
+ border_width = (gint) gtk_container_get_border_width (GTK_CONTAINER (path_bar));
allocation_width = allocation->width - 2 * border_width;
/* First, we check to see if we need the scrollbars. */
@@ -567,11 +571,13 @@ nautilus_path_bar_size_allocate (GtkWidget *widget,
width = 0;
}
- width += BUTTON_DATA (path_bar->button_list->data)->button->requisition.width;
+ gtk_widget_get_requisition (BUTTON_DATA (path_bar->button_list->data)->button, &requisition);
+ width += requisition.width;
for (list = path_bar->button_list->next; list; list = list->next) {
child = BUTTON_DATA (list->data)->button;
- width += child->requisition.width + path_bar->spacing;
+ gtk_widget_get_requisition (child, &requisition);
+ width += requisition.width + path_bar->spacing;
if (list == path_bar->fake_root) {
break;
@@ -602,18 +608,20 @@ nautilus_path_bar_size_allocate (GtkWidget *widget,
* button, then count backwards.
*/
/* Count down the path chain towards the end. */
- width = BUTTON_DATA (first_button->data)->button->requisition.width;
+ gtk_widget_get_requisition (BUTTON_DATA (first_button->data)->button, &requisition);
+ width = requisition.width;
list = first_button->prev;
while (list && !reached_end) {
child = BUTTON_DATA (list->data)->button;
+ gtk_widget_get_requisition (child, &requisition);
- if (width + child->requisition.width + path_bar->spacing + slider_space > allocation_width) {
+ if (width + requisition.width + path_bar->spacing + slider_space > allocation_width) {
reached_end = TRUE;
} else {
if (list == path_bar->fake_root) {
break;
} else {
- width += child->requisition.width + path_bar->spacing;
+ width += requisition.width + path_bar->spacing;
}
}
@@ -624,10 +632,12 @@ nautilus_path_bar_size_allocate (GtkWidget *widget,
while (first_button->next && ! reached_end) {
child = BUTTON_DATA (first_button->next->data)->button;
- if (width + child->requisition.width + path_bar->spacing + slider_space > allocation_width) {
+ gtk_widget_get_requisition (child, &requisition);
+
+ if (width + requisition.width + path_bar->spacing + slider_space > allocation_width) {
reached_end = TRUE;
} else {
- width += child->requisition.width + path_bar->spacing;
+ width += requisition.width + path_bar->spacing;
if (first_button == path_bar->fake_root) {
break;
}
@@ -656,19 +666,22 @@ nautilus_path_bar_size_allocate (GtkWidget *widget,
for (list = first_button; list; list = list->prev) {
child = BUTTON_DATA (list->data)->button;
+ gtk_widget_get_requisition (child, &requisition);
+
+ gtk_widget_get_allocation (widget, &widget_allocation);
- child_allocation.width = child->requisition.width;
+ child_allocation.width = requisition.width;
if (direction == GTK_TEXT_DIR_RTL) {
child_allocation.x -= child_allocation.width;
}
/* Check to see if we've don't have any more space to allocate buttons */
if (need_sliders && direction == GTK_TEXT_DIR_RTL) {
- if (child_allocation.x - path_bar->spacing - path_bar->slider_width < widget->allocation.x + border_width) {
+ if (child_allocation.x - path_bar->spacing - path_bar->slider_width < widget_allocation.x + border_width) {
break;
}
} else {
if (need_sliders && direction == GTK_TEXT_DIR_LTR) {
- if (child_allocation.x + child_allocation.width + path_bar->spacing + path_bar->slider_width > widget->allocation.x + border_width + allocation_width) {
+ if (child_allocation.x + child_allocation.width + path_bar->spacing + path_bar->slider_width > widget_allocation.x + border_width + allocation_width) {
break;
}
}
@@ -679,10 +692,10 @@ nautilus_path_bar_size_allocate (GtkWidget *widget,
if (direction == GTK_TEXT_DIR_RTL) {
child_allocation.x -= path_bar->spacing;
- down_slider_offset = child_allocation.x - widget->allocation.x - path_bar->slider_width;
+ down_slider_offset = child_allocation.x - widget_allocation.x - path_bar->slider_width;
down_slider_offset = border_width;
} else {
- down_slider_offset = child_allocation.x - widget->allocation.x;
+ down_slider_offset = child_allocation.x - widget_allocation.x;
down_slider_offset = allocation->width - border_width - path_bar->slider_width;
child_allocation.x += child_allocation.width + path_bar->spacing;
}
@@ -859,6 +872,7 @@ nautilus_path_bar_scroll_down (NautilusPathBar *path_bar)
gint space_needed;
gint border_width;
GtkTextDirection direction;
+ GtkAllocation allocation, button_allocation, slider_allocation;
down_button = NULL;
up_button = NULL;
@@ -870,7 +884,7 @@ nautilus_path_bar_scroll_down (NautilusPathBar *path_bar)
gtk_widget_queue_resize (GTK_WIDGET (path_bar));
- border_width = GTK_CONTAINER (path_bar)->border_width;
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (path_bar));
direction = gtk_widget_get_direction (GTK_WIDGET (path_bar));
/* We find the button at the 'down' end that we have to make */
@@ -894,20 +908,25 @@ nautilus_path_bar_scroll_down (NautilusPathBar *path_bar)
}
}
- space_needed = BUTTON_DATA (down_button->data)->button->allocation.width + path_bar->spacing;
+ gtk_widget_get_allocation (BUTTON_DATA (down_button->data)->button, &button_allocation);
+ gtk_widget_get_allocation (GTK_WIDGET (path_bar), &allocation);
+ gtk_widget_get_allocation (path_bar->down_slider_button, &slider_allocation);
+
+ space_needed = button_allocation.width + path_bar->spacing;
if (direction == GTK_TEXT_DIR_RTL) {
- space_available = path_bar->down_slider_button->allocation.x - GTK_WIDGET (path_bar)->allocation.x;
+ space_available = slider_allocation.x - allocation.x;
} else {
- space_available = (GTK_WIDGET (path_bar)->allocation.x + GTK_WIDGET (path_bar)->allocation.width - border_width) -
- (path_bar->down_slider_button->allocation.x + path_bar->down_slider_button->allocation.width);
+ space_available = (allocation.x + allocation.width - border_width) -
+ (slider_allocation.x + slider_allocation.width);
}
/* We have space_available extra space that's not being used. We
* need space_needed space to make the button fit. So we walk down
* from the end, removing buttons until we get all the space we
* need. */
+ gtk_widget_get_allocation (BUTTON_DATA (up_button->data)->button, &button_allocation);
while (space_available < space_needed) {
- space_available += BUTTON_DATA (up_button->data)->button->allocation.width + path_bar->spacing;
+ space_available += button_allocation.width + path_bar->spacing;
up_button = up_button->prev;
path_bar->first_scrolled_button = up_button;
}
@@ -1126,7 +1145,7 @@ button_clicked_cb (GtkWidget *button,
return;
}
- path_bar = NAUTILUS_PATH_BAR (button->parent);
+ path_bar = NAUTILUS_PATH_BAR (gtk_widget_get_parent (button));
button_list = g_list_find (path_bar->button_list, button_data);
g_assert (button_list != NULL);
@@ -1447,7 +1466,7 @@ button_drag_data_get_cb (GtkWidget *widget,
if (info == NAUTILUS_ICON_DND_GNOME_ICON_LIST) {
tmp = g_strdup_printf ("%s\r\n", uri_list[0]);
- gtk_selection_data_set (selection_data, selection_data->target,
+ gtk_selection_data_set (selection_data, gtk_selection_data_get_target (selection_data),
8, tmp, strlen (tmp));
g_free (tmp);
} else if (info == NAUTILUS_ICON_DND_URI_LIST) {
--
1.7.2

View File

@ -1,64 +0,0 @@
From 06a2e40ccc45d82692997ee29e56314a45ea373f Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:22:36 +0200
Subject: [PATCH 064/249] [src] GSEAL nautilus-places-sidebar.
---
src/nautilus-places-sidebar.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index c70575e..49ff2ef 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -1171,9 +1171,9 @@ drag_data_received_callback (GtkWidget *widget,
tree_view = GTK_TREE_VIEW (widget);
if (!sidebar->drag_data_received) {
- if (selection_data->target != GDK_NONE &&
+ if (gtk_selection_data_get_target (selection_data) != GDK_NONE &&
info == TEXT_URI_LIST) {
- sidebar->drag_list = build_selection_list (selection_data->data);
+ sidebar->drag_list = build_selection_list (gtk_selection_data_get_data (selection_data));
} else {
sidebar->drag_list = NULL;
}
@@ -1228,14 +1228,18 @@ drag_data_received_callback (GtkWidget *widget,
break;
}
} else {
+ GdkDragAction real_action;
+
/* file transfer requested */
- if (context->action == GDK_ACTION_ASK) {
- context->action =
+ real_action = gdk_drag_context_get_selected_action (context);
+
+ if (real_action == GDK_ACTION_ASK) {
+ real_action =
nautilus_drag_drop_action_ask (GTK_WIDGET (tree_view),
- context->actions);
+ gdk_drag_context_get_actions (context));
}
- if (context->action > 0) {
+ if (real_action > 0) {
model = gtk_tree_view_get_model (tree_view);
gtk_tree_model_get_iter (model, &iter, tree_path);
@@ -1245,10 +1249,10 @@ drag_data_received_callback (GtkWidget *widget,
switch (info) {
case TEXT_URI_LIST:
- selection_list = build_selection_list (selection_data->data);
+ selection_list = build_selection_list (gtk_selection_data_get_data (selection_data));
uris = uri_list_from_selection (selection_list);
nautilus_file_operations_copy_move (uris, NULL, drop_uri,
- context->action, GTK_WIDGET (tree_view),
+ real_action, GTK_WIDGET (tree_view),
NULL, NULL);
nautilus_drag_destroy_selection_list (selection_list);
g_list_free (uris);
--
1.7.2

View File

@ -1,138 +0,0 @@
From 075446f3751566ec1187d6cdb3751456c9c50867 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:22:43 +0200
Subject: [PATCH 065/249] [src] GSEAL nautilus-property-browser.
---
src/nautilus-property-browser.c | 38 ++++++++++++++++++++++++--------------
1 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/src/nautilus-property-browser.c b/src/nautilus-property-browser.c
index d655add..26b1368 100644
--- a/src/nautilus-property-browser.c
+++ b/src/nautilus-property-browser.c
@@ -343,7 +343,7 @@ nautilus_property_browser_init (GtkObject *object)
/* create the "done" button */
temp_button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
- GTK_WIDGET_SET_FLAGS (temp_button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (temp_button, TRUE);
gtk_widget_show (temp_button);
gtk_box_pack_end (GTK_BOX (property_browser->details->bottom_box), temp_button, FALSE, FALSE, 0);
@@ -585,10 +585,13 @@ nautilus_property_browser_drag_data_get (GtkWidget *widget,
char *image_file_name, *image_file_uri;
gboolean is_reset;
NautilusPropertyBrowser *property_browser = NAUTILUS_PROPERTY_BROWSER(widget);
+ GdkAtom target;
g_return_if_fail (widget != NULL);
g_return_if_fail (context != NULL);
+ target = gtk_selection_data_get_target (selection_data);
+
switch (info) {
case PROPERTY_TYPE:
/* formulate the drag data based on the drag type. Eventually, we will
@@ -598,9 +601,9 @@ nautilus_property_browser_drag_data_get (GtkWidget *widget,
is_reset = FALSE;
if (strcmp (property_browser->details->drag_type,
"property/keyword") == 0) {
- char *keyword_str = eel_filename_strip_extension(property_browser->details->dragged_file);
- gtk_selection_data_set(selection_data, selection_data->target, 8, keyword_str, strlen(keyword_str));
- g_free(keyword_str);
+ char *keyword_str = eel_filename_strip_extension (property_browser->details->dragged_file);
+ gtk_selection_data_set (selection_data, target, 8, keyword_str, strlen (keyword_str));
+ g_free (keyword_str);
return;
}
else if (strcmp (property_browser->details->drag_type,
@@ -618,7 +621,7 @@ nautilus_property_browser_drag_data_get (GtkWidget *widget,
colorArray[3] = 0xffff;
gtk_selection_data_set(selection_data,
- selection_data->target, 16, (const char *) &colorArray[0], 8);
+ target, 16, (const char *) &colorArray[0], 8);
return;
} else {
is_reset = TRUE;
@@ -645,7 +648,7 @@ nautilus_property_browser_drag_data_get (GtkWidget *widget,
}
image_file_uri = g_filename_to_uri (image_file_name, NULL, NULL);
- gtk_selection_data_set (selection_data, selection_data->target, 8, image_file_uri, strlen (image_file_uri));
+ gtk_selection_data_set (selection_data, target, 8, image_file_uri, strlen (image_file_uri));
g_free (image_file_name);
g_free (image_file_uri);
@@ -1066,10 +1069,10 @@ nautilus_emblem_dialog_new (NautilusPropertyBrowser *property_browser)
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 2);
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
- 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_dialog_set_default_response (GTK_DIALOG(dialog), GTK_RESPONSE_OK);
/* make the keyword label and field */
@@ -1133,7 +1136,7 @@ nautilus_color_selection_dialog_new (NautilusPropertyBrowser *property_browser)
/* install the table in the dialog */
gtk_widget_show (table);
- 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_dialog_set_default_response (GTK_DIALOG(dialog), GTK_RESPONSE_OK);
/* make the name label and field */
@@ -1368,7 +1371,9 @@ show_color_selection_window (GtkWidget *widget, gpointer *data)
GdkColor color;
NautilusPropertyBrowser *property_browser = NAUTILUS_PROPERTY_BROWSER(data);
- gtk_color_selection_get_current_color (GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (property_browser->details->colors_dialog)->colorsel), &color);
+ gtk_color_selection_get_current_color (GTK_COLOR_SELECTION
+ (gtk_color_selection_dialog_get_color_selection (GTK_COLOR_SELECTION_DIALOG (property_browser->details->colors_dialog))),
+ &color);
gtk_widget_destroy (property_browser->details->colors_dialog);
/* allocate a new color selection dialog */
@@ -1397,17 +1402,22 @@ add_new_color (NautilusPropertyBrowser *property_browser)
gtk_window_present (GTK_WINDOW (property_browser->details->colors_dialog));
} else {
GtkColorSelectionDialog *color_dialog;
+ GtkWidget *ok_button, *cancel_button, *help_button;
property_browser->details->colors_dialog = gtk_color_selection_dialog_new (_("Select a Color to Add"));
color_dialog = GTK_COLOR_SELECTION_DIALOG (property_browser->details->colors_dialog);
eel_add_weak_pointer (&property_browser->details->colors_dialog);
- g_signal_connect_object (color_dialog->ok_button, "clicked",
+ g_object_get (color_dialog, "ok-button", &ok_button,
+ "cancel-button", &cancel_button,
+ "help-button", &help_button, NULL);
+
+ g_signal_connect_object (ok_button, "clicked",
G_CALLBACK (show_color_selection_window), property_browser, 0);
- g_signal_connect_object (color_dialog->cancel_button, "clicked",
+ g_signal_connect_object (cancel_button, "clicked",
G_CALLBACK (gtk_widget_destroy), color_dialog, G_CONNECT_SWAPPED);
- gtk_widget_hide(color_dialog->help_button);
+ gtk_widget_hide (help_button);
gtk_window_set_position (GTK_WINDOW (color_dialog), GTK_WIN_POS_MOUSE);
gtk_widget_show (GTK_WIDGET(color_dialog));
@@ -1986,7 +1996,7 @@ property_browser_category_button_new (const char *display_name,
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (button), FALSE);
/* We also want all of the buttons to be the same height */
- eel_labeled_image_set_fixed_image_height (EEL_LABELED_IMAGE (GTK_BIN (button)->child), STANDARD_BUTTON_IMAGE_HEIGHT);
+ eel_labeled_image_set_fixed_image_height (EEL_LABELED_IMAGE (gtk_bin_get_child (GTK_BIN (button))), STANDARD_BUTTON_IMAGE_HEIGHT);
g_free (file_name);
--
1.7.2

View File

@ -1,25 +0,0 @@
From 2aa9bed8a98cbf68fec53b88e7d05f86f158bd07 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:22:57 +0200
Subject: [PATCH 066/249] [src] GSEAL nautilus-query-editor.
---
src/nautilus-query-editor.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index 3ab8697..52f583f 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -560,7 +560,7 @@ type_combo_changed (GtkComboBox *combo_box, NautilusQueryEditorRow *row)
GTK_SHADOW_IN);
gtk_widget_show (scrolled);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), scrolled, TRUE, TRUE, 6);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), scrolled, TRUE, TRUE, 6);
treeview = gtk_tree_view_new ();
gtk_tree_view_set_model (GTK_TREE_VIEW (treeview),
--
1.7.2

View File

@ -1,59 +0,0 @@
From 24b94447cb798ee03c9d21973f2d650c4cec2ad9 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:23:16 +0200
Subject: [PATCH 067/249] [src] GSEAL nautilus-side-pane.
---
src/nautilus-side-pane.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/nautilus-side-pane.c b/src/nautilus-side-pane.c
index 85601ce..23dbb23 100644
--- a/src/nautilus-side-pane.c
+++ b/src/nautilus-side-pane.c
@@ -128,7 +128,7 @@ nautilus_side_pane_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
int width;
- GtkAllocation child_allocation;
+ GtkAllocation child_allocation, frame_allocation;
NautilusSidePane *pane;
GtkWidget *frame;
GtkWidget *hbox;
@@ -143,8 +143,9 @@ nautilus_side_pane_size_allocate (GtkWidget *widget,
gtk_widget_get_child_requisition (hbox, &child_requisition);
width = child_requisition.width;
- child_allocation = frame->allocation;
- child_allocation.width = MAX (width, frame->allocation.width);
+ gtk_widget_get_allocation (frame, &frame_allocation);
+ child_allocation = frame_allocation;
+ child_allocation.width = MAX (width, frame_allocation.width);
gtk_widget_size_allocate (frame, &child_allocation);
}
@@ -208,16 +209,18 @@ menu_position_under (GtkMenu *menu,
gpointer user_data)
{
GtkWidget *widget;
+ GtkAllocation allocation;
g_return_if_fail (GTK_IS_BUTTON (user_data));
g_return_if_fail (!gtk_widget_get_has_window (GTK_WIDGET (user_data)));
widget = GTK_WIDGET (user_data);
- gdk_window_get_origin (widget->window, x, y);
+ gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
+ gtk_widget_get_allocation (widget, &allocation);
- *x += widget->allocation.x;
- *y += widget->allocation.y + widget->allocation.height;
+ *x += allocation.x;
+ *y += allocation.y + allocation.height;
*push_in = FALSE;
}
--
1.7.2

View File

@ -1,88 +0,0 @@
From 11736c1fcbe581eab9c4a86619cfff0e71bbef38 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:23:25 +0200
Subject: [PATCH 068/249] [src] GSEAL nautilus-sidebar-title.
---
src/nautilus-sidebar-title.c | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/src/nautilus-sidebar-title.c b/src/nautilus-sidebar-title.c
index b230d5a..309c16b 100644
--- a/src/nautilus-sidebar-title.c
+++ b/src/nautilus-sidebar-title.c
@@ -275,8 +275,10 @@ static guint
get_best_icon_size (NautilusSidebarTitle *sidebar_title)
{
gint width;
+ GtkAllocation allocation;
- width = GTK_WIDGET (sidebar_title)->allocation.width - TITLE_PADDING;
+ gtk_widget_get_allocation (GTK_WIDGET (sidebar_title), &allocation);
+ width = allocation.width - TITLE_PADDING;
if (width < 0) {
/* use smallest available icon size */
@@ -343,13 +345,15 @@ update_title_font (NautilusSidebarTitle *sidebar_title)
int largest_fitting_font_size;
int max_style_font_size;
GtkStyle *style;
+ GtkAllocation allocation;
/* Make sure theres work to do */
if (eel_strlen (sidebar_title->details->title_text) < 1) {
return;
}
- available_width = GTK_WIDGET (sidebar_title)->allocation.width - TITLE_PADDING;
+ gtk_widget_get_allocation (GTK_WIDGET (sidebar_title), &allocation);
+ available_width = allocation.width - TITLE_PADDING;
/* No work to do */
if (available_width <= 0) {
@@ -430,6 +434,7 @@ update_more_info (NautilusSidebarTitle *sidebar_title)
char *date_modified_str;
int sidebar_width;
PangoLayout *layout;
+ GtkAllocation allocation;
file = sidebar_title->details->file;
@@ -454,8 +459,9 @@ update_more_info (NautilusSidebarTitle *sidebar_title)
append_and_eat (info_string, NULL,
nautilus_file_get_string_attribute (file, "size"));
}
-
- sidebar_width = GTK_WIDGET (sidebar_title)->allocation.width - 2 * SIDEBAR_INFO_MARGIN;
+
+ gtk_widget_get_allocation (GTK_WIDGET (sidebar_title), &allocation);
+ sidebar_width = allocation.width - 2 * SIDEBAR_INFO_MARGIN;
if (sidebar_width > MINIMUM_INFO_WIDTH) {
layout = pango_layout_copy (gtk_label_get_layout (GTK_LABEL (sidebar_title->details->more_info_label)));
pango_layout_set_width (layout, -1);
@@ -621,14 +627,20 @@ nautilus_sidebar_title_size_allocate (GtkWidget *widget,
NautilusSidebarTitle *sidebar_title;
guint16 old_width;
guint best_icon_size;
+ GtkAllocation old_allocation, new_allocation;
+
+ g_print ("size allocate\n");
sidebar_title = NAUTILUS_SIDEBAR_TITLE (widget);
- old_width = widget->allocation.width;
+ gtk_widget_get_allocation (widget, &old_allocation);
+ old_width = old_allocation.width;
EEL_CALL_PARENT (GTK_WIDGET_CLASS, size_allocate, (widget, allocation));
- if (old_width != widget->allocation.width) {
+ gtk_widget_get_allocation (widget, &new_allocation);
+
+ if (old_width != new_allocation.width) {
best_icon_size = get_best_icon_size (sidebar_title);
if (best_icon_size != sidebar_title->details->best_icon_size) {
sidebar_title->details->best_icon_size = best_icon_size;
--
1.7.2

View File

@ -1,48 +0,0 @@
From 2675ebc0873e71af0a5f8cc3463313525bfeebac Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:23:31 +0200
Subject: [PATCH 069/249] [src] GSEAL nautilus-spatial-window.
---
src/nautilus-spatial-window.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c
index 8d9d2f2..7faf67d 100644
--- a/src/nautilus-spatial-window.c
+++ b/src/nautilus-spatial-window.c
@@ -270,8 +270,8 @@ nautilus_spatial_window_save_geometry (NautilusWindowSlot *slot)
return;
}
- if (GTK_WIDGET(window)->window &&
- !(gdk_window_get_state (GTK_WIDGET(window)->window) & GDK_WINDOW_STATE_MAXIMIZED)) {
+ if (gtk_widget_get_window (GTK_WIDGET (window)) &&
+ !(gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET(window))) & GDK_WINDOW_STATE_MAXIMIZED)) {
geometry_string = eel_gtk_window_get_geometry_string (GTK_WINDOW (window));
nautilus_file_set_metadata (viewed_file,
@@ -635,15 +635,17 @@ menu_popup_pos (GtkMenu *menu,
{
GtkWidget *widget;
GtkRequisition menu_requisition, button_requisition;
+ GtkAllocation allocation;
widget = user_data;
gtk_widget_size_request (GTK_WIDGET (menu), &menu_requisition);
gtk_widget_size_request (widget, &button_requisition);
+ gtk_widget_get_allocation (widget, &allocation);
- gdk_window_get_origin (widget->window, x, y);
- *x += widget->allocation.x;
- *y += widget->allocation.y;
+ gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
+ *x += allocation.x;
+ *y += allocation.y;
*y -= menu_requisition.height - button_requisition.height;
--
1.7.2

View File

@ -1,25 +0,0 @@
From b5407396039035e6f4e78c2d9d03891d76dd93bd Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:23:38 +0200
Subject: [PATCH 070/249] [src] GSEAL nautilus-window-bookmarks.
---
src/nautilus-window-bookmarks.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/nautilus-window-bookmarks.c b/src/nautilus-window-bookmarks.c
index 0d25e35..84d0fa0 100644
--- a/src/nautilus-window-bookmarks.c
+++ b/src/nautilus-window-bookmarks.c
@@ -195,7 +195,7 @@ connect_proxy_cb (GtkActionGroup *action_group,
if (!GTK_IS_MENU_ITEM (proxy))
return;
- label = GTK_LABEL (GTK_BIN (proxy)->child);
+ label = GTK_LABEL (gtk_bin_get_child (GTK_BIN (proxy)));
gtk_label_set_use_underline (label, FALSE);
gtk_label_set_ellipsize (label, PANGO_ELLIPSIZE_END);
--
1.7.2

View File

@ -1,25 +0,0 @@
From 44af78c3c205f88801a8bdfa3cb0a02f7cd87d3f Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:23:47 +0200
Subject: [PATCH 071/249] [src] GSEAL nautilus-window-manage-views.
---
src/nautilus-window-manage-views.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index f982c39..3ec3157 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -1399,7 +1399,7 @@ location_has_really_changed (NautilusWindowSlot *slot)
if (slot->new_content_view != NULL) {
widget = nautilus_view_get_widget (slot->new_content_view);
/* Switch to the new content view. */
- if (widget->parent == NULL) {
+ if (gtk_widget_get_parent (widget) == NULL) {
if (slot->content_view != NULL) {
nautilus_window_slot_disconnect_content_view (slot, slot->content_view);
}
--
1.7.2

View File

@ -1,29 +0,0 @@
From bbeb350ef219f6e94d9eba6e78d0ebbdb2201a08 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:23:58 +0200
Subject: [PATCH 072/249] [src] GSEAL nautilus-window.
---
src/nautilus-window.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 939ee11..588464e 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -333,10 +333,10 @@ update_cursor (NautilusWindow *window)
if (slot->allow_stop) {
cursor = gdk_cursor_new (GDK_WATCH);
- gdk_window_set_cursor (GTK_WIDGET (window)->window, cursor);
+ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), cursor);
gdk_cursor_unref (cursor);
} else {
- gdk_window_set_cursor (GTK_WIDGET (window)->window, NULL);
+ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), NULL);
}
}
--
1.7.2

View File

@ -1,112 +0,0 @@
From 78287a76d6be97428d166f781385b86e18c9b6b8 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:24:06 +0200
Subject: [PATCH 073/249] [src] GSEAL nautilus-zoom-control.
---
src/nautilus-zoom-control.c | 30 ++++++++++++++++--------------
1 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/src/nautilus-zoom-control.c b/src/nautilus-zoom-control.c
index c055006..2907cd7 100644
--- a/src/nautilus-zoom-control.c
+++ b/src/nautilus-zoom-control.c
@@ -141,6 +141,7 @@ menu_position_under_widget (GtkMenu *menu,
GdkRectangle monitor;
int monitor_num;
GdkScreen *screen;
+ GtkAllocation allocation;
widget = GTK_WIDGET (user_data);
g_assert (GTK_IS_WIDGET (widget));
@@ -150,32 +151,33 @@ menu_position_under_widget (GtkMenu *menu,
gtk_widget_size_request (widget, &req);
gtk_widget_size_request (GTK_WIDGET (menu), &menu_req);
+ gtk_widget_get_allocation (widget, &allocation);
screen = gtk_widget_get_screen (GTK_WIDGET (menu));
- monitor_num = gdk_screen_get_monitor_at_window (screen, widget->window);
+ monitor_num = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (widget));
if (monitor_num < 0) {
monitor_num = 0;
}
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
- gdk_window_get_origin (widget->window, x, y);
+ gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
if (!gtk_widget_get_has_window (widget)) {
- *x += widget->allocation.x;
- *y += widget->allocation.y;
+ *x += allocation.x;
+ *y += allocation.y;
}
if (gtk_widget_get_direction (container) == GTK_TEXT_DIR_LTR) {
- *x += widget->allocation.width - req.width;
+ *x += allocation.width - req.width;
} else {
*x += req.width - menu_req.width;
}
- if ((*y + widget->allocation.height + menu_req.height) <= monitor.y + monitor.height) {
- *y += widget->allocation.height;
+ if ((*y + allocation.height + menu_req.height) <= monitor.y + monitor.height) {
+ *y += allocation.height;
} else if ((*y - menu_req.height) >= monitor.y) {
*y -= menu_req.height;
- } else if (monitor.y + monitor.height - (*y + widget->allocation.height) > *y) {
- *y += widget->allocation.height;
+ } else if (monitor.y + monitor.height - (*y + allocation.height) > *y) {
+ *y += allocation.height;
} else {
*y -= menu_req.height;
}
@@ -727,7 +729,7 @@ nautilus_zoom_control_accessible_do_action (AtkAction *accessible, int i)
g_assert (i >= 0 && i < NUM_ACTIONS);
- widget = GTK_ACCESSIBLE (accessible)->widget;
+ widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
if (!widget) {
return FALSE;
}
@@ -781,7 +783,7 @@ nautilus_zoom_control_accessible_get_current_value (AtkValue *accessible,
g_value_init (value, G_TYPE_INT);
- control = NAUTILUS_ZOOM_CONTROL (GTK_ACCESSIBLE (accessible)->widget);
+ control = NAUTILUS_ZOOM_CONTROL (gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)));
if (!control) {
g_value_set_int (value, NAUTILUS_ZOOM_LEVEL_STANDARD);
return;
@@ -798,7 +800,7 @@ nautilus_zoom_control_accessible_get_maximum_value (AtkValue *accessible,
g_value_init (value, G_TYPE_INT);
- control = NAUTILUS_ZOOM_CONTROL (GTK_ACCESSIBLE (accessible)->widget);
+ control = NAUTILUS_ZOOM_CONTROL (gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)));
if (!control) {
g_value_set_int (value, NAUTILUS_ZOOM_LEVEL_STANDARD);
return;
@@ -815,7 +817,7 @@ nautilus_zoom_control_accessible_get_minimum_value (AtkValue *accessible,
g_value_init (value, G_TYPE_INT);
- control = NAUTILUS_ZOOM_CONTROL (GTK_ACCESSIBLE (accessible)->widget);
+ control = NAUTILUS_ZOOM_CONTROL (gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)));
if (!control) {
g_value_set_int (value, NAUTILUS_ZOOM_LEVEL_STANDARD);
return;
@@ -861,7 +863,7 @@ nautilus_zoom_control_accessible_set_current_value (AtkValue *accessible,
NautilusZoomControl *control;
NautilusZoomLevel zoom;
- control = NAUTILUS_ZOOM_CONTROL (GTK_ACCESSIBLE (accessible)->widget);
+ control = NAUTILUS_ZOOM_CONTROL (gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible)));
if (!control) {
return FALSE;
}
--
1.7.2

View File

@ -1,35 +0,0 @@
From d9f80b3f407b65f559c0ca47cddac41175ac353d Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Fri, 11 Jun 2010 13:24:20 +0200
Subject: [PATCH 074/249] [test] GSEAL test-eel-image-table.
---
test/test-eel-image-table.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/test/test-eel-image-table.c b/test/test-eel-image-table.c
index 267ac15..271642b 100644
--- a/test/test-eel-image-table.c
+++ b/test/test-eel-image-table.c
@@ -179,6 +179,7 @@ image_table_size_allocate (GtkWidget *image_table,
gpointer callback_data)
{
static int recursion_count = 0;
+ GtkAllocation w_allocation;
g_return_if_fail (EEL_IS_IMAGE_TABLE (image_table));
g_return_if_fail (allocation != NULL);
@@ -190,8 +191,9 @@ image_table_size_allocate (GtkWidget *image_table,
/*gtk_widget_queue_resize (GTK_WIDGET (callback_data));*/
+ gtk_widget_get_allocation (GTK_WIDGET (image_table), &w_allocation);
if (0) gtk_widget_size_allocate (GTK_WIDGET (image_table),
- &GTK_WIDGET (image_table)->allocation);
+ &w_allocation);
g_print ("%s(%d)\n", G_STRFUNC, recursion_count);
--
1.7.2

View File

@ -1,92 +0,0 @@
From 9bdd0ef925a1e660031917746f8914a38e352576 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Tue, 30 Mar 2010 16:33:51 +0000
Subject: Do not show Unmount when showing Eject/Safe removal
Having three menu entries (unmount/eject/safe removal) in a volume/drive menu
entry is too confusing. Unmount only really makes sense for internal drives,
for external ones it is pretty much a "geek" option. Geeks can use palimpsest
or "unmount /media/foo" from the CLI if they really want to, for everyone else
it is just an unintuitive and hard to to explain menu entry.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=598690
Bug-Ubuntu: https://launchpad.net/bugs/453072
(cherry picked from commit 0a5cc4c4e5b01eb8aa38dfae926502ce920efc94)
---
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index d8b9050..361b994 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -7782,10 +7782,6 @@ file_should_show_foreach (NautilusFile *file,
*show_eject = TRUE;
}
- if (nautilus_file_can_unmount (file)) {
- *show_unmount = TRUE;
- }
-
if (nautilus_file_can_mount (file)) {
*show_mount = TRUE;
@@ -7805,6 +7801,12 @@ file_should_show_foreach (NautilusFile *file,
*show_stop = TRUE;
}
+ /* Dot not show both Unmount and Eject/Safe Removal; too confusing to
+ * have too many menu entries */
+ if (nautilus_file_can_unmount (file) && !*show_eject && !*show_stop) {
+ *show_unmount = TRUE;
+ }
+
if (nautilus_file_can_poll_for_media (file) && !nautilus_file_is_media_check_automatic (file)) {
*show_poll = TRUE;
}
@@ -7852,10 +7854,6 @@ file_should_show_self (NautilusFile *file,
*show_eject = TRUE;
}
- if (nautilus_file_can_unmount (file)) {
- *show_unmount = TRUE;
- }
-
if (nautilus_file_can_mount (file)) {
*show_mount = TRUE;
}
@@ -7874,6 +7872,12 @@ file_should_show_self (NautilusFile *file,
*show_stop = TRUE;
}
+ /* Dot not show both Unmount and Eject/Safe Removal; too confusing to
+ * have too many menu entries */
+ if (nautilus_file_can_unmount (file) && !*show_eject && !*show_stop) {
+ *show_unmount = TRUE;
+ }
+
if (nautilus_file_can_poll_for_media (file) && !nautilus_file_is_media_check_automatic (file)) {
*show_poll = TRUE;
}
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index 95c06eb..6dc2df7 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -1317,7 +1317,7 @@ check_unmount_and_eject (GMount *mount,
}
if (mount != NULL) {
*show_eject |= g_mount_can_eject (mount);
- *show_unmount = g_mount_can_unmount (mount);
+ *show_unmount = g_mount_can_unmount (mount) && !*show_eject;
}
}
@@ -1349,6 +1349,9 @@ check_visibility (GMount *mount,
*show_start = g_drive_can_start (drive) || g_drive_can_start_degraded (drive);
*show_stop = g_drive_can_stop (drive);
+
+ if (*show_stop)
+ *show_unmount = FALSE;
}
if (volume != NULL) {
--
cgit v0.8.3.1

View File

@ -1,6 +1,6 @@
diff -up nautilus-2.25.91-wrk/libnautilus-extension/nautilus-column.c.selinux nautilus-2.25.91-wrk/libnautilus-extension/nautilus-column.c
--- nautilus-2.25.91-wrk/libnautilus-extension/nautilus-column.c.selinux 2009-02-10 18:49:53.000000000 +0100
+++ nautilus-2.25.91-wrk/libnautilus-extension/nautilus-column.c 2009-02-16 17:20:33.000000000 +0100
diff -up nautilus-2.31.6/libnautilus-extension/nautilus-column.c.bak nautilus-2.31.6/libnautilus-extension/nautilus-column.c
--- nautilus-2.31.6/libnautilus-extension/nautilus-column.c.bak 2009-04-17 15:12:30.000000000 +0200
+++ nautilus-2.31.6/libnautilus-extension/nautilus-column.c 2010-08-12 15:38:31.000000000 +0200
@@ -34,6 +34,7 @@ enum {
PROP_LABEL,
PROP_DESCRIPTION,
@ -59,9 +59,9 @@ diff -up nautilus-2.25.91-wrk/libnautilus-extension/nautilus-column.c.selinux na
+ G_PARAM_READWRITE));
}
diff -up nautilus-2.25.91-wrk/libnautilus-extension/nautilus-column.h.selinux nautilus-2.25.91-wrk/libnautilus-extension/nautilus-column.h
--- nautilus-2.25.91-wrk/libnautilus-extension/nautilus-column.h.selinux 2008-09-14 14:14:27.000000000 +0200
+++ nautilus-2.25.91-wrk/libnautilus-extension/nautilus-column.h 2009-02-16 17:20:33.000000000 +0100
diff -up nautilus-2.31.6/libnautilus-extension/nautilus-column.h.bak nautilus-2.31.6/libnautilus-extension/nautilus-column.h
--- nautilus-2.31.6/libnautilus-extension/nautilus-column.h.bak 2009-04-17 15:12:30.000000000 +0200
+++ nautilus-2.31.6/libnautilus-extension/nautilus-column.h 2010-08-12 15:38:31.000000000 +0200
@@ -64,6 +64,7 @@ NautilusColumn * nautilus_column_new
* label (string) - the user-visible label for the column
* description (string) - a user-visible description of the column
@ -70,9 +70,9 @@ diff -up nautilus-2.25.91-wrk/libnautilus-extension/nautilus-column.h.selinux na
*/
G_END_DECLS
diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-column-utilities.c.selinux nautilus-2.25.91-wrk/libnautilus-private/nautilus-column-utilities.c
--- nautilus-2.25.91-wrk/libnautilus-private/nautilus-column-utilities.c.selinux 2008-09-14 14:14:27.000000000 +0200
+++ nautilus-2.25.91-wrk/libnautilus-private/nautilus-column-utilities.c 2009-02-16 17:20:33.000000000 +0100
diff -up nautilus-2.31.6/libnautilus-private/nautilus-column-utilities.c.bak nautilus-2.31.6/libnautilus-private/nautilus-column-utilities.c
--- nautilus-2.31.6/libnautilus-private/nautilus-column-utilities.c.bak 2010-08-12 12:20:55.000000000 +0200
+++ nautilus-2.31.6/libnautilus-private/nautilus-column-utilities.c 2010-08-12 15:38:31.000000000 +0200
@@ -119,6 +119,7 @@ get_builtin_columns (void)
"attribute", "selinux_context",
"label", _("SELinux Context"),
@ -81,10 +81,10 @@ diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-column-utilities.c.se
NULL));
columns = g_list_append (columns,
g_object_new (NAUTILUS_TYPE_COLUMN,
diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file.c.selinux nautilus-2.25.91-wrk/libnautilus-private/nautilus-file.c
--- nautilus-2.25.91-wrk/libnautilus-private/nautilus-file.c.selinux 2009-02-16 09:45:37.000000000 +0100
+++ nautilus-2.25.91-wrk/libnautilus-private/nautilus-file.c 2009-02-16 17:20:33.000000000 +0100
@@ -1634,7 +1634,7 @@ update_info_internal (NautilusFile *file
diff -up nautilus-2.31.6/libnautilus-private/nautilus-file.c.bak nautilus-2.31.6/libnautilus-private/nautilus-file.c
--- nautilus-2.31.6/libnautilus-private/nautilus-file.c.bak 2010-08-12 15:38:25.000000000 +0200
+++ nautilus-2.31.6/libnautilus-private/nautilus-file.c 2010-08-12 15:38:31.000000000 +0200
@@ -2181,7 +2181,7 @@ update_info_internal (NautilusFile *file
file->details->is_mountpoint = is_mountpoint;
has_permissions = g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_UNIX_MODE);
@ -93,7 +93,7 @@ diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file.c.selinux nautil
if (file->details->has_permissions != has_permissions ||
file->details->permissions != permissions) {
changed = TRUE;
@@ -4393,7 +4393,7 @@ nautilus_file_can_get_selinux_context (N
@@ -5187,7 +5187,7 @@ nautilus_file_can_get_selinux_context (N
* context
* @file: NautilusFile representing the file in question.
*
@ -102,7 +102,7 @@ diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file.c.selinux nautil
*
**/
char *
@@ -4426,6 +4426,114 @@ nautilus_file_get_selinux_context (Nauti
@@ -5220,6 +5220,114 @@ nautilus_file_get_selinux_context (Nauti
return translated;
}
@ -217,10 +217,10 @@ diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file.c.selinux nautil
static char *
get_real_name (const char *name, const char *gecos)
{
diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file.h.selinux nautilus-2.25.91-wrk/libnautilus-private/nautilus-file.h
--- nautilus-2.25.91-wrk/libnautilus-private/nautilus-file.h.selinux 2009-02-02 13:28:32.000000000 +0100
+++ nautilus-2.25.91-wrk/libnautilus-private/nautilus-file.h 2009-02-16 17:20:33.000000000 +0100
@@ -244,6 +244,7 @@ GList * nautilus_get_all
diff -up nautilus-2.31.6/libnautilus-private/nautilus-file.h.bak nautilus-2.31.6/libnautilus-private/nautilus-file.h
--- nautilus-2.31.6/libnautilus-private/nautilus-file.h.bak 2010-08-12 12:20:55.000000000 +0200
+++ nautilus-2.31.6/libnautilus-private/nautilus-file.h 2010-08-12 15:38:31.000000000 +0200
@@ -250,6 +250,7 @@ GList * nautilus_get_all
GList * nautilus_file_get_settable_group_names (NautilusFile *file);
gboolean nautilus_file_can_get_selinux_context (NautilusFile *file);
char * nautilus_file_get_selinux_context (NautilusFile *file);
@ -228,7 +228,7 @@ diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file.h.selinux nautil
/* "Capabilities". */
gboolean nautilus_file_can_read (NautilusFile *file);
@@ -278,6 +279,10 @@ void nautilus_file_se
@@ -310,6 +311,10 @@ void nautilus_file_se
guint32 permissions,
NautilusFileOperationCallback callback,
gpointer callback_data);
@ -239,12 +239,12 @@ diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file.h.selinux nautil
void nautilus_file_rename (NautilusFile *file,
const char *new_name,
NautilusFileOperationCallback callback,
diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.c.selinux nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.c
--- nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.c.selinux 2009-02-02 13:28:32.000000000 +0100
+++ nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.c 2009-02-16 17:20:33.000000000 +0100
@@ -67,6 +67,11 @@
#include "nautilus-trash-monitor.h"
diff -up nautilus-2.31.6/libnautilus-private/nautilus-file-operations.c.bak nautilus-2.31.6/libnautilus-private/nautilus-file-operations.c
--- nautilus-2.31.6/libnautilus-private/nautilus-file-operations.c.bak 2010-08-12 12:52:30.000000000 +0200
+++ nautilus-2.31.6/libnautilus-private/nautilus-file-operations.c 2010-08-12 15:38:31.000000000 +0200
@@ -68,6 +68,11 @@
#include "nautilus-file-utilities.h"
#include "nautilus-file-conflict-dialog.h"
+#ifdef HAVE_SELINUX
+ #include <selinux/selinux.h>
@ -254,7 +254,7 @@ diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.c.sel
static gboolean confirm_trash_auto_value;
/* TODO: TESTING!!! */
@@ -140,6 +145,7 @@ typedef struct {
@@ -152,6 +157,7 @@ typedef struct {
guint32 file_mask;
guint32 dir_permissions;
guint32 dir_mask;
@ -262,7 +262,7 @@ diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.c.sel
} SetPermissionsJob;
typedef enum {
@@ -5141,6 +5147,10 @@ set_permissions_job_done (gpointer user_
@@ -5408,6 +5414,10 @@ set_permissions_job_done (gpointer user_
job->done_callback (job->done_callback_data);
}
@ -273,7 +273,7 @@ diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.c.sel
finalize_common ((CommonJob *)job);
return FALSE;
}
@@ -5196,6 +5206,14 @@ set_permissions_file (SetPermissionsJob
@@ -5463,6 +5473,14 @@ set_permissions_file (SetPermissionsJob
current, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
common->cancellable, NULL);
}
@ -288,7 +288,7 @@ diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.c.sel
if (!job_aborted (common) &&
g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY) {
@@ -5259,6 +5277,7 @@ nautilus_file_set_permissions_recursive
@@ -5526,6 +5544,7 @@ nautilus_file_set_permissions_recursive
guint32 file_mask,
guint32 dir_permissions,
guint32 dir_mask,
@ -296,7 +296,7 @@ diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.c.sel
NautilusOpCallback callback,
gpointer callback_data)
{
@@ -5272,7 +5291,24 @@ nautilus_file_set_permissions_recursive
@@ -5539,7 +5558,24 @@ nautilus_file_set_permissions_recursive
job->dir_mask = dir_mask;
job->done_callback = callback;
job->done_callback_data = callback_data;
@ -322,10 +322,10 @@ diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.c.sel
g_io_scheduler_push_job (set_permissions_job,
job,
NULL,
diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.h.selinux nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.h
--- nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.h.selinux 2008-09-14 14:14:27.000000000 +0200
+++ nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.h 2009-02-16 17:20:33.000000000 +0100
@@ -85,6 +85,7 @@ void nautilus_file_set_permissions_recur
diff -up nautilus-2.31.6/libnautilus-private/nautilus-file-operations.h.bak nautilus-2.31.6/libnautilus-private/nautilus-file-operations.h
--- nautilus-2.31.6/libnautilus-private/nautilus-file-operations.h.bak 2010-08-03 01:35:56.000000000 +0200
+++ nautilus-2.31.6/libnautilus-private/nautilus-file-operations.h 2010-08-12 15:38:31.000000000 +0200
@@ -87,6 +87,7 @@ void nautilus_file_set_permissions_recur
guint32 file_mask,
guint32 folder_permissions,
guint32 folder_mask,
@ -333,10 +333,10 @@ diff -up nautilus-2.25.91-wrk/libnautilus-private/nautilus-file-operations.h.sel
NautilusOpCallback callback,
gpointer callback_data);
diff -up nautilus-2.25.91-wrk/src/file-manager/fm-error-reporting.c.selinux nautilus-2.25.91-wrk/src/file-manager/fm-error-reporting.c
--- nautilus-2.25.91-wrk/src/file-manager/fm-error-reporting.c.selinux 2008-09-14 14:14:22.000000000 +0200
+++ nautilus-2.25.91-wrk/src/file-manager/fm-error-reporting.c 2009-02-16 17:20:33.000000000 +0100
@@ -232,6 +232,31 @@ fm_report_error_setting_permissions (Nau
diff -up nautilus-2.31.6/src/file-manager/fm-error-reporting.c.bak nautilus-2.31.6/src/file-manager/fm-error-reporting.c
--- nautilus-2.31.6/src/file-manager/fm-error-reporting.c.bak 2009-04-17 15:12:31.000000000 +0200
+++ nautilus-2.31.6/src/file-manager/fm-error-reporting.c 2010-08-12 15:38:31.000000000 +0200
@@ -238,6 +238,31 @@ fm_report_error_setting_permissions (Nau
g_free (message);
}
@ -368,9 +368,9 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-error-reporting.c.selinux naut
typedef struct _FMRenameData {
char *name;
NautilusFileOperationCallback callback;
diff -up nautilus-2.25.91-wrk/src/file-manager/fm-error-reporting.h.selinux nautilus-2.25.91-wrk/src/file-manager/fm-error-reporting.h
--- nautilus-2.25.91-wrk/src/file-manager/fm-error-reporting.h.selinux 2008-10-06 12:49:08.000000000 +0200
+++ nautilus-2.25.91-wrk/src/file-manager/fm-error-reporting.h 2009-02-16 17:20:33.000000000 +0100
diff -up nautilus-2.31.6/src/file-manager/fm-error-reporting.h.bak nautilus-2.31.6/src/file-manager/fm-error-reporting.h
--- nautilus-2.31.6/src/file-manager/fm-error-reporting.h.bak 2009-04-17 15:12:31.000000000 +0200
+++ nautilus-2.31.6/src/file-manager/fm-error-reporting.h 2010-08-12 15:38:31.000000000 +0200
@@ -40,8 +40,11 @@ void fm_report_error_setting_permissions
GError *error,
GtkWindow *parent_window);
@ -384,10 +384,10 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-error-reporting.h.selinux naut
void fm_report_error_setting_group (NautilusFile *file,
GError *error,
GtkWindow *parent_window);
diff -up nautilus-2.25.91-wrk/src/file-manager/fm-list-view.c.selinux nautilus-2.25.91-wrk/src/file-manager/fm-list-view.c
--- nautilus-2.25.91-wrk/src/file-manager/fm-list-view.c.selinux 2008-12-09 09:45:47.000000000 +0100
+++ nautilus-2.25.91-wrk/src/file-manager/fm-list-view.c 2009-02-16 17:20:33.000000000 +0100
@@ -1420,13 +1420,15 @@ create_and_set_up_tree_view (FMListView
diff -up nautilus-2.31.6/src/file-manager/fm-list-view.c.bak nautilus-2.31.6/src/file-manager/fm-list-view.c
--- nautilus-2.31.6/src/file-manager/fm-list-view.c.bak 2010-08-12 12:20:55.000000000 +0200
+++ nautilus-2.31.6/src/file-manager/fm-list-view.c 2010-08-12 15:38:31.000000000 +0200
@@ -1545,13 +1545,15 @@ create_and_set_up_tree_view (FMListView
char *name;
char *label;
float xalign;
@ -404,7 +404,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-list-view.c.selinux nautilus-2
column_num = fm_list_model_add_column (view->details->model,
nautilus_column);
@@ -1472,6 +1474,8 @@ create_and_set_up_tree_view (FMListView
@@ -1596,6 +1598,8 @@ create_and_set_up_tree_view (FMListView
} else {
cell = gtk_cell_renderer_text_new ();
g_object_set (cell, "xalign", xalign, NULL);
@ -413,10 +413,10 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-list-view.c.selinux nautilus-2
view->details->cells = g_list_append (view->details->cells,
cell);
column = gtk_tree_view_column_new_with_attributes (label,
diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c
--- nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux 2009-02-16 09:45:36.000000000 +0100
+++ nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c 2009-02-16 17:20:33.000000000 +0100
@@ -83,6 +83,10 @@
diff -up nautilus-2.31.6/src/file-manager/fm-properties-window.c.bak nautilus-2.31.6/src/file-manager/fm-properties-window.c
--- nautilus-2.31.6/src/file-manager/fm-properties-window.c.bak 2010-08-12 12:20:55.000000000 +0200
+++ nautilus-2.31.6/src/file-manager/fm-properties-window.c 2010-08-12 15:39:25.000000000 +0200
@@ -80,6 +80,10 @@
#define FREE_FILL_B (0.811764706 * 65535)
@ -427,7 +427,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
#define PREVIEW_IMAGE_WIDTH 96
#define ROW_PAD 6
@@ -125,12 +129,15 @@ struct FMPropertiesWindowDetails {
@@ -122,12 +126,15 @@ struct FMPropertiesWindowDetails {
unsigned int owner_change_timeout;
GList *permission_buttons;
@ -444,7 +444,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
GList *mime_list;
gboolean deep_count_finished;
@@ -217,6 +224,10 @@ static void permission_combo_update
@@ -214,6 +221,10 @@ static void permission_combo_update
GtkComboBox *combo);
static void value_field_update (FMPropertiesWindow *window,
GtkLabel *field);
@ -455,7 +455,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
static void properties_window_update (FMPropertiesWindow *window,
GList *files);
static void is_directory_ready_callback (NautilusFile *file,
@@ -246,10 +257,36 @@ static GtkLabel *attach_ellipsizing_valu
@@ -243,10 +254,36 @@ static GtkLabel *attach_ellipsizing_valu
const char *initial_text);
static GtkWidget* create_pie_widget (FMPropertiesWindow *window);
@ -492,7 +492,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
static gboolean
is_multi_file_window (FMPropertiesWindow *window)
{
@@ -270,6 +307,111 @@ is_multi_file_window (FMPropertiesWindow
@@ -267,6 +304,111 @@ is_multi_file_window (FMPropertiesWindow
return FALSE;
}
@ -604,16 +604,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
static int
get_not_gone_original_file_count (FMPropertiesWindow *window)
{
@@ -502,7 +644,7 @@ fm_properties_window_drag_data_received
return;
}
- uris = g_strsplit (selection_data->data, "\r\n", 0);
+ uris = g_strsplit ((char *) selection_data->data, "\r\n", 0);
exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0');
@@ -651,11 +793,7 @@ set_name_field (FMPropertiesWindow *wind
@@ -648,11 +790,7 @@ set_name_field (FMPropertiesWindow *wind
* currently showing. This causes minimal ripples (e.g.
* selection change).
*/
@ -626,7 +617,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
}
}
}
@@ -735,7 +873,6 @@ static void
@@ -732,7 +870,6 @@ static void
name_field_restore_original_name (NautilusEntry *name_field)
{
const char *original_name;
@ -634,7 +625,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
original_name = (const char *) g_object_get_data (G_OBJECT (name_field),
"original_name");
@@ -744,14 +881,8 @@ name_field_restore_original_name (Nautil
@@ -741,14 +878,8 @@ name_field_restore_original_name (Nautil
return;
}
@ -650,7 +641,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
}
static void
@@ -1213,6 +1344,14 @@ properties_window_update (FMPropertiesWi
@@ -1210,6 +1341,14 @@ properties_window_update (FMPropertiesWi
for (l = window->details->value_fields; l != NULL; l = l->next) {
value_field_update (window, GTK_LABEL (l->data));
}
@ -665,7 +656,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
}
mime_list = get_mime_list (window);
@@ -1383,6 +1522,164 @@ value_field_update (FMPropertiesWindow *
@@ -1380,6 +1519,164 @@ value_field_update (FMPropertiesWindow *
window->details->target_files));
}
@ -830,7 +821,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
static GtkLabel *
attach_label (GtkTable *table,
int row,
@@ -1437,6 +1734,47 @@ attach_value_label (GtkTable *table,
@@ -1434,6 +1731,47 @@ attach_value_label (GtkTable *table,
return attach_label (table, row, column, initial_text, FALSE, FALSE, FALSE, TRUE, FALSE);
}
@ -878,7 +869,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
static GtkLabel *
attach_ellipsizing_value_label (GtkTable *table,
int row,
@@ -1495,6 +1833,649 @@ attach_value_field (FMPropertiesWindow *
@@ -1492,6 +1830,647 @@ attach_value_field (FMPropertiesWindow *
FALSE);
}
@ -890,9 +881,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
+ GdkCursor * cursor;
+
+ cursor = gdk_cursor_new (GDK_WATCH);
+ if (GDK_IS_WINDOW (GTK_WIDGET (window)->window)) {
+ gdk_window_set_cursor (GTK_WIDGET (window)->window, cursor);
+ }
+ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), cursor);
+ gdk_cursor_unref (cursor);
+ }
+ window->details->long_operation_underway ++;
@ -901,10 +890,10 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
+static void
+end_long_operation (FMPropertiesWindow *window)
+{
+ if (GTK_WIDGET (window)->window != NULL &&
+ if (gtk_widget_get_window (GTK_WIDGET (window)) != NULL &&
+ window->details->long_operation_underway == 1) {
+ /* finished !! */
+ gdk_window_set_cursor (GTK_WIDGET (window)->window, NULL);
+ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), NULL);
+ }
+ window->details->long_operation_underway--;
+}
@ -1528,7 +1517,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
static GtkWidget*
attach_ellipsizing_value_field (FMPropertiesWindow *window,
GtkTable *table,
@@ -2485,6 +3466,37 @@ append_title_value_pair (FMPropertiesWin
@@ -2485,6 +3464,37 @@ append_title_value_pair (FMPropertiesWin
return last_row;
}
@ -1566,7 +1555,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
static guint
append_title_and_ellipsizing_value (FMPropertiesWindow *window,
GtkTable *table,
@@ -3504,31 +4516,6 @@ create_emblems_page (FMPropertiesWindow
@@ -3511,31 +4521,6 @@ create_emblems_page (FMPropertiesWindow
}
static void
@ -1577,7 +1566,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
- GdkCursor * cursor;
-
- cursor = gdk_cursor_new (GDK_WATCH);
- gdk_window_set_cursor (GTK_WIDGET (window)->window, cursor);
- gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), cursor);
- gdk_cursor_unref (cursor);
- }
- window->details->long_operation_underway ++;
@ -1586,10 +1575,10 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
-static void
-end_long_operation (FMPropertiesWindow *window)
-{
- if (GTK_WIDGET (window)->window != NULL &&
- if (gtk_widget_get_window (GTK_WIDGET (window)) != NULL &&
- window->details->long_operation_underway == 1) {
- /* finished !! */
- gdk_window_set_cursor (GTK_WIDGET (window)->window, NULL);
- gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), NULL);
- }
- window->details->long_operation_underway--;
-}
@ -1598,8 +1587,8 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
permission_change_callback (NautilusFile *file,
GFile *res_loc,
GError *error,
@@ -4304,39 +5291,6 @@ append_special_execution_flags (FMProper
gtk_table_set_row_spacing (table, table->nrows - 1, 18);
@@ -4318,39 +5303,6 @@ append_special_execution_flags (FMProper
gtk_table_set_row_spacing (table, nrows - 1, 18);
}
-static gboolean
@ -1638,7 +1627,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
static GHashTable *
get_initial_permissions (GList *file_list)
@@ -4676,7 +5630,9 @@ apply_recursive_clicked (GtkWidget *recu
@@ -4698,7 +5650,9 @@ apply_recursive_clicked (GtkWidget *recu
guint32 file_permission, file_permission_mask;
guint32 dir_permission, dir_permission_mask;
guint32 vfs_mask, vfs_new_perm, p;
@ -1649,7 +1638,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
gboolean active, is_folder, is_special, use_original;
GList *l;
GtkTreeModel *model;
@@ -4720,9 +5676,9 @@ apply_recursive_clicked (GtkWidget *recu
@@ -4742,9 +5696,9 @@ apply_recursive_clicked (GtkWidget *recu
}
/* Simple mode, minus exec checkbox */
for (l = window->details->permission_combos; l != NULL; l = l->next) {
@ -1661,7 +1650,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
continue;
}
@@ -4730,7 +5686,7 @@ apply_recursive_clicked (GtkWidget *recu
@@ -4752,7 +5706,7 @@ apply_recursive_clicked (GtkWidget *recu
is_folder = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (combo),
"is-folder"));
@ -1670,7 +1659,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
gtk_tree_model_get (model, &iter, 1, &new_perm, 2, &use_original, -1);
if (use_original) {
continue;
@@ -4753,12 +5709,53 @@ apply_recursive_clicked (GtkWidget *recu
@@ -4775,12 +5729,53 @@ apply_recursive_clicked (GtkWidget *recu
}
}
@ -1724,7 +1713,7 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
if (nautilus_file_is_directory (file) &&
nautilus_file_can_set_permissions (file)) {
uri = nautilus_file_get_uri (file);
@@ -4769,11 +5766,13 @@ apply_recursive_clicked (GtkWidget *recu
@@ -4791,11 +5786,13 @@ apply_recursive_clicked (GtkWidget *recu
file_permission_mask,
dir_permission,
dir_permission_mask,
@ -1738,8 +1727,8 @@ diff -up nautilus-2.25.91-wrk/src/file-manager/fm-properties-window.c.selinux na
}
static void
@@ -4822,10 +5821,16 @@ create_permissions_page (FMPropertiesWin
gtk_table_set_row_spacing (page_table, page_table->nrows - 1, 18);
@@ -4846,10 +5843,16 @@ create_permissions_page (FMPropertiesWin
gtk_table_set_row_spacing (page_table, nrows - 1, 18);
#ifdef HAVE_SELINUX
- append_title_value_pair

View File

@ -1,107 +0,0 @@
From 4edc5f843a4cb0d89c21fd957dc7d6fa955cf012 Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl@redhat.com>
Date: Tue, 01 Jun 2010 07:17:56 +0000
Subject: Don't use deprecated Gtk+ api (GtkBoxChild)
---
diff --git a/libnautilus-private/nautilus-keep-last-vertical-box.c b/libnautilus-private/nautilus-keep-last-vertical-box.c
index 8aabb56..5e350e1 100644
--- a/libnautilus-private/nautilus-keep-last-vertical-box.c
+++ b/libnautilus-private/nautilus-keep-last-vertical-box.c
@@ -84,13 +84,13 @@ nautilus_keep_last_vertical_box_new (gint spacing)
return GTK_WIDGET (box);
}
-static void
-nautilus_keep_last_vertical_box_size_allocate (GtkWidget *widget,
+static void
+nautilus_keep_last_vertical_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkBox *box;
- GtkBoxChild *last_child, *child;
- GList *children;
+ GtkWidget *last_child, *child;
+ GList *children, *l;
GtkAllocation last_child_allocation, child_allocation, tiny_allocation;
g_return_if_fail (NAUTILUS_IS_KEEP_LAST_VERTICAL_BOX (widget));
@@ -99,13 +99,14 @@ nautilus_keep_last_vertical_box_size_allocate (GtkWidget *widget,
EEL_CALL_PARENT (GTK_WIDGET_CLASS, size_allocate, (widget, allocation));
box = GTK_BOX (widget);
- children = g_list_last (box->children);
+ children = gtk_container_get_children (GTK_CONTAINER(widget));
+ l = g_list_last (children);
- if (children != NULL) {
- last_child = children->data;
- children = children->prev;
+ if (l != NULL) {
+ last_child = l->data;
+ l = l->prev;
- last_child_allocation = last_child->widget->allocation;
+ gtk_widget_get_allocation (last_child, &last_child_allocation);
/* If last child doesn't fit vertically, prune items from the end of the
* list one at a time until it does.
@@ -113,11 +114,11 @@ nautilus_keep_last_vertical_box_size_allocate (GtkWidget *widget,
if (last_child_allocation.y + last_child_allocation.height >
allocation->y + allocation->height) {
- while (children != NULL) {
- child = children->data;
- children = children->prev;
+ while (l != NULL) {
+ child = l->data;
+ l = l->prev;
- child_allocation = child->widget->allocation;
+ gtk_widget_get_allocation (child, &child_allocation);
/* Reallocate this child's position so that it does not appear.
* Setting the width & height to 0 is not enough, as
@@ -126,20 +127,20 @@ nautilus_keep_last_vertical_box_size_allocate (GtkWidget *widget,
* This might not work in all future cases. Alternatively, the
* items that don't fit could be hidden, but that would interfere
* with having other hidden children.
- *
+ *
* Note that these children are having their size allocated twice,
* once by gtk_vbox_size_allocate and then again here. I don't
* know of any problems with this, but holler if you do.
*/
tiny_allocation.x = tiny_allocation.y = -1;
tiny_allocation.height = tiny_allocation.width = 0;
- gtk_widget_size_allocate (child->widget, &tiny_allocation);
+ gtk_widget_size_allocate (child, &tiny_allocation);
/* We're done if the special last item fits now. */
if (child_allocation.y + last_child_allocation.height <=
allocation->y + allocation->height) {
last_child_allocation.y = child_allocation.y;
- gtk_widget_size_allocate (last_child->widget, &last_child_allocation);
+ gtk_widget_size_allocate (last_child, &last_child_allocation);
break;
}
@@ -148,12 +149,13 @@ nautilus_keep_last_vertical_box_size_allocate (GtkWidget *widget,
* just too darn tall. Let's squash it down to fit in the box's
* allocation.
*/
- if (children == NULL) {
+ if (l == NULL) {
last_child_allocation.y = allocation->y;
last_child_allocation.height = allocation->height;
- gtk_widget_size_allocate (last_child->widget, &last_child_allocation);
+ gtk_widget_size_allocate (last_child, &last_child_allocation);
}
}
}
}
-}
+ g_list_free (children);
+}
--
cgit v0.8.3.1

View File

@ -1,489 +0,0 @@
From a09d41702b771fb0041fa0c4270afaa678413a2d Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Tue, 13 Apr 2010 12:52:22 +0000
Subject: Remove deprecated GTK+ symbols (#565038).
---
diff --git a/eel/eel-background.c b/eel/eel-background.c
index d0782d7..2edbc31 100644
--- a/eel/eel-background.c
+++ b/eel/eel-background.c
@@ -750,7 +750,7 @@ eel_background_set_up_widget (EelBackground *background, GtkWidget *widget)
GdkWindow *window;
gboolean in_fade;
- if (!GTK_WIDGET_REALIZED (widget)) {
+ if (!gtk_widget_get_realized (widget)) {
return;
}
@@ -814,7 +814,7 @@ on_background_changed (EelBackground *background)
static void
init_fade (EelBackground *background, GtkWidget *widget)
{
- if (widget == NULL || !GTK_WIDGET_REALIZED (widget))
+ if (widget == NULL || !gtk_widget_get_realized (widget))
return;
if (!background->details->is_desktop) {
@@ -966,7 +966,7 @@ eel_background_set_desktop (EelBackground *background, GtkWidget *widget, gboole
{
background->details->is_desktop = is_desktop;
- if (GTK_WIDGET_REALIZED(widget) && background->details->is_desktop) {
+ if (gtk_widget_get_realized (widget) && background->details->is_desktop) {
widget_realized_setup (widget, background);
}
diff --git a/eel/eel-canvas.c b/eel/eel-canvas.c
index ac7f562..3778b68 100644
--- a/eel/eel-canvas.c
+++ b/eel/eel-canvas.c
@@ -347,7 +347,7 @@ eel_canvas_item_realize (EelCanvasItem *item)
if (item->parent && !(item->parent->object.flags & EEL_CANVAS_ITEM_REALIZED))
(* EEL_CANVAS_ITEM_GET_CLASS (item->parent)->realize) (item->parent);
- if (item->parent == NULL && !GTK_WIDGET_REALIZED (GTK_WIDGET (item->canvas)))
+ if (item->parent == NULL && !gtk_widget_get_realized (GTK_WIDGET (item->canvas)))
gtk_widget_realize (GTK_WIDGET (item->canvas));
GTK_OBJECT_SET_FLAGS (item, EEL_CANVAS_ITEM_REALIZED);
@@ -779,7 +779,7 @@ eel_canvas_item_show (EelCanvasItem *item)
(* EEL_CANVAS_ITEM_GET_CLASS (item)->map) (item);
} else {
if (!(item->object.flags & EEL_CANVAS_ITEM_MAPPED) &&
- GTK_WIDGET_MAPPED (GTK_WIDGET (item->canvas)))
+ gtk_widget_get_mapped (GTK_WIDGET (item->canvas)))
(* EEL_CANVAS_ITEM_GET_CLASS (item)->map) (item);
}
@@ -837,7 +837,8 @@ eel_canvas_item_grab (EelCanvasItem *item, guint event_mask, GdkCursor *cursor,
int retval;
g_return_val_if_fail (EEL_IS_CANVAS_ITEM (item), GDK_GRAB_NOT_VIEWABLE);
- g_return_val_if_fail (GTK_WIDGET_MAPPED (item->canvas), GDK_GRAB_NOT_VIEWABLE);
+ g_return_val_if_fail (gtk_widget_get_mapped (GTK_WIDGET (item->canvas)),
+ GDK_GRAB_NOT_VIEWABLE);
if (item->canvas->grabbed_item)
return GDK_GRAB_ALREADY_GRABBED;
@@ -1009,7 +1010,7 @@ eel_canvas_item_grab_focus (EelCanvasItem *item)
GdkEvent ev;
g_return_if_fail (EEL_IS_CANVAS_ITEM (item));
- g_return_if_fail (GTK_WIDGET_CAN_FOCUS (GTK_WIDGET (item->canvas)));
+ g_return_if_fail (gtk_widget_get_can_focus (GTK_WIDGET (item->canvas)));
focused_item = item->canvas->focused_item;
@@ -2424,7 +2425,7 @@ emit_event (EelCanvas *canvas, GdkEvent *event)
guint mask;
/* Could be an old pick event */
- if (!GTK_WIDGET_REALIZED (canvas)) {
+ if (!gtk_widget_get_realized (GTK_WIDGET (canvas))) {
return FALSE;
}
@@ -2860,7 +2861,7 @@ eel_canvas_expose (GtkWidget *widget, GdkEventExpose *event)
canvas = EEL_CANVAS (widget);
- if (!GTK_WIDGET_DRAWABLE (widget) || (event->window != canvas->layout.bin_window)) return FALSE;
+ if (!gtk_widget_is_drawable (widget) || (event->window != canvas->layout.bin_window)) return FALSE;
#ifdef VERBOSE
g_print ("Expose\n");
@@ -3148,7 +3149,7 @@ eel_canvas_set_pixels_per_unit (EelCanvas *canvas, double n)
* scrolling the window scroll causing exposes.
*/
window = NULL;
- if (GTK_WIDGET_MAPPED (widget)) {
+ if (gtk_widget_get_mapped (widget)) {
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y;
@@ -3310,7 +3311,8 @@ eel_canvas_request_redraw (EelCanvas *canvas, int x1, int y1, int x2, int y2)
g_return_if_fail (EEL_IS_CANVAS (canvas));
- if (!GTK_WIDGET_DRAWABLE (canvas) || (x1 >= x2) || (y1 >= y2)) return;
+ if (!gtk_widget_is_drawable (GTK_WIDGET (canvas))
+ || (x1 >= x2) || (y1 >= y2)) return;
bbox.x = x1;
bbox.y = y1;
@@ -3754,7 +3756,7 @@ eel_canvas_item_accessible_grab_focus (AtkComponent *component)
eel_canvas_item_grab_focus (item);
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (item->canvas));
- if (GTK_WIDGET_TOPLEVEL (toplevel)) {
+ if (gtk_widget_is_toplevel (toplevel)) {
gtk_window_present (GTK_WINDOW (toplevel));
}
@@ -3821,7 +3823,7 @@ eel_canvas_item_accessible_ref_state_set (AtkObject *accessible)
atk_state_set_add_state (state_set, ATK_STATE_SHOWING);
}
}
- if (GTK_WIDGET_CAN_FOCUS (GTK_WIDGET (item->canvas))) {
+ if (gtk_widget_get_can_focus (GTK_WIDGET (item->canvas))) {
atk_state_set_add_state (state_set, ATK_STATE_FOCUSABLE);
if (item->canvas->focused_item == item) {
diff --git a/eel/eel-debug-drawing.c b/eel/eel-debug-drawing.c
index 7132417..8aeb4b9 100644
--- a/eel/eel-debug-drawing.c
+++ b/eel/eel-debug-drawing.c
@@ -148,7 +148,7 @@ debug_pixbuf_viewer_expose_event (GtkWidget *widget, GdkEventExpose *event)
g_assert (DEBUG_IS_PIXBUF_VIEWER (widget));
g_assert (event != NULL);
g_assert (event->window == widget->window);
- g_assert (GTK_WIDGET_REALIZED (widget));
+ g_assert (gtk_widget_get_realized (widget));
viewer = DEBUG_PIXBUF_VIEWER (widget);
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index 51ec872..31c45ad 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -1171,7 +1171,7 @@ eel_editable_label_style_set (GtkWidget *widget,
/* Set the background, foreground and cursor colors based on
* the new theme selected.
*/
- if (GTK_WIDGET_REALIZED (widget))
+ if (gtk_widget_get_realized (widget))
{
gdk_window_set_background (widget->window, &widget->style->base[gtk_widget_get_state (widget)]);
@@ -1485,7 +1485,7 @@ _eel_draw_insertion_cursor (GtkWidget *widget,
static void
eel_editable_label_draw_cursor (EelEditableLabel *label, gint xoffset, gint yoffset)
{
- if (GTK_WIDGET_DRAWABLE (label))
+ if (gtk_widget_is_drawable (GTK_WIDGET (label)))
{
GtkWidget *widget = GTK_WIDGET (label);
@@ -1618,7 +1618,7 @@ eel_editable_label_expose (GtkWidget *widget,
eel_editable_label_ensure_layout (label, TRUE);
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_MAPPED (widget) &&
+ if (gtk_widget_get_visible (widget) && gtk_widget_get_mapped (widget) &&
label->text)
{
get_layout_location (label, &x, &y);
@@ -1671,7 +1671,7 @@ eel_editable_label_expose (GtkWidget *widget,
state = GTK_STATE_SELECTED;
- if (!GTK_WIDGET_HAS_FOCUS (widget))
+ if (!gtk_widget_has_focus (widget))
state = GTK_STATE_ACTIVE;
gdk_draw_layout_with_colors (widget->window,
@@ -1684,7 +1684,7 @@ eel_editable_label_expose (GtkWidget *widget,
gdk_gc_set_clip_region (widget->style->black_gc, NULL);
gdk_region_destroy (clip);
}
- else if (GTK_WIDGET_HAS_FOCUS (widget))
+ else if (gtk_widget_has_focus (widget))
eel_editable_label_draw_cursor (label, x, y);
if (label->draw_outline)
@@ -1876,7 +1876,7 @@ eel_editable_label_button_press (GtkWidget *widget,
if (event->button == 1)
{
- if (!GTK_WIDGET_HAS_FOCUS (widget))
+ if (!gtk_widget_has_focus (widget))
gtk_widget_grab_focus (widget);
if (event->type == GDK_3BUTTON_PRESS)
@@ -3110,7 +3110,7 @@ popup_position_func (GtkMenu *menu,
label = EEL_EDITABLE_LABEL (user_data);
widget = GTK_WIDGET (label);
- g_assert (GTK_WIDGET_REALIZED (label));
+ g_assert (gtk_widget_get_realized (widget));
gdk_window_get_origin (widget->window, x, y);
@@ -3152,7 +3152,7 @@ popup_targets_received (GtkClipboard *clipboard,
info = user_data;
label = info->label;
- if (GTK_WIDGET_REALIZED (label))
+ if (gtk_widget_get_realized (GTK_WIDGET (label)))
{
if (label->popup_menu)
gtk_widget_destroy (label->popup_menu);
diff --git a/eel/eel-gtk-container.c b/eel/eel-gtk-container.c
index 247d7eb..08056d9 100644
--- a/eel/eel-gtk-container.c
+++ b/eel/eel-gtk-container.c
@@ -77,7 +77,7 @@ eel_gtk_container_child_map (GtkContainer *container,
g_return_if_fail (child->parent == GTK_WIDGET (container));
- if (GTK_WIDGET_VISIBLE (child) && !GTK_WIDGET_MAPPED (child)) {
+ if (gtk_widget_get_visible (child) && !gtk_widget_get_mapped (child)) {
gtk_widget_map (child);
}
}
@@ -103,7 +103,7 @@ eel_gtk_container_child_unmap (GtkContainer *container,
g_return_if_fail (child->parent == GTK_WIDGET (container));
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_MAPPED (child)) {
+ if (gtk_widget_get_visible (child) && gtk_widget_get_mapped (child)) {
gtk_widget_unmap (child);
}
}
@@ -122,17 +122,22 @@ void
eel_gtk_container_child_add (GtkContainer *container,
GtkWidget *child)
{
+ GtkWidget *widget;
+
g_return_if_fail (GTK_IS_CONTAINER (container));
g_return_if_fail (GTK_IS_WIDGET (child));
+
+ widget = GTK_WIDGET (container);
- gtk_widget_set_parent (child, GTK_WIDGET (container));
+ gtk_widget_set_parent (child, widget);
- if (GTK_WIDGET_REALIZED (container)) {
+ if (gtk_widget_get_realized (widget)) {
gtk_widget_realize (child);
}
- if (GTK_WIDGET_VISIBLE (container) && GTK_WIDGET_VISIBLE (child)) {
- if (GTK_WIDGET_MAPPED (container)) {
+ if (gtk_widget_get_mapped (widget)
+ && gtk_widget_get_visible (child)) {
+ if (gtk_widget_get_mapped (widget)) {
gtk_widget_map (child);
}
@@ -160,7 +165,7 @@ eel_gtk_container_child_remove (GtkContainer *container,
g_return_if_fail (GTK_IS_WIDGET (child));
g_return_if_fail (child->parent == GTK_WIDGET (container));
- child_was_visible = GTK_WIDGET_VISIBLE (child);
+ child_was_visible = gtk_widget_get_visible (child);
gtk_widget_unparent (child);
diff --git a/eel/eel-gtk-extensions.c b/eel/eel-gtk-extensions.c
index 6f88f72..1bf5800 100644
--- a/eel/eel-gtk-extensions.c
+++ b/eel/eel-gtk-extensions.c
@@ -253,7 +253,7 @@ eel_gtk_window_set_initial_geometry (GtkWindow *window,
* Someday we could make this move an already-showing window, but we don't
* need that functionality yet.
*/
- g_return_if_fail (!GTK_WIDGET_VISIBLE (window));
+ g_return_if_fail (!gtk_widget_get_visible (GTK_WIDGET (window)));
if ((geometry_flags & EEL_GDK_X_VALUE) && (geometry_flags & EEL_GDK_Y_VALUE)) {
real_left = left;
@@ -321,7 +321,7 @@ eel_gtk_window_set_initial_geometry_from_string (GtkWindow *window,
* Someday we could make this move an already-showing window, but we don't
* need that functionality yet.
*/
- g_return_if_fail (!GTK_WIDGET_VISIBLE (window));
+ g_return_if_fail (!gtk_widget_get_visible (GTK_WIDGET (window)));
geometry_flags = eel_gdk_parse_geometry (geometry_string, &left, &top, &width, &height);
@@ -640,7 +640,7 @@ eel_gtk_signal_connect_while_realized (GtkObject *object,
g_return_if_fail (name[0] != '\0');
g_return_if_fail (callback != NULL);
g_return_if_fail (GTK_IS_WIDGET (realized_widget));
- g_return_if_fail (GTK_WIDGET_REALIZED (realized_widget));
+ g_return_if_fail (gtk_widget_get_realized (realized_widget));
info = g_new0 (RealizeDisconnectInfo, 1);
@@ -986,7 +986,7 @@ eel_gtk_widget_find_windowed_ancestor (GtkWidget *widget)
{
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
- while (widget && GTK_WIDGET_NO_WINDOW (widget)) {
+ while (widget && !gtk_widget_get_has_window (widget)) {
widget = widget->parent;
}
@@ -1109,7 +1109,7 @@ eel_gtk_viewport_get_visible_rect (GtkViewport *viewport,
g_return_val_if_fail (GTK_IS_VIEWPORT (viewport), FALSE);
g_return_val_if_fail (rect != NULL, FALSE);
- if (GTK_WIDGET_REALIZED (viewport)) {
+ if (gtk_widget_get_realized (GTK_WIDGET (viewport))) {
viewport_rect.x = 0;
viewport_rect.y = 0;
gdk_drawable_get_size (viewport->view_window,
diff --git a/eel/eel-image-table.c b/eel/eel-image-table.c
index f13f3d9..e781652 100644
--- a/eel/eel-image-table.c
+++ b/eel/eel-image-table.c
@@ -343,7 +343,7 @@ image_table_handle_motion (EelImageTable *image_table,
child = eel_wrap_table_find_child_at_event_point (EEL_WRAP_TABLE (image_table), x, y);
- if (child && !GTK_WIDGET_SENSITIVE (child)) {
+ if (child && !gtk_widget_get_sensitive (child)) {
return;
}
@@ -458,7 +458,7 @@ ancestor_button_press_event (GtkWidget *widget,
child = eel_wrap_table_find_child_at_event_point (EEL_WRAP_TABLE (image_table), event->x, event->y);
- if (child && !GTK_WIDGET_SENSITIVE (child)) {
+ if (child && !gtk_widget_get_sensitive (child)) {
return FALSE;
}
@@ -497,7 +497,7 @@ ancestor_button_release_event (GtkWidget *widget,
child = eel_wrap_table_find_child_at_event_point (EEL_WRAP_TABLE (image_table), event->x, event->y);
- if (child && !GTK_WIDGET_SENSITIVE (child)) {
+ if (child && !gtk_widget_get_sensitive (child)) {
return FALSE;
}
diff --git a/eel/eel-labeled-image.c b/eel/eel-labeled-image.c
index b3ea349..89e64bb 100644
--- a/eel/eel-labeled-image.c
+++ b/eel/eel-labeled-image.c
@@ -535,7 +535,7 @@ eel_labeled_image_expose_event (GtkWidget *widget,
EelIRect label_bounds;
g_assert (EEL_IS_LABELED_IMAGE (widget));
- g_assert (GTK_WIDGET_REALIZED (widget));
+ g_assert (gtk_widget_get_realized (widget));
g_assert (event != NULL);
labeled_image = EEL_LABELED_IMAGE (widget);
@@ -568,7 +568,7 @@ eel_labeled_image_expose_event (GtkWidget *widget,
event);
}
- if (GTK_WIDGET_HAS_FOCUS (widget)) {
+ if (gtk_widget_has_focus (widget)) {
label_bounds = eel_labeled_image_get_image_bounds (EEL_LABELED_IMAGE (widget));
gtk_paint_focus (widget->style, widget->window,
GTK_STATE_NORMAL,
@@ -1923,7 +1923,7 @@ button_leave_callback (GtkWidget *widget,
{
g_assert (GTK_IS_WIDGET (widget));
- if (GTK_WIDGET_DRAWABLE (widget)) {
+ if (gtk_widget_is_drawable (widget)) {
const int fudge = 4;
EelIRect bounds;
diff --git a/eel/eel-wrap-table.c b/eel/eel-wrap-table.c
index 2ff81ae..4570428 100644
--- a/eel/eel-wrap-table.c
+++ b/eel/eel-wrap-table.c
@@ -320,7 +320,7 @@ eel_wrap_table_expose_event (GtkWidget *widget,
GList *iterator;
g_assert (EEL_IS_WRAP_TABLE (widget));
- g_assert (GTK_WIDGET_REALIZED (widget));
+ g_assert (gtk_widget_get_realized (widget));
g_assert (event != NULL);
wrap_table = EEL_WRAP_TABLE (widget);
@@ -352,7 +352,7 @@ eel_wrap_table_map (GtkWidget *widget)
item = iterator->data;
- if (GTK_WIDGET_VISIBLE (item) && !GTK_WIDGET_MAPPED (item)) {
+ if (gtk_widget_get_visible (item) && !gtk_widget_get_mapped (item)) {
gtk_widget_map (item);
}
}
@@ -375,7 +375,7 @@ eel_wrap_table_unmap (GtkWidget *widget)
item = iterator->data;
- if (GTK_WIDGET_VISIBLE (item) && GTK_WIDGET_MAPPED (item)) {
+ if (gtk_widget_get_visible (item) && gtk_widget_get_mapped (item)) {
gtk_widget_unmap (item);
}
}
@@ -397,23 +397,25 @@ eel_wrap_table_add (GtkContainer *container,
GtkWidget *child)
{
EelWrapTable *wrap_table;
+ GtkWidget *widget;
g_assert (container != NULL);
g_assert (EEL_IS_WRAP_TABLE (container));
g_assert (GTK_IS_WIDGET (child));
+ widget = GTK_WIDGET (container);
wrap_table = EEL_WRAP_TABLE (container);
gtk_widget_set_parent (child, GTK_WIDGET (container));
wrap_table->details->children = g_list_append (wrap_table->details->children, child);
- if (GTK_WIDGET_REALIZED (container)) {
+ if (gtk_widget_get_realized (widget)) {
gtk_widget_realize (child);
}
- if (GTK_WIDGET_VISIBLE (container) && GTK_WIDGET_VISIBLE (child)) {
- if (GTK_WIDGET_MAPPED (container)) {
+ if (gtk_widget_get_visible (widget) && gtk_widget_get_visible (child)) {
+ if (gtk_widget_get_mapped (widget)) {
gtk_widget_map (child);
}
@@ -439,7 +441,7 @@ eel_wrap_table_remove (GtkContainer *container,
wrap_table = EEL_WRAP_TABLE (container);;
- child_was_visible = GTK_WIDGET_VISIBLE (child);
+ child_was_visible = gtk_widget_get_visible (child);
gtk_widget_unparent (child);
wrap_table->details->children = g_list_remove (wrap_table->details->children, child);
@@ -533,7 +535,7 @@ wrap_table_layout (EelWrapTable *wrap_table)
item = iterator->data;
- if (GTK_WIDGET_VISIBLE (item)) {
+ if (gtk_widget_get_visible (item)) {
GtkAllocation item_allocation;
if (wrap_table->details->homogeneous) {
@@ -630,7 +632,7 @@ wrap_table_get_max_child_dimensions (const EelWrapTable *wrap_table)
child = iterator->data;
- if (GTK_WIDGET_VISIBLE (child)) {
+ if (gtk_widget_get_visible (child)) {
GtkRequisition child_requisition;
EelDimensions child_dimensions;
@@ -831,7 +833,7 @@ eel_wrap_table_find_child_at_event_point (const EelWrapTable *wrap_table,
child = iterator->data;
- if (GTK_WIDGET_VISIBLE (child)) {
+ if (gtk_widget_get_visible (child)) {
EelIRect child_bounds;
child_bounds = eel_gtk_widget_get_bounds (child);
--
cgit v0.8.3.1

View File

@ -1,11 +0,0 @@
--- nautilus-2.5.7/libnautilus-private/apps_nautilus_preferences.schemas.in.rhconfig 2004-02-13 09:14:16.000000000 +0100
+++ nautilus-2.5.7/libnautilus-private/apps_nautilus_preferences.schemas.in 2004-02-13 09:17:23.000000000 +0100
@@ -144,7 +144,7 @@
<applyto>/apps/nautilus/preferences/theme</applyto>
<owner>nautilus</owner>
<type>string</type>
- <default>default</default>
+ <default>Bluecurve</default>
<locale name="C">
<short>Current Nautilus theme (deprecated)</short>
<long>

View File

@ -21,49 +21,4 @@ index 353931f..d7c5618 100644
#: ../libnautilus-private/nautilus-file-operations.c:2876
msgid "Duplicating %'d file (in \"%B\")"
diff --git a/po/bn_IN.po b/po/bn_IN.po
index 51bb767..a7a330c 100644
--- a/po/bn_IN.po
+++ b/po/bn_IN.po
@@ -2286,14 +2286,14 @@ msgstr "\"%B\"-র প্রতিলিপি তৈরি করা হচ্
#: ../libnautilus-private/nautilus-file-operations.c:2890
msgid "Moving %'d file (in \"%B\") to \"%B\""
msgid_plural "Moving %'d files (in \"%B\") to \"%B\""
-msgstr[0] " \"%B\"-এ উপস্থিত %'d ফাইল \"%B\"-এ স্থানান্তর করা হচ্ছে"
-msgstr[1] " \"%B\"-এ উপস্থিত %'d ফাইল \"%B\"-এ স্থানান্তর করা হচ্ছে"
+msgstr[0] " \"%2$B\"-এ উপস্থিত %1$'d ফাইল \"%3$B\"-এ স্থানান্তর করা হচ্ছে"
+msgstr[1] " \"%2$B\"-এ উপস্থিত %1$'d ফাইল \"%3$B\"-এ স্থানান্তর করা হচ্ছে"
#: ../libnautilus-private/nautilus-file-operations.c:2894
msgid "Copying %'d file (in \"%B\") to \"%B\""
msgid_plural "Copying %'d files (in \"%B\") to \"%B\""
-msgstr[0] " \"%B\"-এ উপস্থিত %'d ফাইল \"%B\"-এ কপি হচ্ছে"
-msgstr[1] " \"%B\"-এ উপস্থিত %'d ফাইল \"%B\"-এ কপি হচ্ছে"
+msgstr[0] " \"%2$B\"-এ উপস্থিত %1$'d ফাইল \"%3$B\"-এ কপি হচ্ছে"
+msgstr[1] " \"%2$B\"-এ উপস্থিত %1$'d ফাইল \"%3$B\"-এ কপি হচ্ছে"
#: ../libnautilus-private/nautilus-file-operations.c:2902
msgid "Duplicating %'d file (in \"%B\")"
diff --git a/po/gu.po b/po/gu.po
index 0dd7313..24d916a 100644
--- a/po/gu.po
+++ b/po/gu.po
@@ -2240,14 +2240,14 @@ msgstr "\"%B\" ની નકલ કરી રહ્યા છીએ"
#: ../libnautilus-private/nautilus-file-operations.c:2890
msgid "Moving %'d file (in \"%B\") to \"%B\""
msgid_plural "Moving %'d files (in \"%B\") to \"%B\""
-msgstr[0] "\"%B\" માં %'d ફાઇલોને ખસેડી રહ્યા છે (\"%B\" માં)"
-msgstr[1] "\"%B\" માં %'d ને ખસેડી રહ્યા છે (\"%B\" માં)"
+msgstr[0] "\"%3$B\" માં %1$'d ફાઇલોને ખસેડી રહ્યા છે (\"%2$B\" માં)"
+msgstr[1] "\"%3$B\" માં %1$'d ને ખસેડી રહ્યા છે (\"%2$B\" માં)"
#: ../libnautilus-private/nautilus-file-operations.c:2894
msgid "Copying %'d file (in \"%B\") to \"%B\""
msgid_plural "Copying %'d files (in \"%B\") to \"%B\""
-msgstr[0] "\"%B\" માં %'d ફાઇલની નકલ કરી રહ્યા છે"
-msgstr[1] "\"%B\" માં %'d ફાઇલોની નકલ કરી રહ્યા છે"
+msgstr[0] "\"%3$B\" માં %1$'d ફાઇલની નકલ કરી રહ્યા છે (\"%2$B\")"
+msgstr[1] "\"%3$B\" માં %1$'d ફાઇલોની નકલ કરી રહ્યા છે (\"%2$B\")"
#: ../libnautilus-private/nautilus-file-operations.c:2902
msgid "Duplicating %'d file (in \"%B\")"

View File

@ -1,22 +0,0 @@
From f2e87dbcdb5535724a59ab9c69afe038b124b2bf Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Sat, 19 Jun 2010 04:01:18 +0000
Subject: Use the right datatype in the schema
GConf calls it a bool, not a boolean.
---
diff --git a/libnautilus-private/apps_nautilus_preferences.schemas.in b/libnautilus-private/apps_nautilus_preferences.schemas.in
index 8c5a910..fbc65fb 100644
--- a/libnautilus-private/apps_nautilus_preferences.schemas.in
+++ b/libnautilus-private/apps_nautilus_preferences.schemas.in
@@ -220,7 +220,7 @@
<key>/schemas/apps/nautilus/preferences/navigation_window_saved_maximized</key>
<applyto>/apps/nautilus/preferences/navigation_window_saved_maximized</applyto>
<owner>nautilus</owner>
- <type>boolean</type>
+ <type>bool</type>
<default></default>
<locale name="C">
<short>Whether the navigation window should be maximized.</short>
--
cgit v0.8.3.1

View File

@ -1,27 +0,0 @@
From ac038a0d90a4d59b564803be2698bc883672ab84 Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Wed, 21 Jul 2010 15:43:06 +0200
Subject: [PATCH] Set default value for the navigation_window_saved_maximized gconf key
And avoid gconftool messages like
WARNING: Failed to parse default value `' for schema (/schemas/apps/nautilus/preferences/navigation_window_saved_maximized)
---
.../apps_nautilus_preferences.schemas.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libnautilus-private/apps_nautilus_preferences.schemas.in b/libnautilus-private/apps_nautilus_preferences.schemas.in
index fbc65fb..c83ee1b 100644
--- a/libnautilus-private/apps_nautilus_preferences.schemas.in
+++ b/libnautilus-private/apps_nautilus_preferences.schemas.in
@@ -221,7 +221,7 @@
<applyto>/apps/nautilus/preferences/navigation_window_saved_maximized</applyto>
<owner>nautilus</owner>
<type>bool</type>
- <default></default>
+ <default>false</default>
<locale name="C">
<short>Whether the navigation window should be maximized.</short>
<long>
--
1.7.1.1

View File

@ -1,34 +0,0 @@
From 4309418a12b43e87a4de1f44d0641a6c902a64ce Mon Sep 17 00:00:00 2001
From: Gregory J. Horvath <hgj@sch.bme.hu>
Date: Wed, 19 May 2010 12:34:46 +0000
Subject: Add a missing GConf schema.
---
diff --git a/libnautilus-private/apps_nautilus_preferences.schemas.in b/libnautilus-private/apps_nautilus_preferences.schemas.in
index 20e4137..2a2501d 100644
--- a/libnautilus-private/apps_nautilus_preferences.schemas.in
+++ b/libnautilus-private/apps_nautilus_preferences.schemas.in
@@ -202,6 +202,21 @@
</schema>
<schema>
+ <key>/schemas/apps/nautilus/preferences/navigation_window_saved_geometry</key>
+ <applyto>/apps/nautilus/preferences/navigation_window_saved_geometry</applyto>
+ <owner>nautilus</owner>
+ <type>string</type>
+ <default></default>
+ <locale name="C">
+ <short>The geometry string for a navigation window.</short>
+ <long>
+ A string containing the saved geometry and coordinates string for
+ navigation windows.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/nautilus/preferences/confirm_trash</key>
<applyto>/apps/nautilus/preferences/confirm_trash</applyto>
<owner>nautilus</owner>
--
cgit v0.8.3.1

View File

@ -1,33 +0,0 @@
From 97d736a0861a81f825698451249564e42d002d4b Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Wed, 19 May 2010 15:42:34 +0000
Subject: Add another missing GConf schema.
---
diff --git a/libnautilus-private/apps_nautilus_preferences.schemas.in b/libnautilus-private/apps_nautilus_preferences.schemas.in
index 2a2501d..fd25f1a 100644
--- a/libnautilus-private/apps_nautilus_preferences.schemas.in
+++ b/libnautilus-private/apps_nautilus_preferences.schemas.in
@@ -215,6 +215,20 @@
</long>
</locale>
</schema>
+
+ <schema>
+ <key>/schemas/apps/nautilus/preferences/navigation_window_saved_maximized</key>
+ <applyto>/apps/nautilus/preferences/navigation_window_saved_maximized</applyto>
+ <owner>nautilus</owner>
+ <type>boolean</type>
+ <default></default>
+ <locale name="C">
+ <short>Whether the navigation window should be maximized.</short>
+ <long>
+ Whether the navigation window should be maximized by default.
+ </long>
+ </locale>
+ </schema>
<schema>
<key>/schemas/apps/nautilus/preferences/confirm_trash</key>
--
cgit v0.8.3.1

View File

@ -1,6 +1,6 @@
%define glib2_version 2.24.0
%define glib2_version 2.25.9
%define pango_version 1.1.3
%define gtk2_version 2.20.0
%define gtk2_version 2.21.2
%define gnome_icon_theme_version 1.1.5
%define libxml2_version 2.4.20
%define desktop_file_utils_version 0.7
@ -11,16 +11,15 @@
%define gconf_version 2.14
%define exempi_version 1.99.5
%define unique_version 1.0.4
%define fake_version 2.30.1
%define gobject_introspection_version 0.6.4
Name: nautilus
Summary: File manager for GNOME
Version: 2.31.5
Release: 3.really.2.30.1%{?dist}
Version: 2.31.6
Release: 1%{?dist}
License: GPLv2+
Group: User Interface/Desktops
Source: http://download.gnome.org/sources/%{name}/2.30/%{name}-%{fake_version}.tar.bz2
Source: http://download.gnome.org/sources/%{name}/2.31/%{name}-%{version}.tar.bz2
URL: http://projects.gnome.org/nautilus/
Requires: gamin
@ -56,6 +55,7 @@ BuildRequires: libselinux-devel
BuildRequires: unique-devel >= %{unique_version}
BuildRequires: gtk-doc
BuildRequires: scrollkeeper
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
Requires(pre): GConf2 >= %{gconf_version}
Requires(preun): GConf2 >= %{gconf_version}
@ -79,7 +79,7 @@ Provides: eel2 = 2.26.0-3
# Some changes to default config
Patch1: nautilus-config.patch
Patch4: nautilus-2.23.5-selinux.patch
Patch4: nautilus-2.31.6-selinux.patch
Patch7: rtl-fix.patch
#Patch8: nautilus-2.22.1-hide-white-screen.patch
@ -89,86 +89,11 @@ Patch10: nautilus-gvfs-desktop-key-2.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=519743
Patch17: nautilus-filetype-symlink-fix.patch
# from upstream
Patch18: nautilus-2.30.1-hide-unmount-when-eject.patch
Patch19: nautilus-gconf-navigation_window_saved_geometry.patch
Patch20: nautilus-gconf-navigation_window_saved_maximized.patch
Patch21: nautilus-gconf-correct-type.patch
Patch22: nautilus-gconf-default-value.patch
# [bn_IN, gu_IN][nautilus] - Its crashing, when drag any file
# https://bugzilla.redhat.com/show_bug.cgi?id=583559
Patch23: nautilus-578086-po.patch
Patch98: nautilus-2.31.x-seal-GtkBoxChild.patch
Patch99: nautilus-2.31.x-seal1.patch
Patch100: 0013-eel-GSEAL-eel-accessibility.patch
Patch101: 0014-eel-GSEAL-eel-alert-dialog.patch
Patch102: 0015-eel-GSEAL-eel-art-gtk-extensions.patch
Patch103: 0016-eel-GSEAL-eel-background-box.patch
Patch104: 0017-eel-GSEAL-eel-background-box.patch
Patch105: 0018-eel-GSEAL-eel-canvas-rect-ellipse.patch
Patch106: 0019-eel-GSEAL-eel-canvas.patch
Patch107: 0020-eel-GSEAL-eel-debug-drawing.patch
Patch108: 0021-eel-GSEAL-eel-editable-label.patch
Patch109: 0022-eel-GSEAL-eel-gtk-container.patch
Patch110: 0023-eel-GSEAL-eel-gtk-extensions.patch
Patch111: 0024-eel-GSEAL-eel-image-table.patch
Patch112: 0025-eel-GSEAL-eel-labeled-image.patch
Patch113: 0026-eel-GSEAL-eel-wrap-table.patch
Patch114: 0027-ln-p-GSEAL-nautilus-autorun.patch
Patch115: 0028-ln-p-GSEAL-nautilus-bookmark.patch
Patch116: 0029-ln-p-GSEAL-nautilus-cell-renderer-pixbuf-emblem.patch
Patch117: 0030-ln-p-GSEAL-nautilus-clipboard-monitor.patch
Patch118: 0031-ln-p-GSEAL-nautilus-clipboard.patch
Patch119: 0032-ln-p-GSEAL-nautilus-dnd.patch
Patch120: 0033-ln-p-GSEAL-nautilus-entry.patch
Patch121: 0034-ln-p-GSEAL-nautilus-file-conflict-dialog.patch
Patch122: 0035-ln-p-GSEAL-nautilus-file-operations.patch
Patch123: 0036-ln-p-GSEAL-nautilus-horizontal-splitter.patch
Patch124: 0037-ln-p-GSEAL-nautilus-icon-canvas-item.patch
Patch125: 0038-ln-p-GSEAL-nautilus-icon-container.patch
Patch126: 0039-ln-p-GSEAL-nautilus-icon-dnd.patch
Patch127: 0040-ln-p-GSEAL-nautilus-keep-last-vertical-box.patch
Patch128: 0041-ln-p-GSEAL-nautilus-open-with-dialog.patch
Patch129: 0042-ln-p-GSEAL-nautilus-progress-info.patch
Patch130: 0043-ln-p-GSEAL-nautilus-tree-view-drag-dest.patch
Patch131: 0044-ln-p-GSEAL-nautilus-undo.patch
Patch132: 0045-file-manager-GSEAL-fm-desktop-icon-view.patch
Patch133: 0046-file-manager-GSEAL-fm-directory-view.patch
Patch134: 0047-file-manager-GSEAL-fm-ditem-page.patch
Patch135: 0048-file-manager-GSEAL-fm-icon-view.patch
Patch136: 0049-file-manager-GSEAL-fm-list-model.patch
Patch137: 0050-file-manager-GSEAL-fm-list-view.patch
Patch138: 0051-file-manager-GSEAL-fm-properties-window.patch
Patch139: 0052-file-manager-GSEAL-fm-tree-view.patch
Patch140: 0053-src-GSEAL-nautilus-application.patch
Patch141: 0054-src-GSEAL-nautilus-connect-server-dialog.patch
Patch142: 0055-src-GSEAL-nautilus-desktop-window.patch
Patch143: 0056-src-GSEAL-nautilus-emblem-sidebar.patch
Patch144: 0057-src-GSEAL-nautilus-information-panel.patch
Patch145: 0058-src-GSEAL-nautilus-location-bar.patch
Patch146: 0059-src-GSEAL-nautilus-location-dialog.patch
Patch147: 0060-src-GSEAL-nautilus-navigation-window-menus.patch
Patch148: 0061-src-GSEAL-nautilus-navigation-window.patch
Patch149: 0062-src-GSEAL-nautilus-notebook.patch
Patch150: 0063-src-GSEAL-nautilus-pathbar.patch
Patch151: 0064-src-GSEAL-nautilus-places-sidebar.patch
Patch152: 0065-src-GSEAL-nautilus-property-browser.patch
Patch153: 0066-src-GSEAL-nautilus-query-editor.patch
Patch154: 0067-src-GSEAL-nautilus-side-pane.patch
Patch155: 0068-src-GSEAL-nautilus-sidebar-title.patch
Patch156: 0069-src-GSEAL-nautilus-spatial-window.patch
Patch157: 0070-src-GSEAL-nautilus-window-bookmarks.patch
Patch158: 0071-src-GSEAL-nautilus-window-manage-views.patch
Patch159: 0072-src-GSEAL-nautilus-window.patch
Patch160: 0073-src-GSEAL-nautilus-zoom-control.patch
Patch161: 0074-test-GSEAL-test-eel-image-table.patch
%description
Nautilus is the file manager and graphical shell for the GNOME desktop
that makes it easy to manage your files and the rest of your system.
@ -199,7 +124,7 @@ This package provides libraries and header files needed
for developing nautilus extensions.
%prep
%setup -q -n %{name}-%{fake_version}
%setup -q -n %{name}-%{version}
%patch1 -p1 -b .config
%patch4 -p1 -b .selinux
@ -207,80 +132,8 @@ for developing nautilus extensions.
# %patch8 -p1 -b .hide-white-screen
%patch10 -p1 -b .gvfs-desktop-key
%patch17 -p0 -b .symlink
%patch18 -p1 -b .hide-unmount
%patch19 -p1 -b .saved-geometry
%patch20 -p1 -b .saved-maximized
%patch21 -p1 -b .gconf-type
%patch22 -p1 -b .gconf-default
%patch23 -p1 -b .gu_IN-crash
# seal
%patch98 -p1 -b .seal-GtkBoxChild
%patch99 -p1 -b .seal1
%patch100 -p1 -b .0013-eel-GSEAL-eel-accessibility
%patch101 -p1 -b .0014-eel-GSEAL-eel-alert-dialog
%patch102 -p1 -b .0015-eel-GSEAL-eel-art-gtk-extensions
%patch103 -p1 -b .0016-eel-GSEAL-eel-background-box
%patch104 -p1 -b .0017-eel-GSEAL-eel-background-box
%patch105 -p1 -b .0018-eel-GSEAL-eel-canvas-rect-ellipse
%patch106 -p1 -b .0019-eel-GSEAL-eel-canvas
%patch107 -p1 -b .0020-eel-GSEAL-eel-debug-drawing
%patch108 -p1 -b .0021-eel-GSEAL-eel-editable-label
%patch109 -p1 -b .0022-eel-GSEAL-eel-gtk-container
%patch110 -p1 -b .0023-eel-GSEAL-eel-gtk-extensions
%patch111 -p1 -b .0024-eel-GSEAL-eel-image-table
%patch112 -p1 -b .0025-eel-GSEAL-eel-labeled-image
%patch113 -p1 -b .0026-eel-GSEAL-eel-wrap-table
%patch114 -p1 -b .0027-ln-p-GSEAL-nautilus-autorun
%patch115 -p1 -b .0028-ln-p-GSEAL-nautilus-bookmark
%patch116 -p1 -b .0029-ln-p-GSEAL-nautilus-cell-renderer-pixbuf-emblem
# %patch117 -p1 -b .0030-ln-p-GSEAL-nautilus-clipboard-monitor
%patch118 -p1 -b .0031-ln-p-GSEAL-nautilus-clipboard
%patch119 -p1 -b .0032-ln-p-GSEAL-nautilus-dnd
%patch120 -p1 -b .0033-ln-p-GSEAL-nautilus-entry
# %patch121 -p1 -b .0034-ln-p-GSEAL-nautilus-file-conflict-dialog
%patch122 -p1 -b .0035-ln-p-GSEAL-nautilus-file-operations
%patch123 -p1 -b .0036-ln-p-GSEAL-nautilus-horizontal-splitter
%patch124 -p1 -b .0037-ln-p-GSEAL-nautilus-icon-canvas-item
%patch125 -p1 -b .0038-ln-p-GSEAL-nautilus-icon-container
%patch126 -p1 -b .0039-ln-p-GSEAL-nautilus-icon-dnd
%patch127 -p1 -b .0040-ln-p-GSEAL-nautilus-keep-last-vertical-box
%patch128 -p1 -b .0041-ln-p-GSEAL-nautilus-open-with-dialog
%patch129 -p1 -b .0042-ln-p-GSEAL-nautilus-progress-info
%patch130 -p1 -b .0043-ln-p-GSEAL-nautilus-tree-view-drag-dest
%patch131 -p1 -b .0044-ln-p-GSEAL-nautilus-undo
%patch132 -p1 -b .0045-file-manager-GSEAL-fm-desktop-icon-view
# %patch133 -p1 -b .0046-file-manager-GSEAL-fm-directory-view
%patch134 -p1 -b .0047-file-manager-GSEAL-fm-ditem-page
%patch135 -p1 -b .0048-file-manager-GSEAL-fm-icon-view
%patch136 -p1 -b .0049-file-manager-GSEAL-fm-list-model
%patch137 -p1 -b .0050-file-manager-GSEAL-fm-list-view
# %patch138 -p1 -b .0051-file-manager-GSEAL-fm-properties-window
%patch139 -p1 -b .0052-file-manager-GSEAL-fm-tree-view
%patch140 -p1 -b .0053-src-GSEAL-nautilus-application
%patch141 -p1 -b .0054-src-GSEAL-nautilus-connect-server-dialog
%patch142 -p1 -b .0055-src-GSEAL-nautilus-desktop-window
%patch143 -p1 -b .0056-src-GSEAL-nautilus-emblem-sidebar
# %patch144 -p1 -b .0057-src-GSEAL-nautilus-information-panel
%patch145 -p1 -b .0058-src-GSEAL-nautilus-location-bar
%patch146 -p1 -b .0059-src-GSEAL-nautilus-location-dialog
%patch147 -p1 -b .0060-src-GSEAL-nautilus-navigation-window-menus
%patch148 -p1 -b .0061-src-GSEAL-nautilus-navigation-window
%patch149 -p1 -b .0062-src-GSEAL-nautilus-notebook
%patch150 -p1 -b .0063-src-GSEAL-nautilus-pathbar
%patch151 -p1 -b .0064-src-GSEAL-nautilus-places-sidebar
%patch152 -p1 -b .0065-src-GSEAL-nautilus-property-browser
%patch153 -p1 -b .0066-src-GSEAL-nautilus-query-editor
%patch154 -p1 -b .0067-src-GSEAL-nautilus-side-pane
%patch155 -p1 -b .0068-src-GSEAL-nautilus-sidebar-title
%patch156 -p1 -b .0069-src-GSEAL-nautilus-spatial-window
%patch157 -p1 -b .0070-src-GSEAL-nautilus-window-bookmarks
%patch158 -p1 -b .0071-src-GSEAL-nautilus-window-manage-views
%patch159 -p1 -b .0072-src-GSEAL-nautilus-window
%patch160 -p1 -b .0073-src-GSEAL-nautilus-zoom-control
%patch161 -p1 -b .0074-test-GSEAL-test-eel-image-table
%build
@ -400,6 +253,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
%files extensions
%defattr(-, root, root)
%{_libdir}/libnautilus-extension.so.*
%{_libdir}/girepository-1.0/*.typelib
%dir %{_libdir}/nautilus
%dir %{_libdir}/nautilus/extensions-2.0
@ -408,10 +262,14 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
%{_includedir}/nautilus
%{_libdir}/pkgconfig/*
%{_libdir}/*.so
%{_datadir}/gir-1.0/*.gir
%doc %{_datadir}/gtk-doc/html/libnautilus-extension/*
%changelog
* Thu Aug 12 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.31.6-1
- Update to 2.31.6
* Fri Aug 6 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.31.5-3.really.2.30.1
- Revert back (temporarily) to 2.30.1 and mask it as 2.31.5 due to recent gnome3 changes

View File

@ -1 +1 @@
e1bda55f9c6cd223561da066dbc4e863 nautilus-2.30.1.tar.bz2
bcae941993278b23f8697e7f9125f63b nautilus-2.31.6.tar.bz2