[gnome-packagekit] Build fixes for new GTK+ deprecations
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Build fixes for new GTK+ deprecations
- Date: Wed, 22 Dec 2010 17:55:11 +0000 (UTC)
commit a1fbbc64a85d5b7bce50062fb9099a6684ded775
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Dec 22 18:54:20 2010 +0100
Build fixes for new GTK+ deprecations
src/gpk-common.c | 3 ++-
src/gpk-dbus-task.c | 3 ++-
src/gpk-distro-upgrade.c | 10 +++++-----
src/gpk-update-viewer.c | 4 ++--
src/gpk-x11.c | 2 +-
5 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/src/gpk-common.c b/src/gpk-common.c
index a812511..9f15ad2 100644
--- a/src/gpk-common.c
+++ b/src/gpk-common.c
@@ -28,6 +28,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
#include <dbus/dbus-glib.h>
#include <packagekit-glib2/packagekit.h>
#include <locale.h>
@@ -269,7 +270,7 @@ gpk_window_set_parent_xid (GtkWindow *window, guint32 xid)
g_return_val_if_fail (xid != 0, FALSE);
display = gdk_display_get_default ();
- parent_window = gdk_window_foreign_new_for_display (display, xid);
+ parent_window = gdk_x11_window_foreign_new_for_display (display, xid);
our_window = gtk_widget_get_window (GTK_WIDGET (window));
/* set this above our parent */
diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
index 2b01abe..1ca4446 100644
--- a/src/gpk-dbus-task.c
+++ b/src/gpk-dbus-task.c
@@ -29,6 +29,7 @@
#include <gio/gio.h>
#include <fontconfig/fontconfig.h>
+#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#include <libnotify/notify.h>
#include <packagekit-glib2/packagekit.h>
@@ -146,7 +147,7 @@ gpk_dbus_task_set_xid (GpkDbusTask *dtask, guint32 xid)
g_return_val_if_fail (GPK_IS_DBUS_TASK (dtask), FALSE);
display = gdk_display_get_default ();
- dtask->priv->parent_window = gdk_window_foreign_new_for_display (display, xid);
+ dtask->priv->parent_window = gdk_x11_window_foreign_new_for_display (display, xid);
g_debug ("parent_window=%p", dtask->priv->parent_window);
gpk_modal_dialog_set_parent (dtask->priv->dialog, dtask->priv->parent_window);
return TRUE;
diff --git a/src/gpk-distro-upgrade.c b/src/gpk-distro-upgrade.c
index 17d7998..c79ff4b 100644
--- a/src/gpk-distro-upgrade.c
+++ b/src/gpk-distro-upgrade.c
@@ -422,7 +422,7 @@ gpk_distro_upgrade_create_page_introduction (GpkDistroUpgradePrivate *priv)
gtk_assistant_set_page_type (GTK_ASSISTANT (priv->assistant), vbox, GTK_ASSISTANT_PAGE_INTRO);
gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant), vbox, TRUE);
- pixbuf = gtk_widget_render_icon (priv->assistant, GTK_STOCK_REFRESH, GTK_ICON_SIZE_DIALOG, NULL);
+ pixbuf = gtk_widget_render_icon_pixbuf (priv->assistant, GTK_STOCK_REFRESH, GTK_ICON_SIZE_DIALOG);
gtk_assistant_set_page_header_image (GTK_ASSISTANT (priv->assistant), vbox, pixbuf);
g_object_unref (pixbuf);
}
@@ -505,7 +505,7 @@ gpk_distro_upgrade_create_page_choose (GpkDistroUpgradePrivate *priv)
/* we need this for later */
priv->page_choose_vbox = vbox;
- pixbuf = gtk_widget_render_icon (priv->assistant, GTK_STOCK_REFRESH, GTK_ICON_SIZE_DIALOG, NULL);
+ pixbuf = gtk_widget_render_icon_pixbuf (priv->assistant, GTK_STOCK_REFRESH, GTK_ICON_SIZE_DIALOG);
gtk_assistant_set_page_header_image (GTK_ASSISTANT (priv->assistant), vbox, pixbuf);
g_object_unref (pixbuf);
}
@@ -583,7 +583,7 @@ gpk_distro_upgrade_create_page_kind (GpkDistroUpgradePrivate *priv)
/* TRANSLATORS: this is a choose page title */
gtk_assistant_set_page_title (GTK_ASSISTANT (priv->assistant), vbox, _("Choose desired download options"));
- pixbuf = gtk_widget_render_icon (priv->assistant, GTK_STOCK_REFRESH, GTK_ICON_SIZE_DIALOG, NULL);
+ pixbuf = gtk_widget_render_icon_pixbuf (priv->assistant, GTK_STOCK_REFRESH, GTK_ICON_SIZE_DIALOG);
gtk_assistant_set_page_header_image (GTK_ASSISTANT (priv->assistant), vbox, pixbuf);
g_object_unref (pixbuf);
}
@@ -626,7 +626,7 @@ gpk_distro_upgrade_create_page_confirmation (GpkDistroUpgradePrivate *priv)
gtk_assistant_set_page_type (GTK_ASSISTANT (priv->assistant), vbox, GTK_ASSISTANT_PAGE_CONFIRM);
gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant), vbox, TRUE);
- pixbuf = gtk_widget_render_icon (priv->assistant, GTK_STOCK_REFRESH, GTK_ICON_SIZE_DIALOG, NULL);
+ pixbuf = gtk_widget_render_icon_pixbuf (priv->assistant, GTK_STOCK_REFRESH, GTK_ICON_SIZE_DIALOG);
gtk_assistant_set_page_header_image (GTK_ASSISTANT (priv->assistant), vbox, pixbuf);
g_object_unref (pixbuf);
}
@@ -663,7 +663,7 @@ gpk_distro_upgrade_create_page_action (GpkDistroUpgradePrivate *priv)
gtk_assistant_set_page_type (GTK_ASSISTANT (priv->assistant), vbox, GTK_ASSISTANT_PAGE_PROGRESS);
gtk_assistant_set_page_complete (GTK_ASSISTANT (priv->assistant), vbox, TRUE);
- pixbuf = gtk_widget_render_icon (priv->assistant, GTK_STOCK_REFRESH, GTK_ICON_SIZE_DIALOG, NULL);
+ pixbuf = gtk_widget_render_icon_pixbuf (priv->assistant, GTK_STOCK_REFRESH, GTK_ICON_SIZE_DIALOG);
gtk_assistant_set_page_header_image (GTK_ASSISTANT (priv->assistant), vbox, pixbuf);
g_object_unref (pixbuf);
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 5bbcea3..83781dd 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -981,7 +981,7 @@ gpk_update_viewer_progress_cb (PkProgress *progress, PkProgressType type, gpoint
display = gdk_display_get_default ();
cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
gdk_window_set_cursor (window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
/* set status */
@@ -2861,7 +2861,7 @@ gpk_update_viewer_textview_set_cursor (GtkTextView *text_view, gint x, gint y)
else
cursor = gdk_cursor_new_for_display (gdk_display_get_default (), GDK_XTERM);
gdk_window_set_cursor (gtk_text_view_get_window (text_view, GTK_TEXT_WINDOW_TEXT), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
if (tags != NULL)
diff --git a/src/gpk-x11.c b/src/gpk-x11.c
index 46fddef..9b54454 100644
--- a/src/gpk-x11.c
+++ b/src/gpk-x11.c
@@ -53,7 +53,7 @@ gpk_x11_set_xid (GpkX11 *x11, guint32 xid)
g_return_val_if_fail (GPK_IS_X11 (x11), FALSE);
- window = gdk_window_foreign_new_for_display (x11->priv->gdk_display, xid);
+ window = gdk_x11_window_foreign_new_for_display (x11->priv->gdk_display, xid);
/* save the x state */
x11->priv->display = GDK_DISPLAY_XDISPLAY (x11->priv->gdk_display);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]