Picky --enable-ansi cleanups.

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.
This commit is contained in:
Owen Taylor 1998-04-10 00:44:35 +00:00 committed by Owen Taylor
parent 26df647a0f
commit 3a02948170
16 changed files with 156 additions and 27 deletions

View 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>)

View 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>)

View 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>)

View 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>)

View 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>)

View 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>)

View 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>)

View 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;

View 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;

View 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;

View File

@ -24,7 +24,7 @@ enum {
ARG_XALIGN,
ARG_YALIGN,
ARG_XPAD,
ARG_YPAD,
ARG_YPAD
};
static void gtk_misc_class_init (GtkMiscClass *klass);

View 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

View 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;

View 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++)
{

View 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);

View 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);