]> Pileus Git - ~andy/gtk/commitdiff
Removed the fleur_cursor field. Now the cursor is created/destroyed on
authorFederico Mena Quintero <federico@nuclecu.unam.mx>
Tue, 9 Jun 1998 21:01:45 +0000 (21:01 +0000)
committerArturo Espinosa <unammx@src.gnome.org>
Tue, 9 Jun 1998 21:01:45 +0000 (21:01 +0000)
1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>

* gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
fleur_cursor field.  Now the cursor is created/destroyed on demand
by the routines that need it.

* gtk/gtkhandlebox.c (gtk_handle_box_button_changed):
(gtk_handle_box_motion): The fleur cursor is created and destroyed
only when needed.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkhandlebox.c
gtk/gtkhandlebox.h

index 127b132f505802724dfad46e9f78e4b2d8f7b8f6..595012e63e76c7118b0b1acfac78544f94ae12f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
+       fleur_cursor field.  Now the cursor is created/destroyed on demand
+       by the routines that need it.
+
+       * gtk/gtkhandlebox.c (gtk_handle_box_button_changed): 
+       (gtk_handle_box_motion): The fleur cursor is created and destroyed
+       only when needed.
+
 Tue Jun  9 09:57:09 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtktypeutils.h: 
index 127b132f505802724dfad46e9f78e4b2d8f7b8f6..595012e63e76c7118b0b1acfac78544f94ae12f0 100644 (file)
@@ -1,3 +1,13 @@
+1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
+       fleur_cursor field.  Now the cursor is created/destroyed on demand
+       by the routines that need it.
+
+       * gtk/gtkhandlebox.c (gtk_handle_box_button_changed): 
+       (gtk_handle_box_motion): The fleur cursor is created and destroyed
+       only when needed.
+
 Tue Jun  9 09:57:09 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtktypeutils.h: 
index 127b132f505802724dfad46e9f78e4b2d8f7b8f6..595012e63e76c7118b0b1acfac78544f94ae12f0 100644 (file)
@@ -1,3 +1,13 @@
+1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
+       fleur_cursor field.  Now the cursor is created/destroyed on demand
+       by the routines that need it.
+
+       * gtk/gtkhandlebox.c (gtk_handle_box_button_changed): 
+       (gtk_handle_box_motion): The fleur cursor is created and destroyed
+       only when needed.
+
 Tue Jun  9 09:57:09 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtktypeutils.h: 
index 127b132f505802724dfad46e9f78e4b2d8f7b8f6..595012e63e76c7118b0b1acfac78544f94ae12f0 100644 (file)
@@ -1,3 +1,13 @@
+1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
+       fleur_cursor field.  Now the cursor is created/destroyed on demand
+       by the routines that need it.
+
+       * gtk/gtkhandlebox.c (gtk_handle_box_button_changed): 
+       (gtk_handle_box_motion): The fleur cursor is created and destroyed
+       only when needed.
+
 Tue Jun  9 09:57:09 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtktypeutils.h: 
index 127b132f505802724dfad46e9f78e4b2d8f7b8f6..595012e63e76c7118b0b1acfac78544f94ae12f0 100644 (file)
@@ -1,3 +1,13 @@
+1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
+       fleur_cursor field.  Now the cursor is created/destroyed on demand
+       by the routines that need it.
+
+       * gtk/gtkhandlebox.c (gtk_handle_box_button_changed): 
+       (gtk_handle_box_motion): The fleur cursor is created and destroyed
+       only when needed.
+
 Tue Jun  9 09:57:09 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtktypeutils.h: 
index 127b132f505802724dfad46e9f78e4b2d8f7b8f6..595012e63e76c7118b0b1acfac78544f94ae12f0 100644 (file)
@@ -1,3 +1,13 @@
+1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
+       fleur_cursor field.  Now the cursor is created/destroyed on demand
+       by the routines that need it.
+
+       * gtk/gtkhandlebox.c (gtk_handle_box_button_changed): 
+       (gtk_handle_box_motion): The fleur cursor is created and destroyed
+       only when needed.
+
 Tue Jun  9 09:57:09 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtktypeutils.h: 
index 127b132f505802724dfad46e9f78e4b2d8f7b8f6..595012e63e76c7118b0b1acfac78544f94ae12f0 100644 (file)
@@ -1,3 +1,13 @@
+1998-06-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
+       fleur_cursor field.  Now the cursor is created/destroyed on demand
+       by the routines that need it.
+
+       * gtk/gtkhandlebox.c (gtk_handle_box_button_changed): 
+       (gtk_handle_box_motion): The fleur cursor is created and destroyed
+       only when needed.
+
 Tue Jun  9 09:57:09 1998  Tim Janik  <timj@gtk.org>
 
        * gtk/gtktypeutils.h: 
index a59f643ea14b635f91c0aabe3b83e76a1875deb7..dc45477ce27f73a031eac88863d0438622695128 100644 (file)
@@ -183,7 +183,6 @@ gtk_handle_box_init (GtkHandleBox *handle_box)
   handle_box->child_detached = FALSE;
   handle_box->in_drag = FALSE;
   handle_box->shrink_on_detach = TRUE;
-  handle_box->fleur_cursor = gdk_cursor_new (GDK_FLEUR);
   handle_box->dragoff_x = 0;
   handle_box->dragoff_y = 0;
 }
@@ -321,7 +320,6 @@ gtk_handle_box_realize (GtkWidget *widget)
   gdk_window_set_user_data (hb->float_window, widget);
   gdk_window_set_decorations (hb->float_window, 0);
   
-
   widget->style = gtk_style_attach (widget->style, widget->window);
   gtk_style_set_background (widget->style, widget->window, GTK_WIDGET_STATE (hb));
   gtk_style_set_background (widget->style, hb->bin_window, GTK_WIDGET_STATE (hb));
@@ -345,9 +343,6 @@ gtk_handle_box_unrealize (GtkWidget *widget)
   gdk_window_destroy (hb->float_window);
   hb->float_window = NULL;
 
-  gdk_cursor_destroy (hb->fleur_cursor);
-  hb->fleur_cursor = NULL;
-
   if (GTK_WIDGET_CLASS (parent_class)->unrealize)
     (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
 }
@@ -801,6 +796,7 @@ gtk_handle_box_button_changed (GtkWidget      *widget,
 {
   GtkHandleBox *hb;
   gboolean event_handled;
+  GdkCursor *fleur;
   
   g_return_val_if_fail (widget != NULL, FALSE);
   g_return_val_if_fail (GTK_IS_HANDLE_BOX (widget), FALSE);
@@ -849,14 +845,16 @@ gtk_handle_box_button_changed (GtkWidget      *widget,
 
          gtk_grab_add (widget);
          hb->in_drag = TRUE;
+         fleur = gdk_cursor_new (GDK_FLEUR);
          while (gdk_pointer_grab (hb->bin_window,
                                   FALSE,
                                   (GDK_BUTTON1_MOTION_MASK |
                                    GDK_POINTER_MOTION_HINT_MASK |
                                    GDK_BUTTON_RELEASE_MASK),
                                   NULL,
-                                  hb->fleur_cursor,
+                                  fleur,
                                   GDK_CURRENT_TIME) != 0); /* wait for success */
+         gdk_cursor_destroy (fleur);
          event_handled = TRUE;
        }
     }
@@ -881,6 +879,7 @@ gtk_handle_box_motion (GtkWidget      *widget,
   gint ox, oy;
   gint snap_x, snap_y;
   gboolean in_handle;
+  GdkCursor *fleur;
 
   g_return_val_if_fail (widget != NULL, FALSE);
   g_return_val_if_fail (GTK_IS_HANDLE_BOX (widget), FALSE);
@@ -941,14 +940,16 @@ gtk_handle_box_motion (GtkWidget      *widget,
                           handle_box_signals[SIGNAL_CHILD_ATTACHED],
                           GTK_BIN (hb)->child);
          
+         fleur = gdk_cursor_new (GDK_FLEUR);
          while (gdk_pointer_grab (hb->bin_window,
                                   FALSE,
                                   (GDK_BUTTON1_MOTION_MASK |
                                    GDK_POINTER_MOTION_HINT_MASK |
                                    GDK_BUTTON_RELEASE_MASK),
                                   NULL,
-                                  hb->fleur_cursor,
+                                  fleur,
                                   GDK_CURRENT_TIME) != 0); /* wait for success */
+         gdk_cursor_destroy (fleur);
          
          gtk_widget_queue_resize (widget);
        }
@@ -989,14 +990,16 @@ gtk_handle_box_motion (GtkWidget      *widget,
                           GTK_BIN (hb)->child);
          gtk_handle_box_draw_ghost (hb);
          
+         fleur = gdk_cursor_new (GDK_FLEUR);
          while (gdk_pointer_grab (hb->bin_window,
                                   FALSE,
                                   (GDK_BUTTON1_MOTION_MASK |
                                    GDK_POINTER_MOTION_HINT_MASK |
                                    GDK_BUTTON_RELEASE_MASK),
                                   NULL,
-                                  hb->fleur_cursor,
+                                  fleur,
                                   GDK_CURRENT_TIME) != 0); /* wait for success */
+         gdk_cursor_destroy (fleur);
          
          gtk_widget_queue_resize (widget);
        }
index 31a6462e53daf902b9580010a2e6a9c03fdd09c2..4aa0d8ea60d605dfdbb445e4bc85d57ff0352cf8 100644 (file)
@@ -55,7 +55,6 @@ struct _GtkHandleBox
   guint                  child_detached : 1;
   guint                  in_drag : 1;
   guint                  shrink_on_detach : 1;
-  GdkCursor      *fleur_cursor;
 
   gint dragoff_x, dragoff_y; /* start drag position (wrt widget->window) */
 };