]> Pileus Git - ~andy/gtk/commitdiff
applied gtk-shige-980311-0.patch.gz, which removes the erronerous
authorTim Janik <timj@gimp.org>
Thu, 12 Mar 1998 07:28:41 +0000 (07:28 +0000)
committerTim Janik <timj@src.gnome.org>
Thu, 12 Mar 1998 07:28:41 +0000 (07:28 +0000)
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.

19 files changed:
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
TODO
gdk/gdk.h
gdk/gdkvisual.c
gdk/x11/gdkvisual-x11.c
gtk/gtkclist.c
gtk/gtkcontainer.h
gtk/gtknotebook.c
gtk/gtkobject.c
gtk/gtkspinbutton.c
gtk/gtkstatusbar.c
gtk/gtktree.c
gtk/gtkwidget.c

index 70d45948491662cf1d87b471d4e34ae16c99ac45..1ffaaa274052a00b094ce5c4d0472426b67110ca 100644 (file)
--- 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:
index 70d45948491662cf1d87b471d4e34ae16c99ac45..1ffaaa274052a00b094ce5c4d0472426b67110ca 100644 (file)
@@ -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:
index 70d45948491662cf1d87b471d4e34ae16c99ac45..1ffaaa274052a00b094ce5c4d0472426b67110ca 100644 (file)
@@ -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:
index 70d45948491662cf1d87b471d4e34ae16c99ac45..1ffaaa274052a00b094ce5c4d0472426b67110ca 100644 (file)
@@ -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:
index 70d45948491662cf1d87b471d4e34ae16c99ac45..1ffaaa274052a00b094ce5c4d0472426b67110ca 100644 (file)
@@ -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:
index 70d45948491662cf1d87b471d4e34ae16c99ac45..1ffaaa274052a00b094ce5c4d0472426b67110ca 100644 (file)
@@ -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:
index 70d45948491662cf1d87b471d4e34ae16c99ac45..1ffaaa274052a00b094ce5c4d0472426b67110ca 100644 (file)
@@ -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 ffb1e5a8c1704a333a3030fa8d878d854512843d..790abdc07c036e2ffe3b04c4431869e1178b9371 100644 (file)
--- 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.
index b22570aa10b43f2bf812ee2f6214d56a8417ffa0..c8c94fc5af0acd0eab81e2491a8679af9b88a06e 100644 (file)
--- 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
index e2f1448eb49b285ea9f83532fb81d39dd74e5bc1..16163dbddfb1ef621b2853a1a4df70f3dde15d36 100644 (file)
@@ -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;
 }
 
 
index e2f1448eb49b285ea9f83532fb81d39dd74e5bc1..16163dbddfb1ef621b2853a1a4df70f3dde15d36 100644 (file)
@@ -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;
 }
 
 
index 7fdb5717849e5e7b64ad6dc228096acd1019946c..64b7cdfe9ffc74b32f71d5404c363b9fe1e4ccdc 100644 (file)
@@ -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:
index 3585d20e4b059e6377a2110b0357f7932fcee8cc..711ff0a4827ee60c7c4f0e839fa95a09b0006cf0 100644 (file)
@@ -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 ())
index e6220695531e9cdbccab23385031911b6c12ad9c..981ea87a4fd19b772197ced786bf393608a4c60c 100644 (file)
@@ -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 ("");
index 4eeeb922a624611bd8cad56bc06f81f8a4dd0649..52990edfe0feb2aea5a7747f18f2b23d2304d3af 100644 (file)
@@ -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;
index beffd0a9c5aac475223216af1f73a62eab9dce0c..db6149fa1a0d29c5a45488b35abd0c8fec150f08 100644 (file)
@@ -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))
            {
index 782f5718cd88dab21b65e8139ad547c7d2448a70..66af6f4406750a1efee8752eb02e8efc88346622 100644 (file)
@@ -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);
 }
index 28b93dda7ac9765b8976f9cc8055cd9f80af4e4e..acfbfb53dda01659e6d8754b7e5fa540d33b1eb7 100644 (file)
@@ -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);
+       }
     }
 }
 
index d0d42c148ef01f91915e3b8ae850879d1f496304..0a473d913ed0afa1cd0eb9e36d0e582670256267 100644 (file)
@@ -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);
     }
 }