[gnome-packagekit] Build against the latest GTK3 release
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Build against the latest GTK3 release
- Date: Mon, 4 Oct 2010 07:52:12 +0000 (UTC)
commit e442fcfea3dfa94b27966f2326b61707f579e36c
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Oct 4 08:51:43 2010 +0100
Build against the latest GTK3 release
I had to take out the cursor setting from the cell renderer render() function,
where it seems totally misplaced.
Signed-off-by: Richard Hughes <richard hughsie com>
src/gpk-animated-icon.c | 8 ++++----
src/gpk-application.c | 2 +-
src/gpk-cell-renderer-uri.c | 23 ++++++-----------------
src/gpk-update-viewer.c | 2 +-
src/gpk-x11.c | 4 ++--
5 files changed, 14 insertions(+), 25 deletions(-)
---
diff --git a/src/gpk-animated-icon.c b/src/gpk-animated-icon.c
index 6a73e4f..f4e1712 100644
--- a/src/gpk-animated-icon.c
+++ b/src/gpk-animated-icon.c
@@ -259,7 +259,7 @@ gpk_animated_icon_enable_animation (GpkAnimatedIcon *icon, gboolean enabled)
* @object: The object to destroy
**/
static void
-gpk_animated_icon_destroy (GtkObject *object)
+gpk_animated_icon_destroy (GtkWidget *object)
{
GpkAnimatedIcon *icon;
icon = GPK_ANIMATED_ICON (object);
@@ -272,14 +272,14 @@ gpk_animated_icon_destroy (GtkObject *object)
icon->filename = NULL;
gpk_animated_icon_free_pixbufs (icon);
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
+ GTK_WIDGET_CLASS (parent_class)->destroy (object);
}
static void
gpk_animated_icon_class_init (GpkAnimatedIconClass *class)
{
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
- object_class->destroy = gpk_animated_icon_destroy;
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
+ widget_class->destroy = gpk_animated_icon_destroy;
parent_class = g_type_class_peek_parent (class);
}
diff --git a/src/gpk-application.c b/src/gpk-application.c
index c56b1b9..3db4196 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -2640,7 +2640,7 @@ gpk_application_popup_position_menu (GtkMenu *menu, gint *x, gint *y, gboolean *
/* find the location */
window = gtk_widget_get_window (widget);
gdk_window_get_origin (window, &menu_xpos, &menu_ypos);
- gtk_widget_size_request (GTK_WIDGET (widget), &requisition);
+ gtk_widget_get_preferred_size (GTK_WIDGET (widget), &requisition, NULL);
/* set the position */
*x = menu_xpos;
diff --git a/src/gpk-cell-renderer-uri.c b/src/gpk-cell-renderer-uri.c
index bc19988..a083b61 100644
--- a/src/gpk-cell-renderer-uri.c
+++ b/src/gpk-cell-renderer-uri.c
@@ -162,29 +162,18 @@ gpk_cell_renderer_uri_set_link_color (GdkColor *color, gboolean visited)
static void
gpk_cell_renderer_uri_render (GtkCellRenderer *cell,
- GdkWindow *window,
- GtkWidget *widget,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GdkRectangle *expose_area,
- GtkCellRendererState flags)
+ cairo_t *cr,
+ GtkWidget *widget,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags)
{
gboolean ret;
- GdkDisplay *display;
- GdkCursor *cursor;
GtkStyle *style;
GdkColor *color;
gchar *color_string;
GpkCellRendererUri *cru = GPK_CELL_RENDERER_URI (cell);
- /* set cursor */
- display = gdk_display_get_default ();
- if (cru->uri == NULL)
- cursor = gdk_cursor_new_for_display (display, GDK_XTERM);
- else
- cursor = gdk_cursor_new_for_display (display, GDK_HAND2);
- gdk_window_set_cursor (window, cursor);
- gdk_cursor_unref (cursor);
ret = gpk_cell_renderer_uri_is_clicked (cru);
/* get a copy of the widget color */
@@ -230,7 +219,7 @@ gpk_cell_renderer_uri_render (GtkCellRenderer *cell,
g_object_set (G_OBJECT(cru), "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL);
}
- GTK_CELL_RENDERER_CLASS (parent_class)->render (cell, window, widget, background_area, cell_area, expose_area, flags);
+ GTK_CELL_RENDERER_CLASS (parent_class)->render (cell, cr, widget, background_area, cell_area, flags);
}
/**
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 0bde267..71980e5 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -2981,7 +2981,7 @@ static void
gpk_update_viewer_vpaned_realized_cb (GtkWidget *widget, GpkUpdateViewer *update_viewer)
{
GtkRequisition req;
- gtk_widget_size_request (widget, &req);
+ gtk_widget_get_preferred_size (widget, &req, NULL);
egg_debug ("req.height=%i", req.height);
if (req.height != 0)
gtk_paned_set_position (GTK_PANED (widget), 166);
diff --git a/src/gpk-x11.c b/src/gpk-x11.c
index d37fd74..571b286 100644
--- a/src/gpk-x11.c
+++ b/src/gpk-x11.c
@@ -171,7 +171,7 @@ gpk_x11_get_title (GpkX11 *x11)
atom_type = gdk_x11_get_xatom_by_name_for_display (x11->priv->gdk_display, "UTF8_STRING");
rc = XGetWindowProperty (x11->priv->display, x11->priv->window, atom, 0, G_MAXLONG, False, atom_type,
&type, &format, &nitems, &bytes_after, (void*) &data);
- gdk_error_trap_pop ();
+ gdk_error_trap_pop_ignored ();
if (rc == Success && nitems > 0) {
title = g_strdup (data);
goto out;
@@ -181,7 +181,7 @@ gpk_x11_get_title (GpkX11 *x11)
gdk_error_trap_push ();
rc = XGetWindowProperty (x11->priv->display, x11->priv->window, XA_WM_NAME, 0, G_MAXLONG, False, XA_STRING,
&type, &format, &nitems, &bytes_after, (void*) &data);
- gdk_error_trap_pop ();
+ gdk_error_trap_pop_ignored ();
if (rc == Success && nitems > 0) {
title = g_strdup (data);
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]