Commit 50512ddc authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Remove reallocate-redraws property. This is something that only a widget

Fri May 18 14:25:20 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcontainer.c: Remove reallocate-redraws property.
	This is something that only a widget writer would ever want
	to change.

	* gtk/gtksignal.c: Handle G_SIGNAL_TYPE_STATIC_SCOPE for
	gtk_signal_emit_by_name().

	* gtk/gtkviewport.c: Fix some warnings.

	* gtk/gtkwidget.c gtk/gtksizegroup.c: Add "size group" facility
	allowing the requisitions of multiple widgets to be grouped
	together.

	* tests/testgtk.c: Add GtkSizeGroup test

	* demos/gtk-demo/sizegroup.c: Add GtkSizeGroup demo.

	* demos/gtk-demo/main.c demos/gtk-demo/pixbufs.c: Fix some
	warnings.

	* configure.in: Switch to using AM_GLIB_GNU_GETTEXT.
parent 02d5f41c
Fri May 18 14:25:20 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c: Remove reallocate-redraws property.
This is something that only a widget writer would ever want
to change.
* gtk/gtksignal.c: Handle G_SIGNAL_TYPE_STATIC_SCOPE for
gtk_signal_emit_by_name().
* gtk/gtkviewport.c: Fix some warnings.
* gtk/gtkwidget.c gtk/gtksizegroup.c: Add "size group" facility
allowing the requisitions of multiple widgets to be grouped
together.
* tests/testgtk.c: Add GtkSizeGroup test
* demos/gtk-demo/sizegroup.c: Add GtkSizeGroup demo.
* demos/gtk-demo/main.c demos/gtk-demo/pixbufs.c: Fix some
warnings.
* configure.in: Switch to using AM_GLIB_GNU_GETTEXT.
2001-04-28 Martin Baulig <baulig@suse.de> 2001-04-28 Martin Baulig <baulig@suse.de>
* gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon() * gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon()
......
Fri May 18 14:25:20 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c: Remove reallocate-redraws property.
This is something that only a widget writer would ever want
to change.
* gtk/gtksignal.c: Handle G_SIGNAL_TYPE_STATIC_SCOPE for
gtk_signal_emit_by_name().
* gtk/gtkviewport.c: Fix some warnings.
* gtk/gtkwidget.c gtk/gtksizegroup.c: Add "size group" facility
allowing the requisitions of multiple widgets to be grouped
together.
* tests/testgtk.c: Add GtkSizeGroup test
* demos/gtk-demo/sizegroup.c: Add GtkSizeGroup demo.
* demos/gtk-demo/main.c demos/gtk-demo/pixbufs.c: Fix some
warnings.
* configure.in: Switch to using AM_GLIB_GNU_GETTEXT.
2001-04-28 Martin Baulig <baulig@suse.de> 2001-04-28 Martin Baulig <baulig@suse.de>
* gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon() * gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon()
......
Fri May 18 14:25:20 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c: Remove reallocate-redraws property.
This is something that only a widget writer would ever want
to change.
* gtk/gtksignal.c: Handle G_SIGNAL_TYPE_STATIC_SCOPE for
gtk_signal_emit_by_name().
* gtk/gtkviewport.c: Fix some warnings.
* gtk/gtkwidget.c gtk/gtksizegroup.c: Add "size group" facility
allowing the requisitions of multiple widgets to be grouped
together.
* tests/testgtk.c: Add GtkSizeGroup test
* demos/gtk-demo/sizegroup.c: Add GtkSizeGroup demo.
* demos/gtk-demo/main.c demos/gtk-demo/pixbufs.c: Fix some
warnings.
* configure.in: Switch to using AM_GLIB_GNU_GETTEXT.
2001-04-28 Martin Baulig <baulig@suse.de> 2001-04-28 Martin Baulig <baulig@suse.de>
* gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon() * gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon()
......
Fri May 18 14:25:20 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c: Remove reallocate-redraws property.
This is something that only a widget writer would ever want
to change.
* gtk/gtksignal.c: Handle G_SIGNAL_TYPE_STATIC_SCOPE for
gtk_signal_emit_by_name().
* gtk/gtkviewport.c: Fix some warnings.
* gtk/gtkwidget.c gtk/gtksizegroup.c: Add "size group" facility
allowing the requisitions of multiple widgets to be grouped
together.
* tests/testgtk.c: Add GtkSizeGroup test
* demos/gtk-demo/sizegroup.c: Add GtkSizeGroup demo.
* demos/gtk-demo/main.c demos/gtk-demo/pixbufs.c: Fix some
warnings.
* configure.in: Switch to using AM_GLIB_GNU_GETTEXT.
2001-04-28 Martin Baulig <baulig@suse.de> 2001-04-28 Martin Baulig <baulig@suse.de>
* gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon() * gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon()
......
Fri May 18 14:25:20 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c: Remove reallocate-redraws property.
This is something that only a widget writer would ever want
to change.
* gtk/gtksignal.c: Handle G_SIGNAL_TYPE_STATIC_SCOPE for
gtk_signal_emit_by_name().
* gtk/gtkviewport.c: Fix some warnings.
* gtk/gtkwidget.c gtk/gtksizegroup.c: Add "size group" facility
allowing the requisitions of multiple widgets to be grouped
together.
* tests/testgtk.c: Add GtkSizeGroup test
* demos/gtk-demo/sizegroup.c: Add GtkSizeGroup demo.
* demos/gtk-demo/main.c demos/gtk-demo/pixbufs.c: Fix some
warnings.
* configure.in: Switch to using AM_GLIB_GNU_GETTEXT.
2001-04-28 Martin Baulig <baulig@suse.de> 2001-04-28 Martin Baulig <baulig@suse.de>
* gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon() * gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon()
......
Fri May 18 14:25:20 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c: Remove reallocate-redraws property.
This is something that only a widget writer would ever want
to change.
* gtk/gtksignal.c: Handle G_SIGNAL_TYPE_STATIC_SCOPE for
gtk_signal_emit_by_name().
* gtk/gtkviewport.c: Fix some warnings.
* gtk/gtkwidget.c gtk/gtksizegroup.c: Add "size group" facility
allowing the requisitions of multiple widgets to be grouped
together.
* tests/testgtk.c: Add GtkSizeGroup test
* demos/gtk-demo/sizegroup.c: Add GtkSizeGroup demo.
* demos/gtk-demo/main.c demos/gtk-demo/pixbufs.c: Fix some
warnings.
* configure.in: Switch to using AM_GLIB_GNU_GETTEXT.
2001-04-28 Martin Baulig <baulig@suse.de> 2001-04-28 Martin Baulig <baulig@suse.de>
* gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon() * gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon()
......
Fri May 18 14:25:20 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcontainer.c: Remove reallocate-redraws property.
This is something that only a widget writer would ever want
to change.
* gtk/gtksignal.c: Handle G_SIGNAL_TYPE_STATIC_SCOPE for
gtk_signal_emit_by_name().
* gtk/gtkviewport.c: Fix some warnings.
* gtk/gtkwidget.c gtk/gtksizegroup.c: Add "size group" facility
allowing the requisitions of multiple widgets to be grouped
together.
* tests/testgtk.c: Add GtkSizeGroup test
* demos/gtk-demo/sizegroup.c: Add GtkSizeGroup demo.
* demos/gtk-demo/main.c demos/gtk-demo/pixbufs.c: Fix some
warnings.
* configure.in: Switch to using AM_GLIB_GNU_GETTEXT.
2001-04-28 Martin Baulig <baulig@suse.de> 2001-04-28 Martin Baulig <baulig@suse.de>
* gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon() * gtk/gtkimagemenuitem.[ch]: Renamed gtk_image_menu_item_add_icon()
......
...@@ -77,7 +77,7 @@ esac ...@@ -77,7 +77,7 @@ esac
if test -z "$ACLOCAL_FLAGS"; then if test -z "$ACLOCAL_FLAGS"; then
acdir=`aclocal --print-ac-dir` acdir=`aclocal --print-ac-dir`
m4list="glib-2.0.m4 gettext.m4" m4list="glib-2.0.m4 glib-gettext.m4"
for file in $m4list for file in $m4list
do do
...@@ -93,18 +93,6 @@ if test -z "$ACLOCAL_FLAGS"; then ...@@ -93,18 +93,6 @@ if test -z "$ACLOCAL_FLAGS"; then
done done
fi fi
echo "Running gettextize... Ignore non-fatal messages."
# Hmm, we specify --force here, since otherwise things dont'
# get added reliably, but we don't want to overwrite intl
# while making dist.
echo "no" | gettextize --copy --force
#
# Really bad hack
echo "Munging po/Makefile.in.in"
sed s%@PACKAGE@%@GETTEXT_PACKAGE@% < po/Makefile.in.in > po/Makefile.in.in.new
mv po/Makefile.in.in.new po/Makefile.in.in
aclocal $ACLOCAL_FLAGS aclocal $ACLOCAL_FLAGS
# optionally feature autoheader # optionally feature autoheader
......
...@@ -226,10 +226,10 @@ AC_SUBST(STRIP_END) ...@@ -226,10 +226,10 @@ AC_SUBST(STRIP_END)
# i18n stuff # i18n stuff
ALL_LINGUAS="az ca cs da de el en_GB en@IPA es et eu fa fi fr ga gl he hr hu ia it ja ko lt nl nn no pl pt pt_BR ro ru sk sl sp sr sv tr uk vi wa zh_TW zh_CN" ALL_LINGUAS="az ca cs da de el en_GB en@IPA es et eu fa fi fr ga gl he hr hu ia it ja ko lt nl nn no pl pt pt_BR ro ru sk sl sp sr sv tr uk vi wa zh_TW zh_CN"
AM_GTK_GNU_GETTEXT AM_GLIB_GNU_GETTEXT
LIBS="$LIBS $INTLLIBS" LIBS="$LIBS $INTLLIBS"
# AM_GTK_GNU_GETTEXT above substs $DATADIRNAME # AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed # this is the directory where the *.{mo,gmo} files are installed
gtklocaledir='${prefix}/${DATADIRNAME}/locale' gtklocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(gtklocaledir) AC_SUBST(gtklocaledir)
......
...@@ -14,6 +14,7 @@ demos = @STRIP_BEGIN@ \ ...@@ -14,6 +14,7 @@ demos = @STRIP_BEGIN@ \
menus.c \ menus.c \
panes.c \ panes.c \
pixbufs.c \ pixbufs.c \
sizegroup.c \
textview.c \ textview.c \
@STRIP_END@ @STRIP_END@
......
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
...@@ -546,7 +547,7 @@ button_press_event_cb (GtkTreeView *tree_view, ...@@ -546,7 +547,7 @@ button_press_event_cb (GtkTreeView *tree_view,
gtk_signal_connect (GTK_OBJECT (window), gtk_signal_connect (GTK_OBJECT (window),
"destroy", "destroy",
window_closed_cb, GTK_SIGNAL_FUNC (window_closed_cb),
cbdata); cbdata);
} }
else else
...@@ -598,7 +599,7 @@ row_activated_cb (GtkTreeView *tree_view, ...@@ -598,7 +599,7 @@ row_activated_cb (GtkTreeView *tree_view,
gtk_signal_connect (GTK_OBJECT (window), gtk_signal_connect (GTK_OBJECT (window),
"destroy", "destroy",
window_closed_cb, GTK_SIGNAL_FUNC (window_closed_cb),
cbdata); cbdata);
} }
} }
...@@ -714,7 +715,7 @@ create_tree (void) ...@@ -714,7 +715,7 @@ create_tree (void)
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view),
GTK_TREE_VIEW_COLUMN (column)); GTK_TREE_VIEW_COLUMN (column));
gtk_signal_connect (GTK_OBJECT (selection), "selection_changed", selection_cb, model); gtk_signal_connect (GTK_OBJECT (selection), "selection_changed", GTK_SIGNAL_FUNC (selection_cb), model);
gtk_signal_connect (GTK_OBJECT (tree_view), "row_activated", GTK_SIGNAL_FUNC (row_activated_cb), model); gtk_signal_connect (GTK_OBJECT (tree_view), "row_activated", GTK_SIGNAL_FUNC (row_activated_cb), model);
return tree_view; return tree_view;
......
...@@ -47,7 +47,7 @@ static const char *installed_image_names[] = { ...@@ -47,7 +47,7 @@ static const char *installed_image_names[] = {
#define N_IMAGES G_N_ELEMENTS (relative_image_names) #define N_IMAGES G_N_ELEMENTS (relative_image_names)
/* demo window */ /* demo window */
static GtkWindow *window = NULL; static GtkWidget *window = NULL;
/* Current frame */ /* Current frame */
static GdkPixbuf *frame; static GdkPixbuf *frame;
......
/* Size Groups
*
* GtkSizeGroup provides a mechanism for grouping a number of
* widgets together so they all request the same amount of space.
* This is typically useful when you want a column of widgets to
* have the same size, but you can't use a GtkTable widget.
*
* Note that size groups only affect the amount of space requested,
* not the size that the widgets finally receive. If you want the
* widgets in a GtkSizeGroup to actually be the same size, you need
* to pack them in such a way that they get the size they request
* and not more. For example, if you are packing your widgets
* into a table, you would not include the GTK_FILL flag.
*/
#include <gtk/gtk.h>
static GtkWidget *window = NULL;
/* Convenience function to create an option menu holding a number of strings
*/
GtkWidget *
create_option_menu (const char **strings)
{
GtkWidget *menu;
GtkWidget *option_menu;
const char **str;
menu = gtk_menu_new ();
for (str = strings; *str; str++)
{
GtkWidget *menu_item = gtk_menu_item_new_with_label (*str);
gtk_widget_show (menu_item);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
}
option_menu = gtk_option_menu_new ();
gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu);
return option_menu;
}
static void
add_row (GtkTable *table,
int row,
GtkSizeGroup *size_group,
const char *label_text,
const char **options)
{
GtkWidget *option_menu;
GtkWidget *label;
label = gtk_label_new (label_text);
gtk_misc_set_alignment (GTK_MISC (label), 0, 1);
gtk_table_attach (GTK_TABLE (table), label,
0, 1, row, row + 1,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
option_menu = create_option_menu (options);
gtk_size_group_add_widget (size_group, option_menu);
gtk_table_attach (GTK_TABLE (table), option_menu,
1, 2, row, row + 1,
0, 0,
0, 0);
}
static void
toggle_grouping (GtkToggleButton *check_button,
GtkSizeGroup *size_group)
{
GtkSizeGroupMode new_mode;
/* GTK_SIZE_GROUP_NONE is not generally useful, but is useful
* here to show the effect of GTK_SIZE_GROUP_HORIZONTAL by
* contrast.
*/
if (gtk_toggle_button_get_active (check_button))
new_mode = GTK_SIZE_GROUP_HORIZONTAL;
else
new_mode = GTK_SIZE_GROUP_NONE;
gtk_size_group_set_mode (size_group, new_mode);
}
GtkWidget *
do_sizegroup (void)
{
GtkWidget *table;
GtkWidget *frame;
GtkWidget *vbox;
GtkWidget *check_button;
GtkSizeGroup *size_group;
static const char *color_options[] = {
"Red", "Green", "Blue", NULL
};
static const char *dash_options[] = {
"Solid", "Dashed", "Dotted", NULL
};
static const char *end_options[] = {
"Square", "Round", "Arrow", NULL
};
if (!window)
{
window = gtk_dialog_new_with_buttons ("GtkSizeGroup",
NULL, 0,
GTK_STOCK_BUTTON_CLOSE,
GTK_RESPONSE_NONE,
NULL);
gtk_window_set_resizeable (GTK_WINDOW (window), FALSE);
gtk_signal_connect (GTK_OBJECT (window), "response",
GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (gtk_widget_destroyed), &window);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
/* Create one frame holding color options
*/
frame = gtk_frame_new ("Color Options");
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
table = gtk_table_new (2, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 5);
gtk_table_set_row_spacings (GTK_TABLE (table), 5);
gtk_table_set_col_spacings (GTK_TABLE (table), 10);
gtk_container_add (GTK_CONTAINER (frame), table);
add_row (GTK_TABLE (table), 0, size_group, "Foreground", color_options);
add_row (GTK_TABLE (table), 1, size_group, "Background", color_options);
/* And another frame holding line style options
*/
frame = gtk_frame_new ("Line Options");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
table = gtk_table_new (2, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 5);
gtk_table_set_row_spacings (GTK_TABLE (table), 5);
gtk_table_set_col_spacings (GTK_TABLE (table), 10);
gtk_container_add (GTK_CONTAINER (frame), table);
add_row (GTK_TABLE (table), 0, size_group, "Dashing", dash_options);
add_row (GTK_TABLE (table), 1, size_group, "Line ends", end_options);
/* And a check button to turn grouping on and off */
check_button = gtk_check_button_new_with_label ("Enable grouping");
gtk_box_pack_start (GTK_BOX (vbox), check_button, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button), TRUE);
gtk_signal_connect (GTK_OBJECT (check_button), "toggled",
GTK_SIGNAL_FUNC (toggle_grouping), size_group);
}
if (!GTK_WIDGET_VISIBLE (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
return window;
}
...@@ -142,6 +142,7 @@ gtk_public_h_sources = @STRIP_BEGIN@ \ ...@@ -142,6 +142,7 @@ gtk_public_h_sources = @STRIP_BEGIN@ \
gtkseparator.h \ gtkseparator.h \
gtksettings.h \ gtksettings.h \
gtksignal.h \ gtksignal.h \
gtksizegroup.h \
gtksocket.h \ gtksocket.h \
gtkspinbutton.h \ gtkspinbutton.h \
gtkstyle.h \ gtkstyle.h \
...@@ -301,6 +302,7 @@ gtk_c_sources = @STRIP_BEGIN@ \ ...@@ -301,6 +302,7 @@ gtk_c_sources = @STRIP_BEGIN@ \
gtkseparator.c \ gtkseparator.c \
gtksettings.c \ gtksettings.c \
gtksignal.c \ gtksignal.c \
gtksizegroup.c \
gtkspinbutton.c \ gtkspinbutton.c \
gtkstock.c \ gtkstock.c \
gtkstyle.c \ gtkstyle.c \
......
...@@ -125,6 +125,7 @@ ...@@ -125,6 +125,7 @@
#include <gtk/gtkseparatormenuitem.h> #include <gtk/gtkseparatormenuitem.h>
#include <gtk/gtksettings.h> #include <gtk/gtksettings.h>
#include <gtk/gtksignal.h> #include <gtk/gtksignal.h>
#include <gtk/gtksizegroup.h>
#include <gtk/gtksocket.h> #include <gtk/gtksocket.h>
#include <gtk/gtkspinbutton.h> #include <gtk/gtkspinbutton.h>
#include <gtk/gtkstock.h> #include <gtk/gtkstock.h>
......
...@@ -49,7 +49,6 @@ enum { ...@@ -49,7 +49,6 @@ enum {
PROP_BORDER_WIDTH, PROP_BORDER_WIDTH,
PROP_RESIZE_MODE, PROP_RESIZE_MODE,
PROP_CHILD, PROP_CHILD,
PROP_REALLOCATE_REDRAWS
}; };
typedef struct _GtkChildArgInfo GtkChildArgInfo; typedef struct _GtkChildArgInfo GtkChildArgInfo;
...@@ -200,13 +199,7 @@ gtk_container_class_init (GtkContainerClass *class) ...@@ -200,13 +199,7 @@ gtk_container_class_init (GtkContainerClass *class)
_("Can be used to add a new child to the container."), _("Can be used to add a new child to the container."),
GTK_TYPE_WIDGET, GTK_TYPE_WIDGET,
G_PARAM_WRITABLE)); G_PARAM_WRITABLE));
g_object_class_install_property (gobject_class,
PROP_REALLOCATE_REDRAWS,
g_param_spec_boolean ("reallocate_redraws",
_("Reallocate redraws"),
_("Whether redraws should be reallocated"),
FALSE,
G_PARAM_READWRITE));
object_class->destroy = gtk_container_destroy; object_class->destroy = gtk_container_destroy;
widget_class->show_all = gtk_container_show_all; widget_class->show_all = gtk_container_show_all;
...@@ -689,10 +682,6 @@ gtk_container_set_property (GObject *object, ...@@ -689,10 +682,6 @@ gtk_container_set_property (GObject *object,
case PROP_RESIZE_MODE: case PROP_RESIZE_MODE:
gtk_container_set_resize_mode (container, g_value_get_enum (value)); gtk_container_set_resize_mode (container, g_value_get_enum (value));
break; break;
case PROP_REALLOCATE_REDRAWS:
gtk_container_set_reallocate_redraws (container,
g_value_get_boolean (value));
break;
case PROP_CHILD: case PROP_CHILD:
gtk_container_add (container, GTK_WIDGET (g_value_get_object (value))); gtk_container_add (container, GTK_WIDGET (g_value_get_object (value)));
break; break;
...@@ -720,9 +709,6 @@ gtk_container_get_property (GObject *object, ...@@ -720,9 +709,6 @@ gtk_container_get_property (GObject *object,
case PROP_RESIZE_MODE: case PROP_RESIZE_MODE:
g_value_set_enum (value, container->resize_mode); g_value_set_enum (value, container->resize_mode);
break; break;
case PROP_REALLOCATE_REDRAWS:
g_value_set_boolean (value, container->reallocate_redraws);
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break; break;
...@@ -889,15 +875,7 @@ gtk_container_set_reallocate_redraws (GtkContainer *container, ...@@ -889,15 +875,7 @@ gtk_container_set_reallocate_redraws (GtkContainer *container,
{ {
g_return_if_fail (GTK_IS_CONTAINER (container)); g_return_if_fail (GTK_IS_CONTAINER (container));
needs_redraws = needs_redraws ? TRUE : FALSE; container->reallocate_redraws = needs_redraws ? TRUE : FALSE;
if (needs_redraws != container->reallocate_redraws)
{
container->reallocate_redraws = needs_redraws;
g_object_notify (G_OBJECT (container), "reallocate_redraws");
if (container->reallocate_redraws)
gtk_widget_queue_draw (GTK_WIDGET (container));
}
} }
static GtkContainer* static GtkContainer*
...@@ -1092,7 +1070,7 @@ gtk_container_resize_children (GtkContainer *container) ...@@ -1092,7 +1070,7 @@ gtk_container_resize_children (GtkContainer *container)
/* we first check out if we actually need to perform a resize, /* we first check out if we actually need to perform a resize,
* which is not the case if we got another container queued for * which is not the case if we got another container queued for
* a resize in our anchestry. also we can skip the whole * a resize in our ancestry. also we can skip the whole
* resize_widgets checks if we are a toplevel and NEED_RESIZE. * resize_widgets checks if we are a toplevel and NEED_RESIZE.
* this code assumes that our allocation is sufficient for our * this code assumes that our allocation is sufficient for our
* requisition, since otherwise we would NEED_RESIZE. * requisition, since otherwise we would NEED_RESIZE.
...@@ -1119,7 +1097,7 @@ gtk_container_resize_children (GtkContainer *container) ...@@ -1119,7 +1097,7 @@ gtk_container_resize_children (GtkContainer *container)
resize_container = GTK_WIDGET (container); resize_container = GTK_WIDGET (container);
/* we now walk the anchestry for all resize widgets as long /* we now walk the ancestry for all resize widgets as long
* as they are our children and as long as their allocation * as they are our children and as long as their allocation
* is insufficient, since we don't need to reallocate below that. * is insufficient, since we don't need to reallocate below that.
*/ */
...@@ -1141,9 +1119,9 @@ gtk_container_resize_children (GtkContainer *container) ...@@ -1141,9 +1119,9 @@ gtk_container_resize_children (GtkContainer *container)
} }
/* for the newly setup resize_widgets list, we now walk each widget's /* for the newly setup resize_widgets list, we now walk each widget's
* anchestry to sort those widgets out that have RESIZE_NEEDED parents. * ancestry to sort those widgets out that have RESIZE_NEEDED parents.
* we can safely stop the walk if we are the parent, since we checked * we can safely stop the walk if we are the parent, since we checked
* our own anchestry already. * our own ancestry already.
*/ */
resize_containers = NULL; resize_containers = NULL;
for (node = resize_widgets; node; node = node->next) for (node = resize_widgets; node; node = node->next)
......
...@@ -321,11 +321,12 @@ gtk_signal_emitv (GtkObject *object, ...@@ -321,11 +321,12 @@ gtk_signal_emitv (GtkObject *object,
GValue *value = params + 1 + i; GValue *value = params + 1 + i;
GtkArg *arg = args + i; GtkArg *arg = args + i;
g_value_init (value, arg->type); g_value_init (value, arg->type & ~G_SIGNAL_TYPE_STATIC_SCOPE);
if (!gtk_arg_static_to_value (arg, value)) if (!gtk_arg_static_to_value (arg, value))
{ {
g_warning ("%s: failed to convert arg type `%s' to value type `%s'", g_warning ("%s: failed to convert arg type `%s' to value type `%s'",
G_STRLOC, g_type_name (arg->type), g_type_name (G_VALUE_TYPE (value))); G_STRLOC, g_type_name (arg->type & ~G_SIGNAL_TYPE_STATIC_SCOPE),
g_type_name (G_VALUE_TYPE (value)));
return; return;
} }
} }
......
This diff is collapsed.
/* GTK - The GIMP Toolkit
* gtksizegroup.h:
* Copyright (C) 2000 Red Hat Software
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GTK_SIZE_GROUP_H__
#define __GTK_SIZE_GROUP_H__
#include <gtk/gtkwidget.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_SIZE_GROUP (gtk_size_group_get_type ())
#define GTK_SIZE_GROUP(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SIZE_GROUP, GtkSizeGroup))
#define GTK_SIZE_GROUP_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SIZE_GROUP, GtkSizeGroupClass))
#define GTK_IS_SIZE_GROUP(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SIZE_GROUP))
#define GTK_IS_SIZE_GROUP_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SIZE_GROUP))
#define GTK_SIZE_GROUP_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_SIZE_GROUP, GtkSizeGroupClass))
typedef struct _GtkSizeGroup GtkSizeGroup;
typedef struct _GtkSizeGroupClass GtkSizeGroupClass;
struct _GtkSizeGroup
{
GObject parent_instance;
GSList *widgets;
guint8 mode;
guint have_width : 1;
guint have_height : 1;
GtkRequisition requisition;