1 --- gtk+-2.6.4/gtk/gtktable.c 2004-08-09 19:59:52.000000000 +0300
2 +++ gtk+-2.6.4/gtk/gtktable.c 2005-04-06 16:19:37.974765320 +0300
7 +#include "gtkbutton.h"
12 return GTK_WIDGET (table);
15 +void osso_gtk_table_find_button_detail (GtkTable *table,
16 + GtkTableChild *table_child)
18 + OssoGtkButtonAttachFlags attachflags = 0;
19 + gboolean automatic_detail;
21 + g_return_if_fail (GTK_IS_TABLE (table));
22 + g_return_if_fail (table_child != NULL);
23 + g_return_if_fail (GTK_IS_BUTTON (table_child->widget));
25 + if (table_child->top_attach == 0)
26 + attachflags |= OSSO_GTK_BUTTON_ATTACH_NORTH;
28 + if (table_child->bottom_attach == table->nrows)
29 + attachflags |= OSSO_GTK_BUTTON_ATTACH_SOUTH;
31 + if (table_child->left_attach == 0)
32 + attachflags |= OSSO_GTK_BUTTON_ATTACH_WEST;
34 + if (table_child->right_attach == table->ncols)
35 + attachflags |= OSSO_GTK_BUTTON_ATTACH_EAST;
37 + g_object_get (G_OBJECT (table_child->widget), "automatic_detail", &automatic_detail, NULL);
38 + if (automatic_detail == TRUE)
39 + g_object_set (G_OBJECT (table_child->widget), "detail", osso_gtk_button_attach_details[attachflags], NULL);
43 gtk_table_resize (GtkTable *table,
46 n_cols != table->ncols)
49 + guint recalc_column = -1;
50 + guint recalc_row = -1;
52 + if (n_rows > table->nrows)
53 + recalc_row = table->nrows;
55 + recalc_row = n_rows;
57 + if (n_cols > table->ncols)
58 + recalc_column = table->ncols;
60 + recalc_column = n_cols;
62 for (list = table->children; list; list = list->next)
66 g_object_notify (G_OBJECT (table), "n_columns");
69 + if ((recalc_column != -1) || (recalc_row != -1))
70 + for (list = table->children; list; list = list->next)
72 + GtkTableChild *child;
76 + if (GTK_IS_BUTTON (child->widget) &&
77 + ((child->bottom_attach == recalc_row) ||
78 + (child->right_attach == recalc_column)))
80 + osso_gtk_table_find_button_detail (table, child);
86 table_child->yshrink = (yoptions & GTK_SHRINK) != 0;
87 table_child->yfill = (yoptions & GTK_FILL) != 0;
88 table_child->ypadding = ypadding;
91 + if (GTK_IS_BUTTON (table_child->widget))
92 + osso_gtk_table_find_button_detail (table, table_child);
94 table->children = g_list_prepend (table->children, table_child);