summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Painter <jpaint@src.gnome.org>1998-01-15 08:45:57 +0000
committerJay Painter <jpaint@src.gnome.org>1998-01-15 08:45:57 +0000
commit18681dc653519b6ac515e48752e7c70dba80c81c (patch)
tree0f3759b13eda6e6ca81782690413441620299e20
parentf91efadd4f15a5aac68c2981e18925420be41985 (diff)
downloadgtk+-18681dc653519b6ac515e48752e7c70dba80c81c.tar.gz
Fixed a small memory leak in gtkpaned, and I changed the cursor to a
"I" beam for gtkentry. -Jay
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.pre-2-05
-rw-r--r--ChangeLog.pre-2-105
-rw-r--r--ChangeLog.pre-2-25
-rw-r--r--ChangeLog.pre-2-45
-rw-r--r--ChangeLog.pre-2-65
-rw-r--r--ChangeLog.pre-2-85
-rw-r--r--gtk/gtkentry.c3
-rw-r--r--gtk/gtkentry.h1
-rw-r--r--gtk/gtkpaned.c9
-rw-r--r--gtk/gtkpaned.h1
11 files changed, 47 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index afac8c7e9f..5298ce1ae8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
+ * gtk/gtkentry.[ch]: Change window cursor to "I"
+ * gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
+ cursor
+
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index afac8c7e9f..5298ce1ae8 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,8 @@
+Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
+ * gtk/gtkentry.[ch]: Change window cursor to "I"
+ * gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
+ cursor
+
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index afac8c7e9f..5298ce1ae8 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,8 @@
+Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
+ * gtk/gtkentry.[ch]: Change window cursor to "I"
+ * gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
+ cursor
+
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index afac8c7e9f..5298ce1ae8 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,8 @@
+Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
+ * gtk/gtkentry.[ch]: Change window cursor to "I"
+ * gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
+ cursor
+
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index afac8c7e9f..5298ce1ae8 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,8 @@
+Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
+ * gtk/gtkentry.[ch]: Change window cursor to "I"
+ * gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
+ cursor
+
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index afac8c7e9f..5298ce1ae8 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,8 @@
+Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
+ * gtk/gtkentry.[ch]: Change window cursor to "I"
+ * gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
+ cursor
+
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index afac8c7e9f..5298ce1ae8 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,8 @@
+Thu Jan 15 00:44:27 PST 1998 Jay Painter <jpaint@serv.net>
+ * gtk/gtkentry.[ch]: Change window cursor to "I"
+ * gtk/gtkpane.[ch]: Cleared up a tiny memory leak from not destroying the
+ cursor
+
Tue Jan 13 07:30:02 PST 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: minor updates
* gtk/gtktext.c: you can type in it! It should also seg-fault *MUCH* less now,
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 973a6f09b2..b84cc06eb8 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -591,6 +591,8 @@ gtk_entry_realize (GtkWidget *widget)
attributes.y = widget->style->klass->ythickness + INNER_BORDER;
attributes.width = widget->allocation.width - attributes.x * 2;
attributes.height = widget->allocation.height - attributes.y * 2;
+ attributes.cursor = entry->cursor = gdk_cursor_new (GDK_XTERM);
+ attributes_mask |= GDK_WA_CURSOR;
entry->text_area = gdk_window_new (widget->window, &attributes, attributes_mask);
gdk_window_set_user_data (entry->text_area, entry);
@@ -688,6 +690,7 @@ gtk_entry_unrealize (GtkWidget *widget)
{
gdk_window_set_user_data (entry->text_area, NULL);
gdk_window_destroy (entry->text_area);
+ gdk_cursor_destroy (entry->cursor);
}
if (widget->window)
{
diff --git a/gtk/gtkentry.h b/gtk/gtkentry.h
index 270ef3dab0..e44add6c17 100644
--- a/gtk/gtkentry.h
+++ b/gtk/gtkentry.h
@@ -42,6 +42,7 @@ struct _GtkEntry
GdkWindow *text_area;
GdkPixmap *backing_pixmap;
+ GdkCursor *cursor;
gchar *text;
guint16 text_size;
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index d6b53db3d4..c3ee553fc8 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -156,7 +156,7 @@ gtk_paned_realize (GtkWidget *widget)
attributes.window_type = GDK_WINDOW_CHILD;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
- attributes.cursor = gdk_cursor_new(GDK_CROSS);
+ attributes.cursor = paned->cursor = gdk_cursor_new (GDK_CROSS);
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= (GDK_EXPOSURE_MASK |
GDK_BUTTON_PRESS_MASK |
@@ -245,10 +245,15 @@ gtk_paned_unrealize (GtkWidget *widget)
if (paned->xor_gc)
gdk_gc_destroy (paned->xor_gc);
+
if (paned->handle)
- gdk_window_destroy (paned->handle);
+ {
+ gdk_window_destroy (paned->handle);
+ gdk_cursor_destroy (paned->cursor);
+ }
paned->handle = NULL;
+ paned->cursor = NULL;
widget->window = NULL;
}
diff --git a/gtk/gtkpaned.h b/gtk/gtkpaned.h
index 1b25263b0a..db9376e0a5 100644
--- a/gtk/gtkpaned.h
+++ b/gtk/gtkpaned.h
@@ -44,6 +44,7 @@ struct _GtkPaned
GtkWidget *child2;
GdkWindow *handle;
+ GdkCursor *cursor;
GdkRectangle groove_rectangle;
GdkGC *xor_gc;