From: Carlos Garcia Campos Date: Sat, 11 Aug 2007 09:40:45 +0000 (+0000) Subject: Fix multihead problems in toolbar editor. Fixes bug #382055. X-Git-Tag: EVINCE_2_19_4~28 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=ee149b4e364bd98778084dd3fe24b4ca7abed7ae;p=evince.git Fix multihead problems in toolbar editor. Fixes bug #382055. 2007-08-11 Carlos Garcia Campos * cut-n-paste/toolbar-editor/egg-toolbar-editor.c: (set_drag_cursor): * cut-n-paste/toolbar-editor/egg-editable-toolbar.c: (configure_item_cursor), (new_pixbuf_from_widget): Fix multihead problems in toolbar editor. Fixes bug #382055. svn path=/trunk/; revision=2617 --- diff --git a/ChangeLog b/ChangeLog index 2f5c5b39..97f08e31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-08-11 Carlos Garcia Campos + + * cut-n-paste/toolbar-editor/egg-toolbar-editor.c: + (set_drag_cursor): + * cut-n-paste/toolbar-editor/egg-editable-toolbar.c: + (configure_item_cursor), (new_pixbuf_from_widget): + + Fix multihead problems in toolbar editor. Fixes bug #382055. + 2007-08-11 Carlos Garcia Campos * shell/ev-window.c: (ev_window_cmd_file_open), diff --git a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c index 86ae386c..d65b7eb9 100644 --- a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c +++ b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c @@ -434,9 +434,13 @@ configure_item_cursor (GtkToolItem *item, if (priv->edit_mode > 0) { GdkCursor *cursor; + GdkScreen *screen; GdkPixbuf *pixbuf = NULL; - - cursor = gdk_cursor_new (GDK_HAND2); + + screen = gtk_widget_get_screen (GTK_WIDGET (etoolbar)); + + cursor = gdk_cursor_new_for_display (gdk_screen_get_display (screen), + GDK_HAND2); gdk_window_set_cursor (widget->window, cursor); gdk_cursor_unref (cursor); @@ -1763,10 +1767,13 @@ new_pixbuf_from_widget (GtkWidget *widget) GdkVisual *visual; gint icon_width; gint icon_height; + GdkScreen *screen; icon_width = DEFAULT_ICON_WIDTH; - if (!gtk_icon_size_lookup_for_settings (gtk_settings_get_default (), + screen = gtk_widget_get_screen (widget); + + if (!gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (screen), GTK_ICON_SIZE_LARGE_TOOLBAR, NULL, &icon_height)) diff --git a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c index 07674d47..8671cd4c 100644 --- a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c +++ b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c @@ -312,10 +312,12 @@ static void set_drag_cursor (GtkWidget *widget) { GdkCursor *cursor; + GdkScreen *screen; - /* FIXME multihead */ - cursor = gdk_cursor_new (GDK_HAND2); - + screen = gtk_widget_get_screen (widget); + + cursor = gdk_cursor_new_for_display (gdk_screen_get_display (screen), + GDK_HAND2); gdk_window_set_cursor (widget->window, cursor); gdk_cursor_unref (cursor); }