[gedit] filebrowser plugin: replace deprecated gdk_cursor_new
- From: Sebastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] filebrowser plugin: replace deprecated gdk_cursor_new
- Date: Mon, 5 Jan 2015 22:19:35 +0000 (UTC)
commit fc97ef221c7753033d00cf120d69bb8dda41666c
Author: Sebastien Lafargue <slafargue gnome org>
Date: Mon Jan 5 23:17:59 2015 +0100
filebrowser plugin: replace deprecated gdk_cursor_new
plugins/filebrowser/gedit-file-browser-view.c | 5 ++++-
plugins/filebrowser/gedit-file-browser-widget.c | 9 +++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/plugins/filebrowser/gedit-file-browser-view.c b/plugins/filebrowser/gedit-file-browser-view.c
index 48ffc70..81e4404 100644
--- a/plugins/filebrowser/gedit-file-browser-view.c
+++ b/plugins/filebrowser/gedit-file-browser-view.c
@@ -310,7 +310,10 @@ set_click_policy_property (GeditFileBrowserView *obj,
if (click_policy == GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_SINGLE)
{
if (obj->priv->hand_cursor == NULL)
- obj->priv->hand_cursor = gdk_cursor_new (GDK_HAND2);
+ {
+ display = gtk_widget_get_display (GTK_WIDGET (obj));
+ obj->priv->hand_cursor = gdk_cursor_new_for_display (display, GDK_HAND2);
+ }
}
else if (click_policy == GEDIT_FILE_BROWSER_VIEW_CLICK_POLICY_DOUBLE)
{
diff --git a/plugins/filebrowser/gedit-file-browser-widget.c b/plugins/filebrowser/gedit-file-browser-widget.c
index 9dc55ee..72a3da6 100644
--- a/plugins/filebrowser/gedit-file-browser-widget.c
+++ b/plugins/filebrowser/gedit-file-browser-widget.c
@@ -986,6 +986,7 @@ static void
gedit_file_browser_widget_init (GeditFileBrowserWidget *obj)
{
GtkBuilder *builder;
+ GdkDisplay *display;
GAction *action;
GError *error = NULL;
@@ -997,7 +998,8 @@ gedit_file_browser_widget_init (GeditFileBrowserWidget *obj)
g_object_unref,
free_name_icon);
- obj->priv->busy_cursor = gdk_cursor_new (GDK_WATCH);
+ display = gtk_widget_get_display (GTK_WIDGET (obj));
+ obj->priv->busy_cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
builder = gtk_builder_new ();
if (!gtk_builder_add_from_resource (builder,
@@ -2015,7 +2017,10 @@ set_busy (GeditFileBrowserWidget *obj,
if (busy)
{
- cursor = gdk_cursor_new (GDK_WATCH);
+ GdkDisplay *display;
+
+ display = gtk_widget_get_display (GTK_WIDGET (obj));
+ cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
gdk_window_set_cursor (window, cursor);
g_object_unref (cursor);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]