]> Pileus Git - ~andy/gtk/commitdiff
Picky --enable-ansi cleanups.
authorOwen Taylor <owt1@cornell.edu>
Fri, 10 Apr 1998 00:44:35 +0000 (00:44 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 10 Apr 1998 00:44:35 +0000 (00:44 +0000)
Thu Apr  9 18:36:31 1998  Owen Taylor  <owt1@cornell.edu>

* gtk/gtkmisc.c gdk/gdkwindow gtk/gtkentry.c gtk/testgtk.c:
Picky --enable-ansi cleanups.

* gtk/gtkstatusbar.c (gtk_statusbar_pop): Pop top message
off _belonging_to_this_context_. (gtk-d4bjorn-980409-0)

From "Damon Chaplin" <DAChaplin@email.msn.com>

* gtk/gtktable.c (gtk_table_size_request_pass3): Small fix to size
requisition code.

* gtk/gtknotebook.c: Make sure not to do things to page->tab_label
if it doesn't exist.

16 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
gdk/gdkwindow.c
gdk/x11/gdkwindow-x11.c
gtk/gtkeditable.c
gtk/gtkmisc.c
gtk/gtknotebook.c
gtk/gtkstatusbar.c
gtk/gtktable.c
gtk/testgtk.c
tests/testgtk.c

index dc10c16995612664dc2f880560ccb020147dfc15..0cfac7969c09002476c529ee276687b7db181627 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+Thu Apr  9 18:36:31 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkmisc.c gdk/gdkwindow gtk/gtkentry.c gtk/testgtk.c:
+       Picky --enable-ansi cleanups.
+
+       * gtk/gtkstatusbar.c (gtk_statusbar_pop): Pop top message
+       off _belonging_to_this_context_. (gtk-d4bjorn-980409-0)
+
+       From "Damon Chaplin" <DAChaplin@email.msn.com>
+       
+       * gtk/gtktable.c (gtk_table_size_request_pass3): Small fix to size
+       requisition code.
+
+       * gtk/gtknotebook.c: Make sure not to do things to page->tab_label
+       if it doesn't exist.
+
 Thu Apr  9 14:24:35 1998  Owen Taylor  <owt1@cornell.edu>
 
        (Found by Mattias.Gronlund" <Mattias.Gronlund@sa.erisoft.se>)
index dc10c16995612664dc2f880560ccb020147dfc15..0cfac7969c09002476c529ee276687b7db181627 100644 (file)
@@ -1,3 +1,19 @@
+Thu Apr  9 18:36:31 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkmisc.c gdk/gdkwindow gtk/gtkentry.c gtk/testgtk.c:
+       Picky --enable-ansi cleanups.
+
+       * gtk/gtkstatusbar.c (gtk_statusbar_pop): Pop top message
+       off _belonging_to_this_context_. (gtk-d4bjorn-980409-0)
+
+       From "Damon Chaplin" <DAChaplin@email.msn.com>
+       
+       * gtk/gtktable.c (gtk_table_size_request_pass3): Small fix to size
+       requisition code.
+
+       * gtk/gtknotebook.c: Make sure not to do things to page->tab_label
+       if it doesn't exist.
+
 Thu Apr  9 14:24:35 1998  Owen Taylor  <owt1@cornell.edu>
 
        (Found by Mattias.Gronlund" <Mattias.Gronlund@sa.erisoft.se>)
index dc10c16995612664dc2f880560ccb020147dfc15..0cfac7969c09002476c529ee276687b7db181627 100644 (file)
@@ -1,3 +1,19 @@
+Thu Apr  9 18:36:31 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkmisc.c gdk/gdkwindow gtk/gtkentry.c gtk/testgtk.c:
+       Picky --enable-ansi cleanups.
+
+       * gtk/gtkstatusbar.c (gtk_statusbar_pop): Pop top message
+       off _belonging_to_this_context_. (gtk-d4bjorn-980409-0)
+
+       From "Damon Chaplin" <DAChaplin@email.msn.com>
+       
+       * gtk/gtktable.c (gtk_table_size_request_pass3): Small fix to size
+       requisition code.
+
+       * gtk/gtknotebook.c: Make sure not to do things to page->tab_label
+       if it doesn't exist.
+
 Thu Apr  9 14:24:35 1998  Owen Taylor  <owt1@cornell.edu>
 
        (Found by Mattias.Gronlund" <Mattias.Gronlund@sa.erisoft.se>)
index dc10c16995612664dc2f880560ccb020147dfc15..0cfac7969c09002476c529ee276687b7db181627 100644 (file)
@@ -1,3 +1,19 @@
+Thu Apr  9 18:36:31 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkmisc.c gdk/gdkwindow gtk/gtkentry.c gtk/testgtk.c:
+       Picky --enable-ansi cleanups.
+
+       * gtk/gtkstatusbar.c (gtk_statusbar_pop): Pop top message
+       off _belonging_to_this_context_. (gtk-d4bjorn-980409-0)
+
+       From "Damon Chaplin" <DAChaplin@email.msn.com>
+       
+       * gtk/gtktable.c (gtk_table_size_request_pass3): Small fix to size
+       requisition code.
+
+       * gtk/gtknotebook.c: Make sure not to do things to page->tab_label
+       if it doesn't exist.
+
 Thu Apr  9 14:24:35 1998  Owen Taylor  <owt1@cornell.edu>
 
        (Found by Mattias.Gronlund" <Mattias.Gronlund@sa.erisoft.se>)
index dc10c16995612664dc2f880560ccb020147dfc15..0cfac7969c09002476c529ee276687b7db181627 100644 (file)
@@ -1,3 +1,19 @@
+Thu Apr  9 18:36:31 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkmisc.c gdk/gdkwindow gtk/gtkentry.c gtk/testgtk.c:
+       Picky --enable-ansi cleanups.
+
+       * gtk/gtkstatusbar.c (gtk_statusbar_pop): Pop top message
+       off _belonging_to_this_context_. (gtk-d4bjorn-980409-0)
+
+       From "Damon Chaplin" <DAChaplin@email.msn.com>
+       
+       * gtk/gtktable.c (gtk_table_size_request_pass3): Small fix to size
+       requisition code.
+
+       * gtk/gtknotebook.c: Make sure not to do things to page->tab_label
+       if it doesn't exist.
+
 Thu Apr  9 14:24:35 1998  Owen Taylor  <owt1@cornell.edu>
 
        (Found by Mattias.Gronlund" <Mattias.Gronlund@sa.erisoft.se>)
index dc10c16995612664dc2f880560ccb020147dfc15..0cfac7969c09002476c529ee276687b7db181627 100644 (file)
@@ -1,3 +1,19 @@
+Thu Apr  9 18:36:31 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkmisc.c gdk/gdkwindow gtk/gtkentry.c gtk/testgtk.c:
+       Picky --enable-ansi cleanups.
+
+       * gtk/gtkstatusbar.c (gtk_statusbar_pop): Pop top message
+       off _belonging_to_this_context_. (gtk-d4bjorn-980409-0)
+
+       From "Damon Chaplin" <DAChaplin@email.msn.com>
+       
+       * gtk/gtktable.c (gtk_table_size_request_pass3): Small fix to size
+       requisition code.
+
+       * gtk/gtknotebook.c: Make sure not to do things to page->tab_label
+       if it doesn't exist.
+
 Thu Apr  9 14:24:35 1998  Owen Taylor  <owt1@cornell.edu>
 
        (Found by Mattias.Gronlund" <Mattias.Gronlund@sa.erisoft.se>)
index dc10c16995612664dc2f880560ccb020147dfc15..0cfac7969c09002476c529ee276687b7db181627 100644 (file)
@@ -1,3 +1,19 @@
+Thu Apr  9 18:36:31 1998  Owen Taylor  <owt1@cornell.edu>
+
+       * gtk/gtkmisc.c gdk/gdkwindow gtk/gtkentry.c gtk/testgtk.c:
+       Picky --enable-ansi cleanups.
+
+       * gtk/gtkstatusbar.c (gtk_statusbar_pop): Pop top message
+       off _belonging_to_this_context_. (gtk-d4bjorn-980409-0)
+
+       From "Damon Chaplin" <DAChaplin@email.msn.com>
+       
+       * gtk/gtktable.c (gtk_table_size_request_pass3): Small fix to size
+       requisition code.
+
+       * gtk/gtknotebook.c: Make sure not to do things to page->tab_label
+       if it doesn't exist.
+
 Thu Apr  9 14:24:35 1998  Owen Taylor  <owt1@cornell.edu>
 
        (Found by Mattias.Gronlund" <Mattias.Gronlund@sa.erisoft.se>)
index f5de78cc3f162026483fe05b5c4ac009de68a685..8404144766e3af23f5e768b83c5d89b6be0ae415 100644 (file)
@@ -64,9 +64,11 @@ gdk_window_xid_at(Window base, gint bx, gint by, gint x, gint y,
    Display *disp;
    Window *list=NULL;
    Window child=0,parent_win=0,root_win=0;
-   int num,i,ww,wh,wb,wd;
+   int i;
+   guint num;
    int wx,wy;
-   
+   guint ww,wh,wb,wd;
+
    window=(GdkWindow*)&gdk_root_parent;
    private=(GdkWindowPrivate*)window;
    disp=private->xdisplay;
index f5de78cc3f162026483fe05b5c4ac009de68a685..8404144766e3af23f5e768b83c5d89b6be0ae415 100644 (file)
@@ -64,9 +64,11 @@ gdk_window_xid_at(Window base, gint bx, gint by, gint x, gint y,
    Display *disp;
    Window *list=NULL;
    Window child=0,parent_win=0,root_win=0;
-   int num,i,ww,wh,wb,wd;
+   int i;
+   guint num;
    int wx,wy;
-   
+   guint ww,wh,wb,wd;
+
    window=(GdkWindow*)&gdk_root_parent;
    private=(GdkWindowPrivate*)window;
    disp=private->xdisplay;
index 15b506876dca63e2ead068c00c71831675b54602..17a83a0d7ddf6eec895ea04076c93f2eec833a0b 100644 (file)
@@ -440,7 +440,7 @@ gtk_editable_selection_received  (GtkWidget         *widget,
     {
     case STRING:
       selection_data->data[selection_data->length] = 0;
-      gtk_editable_insert_text (editable, selection_data->data,
+      gtk_editable_insert_text (editable, (gchar *)selection_data->data,
                                strlen ((gchar *)selection_data->data), 
                                &tmp_pos);
       editable->current_pos = tmp_pos;
index 13b5e965a0fdb9959d01d8c375cd5b7534e3aa70..b8e7199011e9eb65a5e1c040489a9a00f71be42e 100644 (file)
@@ -24,7 +24,7 @@ enum {
   ARG_XALIGN,
   ARG_YALIGN,
   ARG_XPAD,
-  ARG_YPAD,
+  ARG_YPAD
 };
 
 static void gtk_misc_class_init (GtkMiscClass *klass);
index 05174d3b6e1f39e3c2827ada70d82f82ee81b04d..1a183f85577a9e8b3c005570852d7a0883d8e32c 100644 (file)
@@ -790,7 +790,10 @@ gtk_notebook_set_show_tabs (GtkNotebook *notebook,
          page = children->data;
          children = children->next;
          if (page->default_tab)
-           gtk_widget_destroy (page->tab_label);
+           {
+             gtk_widget_destroy (page->tab_label);
+             page->tab_label = NULL;
+           }
          else
            gtk_widget_hide (page->tab_label);
        }
@@ -1547,7 +1550,7 @@ gtk_notebook_button_press (GtkWidget      *widget,
          page = children->data;
          
          if (GTK_WIDGET_VISIBLE (page->child) &&
-             GTK_WIDGET_MAPPED (page->tab_label) &&
+             page->tab_label && GTK_WIDGET_MAPPED (page->tab_label) &&
              (event->x >= page->allocation.x) &&
              (event->y >= page->allocation.y) &&
              (event->x <= (page->allocation.x + page->allocation.width)) &&
@@ -2423,7 +2426,7 @@ gtk_notebook_pages_allocate (GtkNotebook   *notebook,
              page = children->data;
              children = children->next;
              
-             if (GTK_WIDGET_MAPPED (page->tab_label))
+             if (page->tab_label && GTK_WIDGET_MAPPED (page->tab_label))
                gtk_widget_unmap (page->tab_label);
              
            }
@@ -2433,7 +2436,7 @@ gtk_notebook_pages_allocate (GtkNotebook   *notebook,
              page = children->data;
              children = children->next;
              
-             if (GTK_WIDGET_MAPPED (page->tab_label))
+             if (page->tab_label && GTK_WIDGET_MAPPED (page->tab_label))
                gtk_widget_unmap (page->tab_label);
            }
        }
@@ -2485,7 +2488,7 @@ gtk_notebook_pages_allocate (GtkNotebook   *notebook,
            }
          
          if (GTK_WIDGET_REALIZED (notebook) &&
-             !GTK_WIDGET_MAPPED (page->tab_label))
+             page->tab_label && !GTK_WIDGET_MAPPED (page->tab_label))
            gtk_widget_map (page->tab_label);
        }
     }
@@ -2557,7 +2560,8 @@ gtk_notebook_page_allocate (GtkNotebook     *notebook,
       break;
     }
 
-  gtk_widget_size_allocate (page->tab_label, &child_allocation);
+  if (page->tab_label)
+    gtk_widget_size_allocate (page->tab_label, &child_allocation);
 }
 
 static void
index 4be0dc6493c65e1aa4b3def273e6cb7359d5fddc..cd6101e8eedcb53e279d7696c798afc3b8408511 100644 (file)
@@ -245,16 +245,25 @@ gtk_statusbar_pop (GtkStatusbar *statusbar,
   if (statusbar->messages)
     {
       GSList *list;
-      GtkStatusbarClass *class;
 
-      list = statusbar->messages;
-      msg = list->data;
-      class = GTK_STATUSBAR_CLASS (GTK_OBJECT (statusbar)->klass);
-      
-      statusbar->messages = g_slist_remove_link (statusbar->messages, list);
-      g_free (msg->text);
-      g_mem_chunk_free (class->messages_mem_chunk, msg);
-      g_slist_free_1 (list);
+      for (list = statusbar->messages; list; list = list->next)
+       {
+         msg = list->data;
+
+         if (msg->context_id == context_id)
+           {
+             GtkStatusbarClass *class;
+
+             class = GTK_STATUSBAR_CLASS (GTK_OBJECT (statusbar)->klass);
+
+             statusbar->messages = g_slist_remove_link (statusbar->messages,
+                                                        list);
+             g_free (msg->text);
+             g_mem_chunk_free (class->messages_mem_chunk, msg);
+             g_slist_free_1 (list);
+             break;
+           }
+       }
     }
 
   msg = statusbar->messages ? statusbar->messages->data : NULL;
index d90b47b965e09b67bfbac2747025597f84af7d81..534e5a6e1b47895bd0351620a591105f40805de8 100644 (file)
@@ -724,9 +724,9 @@ gtk_table_size_request_pass3 (GtkTable *table)
                *  its requisition, then divide up the needed space evenly
                *  amongst the columns it spans.
                */
-              if (width < child->widget->requisition.width)
+              if (width < child->widget->requisition.width + child->xpadding * 2)
                 {
-                  width = child->widget->requisition.width - width;
+                  width = child->widget->requisition.width + child->xpadding * 2 - width;
 
                   for (col = child->left_attach; col < child->right_attach; col++)
                     {
@@ -756,9 +756,9 @@ gtk_table_size_request_pass3 (GtkTable *table)
                *  its requisition, then divide up the needed space evenly
                *  amongst the columns it spans.
                */
-              if (height < child->widget->requisition.height)
+              if (height < child->widget->requisition.height + child->ypadding * 2)
                 {
-                  height = child->widget->requisition.height - height;
+                  height = child->widget->requisition.height + child->ypadding * 2 - height;
 
                   for (row = child->top_attach; row < child->bottom_attach; row++)
                     {
index e56fc7073f90398c02099c6c4e9dd46377d1342d..873784185e6674aa5bccdb307b4ef15cd31fbc30 100644 (file)
@@ -3079,7 +3079,7 @@ clist_warning_test (GtkWidget *button,
 
   child = gtk_label_new ("Test");
   gtk_widget_ref (child);
-  gtk_object_sink (child);
+  gtk_object_sink (GTK_OBJECT (child));
 
   if (add_remove)
     gtk_container_add (GTK_CONTAINER (clist), child);
index e56fc7073f90398c02099c6c4e9dd46377d1342d..873784185e6674aa5bccdb307b4ef15cd31fbc30 100644 (file)
@@ -3079,7 +3079,7 @@ clist_warning_test (GtkWidget *button,
 
   child = gtk_label_new ("Test");
   gtk_widget_ref (child);
-  gtk_object_sink (child);
+  gtk_object_sink (GTK_OBJECT (child));
 
   if (add_remove)
     gtk_container_add (GTK_CONTAINER (clist), child);