summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Janik <timj@gimp.org>1998-03-12 07:28:41 +0000
committerTim Janik <timj@src.gnome.org>1998-03-12 07:28:41 +0000
commita8afd462c0d23eb1fed39394a523b364a4cdca39 (patch)
tree968bce7fcef1d8bdbb9dd2750d013701364650e7
parent093dfedf74d607085b163bd254dea8682d0ba774 (diff)
downloadgdk-pixbuf-a8afd462c0d23eb1fed39394a523b364a4cdca39.tar.gz
applied gtk-shige-980311-0.patch.gz, which removes the erronerous
Thu Mar 12 07:43:33 1998 Tim Janik <timj@gimp.org> * gdk/gdk.h: * gdk/gdkvisual.c: applied gtk-shige-980311-0.patch.gz, which removes the erronerous gdk_query_visuals() function in favour of gdk_list_visuals() which does a correct job. * gtk/gtkcontainer.h: applied gtk-draco-980311-0.patch.gz which fixes a class cast check. * gtk/gtkspinbutton.c: applied gtk-hamann_jeske-980312-0.patch.gz about '+' sign acceptance. * gtk/gtknotebook.c: applied gtk-hamann_jeske-980311-1.patch.gz which cares about delayed tab label creation.
-rw-r--r--ChangeLog28
-rw-r--r--ChangeLog.pre-2-028
-rw-r--r--ChangeLog.pre-2-1028
-rw-r--r--ChangeLog.pre-2-228
-rw-r--r--ChangeLog.pre-2-428
-rw-r--r--ChangeLog.pre-2-628
-rw-r--r--ChangeLog.pre-2-828
-rw-r--r--TODO8
-rw-r--r--gdk/gdk.h4
-rw-r--r--gdk/gdkvisual.c15
-rw-r--r--gdk/x11/gdkvisual-x11.c15
-rw-r--r--gtk/gtkclist.c4
-rw-r--r--gtk/gtkcontainer.h2
-rw-r--r--gtk/gtknotebook.c70
-rw-r--r--gtk/gtkobject.c2
-rw-r--r--gtk/gtkspinbutton.c26
-rw-r--r--gtk/gtkstatusbar.c10
-rw-r--r--gtk/gtktree.c11
-rw-r--r--gtk/gtkwidget.c8
19 files changed, 305 insertions, 66 deletions
diff --git a/ChangeLog b/ChangeLog
index 70d459484..1ffaaa274 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+Thu Mar 12 07:43:33 1998 Tim Janik <timj@gimp.org>
+
+ * gdk/gdk.h:
+ * gdk/gdkvisual.c: applied gtk-shige-980311-0.patch.gz, which removes
+ the erronerous gdk_query_visuals() function in favour of
+ gdk_list_visuals() which does a correct job.
+
+ * gtk/gtkcontainer.h: applied gtk-draco-980311-0.patch.gz which fixes
+ a class cast check.
+
+ * gtk/gtkspinbutton.c: applied gtk-hamann_jeske-980312-0.patch.gz about
+ '+' sign acceptance.
+
+ * gtk/gtknotebook.c: applied gtk-hamann_jeske-980311-1.patch.gz which
+ cares about delayed tab label creation.
+
+Thu Mar 12 06:58:17 1998 Tim Janik <timj@gimp.org>
+
+ * gtk/gtktree.c (gtk_tree_map): avoid warnings about NULL casts.
+
+ * gtk/gtkstatusbar.c (gtk_statusbar_destroy): don't leak the context
+ id key's slist.
+
+ * gtk/gtkobject.c (gtk_object_set_data_full): duplicate keys that get
+ inserted into the hashtable, otherwise this function *forces* the caller
+ to leak memory, for dynamically allocated keys (problem pinpointed by
+ Mattias Gronlund).
+
Tue Mar 10 23:02:42 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkdnd.c gtk/gtkclist.c gtk/gtksignal.c gtk/testgtk.c:
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 70d459484..1ffaaa274 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,31 @@
+Thu Mar 12 07:43:33 1998 Tim Janik <timj@gimp.org>
+
+ * gdk/gdk.h:
+ * gdk/gdkvisual.c: applied gtk-shige-980311-0.patch.gz, which removes
+ the erronerous gdk_query_visuals() function in favour of
+ gdk_list_visuals() which does a correct job.
+
+ * gtk/gtkcontainer.h: applied gtk-draco-980311-0.patch.gz which fixes
+ a class cast check.
+
+ * gtk/gtkspinbutton.c: applied gtk-hamann_jeske-980312-0.patch.gz about
+ '+' sign acceptance.
+
+ * gtk/gtknotebook.c: applied gtk-hamann_jeske-980311-1.patch.gz which
+ cares about delayed tab label creation.
+
+Thu Mar 12 06:58:17 1998 Tim Janik <timj@gimp.org>
+
+ * gtk/gtktree.c (gtk_tree_map): avoid warnings about NULL casts.
+
+ * gtk/gtkstatusbar.c (gtk_statusbar_destroy): don't leak the context
+ id key's slist.
+
+ * gtk/gtkobject.c (gtk_object_set_data_full): duplicate keys that get
+ inserted into the hashtable, otherwise this function *forces* the caller
+ to leak memory, for dynamically allocated keys (problem pinpointed by
+ Mattias Gronlund).
+
Tue Mar 10 23:02:42 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkdnd.c gtk/gtkclist.c gtk/gtksignal.c gtk/testgtk.c:
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 70d459484..1ffaaa274 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,31 @@
+Thu Mar 12 07:43:33 1998 Tim Janik <timj@gimp.org>
+
+ * gdk/gdk.h:
+ * gdk/gdkvisual.c: applied gtk-shige-980311-0.patch.gz, which removes
+ the erronerous gdk_query_visuals() function in favour of
+ gdk_list_visuals() which does a correct job.
+
+ * gtk/gtkcontainer.h: applied gtk-draco-980311-0.patch.gz which fixes
+ a class cast check.
+
+ * gtk/gtkspinbutton.c: applied gtk-hamann_jeske-980312-0.patch.gz about
+ '+' sign acceptance.
+
+ * gtk/gtknotebook.c: applied gtk-hamann_jeske-980311-1.patch.gz which
+ cares about delayed tab label creation.
+
+Thu Mar 12 06:58:17 1998 Tim Janik <timj@gimp.org>
+
+ * gtk/gtktree.c (gtk_tree_map): avoid warnings about NULL casts.
+
+ * gtk/gtkstatusbar.c (gtk_statusbar_destroy): don't leak the context
+ id key's slist.
+
+ * gtk/gtkobject.c (gtk_object_set_data_full): duplicate keys that get
+ inserted into the hashtable, otherwise this function *forces* the caller
+ to leak memory, for dynamically allocated keys (problem pinpointed by
+ Mattias Gronlund).
+
Tue Mar 10 23:02:42 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkdnd.c gtk/gtkclist.c gtk/gtksignal.c gtk/testgtk.c:
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 70d459484..1ffaaa274 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,31 @@
+Thu Mar 12 07:43:33 1998 Tim Janik <timj@gimp.org>
+
+ * gdk/gdk.h:
+ * gdk/gdkvisual.c: applied gtk-shige-980311-0.patch.gz, which removes
+ the erronerous gdk_query_visuals() function in favour of
+ gdk_list_visuals() which does a correct job.
+
+ * gtk/gtkcontainer.h: applied gtk-draco-980311-0.patch.gz which fixes
+ a class cast check.
+
+ * gtk/gtkspinbutton.c: applied gtk-hamann_jeske-980312-0.patch.gz about
+ '+' sign acceptance.
+
+ * gtk/gtknotebook.c: applied gtk-hamann_jeske-980311-1.patch.gz which
+ cares about delayed tab label creation.
+
+Thu Mar 12 06:58:17 1998 Tim Janik <timj@gimp.org>
+
+ * gtk/gtktree.c (gtk_tree_map): avoid warnings about NULL casts.
+
+ * gtk/gtkstatusbar.c (gtk_statusbar_destroy): don't leak the context
+ id key's slist.
+
+ * gtk/gtkobject.c (gtk_object_set_data_full): duplicate keys that get
+ inserted into the hashtable, otherwise this function *forces* the caller
+ to leak memory, for dynamically allocated keys (problem pinpointed by
+ Mattias Gronlund).
+
Tue Mar 10 23:02:42 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkdnd.c gtk/gtkclist.c gtk/gtksignal.c gtk/testgtk.c:
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 70d459484..1ffaaa274 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,31 @@
+Thu Mar 12 07:43:33 1998 Tim Janik <timj@gimp.org>
+
+ * gdk/gdk.h:
+ * gdk/gdkvisual.c: applied gtk-shige-980311-0.patch.gz, which removes
+ the erronerous gdk_query_visuals() function in favour of
+ gdk_list_visuals() which does a correct job.
+
+ * gtk/gtkcontainer.h: applied gtk-draco-980311-0.patch.gz which fixes
+ a class cast check.
+
+ * gtk/gtkspinbutton.c: applied gtk-hamann_jeske-980312-0.patch.gz about
+ '+' sign acceptance.
+
+ * gtk/gtknotebook.c: applied gtk-hamann_jeske-980311-1.patch.gz which
+ cares about delayed tab label creation.
+
+Thu Mar 12 06:58:17 1998 Tim Janik <timj@gimp.org>
+
+ * gtk/gtktree.c (gtk_tree_map): avoid warnings about NULL casts.
+
+ * gtk/gtkstatusbar.c (gtk_statusbar_destroy): don't leak the context
+ id key's slist.
+
+ * gtk/gtkobject.c (gtk_object_set_data_full): duplicate keys that get
+ inserted into the hashtable, otherwise this function *forces* the caller
+ to leak memory, for dynamically allocated keys (problem pinpointed by
+ Mattias Gronlund).
+
Tue Mar 10 23:02:42 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkdnd.c gtk/gtkclist.c gtk/gtksignal.c gtk/testgtk.c:
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 70d459484..1ffaaa274 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,31 @@
+Thu Mar 12 07:43:33 1998 Tim Janik <timj@gimp.org>
+
+ * gdk/gdk.h:
+ * gdk/gdkvisual.c: applied gtk-shige-980311-0.patch.gz, which removes
+ the erronerous gdk_query_visuals() function in favour of
+ gdk_list_visuals() which does a correct job.
+
+ * gtk/gtkcontainer.h: applied gtk-draco-980311-0.patch.gz which fixes
+ a class cast check.
+
+ * gtk/gtkspinbutton.c: applied gtk-hamann_jeske-980312-0.patch.gz about
+ '+' sign acceptance.
+
+ * gtk/gtknotebook.c: applied gtk-hamann_jeske-980311-1.patch.gz which
+ cares about delayed tab label creation.
+
+Thu Mar 12 06:58:17 1998 Tim Janik <timj@gimp.org>
+
+ * gtk/gtktree.c (gtk_tree_map): avoid warnings about NULL casts.
+
+ * gtk/gtkstatusbar.c (gtk_statusbar_destroy): don't leak the context
+ id key's slist.
+
+ * gtk/gtkobject.c (gtk_object_set_data_full): duplicate keys that get
+ inserted into the hashtable, otherwise this function *forces* the caller
+ to leak memory, for dynamically allocated keys (problem pinpointed by
+ Mattias Gronlund).
+
Tue Mar 10 23:02:42 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkdnd.c gtk/gtkclist.c gtk/gtksignal.c gtk/testgtk.c:
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 70d459484..1ffaaa274 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,31 @@
+Thu Mar 12 07:43:33 1998 Tim Janik <timj@gimp.org>
+
+ * gdk/gdk.h:
+ * gdk/gdkvisual.c: applied gtk-shige-980311-0.patch.gz, which removes
+ the erronerous gdk_query_visuals() function in favour of
+ gdk_list_visuals() which does a correct job.
+
+ * gtk/gtkcontainer.h: applied gtk-draco-980311-0.patch.gz which fixes
+ a class cast check.
+
+ * gtk/gtkspinbutton.c: applied gtk-hamann_jeske-980312-0.patch.gz about
+ '+' sign acceptance.
+
+ * gtk/gtknotebook.c: applied gtk-hamann_jeske-980311-1.patch.gz which
+ cares about delayed tab label creation.
+
+Thu Mar 12 06:58:17 1998 Tim Janik <timj@gimp.org>
+
+ * gtk/gtktree.c (gtk_tree_map): avoid warnings about NULL casts.
+
+ * gtk/gtkstatusbar.c (gtk_statusbar_destroy): don't leak the context
+ id key's slist.
+
+ * gtk/gtkobject.c (gtk_object_set_data_full): duplicate keys that get
+ inserted into the hashtable, otherwise this function *forces* the caller
+ to leak memory, for dynamically allocated keys (problem pinpointed by
+ Mattias Gronlund).
+
Tue Mar 10 23:02:42 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkdnd.c gtk/gtkclist.c gtk/gtksignal.c gtk/testgtk.c:
diff --git a/TODO b/TODO
index ffb1e5a8c..790abdc07 100644
--- a/TODO
+++ b/TODO
@@ -5,11 +5,6 @@ Bugs:
* pasting into a GtkEntry that already has a very long string,
causes the app to hang.
- * Vertical scrollbar: the expose event looks hosed and is causing
- quite a bit of flickering
- Actually this affects both scrollbar implementation, you can best
- tell if you run the application with --sync (timj)
-
* signal parameters don't seem to get refreshed on recursive invokations
of GTK_NO_RECURSE signals, which causes the restarted emissions to loose
their actual point, i.e. parameter changes on the restarted emission,
@@ -62,9 +57,6 @@ Bugs:
* Force paned window handle to be kept on screen
Additions:
- * widgets which are redrawn because of a gtk_widget_draw(,NULL) should
- be removed from the redraw queue.
-
* GScanner: it might be good to ues stdio and getch() instead of 1-character
reads. so one can take advantage of buffering. Currently each read() takes
a separate syscall.
diff --git a/gdk/gdk.h b/gdk/gdk.h
index b22570aa1..c8c94fc5a 100644
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -111,8 +111,8 @@ void gdk_query_depths (gint **depths,
gint *count);
void gdk_query_visual_types (GdkVisualType **visual_types,
gint *count);
-void gdk_query_visuals (GdkVisual **visuals,
- gint *count);
+
+GList* gdk_list_visuals (void);
/* Windows
diff --git a/gdk/gdkvisual.c b/gdk/gdkvisual.c
index e2f1448eb..16163dbdd 100644
--- a/gdk/gdkvisual.c
+++ b/gdk/gdkvisual.c
@@ -350,12 +350,17 @@ gdk_query_visual_types (GdkVisualType **visual_types,
*visual_types = available_types;
}
-void
-gdk_query_visuals (GdkVisual **visual_return,
- gint *count)
+GList*
+gdk_list_visuals (void)
{
- *count = nvisuals;
- *visual_return = (GdkVisual*) visuals;
+ GList *list;
+ guint i;
+
+ list = NULL;
+ for (i = 0; i < nvisuals; ++i)
+ list = g_list_append (list, (gpointer) &visuals[i]);
+
+ return list;
}
diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
index e2f1448eb..16163dbdd 100644
--- a/gdk/x11/gdkvisual-x11.c
+++ b/gdk/x11/gdkvisual-x11.c
@@ -350,12 +350,17 @@ gdk_query_visual_types (GdkVisualType **visual_types,
*visual_types = available_types;
}
-void
-gdk_query_visuals (GdkVisual **visual_return,
- gint *count)
+GList*
+gdk_list_visuals (void)
{
- *count = nvisuals;
- *visual_return = (GdkVisual*) visuals;
+ GList *list;
+ guint i;
+
+ list = NULL;
+ for (i = 0; i < nvisuals; ++i)
+ list = g_list_append (list, (gpointer) &visuals[i]);
+
+ return list;
}
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index 7fdb57178..64b7cdfe9 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -1398,11 +1398,11 @@ sync_selection (GtkCList * clist,
switch (mode)
{
case SYNC_INSERT:
- (gint) list->data = (gint) list->data + 1;
+ list->data = ((gchar*) list->data) + 1;
break;
case SYNC_REMOVE:
- (gint) list->data = (gint) list->data - 1;
+ list->data = ((gchar*) list->data) - 1;
break;
default:
diff --git a/gtk/gtkcontainer.h b/gtk/gtkcontainer.h
index 3585d20e4..711ff0a48 100644
--- a/gtk/gtkcontainer.h
+++ b/gtk/gtkcontainer.h
@@ -30,7 +30,7 @@ extern "C" {
#define GTK_CONTAINER(obj) (GTK_CHECK_CAST ((obj), gtk_container_get_type (), GtkContainer))
-#define GTK_CONTAINER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), gtk_container_get_type, GtkContainerClass))
+#define GTK_CONTAINER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), gtk_container_get_type (), GtkContainerClass))
#define GTK_IS_CONTAINER(obj) (GTK_CHECK_TYPE ((obj), gtk_container_get_type ()))
#define GTK_TYPE_CONTAINER (gtk_container_get_type ())
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index e62206955..981ea87a4 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -360,8 +360,9 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
if (!tab_label)
{
- tab_label = gtk_label_new ("");
page->default_tab = TRUE;
+ if (notebook->show_tabs)
+ tab_label = gtk_label_new ("");
}
page->tab_label = tab_label;
page->menu_label = menu_label;
@@ -387,8 +388,11 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
notebook->focus_tab = notebook->children;
gtk_widget_set_parent (child, GTK_WIDGET (notebook));
- gtk_widget_set_parent (tab_label, GTK_WIDGET (notebook));
- gtk_widget_show (tab_label);
+ if (tab_label)
+ {
+ gtk_widget_set_parent (tab_label, GTK_WIDGET (notebook));
+ gtk_widget_show (tab_label);
+ }
if (!notebook->cur_page)
gtk_notebook_switch_page (notebook, page, 0);
@@ -403,13 +407,16 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
!GTK_WIDGET_MAPPED (child) && notebook->cur_page == page)
gtk_widget_map (child);
- if (GTK_WIDGET_REALIZED (notebook) &&
- !GTK_WIDGET_REALIZED (tab_label))
- gtk_widget_realize (tab_label);
+ if (tab_label)
+ {
+ if (GTK_WIDGET_REALIZED (notebook) &&
+ !GTK_WIDGET_REALIZED (tab_label))
+ gtk_widget_realize (tab_label);
- if (GTK_WIDGET_MAPPED (notebook) &&
- !GTK_WIDGET_MAPPED (tab_label))
- gtk_widget_map (tab_label);
+ if (GTK_WIDGET_MAPPED (notebook) &&
+ !GTK_WIDGET_MAPPED (tab_label))
+ gtk_widget_map (tab_label);
+ }
}
if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (notebook))
@@ -511,11 +518,14 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
page = list->data;
if ((GTK_WIDGET_VISIBLE (page->child) ||
- GTK_WIDGET_VISIBLE (page->tab_label)) && GTK_WIDGET_VISIBLE (notebook))
+ (page->tab_label && GTK_WIDGET_VISIBLE (page->tab_label)))
+ && GTK_WIDGET_VISIBLE (notebook))
need_resize = TRUE;
gtk_widget_unparent (page->child);
- gtk_widget_unparent (page->tab_label);
+
+ if (page->tab_label)
+ gtk_widget_unparent (page->tab_label);
if (notebook->menu)
{
@@ -766,7 +776,7 @@ gtk_notebook_set_show_tabs (GtkNotebook *notebook,
g_return_if_fail (notebook != NULL);
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
- if (notebook->show_tabs == show_tabs || !GTK_WIDGET_VISIBLE (notebook))
+ if (notebook->show_tabs == show_tabs)
return;
notebook->show_tabs = show_tabs;
@@ -780,7 +790,10 @@ gtk_notebook_set_show_tabs (GtkNotebook *notebook,
{
page = children->data;
children = children->next;
- gtk_widget_hide (page->tab_label);
+ if (page->default_tab)
+ gtk_widget_destroy (page->tab_label);
+ else
+ gtk_widget_hide (page->tab_label);
}
if (notebook->panel)
@@ -788,13 +801,23 @@ gtk_notebook_set_show_tabs (GtkNotebook *notebook,
}
else
{
+ gchar string[32];
+ gint i = 1;
+
GTK_WIDGET_SET_FLAGS (notebook, GTK_CAN_FOCUS);
-
+
while (children)
{
page = children->data;
children = children->next;
+ if (page->default_tab)
+ {
+ sprintf (string, "Page %d", i);
+ page->tab_label = gtk_label_new (string);
+ gtk_widget_set_parent (page->tab_label, GTK_WIDGET (notebook));
+ }
gtk_widget_show (page->tab_label);
+ i++;
}
}
gtk_widget_queue_resize (GTK_WIDGET (notebook));
@@ -867,7 +890,8 @@ gtk_notebook_map (GtkWidget *widget)
page = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (page->child) &&
+ if (page->tab_label &&
+ GTK_WIDGET_VISIBLE (page->child) &&
!GTK_WIDGET_MAPPED (page->tab_label))
gtk_widget_map (page->tab_label);
}
@@ -882,8 +906,8 @@ gtk_notebook_unmap (GtkWidget *widget)
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
gdk_window_hide (widget->window);
- if (GTK_NOTEBOOK(widget)->panel)
- gdk_window_hide (GTK_NOTEBOOK(widget)->panel);
+ if (GTK_NOTEBOOK (widget)->panel)
+ gdk_window_hide (GTK_NOTEBOOK (widget)->panel);
}
static void
@@ -1477,7 +1501,7 @@ gtk_notebook_button_press (GtkWidget *widget,
}
}
else if (event->button == 2)
- gtk_notebook_page_select (GTK_NOTEBOOK(widget));
+ gtk_notebook_page_select (GTK_NOTEBOOK (widget));
else if (event->button == 3)
gtk_notebook_switch_focus_tab (notebook, notebook->children);
gtk_notebook_draw_arrow (notebook, GTK_ARROW_LEFT);
@@ -1497,7 +1521,7 @@ gtk_notebook_button_press (GtkWidget *widget,
}
}
else if (event->button == 2)
- gtk_notebook_page_select (GTK_NOTEBOOK(widget));
+ gtk_notebook_page_select (GTK_NOTEBOOK (widget));
else if (event->button == 3)
gtk_notebook_switch_focus_tab (notebook,
g_list_last (notebook->children));
@@ -2606,7 +2630,7 @@ gtk_notebook_focus (GtkContainer *container,
g_return_val_if_fail (container != NULL, FALSE);
g_return_val_if_fail (GTK_IS_NOTEBOOK (container), FALSE);
- notebook = GTK_NOTEBOOK(container);
+ notebook = GTK_NOTEBOOK (container);
if (!GTK_WIDGET_SENSITIVE (container) || !notebook->children)
return FALSE;
@@ -2816,7 +2840,7 @@ gtk_notebook_key_press (GtkWidget *widget,
return TRUE;
case GDK_Return:
case GDK_space:
- gtk_notebook_page_select (GTK_NOTEBOOK(widget));
+ gtk_notebook_page_select (GTK_NOTEBOOK (widget));
return TRUE;
default:
return_val = FALSE;
@@ -2855,7 +2879,7 @@ gtk_notebook_update_labels (GtkNotebook *notebook,
page = list->data;
list = list->next;
sprintf (string, "Page %d", page_num);
- if (page->default_tab)
+ if (notebook->show_tabs && page->default_tab)
gtk_label_set (GTK_LABEL (page->tab_label), string);
if (notebook->menu && page->default_menu)
gtk_label_set (GTK_LABEL (page->menu_label), string);
@@ -2872,7 +2896,7 @@ gtk_notebook_menu_item_create (GtkNotebook *notebook,
if (page->default_menu)
{
- if (GTK_IS_LABEL (page->tab_label))
+ if (page->tab_label && GTK_IS_LABEL (page->tab_label))
page->menu_label = gtk_label_new (GTK_LABEL (page->tab_label)->label);
else
page->menu_label = gtk_label_new ("");
diff --git a/gtk/gtkobject.c b/gtk/gtkobject.c
index 4eeeb922a..52990edfe 100644
--- a/gtk/gtkobject.c
+++ b/gtk/gtkobject.c
@@ -1060,7 +1060,7 @@ gtk_object_set_data_full (GtkObject *object,
if (!id)
{
id = gtk_object_data_id_alloc ();
- g_hash_table_insert (object_data_ht, (gpointer) key, id);
+ g_hash_table_insert (object_data_ht, (gpointer) g_strdup (key), id);
}
odata = object->object_data;
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index beffd0a9c..db6149fa1 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -1049,14 +1049,28 @@ gtk_spin_button_insert_text (GtkEditable *editable,
if (spin->numeric)
{
struct lconv *lc;
- gboolean minus;
+ gboolean sign;
gint dotpos = -1;
gint i;
+ gchar pos_sign;
+ gchar neg_sign;
lc = localeconv ();
- minus = (strchr (entry->text, *(lc->negative_sign)) != 0) ;
- if (minus && !(*position))
+ if (*(lc->negative_sign))
+ neg_sign = *(lc->negative_sign);
+ else
+ neg_sign = '-';
+
+ if (*(lc->positive_sign))
+ pos_sign = *(lc->positive_sign);
+ else
+ pos_sign = '+';
+
+ sign = ((strchr (entry->text, neg_sign) != 0) ||
+ (strchr (entry->text, pos_sign) != 0));
+
+ if (sign && !(*position))
return;
dotpos = strchr (entry->text, *(lc->decimal_point)) - entry->text;
@@ -1067,11 +1081,11 @@ gtk_spin_button_insert_text (GtkEditable *editable,
for (i = 0; i < new_text_length; i++)
{
- if (new_text[i] == *(lc->negative_sign))
+ if (new_text[i] == neg_sign || new_text[i] == pos_sign)
{
- if (minus || (*position) || i)
+ if (sign || (*position) || i)
return;
- minus = TRUE;
+ sign = TRUE;
}
else if (new_text[i] == *(lc->decimal_point))
{
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c
index 782f5718c..66af6f440 100644
--- a/gtk/gtkstatusbar.c
+++ b/gtk/gtkstatusbar.c
@@ -335,6 +335,11 @@ gtk_statusbar_destroy (GtkObject *object)
g_slist_free (statusbar->messages);
statusbar->messages = NULL;
+ for (list = statusbar->keys; list; list = list->next)
+ g_free (list->data);
+ g_slist_free (statusbar->keys);
+ statusbar->keys = NULL;
+
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
@@ -349,10 +354,5 @@ gtk_statusbar_finalize (GtkObject *object)
statusbar = GTK_STATUSBAR (object);
- for (list = statusbar->keys; list; list = list->next)
- g_free (list->data);
- g_slist_free (statusbar->messages);
- statusbar->keys = NULL;
-
GTK_OBJECT_CLASS (parent_class)->finalize (object);
}
diff --git a/gtk/gtktree.c b/gtk/gtktree.c
index 28b93dda7..acfbfb53d 100644
--- a/gtk/gtktree.c
+++ b/gtk/gtktree.c
@@ -586,10 +586,13 @@ gtk_tree_map (GtkWidget *widget)
!GTK_WIDGET_MAPPED (child))
gtk_widget_map (child);
- if ((child = GTK_WIDGET(GTK_TREE_ITEM(child)->subtree)) &&
- GTK_WIDGET_VISIBLE (child) &&
- !GTK_WIDGET_MAPPED (child))
- gtk_widget_map (child);
+ if (GTK_TREE_ITEM (child)->subtree)
+ {
+ child = GTK_WIDGET (GTK_TREE_ITEM (child)->subtree);
+
+ if (GTK_WIDGET_VISIBLE (child) && !GTK_WIDGET_MAPPED (child))
+ gtk_widget_map (child);
+ }
}
}
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index d0d42c148..0a473d913 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -1553,9 +1553,9 @@ gtk_widget_draw (GtkWidget *widget,
GdkRectangle *area)
{
GdkRectangle temp_area;
-
+
g_return_if_fail (widget != NULL);
-
+
if (GTK_WIDGET_DRAWABLE (widget) &&
!GTK_WIDGET_REDRAW_PENDING (widget))
{
@@ -1571,12 +1571,12 @@ gtk_widget_draw (GtkWidget *widget,
temp_area.x = 0;
temp_area.y = 0;
}
-
+
temp_area.width = widget->allocation.width;
temp_area.height = widget->allocation.height;
area = &temp_area;
}
-
+
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[DRAW], area);
}
}