summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-08-07 11:10:10 +0200
committerraveit65 <[email protected]>2016-09-01 08:21:46 +0200
commit7d859a9e17f0c4f0b790e8b2a3d8ac25481d7fe6 (patch)
tree4a025beb91143d2a41863861b79083cde1a20a63
parent8819ce43d5dcdfd102fd63f7a5ae7713a9e25b04 (diff)
downloadmate-utils-7d859a9e17f0c4f0b790e8b2a3d8ac25481d7fe6.tar.bz2
mate-utils-7d859a9e17f0c4f0b790e8b2a3d8ac25481d7fe6.tar.xz
avoid deprecated gdk_cursor_new ()
-rw-r--r--gsearchtool/src/gsearchtool-callbacks.c7
-rw-r--r--mate-dictionary/src/gdict-window.c5
-rw-r--r--mate-screenshot/src/screenshot-dialog.c4
-rw-r--r--mate-screenshot/src/screenshot-utils.c6
4 files changed, 16 insertions, 6 deletions
diff --git a/gsearchtool/src/gsearchtool-callbacks.c b/gsearchtool/src/gsearchtool-callbacks.c
index 9b13e471..49dd5b7a 100644
--- a/gsearchtool/src/gsearchtool-callbacks.c
+++ b/gsearchtool/src/gsearchtool-callbacks.c
@@ -1421,11 +1421,14 @@ file_motion_notify_cb (GtkWidget *widget,
GdkEventMotion *event,
gpointer user_data)
{
- GSearchWindow * gsearch = user_data;
+ GSearchWindow * gsearch = user_data;
+ GdkDisplay *display;
GdkCursor * cursor;
GtkTreePath * last_hover_path;
GtkTreeIter iter;
+ display = gtk_widget_get_display (GTK_WIDGET (user_data));
+
if (gsearch->is_search_results_single_click_to_activate == FALSE) {
return FALSE;
}
@@ -1442,7 +1445,7 @@ file_motion_notify_cb (GtkWidget *widget,
NULL, NULL, NULL);
if (gsearch->search_results_hover_path != NULL) {
- cursor = gdk_cursor_new (GDK_HAND2);
+ cursor = gdk_cursor_new_for_display (display, GDK_HAND2);
}
else {
cursor = NULL;
diff --git a/mate-dictionary/src/gdict-window.c b/mate-dictionary/src/gdict-window.c
index cec563f6..3c716080 100644
--- a/mate-dictionary/src/gdict-window.c
+++ b/mate-dictionary/src/gdict-window.c
@@ -316,13 +316,16 @@ static void
gdict_window_lookup_start_cb (GdictContext *context,
GdictWindow *window)
{
+ GdkDisplay *display;
gchar *message;
+ display = gtk_widget_get_display (GTK_WIDGET (window));
+
if (!window->word)
return;
if (!window->busy_cursor)
- window->busy_cursor = gdk_cursor_new (GDK_WATCH);
+ window->busy_cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
message = g_strdup_printf (_("Searching for '%s'..."), window->word);
diff --git a/mate-screenshot/src/screenshot-dialog.c b/mate-screenshot/src/screenshot-dialog.c
index 6e71ebf8..fd9f12e4 100644
--- a/mate-screenshot/src/screenshot-dialog.c
+++ b/mate-screenshot/src/screenshot-dialog.c
@@ -408,14 +408,16 @@ screenshot_dialog_set_busy (ScreenshotDialog *dialog,
gboolean busy)
{
GtkWidget *toplevel;
+ GdkDisplay *display;
toplevel = screenshot_dialog_get_toplevel (dialog);
+ display = gtk_widget_get_display (GTK_WIDGET (dialog));
if (busy)
{
GdkCursor *cursor;
/* Change cursor to busy */
- cursor = gdk_cursor_new (GDK_WATCH);
+ cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
gdk_window_set_cursor (gtk_widget_get_window (toplevel), cursor);
#if GTK_CHECK_VERSION (3, 0, 0)
g_object_unref (cursor);
diff --git a/mate-screenshot/src/screenshot-utils.c b/mate-screenshot/src/screenshot-utils.c
index 0efd43b8..f2350184 100644
--- a/mate-screenshot/src/screenshot-utils.c
+++ b/mate-screenshot/src/screenshot-utils.c
@@ -499,6 +499,7 @@ emit_select_callback_in_idle (gpointer user_data)
void
screenshot_select_area_async (SelectAreaCallback callback)
{
+ GdkDisplay *display;
GdkCursor *cursor;
#if GTK_CHECK_VERSION (3, 0, 0)
GdkDeviceManager *manager;
@@ -524,10 +525,11 @@ screenshot_select_area_async (SelectAreaCallback callback)
g_signal_connect (data.window, "button-release-event", G_CALLBACK (select_area_button_release), &data);
g_signal_connect (data.window, "motion-notify-event", G_CALLBACK (select_area_motion_notify), &data);
- cursor = gdk_cursor_new (GDK_CROSSHAIR);
+ display = gdk_display_get_default ();
+ cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
#if GTK_CHECK_VERSION (3, 0, 0)
- manager = gdk_display_get_device_manager (gdk_display_get_default ());
+ manager = gdk_display_get_device_manager (display);
pointer = gdk_device_manager_get_client_pointer (manager);
keyboard = gdk_device_get_associated_device (pointer);