Commit dc0cd67d authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

Apply property patch from Lee Mallabone

2001-03-23  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkhandlebox.c: Apply property patch from Lee Mallabone

	* gtk/gtkbox.c: Apply property patch from Lee Mallabone

	* gtk/gtkcheckmenuitem.c: Apply property patch from Lee Mallabone,
	and deprecated gtk_check_menu_item_set_show_toggle().

	* gtk/gtkbutton.c: Apply property patch from Lee Mallabone

	* gtk/gtkfilesel.c: Apply property patch from Lee Mallabone

	* gtk/gtkframe.c: Apply property patch from Lee Mallabone
parent 4291350f
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtkhandlebox.c: Apply property patch from Lee Mallabone
* gtk/gtkbox.c: Apply property patch from Lee Mallabone
* gtk/gtkcheckmenuitem.c: Apply property patch from Lee Mallabone,
and deprecated gtk_check_menu_item_set_show_toggle().
* gtk/gtkbutton.c: Apply property patch from Lee Mallabone
* gtk/gtkfilesel.c: Apply property patch from Lee Mallabone
* gtk/gtkframe.c: Apply property patch from Lee Mallabone
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c, gtk/gtkimcontext.c, gtk/gtklabel.c: fix up
......
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtkhandlebox.c: Apply property patch from Lee Mallabone
* gtk/gtkbox.c: Apply property patch from Lee Mallabone
* gtk/gtkcheckmenuitem.c: Apply property patch from Lee Mallabone,
and deprecated gtk_check_menu_item_set_show_toggle().
* gtk/gtkbutton.c: Apply property patch from Lee Mallabone
* gtk/gtkfilesel.c: Apply property patch from Lee Mallabone
* gtk/gtkframe.c: Apply property patch from Lee Mallabone
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c, gtk/gtkimcontext.c, gtk/gtklabel.c: fix up
......
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtkhandlebox.c: Apply property patch from Lee Mallabone
* gtk/gtkbox.c: Apply property patch from Lee Mallabone
* gtk/gtkcheckmenuitem.c: Apply property patch from Lee Mallabone,
and deprecated gtk_check_menu_item_set_show_toggle().
* gtk/gtkbutton.c: Apply property patch from Lee Mallabone
* gtk/gtkfilesel.c: Apply property patch from Lee Mallabone
* gtk/gtkframe.c: Apply property patch from Lee Mallabone
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c, gtk/gtkimcontext.c, gtk/gtklabel.c: fix up
......
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtkhandlebox.c: Apply property patch from Lee Mallabone
* gtk/gtkbox.c: Apply property patch from Lee Mallabone
* gtk/gtkcheckmenuitem.c: Apply property patch from Lee Mallabone,
and deprecated gtk_check_menu_item_set_show_toggle().
* gtk/gtkbutton.c: Apply property patch from Lee Mallabone
* gtk/gtkfilesel.c: Apply property patch from Lee Mallabone
* gtk/gtkframe.c: Apply property patch from Lee Mallabone
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c, gtk/gtkimcontext.c, gtk/gtklabel.c: fix up
......
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtkhandlebox.c: Apply property patch from Lee Mallabone
* gtk/gtkbox.c: Apply property patch from Lee Mallabone
* gtk/gtkcheckmenuitem.c: Apply property patch from Lee Mallabone,
and deprecated gtk_check_menu_item_set_show_toggle().
* gtk/gtkbutton.c: Apply property patch from Lee Mallabone
* gtk/gtkfilesel.c: Apply property patch from Lee Mallabone
* gtk/gtkframe.c: Apply property patch from Lee Mallabone
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c, gtk/gtkimcontext.c, gtk/gtklabel.c: fix up
......
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtkhandlebox.c: Apply property patch from Lee Mallabone
* gtk/gtkbox.c: Apply property patch from Lee Mallabone
* gtk/gtkcheckmenuitem.c: Apply property patch from Lee Mallabone,
and deprecated gtk_check_menu_item_set_show_toggle().
* gtk/gtkbutton.c: Apply property patch from Lee Mallabone
* gtk/gtkfilesel.c: Apply property patch from Lee Mallabone
* gtk/gtkframe.c: Apply property patch from Lee Mallabone
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c, gtk/gtkimcontext.c, gtk/gtklabel.c: fix up
......
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtkhandlebox.c: Apply property patch from Lee Mallabone
* gtk/gtkbox.c: Apply property patch from Lee Mallabone
* gtk/gtkcheckmenuitem.c: Apply property patch from Lee Mallabone,
and deprecated gtk_check_menu_item_set_show_toggle().
* gtk/gtkbutton.c: Apply property patch from Lee Mallabone
* gtk/gtkfilesel.c: Apply property patch from Lee Mallabone
* gtk/gtkframe.c: Apply property patch from Lee Mallabone
2001-03-23 Havoc Pennington <hp@redhat.com>
* gtk/gtktoolbar.c, gtk/gtkimcontext.c, gtk/gtklabel.c: fix up
......
......@@ -534,6 +534,12 @@ gtk_font_selection_set_filter().
@GTK_FONT_SCALABLE_BITMAP: scaled bitmap fonts.
@GTK_FONT_ALL: a bitwise combination of all of the above.
<!-- ##### ARG GtkFrame:shadow-type ##### -->
<para>
</para>
<!-- ##### STRUCT GtkIMContextSimple ##### -->
<para>
......
......@@ -124,3 +124,8 @@ field of the #GtkCheckMenuItem-struct struct to discover the new state.
@checkmenuitem: the object which received the signal.
<!-- ##### ARG GtkCheckMenuItem:active ##### -->
<para>
</para>
......@@ -169,3 +169,13 @@ Hides the file operation buttons that normally appear at the top of the dialog.
@filesel: a #GtkFileSelection.
<!-- ##### ARG GtkFileSelection:filename ##### -->
<para>
</para>
<!-- ##### ARG GtkFileSelection:show-fileops ##### -->
<para>
</para>
......@@ -107,3 +107,8 @@ Set the shadow type for the Frame widget.
</para>
<!-- ##### ARG GtkFrame:label-widget ##### -->
<para>
</para>
......@@ -25,11 +25,12 @@
*/
#include "gtkbox.h"
#include "gtkintl.h"
enum {
ARG_0,
ARG_SPACING,
ARG_HOMOGENEOUS
PROP_0,
PROP_SPACING,
PROP_HOMOGENEOUS
};
enum {
......@@ -43,12 +44,14 @@ enum {
static void gtk_box_class_init (GtkBoxClass *klass);
static void gtk_box_init (GtkBox *box);
static void gtk_box_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_box_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_box_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_box_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void gtk_box_map (GtkWidget *widget);
static void gtk_box_unmap (GtkWidget *widget);
static void gtk_box_add (GtkContainer *container,
......@@ -101,27 +104,45 @@ gtk_box_get_type (void)
static void
gtk_box_class_init (GtkBoxClass *class)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
gobject_class = (GObjectClass*) class;
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
container_class = (GtkContainerClass*) class;
parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
gtk_object_add_arg_type ("GtkBox::spacing", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_SPACING);
gtk_object_add_arg_type ("GtkBox::homogeneous", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_HOMOGENEOUS);
gobject_class->set_property = gtk_box_set_property;
gobject_class->get_property = gtk_box_get_property;
g_object_class_install_property (gobject_class,
PROP_SPACING,
g_param_spec_int ("spacing",
_("Spacing"),
_("The amount of space between children."),
0,
G_MAXINT,
0,
G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (gobject_class,
PROP_HOMOGENEOUS,
g_param_spec_boolean ("homogeneous",
_("Homogeneous"),
_("Whether the children should all be the same size."),
FALSE,
G_PARAM_READABLE | G_PARAM_WRITABLE));
gtk_container_add_child_arg_type ("GtkBox::expand", GTK_TYPE_BOOL, GTK_ARG_READWRITE, CHILD_ARG_EXPAND);
gtk_container_add_child_arg_type ("GtkBox::fill", GTK_TYPE_BOOL, GTK_ARG_READWRITE, CHILD_ARG_FILL);
gtk_container_add_child_arg_type ("GtkBox::padding", GTK_TYPE_UINT, GTK_ARG_READWRITE, CHILD_ARG_PADDING);
gtk_container_add_child_arg_type ("GtkBox::pack_type", GTK_TYPE_PACK_TYPE, GTK_ARG_READWRITE, CHILD_ARG_PACK_TYPE);
gtk_container_add_child_arg_type ("GtkBox::position", GTK_TYPE_INT, GTK_ARG_READWRITE, CHILD_ARG_POSITION);
object_class->set_arg = gtk_box_set_arg;
object_class->get_arg = gtk_box_get_arg;
widget_class->map = gtk_box_map;
widget_class->unmap = gtk_box_unmap;
......@@ -143,47 +164,49 @@ gtk_box_init (GtkBox *box)
box->homogeneous = FALSE;
}
static void
gtk_box_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
static void
gtk_box_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GtkBox *box;
box = GTK_BOX (object);
switch (arg_id)
switch (prop_id)
{
case ARG_SPACING:
gtk_box_set_spacing (box, GTK_VALUE_INT (*arg));
case PROP_SPACING:
gtk_box_set_spacing (box, g_value_get_int (value));
break;
case ARG_HOMOGENEOUS:
gtk_box_set_homogeneous (box, GTK_VALUE_BOOL (*arg));
case PROP_HOMOGENEOUS:
gtk_box_set_homogeneous (box, g_value_get_boolean (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_box_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
static void gtk_box_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkBox *box;
box = GTK_BOX (object);
switch (arg_id)
switch (prop_id)
{
case ARG_SPACING:
GTK_VALUE_INT (*arg) = box->spacing;
case PROP_SPACING:
g_value_set_int (value, box->spacing);
break;
case ARG_HOMOGENEOUS:
GTK_VALUE_BOOL (*arg) = box->homogeneous;
case PROP_HOMOGENEOUS:
g_value_set_boolean (value, box->homogeneous);
break;
default:
arg->type = GTK_TYPE_INVALID;
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
......@@ -417,6 +440,7 @@ gtk_box_set_homogeneous (GtkBox *box,
if ((homogeneous ? TRUE : FALSE) != box->homogeneous)
{
box->homogeneous = homogeneous ? TRUE : FALSE;
g_object_notify (G_OBJECT (box), "homogeneous");
gtk_widget_queue_resize (GTK_WIDGET (box));
}
}
......@@ -431,6 +455,7 @@ gtk_box_set_spacing (GtkBox *box,
if (spacing != box->spacing)
{
box->spacing = spacing;
g_object_notify (G_OBJECT (box), "spacing");
gtk_widget_queue_resize (GTK_WIDGET (box));
}
}
......
......@@ -18,7 +18,7 @@
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* Modified by the GTK+ Team and others 1997-2001. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
......@@ -33,6 +33,7 @@
#include "gtkhbox.h"
#include "gtkstock.h"
#include "gtkiconfactory.h"
#include "gtkintl.h"
#define CHILD_SPACING 1
#define DEFAULT_LEFT_POS 4
......@@ -55,19 +56,21 @@ enum {
};
enum {
ARG_0,
ARG_LABEL,
ARG_RELIEF
PROP_0,
PROP_LABEL,
PROP_RELIEF
};
static void gtk_button_class_init (GtkButtonClass *klass);
static void gtk_button_init (GtkButton *button);
static void gtk_button_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_button_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_button_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_button_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void gtk_button_realize (GtkWidget *widget);
static void gtk_button_unrealize (GtkWidget *widget);
static void gtk_button_size_request (GtkWidget *widget,
......@@ -145,8 +148,8 @@ gtk_button_class_init (GtkButtonClass *klass)
parent_class = g_type_class_peek_parent (klass);
object_class->set_arg = gtk_button_set_arg;
object_class->get_arg = gtk_button_get_arg;
G_OBJECT_CLASS(object_class)->set_property = gtk_button_set_property;
G_OBJECT_CLASS(object_class)->get_property = gtk_button_get_property;
widget_class->realize = gtk_button_realize;
widget_class->unrealize = gtk_button_unrealize;
......@@ -170,8 +173,22 @@ gtk_button_class_init (GtkButtonClass *klass)
klass->leave = gtk_real_button_leave;
klass->activate = gtk_real_button_activate;
gtk_object_add_arg_type ("GtkButton::label", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_LABEL);
gtk_object_add_arg_type ("GtkButton::relief", GTK_TYPE_RELIEF_STYLE, GTK_ARG_READWRITE, ARG_RELIEF);
g_object_class_install_property (G_OBJECT_CLASS(object_class),
PROP_LABEL,
g_param_spec_string ("label",
_("Label"),
_("Text of the label widget inside the button, if the button contains a label widget."),
NULL,
G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS(object_class),
PROP_RELIEF,
g_param_spec_enum ("relief",
_("Border relief"),
_("The border relief style."),
GTK_TYPE_RELIEF_STYLE,
GTK_RELIEF_NORMAL,
G_PARAM_READABLE | G_PARAM_WRITABLE));
button_signals[PRESSED] =
gtk_signal_new ("pressed",
......@@ -240,19 +257,20 @@ gtk_button_child_type (GtkContainer *container)
}
static void
gtk_button_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
gtk_button_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GtkButton *button;
button = GTK_BUTTON (object);
switch (arg_id)
switch (prop_id)
{
GtkWidget *child;
case ARG_LABEL:
case PROP_LABEL:
child = GTK_BIN (button)->child;
if (!child)
child = gtk_widget_new (GTK_TYPE_LABEL,
......@@ -260,39 +278,43 @@ gtk_button_set_arg (GtkObject *object,
"parent", button,
NULL);
if (GTK_IS_LABEL (child))
gtk_label_set_text (GTK_LABEL (child),
GTK_VALUE_STRING (*arg) ? GTK_VALUE_STRING (*arg) : "");
{
gtk_label_set_text (GTK_LABEL (child),
g_value_get_string (value) ? g_value_get_string (value) : "");
}
break;
case ARG_RELIEF:
gtk_button_set_relief (button, GTK_VALUE_ENUM (*arg));
case PROP_RELIEF:
gtk_button_set_relief (button, g_value_get_enum (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_button_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
gtk_button_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkButton *button;
button = GTK_BUTTON (object);
switch (arg_id)
switch (prop_id)
{
case ARG_LABEL:
case PROP_LABEL:
if (GTK_BIN (button)->child && GTK_IS_LABEL (GTK_BIN (button)->child))
GTK_VALUE_STRING (*arg) = g_strdup (GTK_LABEL (GTK_BIN (button)->child)->label);
g_value_set_string(value, g_strdup (GTK_LABEL (GTK_BIN (button)->child)->label));
else
GTK_VALUE_STRING (*arg) = NULL;
g_value_set_string(value, NULL);
break;
case ARG_RELIEF:
GTK_VALUE_ENUM (*arg) = gtk_button_get_relief (button);
case PROP_RELIEF:
g_value_set_enum(value, gtk_button_get_relief (button));
break;
default:
arg->type = GTK_TYPE_INVALID;
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
......@@ -445,6 +467,7 @@ gtk_button_set_relief (GtkButton *button,
g_return_if_fail (GTK_IS_BUTTON (button));
button->relief = newrelief;
g_object_notify(G_OBJECT(button), "relief");
gtk_widget_queue_draw (GTK_WIDGET (button));
}
......
......@@ -18,7 +18,7 @@
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* Modified by the GTK+ Team and others 1997-2001. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
......
......@@ -18,7 +18,7 @@
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* Modified by the GTK+ Team and others 1997-2001. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
......@@ -27,6 +27,7 @@
#include "gtkcheckmenuitem.h"
#include "gtkaccellabel.h"
#include "gtksignal.h"
#include "gtkintl.h"
#define CHECK_TOGGLE_SIZE 12
......@@ -35,6 +36,11 @@ enum {
LAST_SIGNAL
};
enum {
PROP_0,
PROP_ACTIVE,
PROP_INCONSISTENT
};
static void gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass);
static void gtk_check_menu_item_init (GtkCheckMenuItem *check_menu_item);
......@@ -47,6 +53,14 @@ static void gtk_check_menu_item_draw_indicator (GtkCheckMenuItem *che
GdkRectangle *area);
static void gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item,
GdkRectangle *area);
static void gtk_check_menu_item_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_check_menu_item_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static GtkMenuItemClass *parent_class = NULL;
......@@ -90,6 +104,25 @@ gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass)
menu_item_class = (GtkMenuItemClass*) klass;
parent_class = gtk_type_class (GTK_TYPE_MENU_ITEM);
G_OBJECT_CLASS(object_class)->set_property = gtk_check_menu_item_set_property;
G_OBJECT_CLASS(object_class)->get_property = gtk_check_menu_item_get_property;
g_object_class_install_property (G_OBJECT_CLASS (object_class),
PROP_ACTIVE,
g_param_spec_boolean ("active",
_("Active"),
_("Whether the menu item is checked."),
FALSE,
G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (G_OBJECT_CLASS (object_class),
PROP_ACTIVE,
g_param_spec_boolean ("inconsistent",
_("Inconsistent"),
_("Whether to display an \"inconsistent\" state."),
FALSE,
G_PARAM_READABLE | G_PARAM_WRITABLE));
widget_class->expose_event = gtk_check_menu_item_expose;
......@@ -142,7 +175,10 @@ gtk_check_menu_item_set_active (GtkCheckMenuItem *check_menu_item,
is_active = is_active != 0;
if (check_menu_item->active != is_active)
gtk_menu_item_activate (GTK_MENU_ITEM (check_menu_item));
{
gtk_menu_item_activate (GTK_MENU_ITEM (check_menu_item));
g_object_notify (G_OBJECT(check_menu_item), "active");
}
}
static void
......@@ -200,6 +236,7 @@ gtk_check_menu_item_set_inconsistent (GtkCheckMenuItem *check_menu_item,
{
check_menu_item->inconsistent = setting;
gtk_widget_queue_draw (GTK_WIDGET (check_menu_item));
g_object_notify (G_OBJECT (check_menu_item), "inconsistent");
}
}
......@@ -326,3 +363,49 @@ gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item,
}
}
}
static void
gtk_check_menu_item_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkCheckMenuItem *checkitem = GTK_CHECK_MENU_ITEM (object);
switch (prop_id)
{
case PROP_ACTIVE:
g_value_set_boolean (value, checkitem->active);
break;
case PROP_INCONSISTENT:
g_value_set_boolean (value, checkitem->inconsistent);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_check_menu_item_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GtkCheckMenuItem *checkitem = GTK_CHECK_MENU_ITEM (object);
switch (prop_id)
{
case PROP_ACTIVE:
gtk_check_menu_item_set_active (checkitem, g_value_get_boolean (value));
break;
case PROP_INCONSISTENT:
gtk_check_menu_item_set_inconsistent (checkitem, g_value_get_boolean (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
......@@ -18,7 +18,7 @@
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* Modified by the GTK+ Team and others 1997-2001. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
......@@ -72,14 +72,16 @@ GtkWidget* gtk_check_menu_item_new (void);
GtkWidget* gtk_check_menu_item_new_with_label (const gchar *label);
void gtk_check_menu_item_set_active (GtkCheckMenuItem *check_menu_item,
gboolean is_active);
void gtk_check_menu_item_set_show_toggle (GtkCheckMenuItem *menu_item,
gboolean always);
void gtk_check_menu_item_toggled (GtkCheckMenuItem *check_menu_item);
void gtk_check_menu_item_set_inconsistent (GtkCheckMenuItem *check_menu_item,
gboolean setting);
gboolean gtk_check_menu_item_get_inconsistent (GtkCheckMenuItem *check_menu_item);
#ifndef GTK_DISABLE_DEPRECATED
void gtk_check_menu_item_set_show_toggle (GtkCheckMenuItem *menu_item,
gboolean always);
#endif
#ifdef __cplusplus
}
......
......@@ -225,6 +225,11 @@ struct _CompletionState
struct _CompletionUserDir *user_directories;
};
enum {
PROP_0,
PROP_SHOW_FILEOPS,
PROP_FILENAME
};
/* File completion functions which would be external, were they used
* outside of this file.
......@@ -339,6 +344,14 @@ static void update_cmpl(PossibleCompletion* poss,
CompletionState* cmpl_state);
static void gtk_file_selection_class_init (GtkFileSelectionClass *klass);
static void gtk_file_selection_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_file_selection_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void gtk_file_selection_init (GtkFileSelection *filesel);
static void gtk_file_selection_destroy (GtkObject *object);
static gint gtk_file_selection_key_press (GtkWidget *widget,
......@@ -472,15 +485,94 @@ gtk_file_selection_get_type (void)
static void
gtk_file_selection_class_init (GtkFileSelectionClass *class)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
gobject_class = (GObjectClass*) class;
object_class = (GtkObjectClass*) class;
parent_class = gtk_type_class (GTK_TYPE_DIALOG);
gobject_class->set_property = gtk_file_selection_set_property;
gobject_class->get_property = gtk_file_selection_get_property;
g_object_class_install_property (gobject_class,
PROP_FILENAME,
g_param_spec_string ("filename",
_("Filename"),
_("The currently selected filename."),
NULL,
G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (gobject_class,
PROP_SHOW_FILEOPS,
g_param_spec_boolean ("show_fileops",
_("Show file operations"),