Commit b6c29a5f authored by Matthias Clasen's avatar Matthias Clasen

: Mark param spec strings as static.

parent 06609470
2005-03-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcellrendererprogress.c:
* gtk/gtkcellrendererpixbuf.c:
* gtk/gtkcellrenderercombo.c:
* gtk/gtkcellrenderer.c:
* gtk/gtkcalendar.c:
* gtk/gtkbutton.c:
* gtk/gtkbox.c:
* gtk/gtkbbox.c:
* gtk/gtkaspectframe.c:
* gtk/gtkarrow.c:
* gtk/gtkalignment.c:
* gtk/gtkactiongroup.c:
* gtk/gtkaction.c:
* gtk/gtkaccellabel.c:
* gtk/gtkaboutdialog.c: Mark param spec strings as static.
* gdk/gdkpango.c (gdk_pango_renderer_class_init):
* gdk/gdkdisplaymanager.c (gdk_display_manager_class_init): Mark
param spec strings as static.
......
2005-03-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcellrendererprogress.c:
* gtk/gtkcellrendererpixbuf.c:
* gtk/gtkcellrenderercombo.c:
* gtk/gtkcellrenderer.c:
* gtk/gtkcalendar.c:
* gtk/gtkbutton.c:
* gtk/gtkbox.c:
* gtk/gtkbbox.c:
* gtk/gtkaspectframe.c:
* gtk/gtkarrow.c:
* gtk/gtkalignment.c:
* gtk/gtkactiongroup.c:
* gtk/gtkaction.c:
* gtk/gtkaccellabel.c:
* gtk/gtkaboutdialog.c: Mark param spec strings as static.
* gdk/gdkpango.c (gdk_pango_renderer_class_init):
* gdk/gdkdisplaymanager.c (gdk_display_manager_class_init): Mark
param spec strings as static.
......
2005-03-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcellrendererprogress.c:
* gtk/gtkcellrendererpixbuf.c:
* gtk/gtkcellrenderercombo.c:
* gtk/gtkcellrenderer.c:
* gtk/gtkcalendar.c:
* gtk/gtkbutton.c:
* gtk/gtkbox.c:
* gtk/gtkbbox.c:
* gtk/gtkaspectframe.c:
* gtk/gtkarrow.c:
* gtk/gtkalignment.c:
* gtk/gtkactiongroup.c:
* gtk/gtkaction.c:
* gtk/gtkaccellabel.c:
* gtk/gtkaboutdialog.c: Mark param spec strings as static.
* gdk/gdkpango.c (gdk_pango_renderer_class_init):
* gdk/gdkdisplaymanager.c (gdk_display_manager_class_init): Mark
param spec strings as static.
......
......@@ -189,6 +189,8 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
widget_class->style_set = gtk_about_dialog_style_set;
#define STATIC_STRINGS G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
/**
* GtkAboutDialog:name:
*
......@@ -203,7 +205,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
P_("Program name"),
P_("The name of the program. If this is not set, it defaults to g_get_application_name()"),
NULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE|STATIC_STRINGS));
/**
* GtkAboutDialog:version:
......@@ -218,7 +220,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
P_("Program version"),
P_("The version of the program"),
NULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE|STATIC_STRINGS));
/**
* GtkAboutDialog:copyright:
......@@ -233,7 +235,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
P_("Copyright string"),
P_("Copyright information for the program"),
NULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE|STATIC_STRINGS));
/**
......@@ -251,7 +253,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
P_("Comments string"),
P_("Comments about the program"),
NULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE|STATIC_STRINGS));
/**
* GtkAboutDialog:license:
......@@ -269,7 +271,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
_("License"),
_("The license of the program"),
NULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE|STATIC_STRINGS));
/**
* GtkAboutDialog:website:
......@@ -285,7 +287,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
P_("Website URL"),
P_("The URL for the link to the website of the program"),
NULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE|STATIC_STRINGS));
/**
* GtkAboutDialog:website-label:
......@@ -302,7 +304,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
P_("Website label"),
P_("The label for the link to the website of the program. If this is not set, it defaults to the URL"),
NULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE|STATIC_STRINGS));
/**
* GtkAboutDialog:authors:
......@@ -319,7 +321,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
P_("Authors"),
P_("List of authors of the program"),
G_TYPE_STRV,
G_PARAM_READWRITE));
G_PARAM_READWRITE|STATIC_STRINGS));
/**
* GtkAboutDialog:documenters:
......@@ -336,7 +338,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
P_("Documenters"),
P_("List of people documenting the program"),
G_TYPE_STRV,
G_PARAM_READWRITE));
G_PARAM_READWRITE|STATIC_STRINGS));
/**
* GtkAboutDialog:artists:
......@@ -353,7 +355,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
P_("Artists"),
P_("List of people who have contributed artwork to the program"),
G_TYPE_STRV,
G_PARAM_READWRITE));
G_PARAM_READWRITE|STATIC_STRINGS));
/**
......@@ -371,7 +373,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
P_("Translator credits"),
P_("Credits to the translators. This string should be marked as translatable"),
NULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE|STATIC_STRINGS));
/**
* GtkAboutDialog:logo:
......@@ -387,7 +389,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
P_("Logo"),
P_("A logo for the about box. If this is not set, it defaults to gtk_window_get_default_icon_list()"),
GDK_TYPE_PIXBUF,
G_PARAM_READWRITE));
G_PARAM_READWRITE|STATIC_STRINGS));
/**
* GtkAboutDialog:logo-icon-name:
......@@ -403,7 +405,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
P_("Logo Icon Name"),
P_("A named icon to use as the logo for the about box."),
NULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE|STATIC_STRINGS));
/* Style properties */
gtk_widget_class_install_style_property (widget_class,
......@@ -411,7 +413,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
P_("Link Color"),
P_("Color of hyperlinks"),
GDK_TYPE_COLOR,
G_PARAM_READABLE));
G_PARAM_READABLE|STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof (GtkAboutDialogPrivate));
}
......
......@@ -133,20 +133,22 @@ gtk_accel_label_class_init (GtkAccelLabelClass *class)
class->accel_seperator = g_strdup (" / ");
class->latin1_to_char = TRUE;
#define STATIC_STRINGS G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
g_object_class_install_property (gobject_class,
PROP_ACCEL_CLOSURE,
g_param_spec_boxed ("accel-closure",
P_("Accelerator Closure"),
P_("The closure to be monitored for accelerator changes"),
G_TYPE_CLOSURE,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE|STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_ACCEL_WIDGET,
g_param_spec_object ("accel-widget",
P_("Accelerator Widget"),
P_("The widget to be monitored for accelerator changes"),
GTK_TYPE_WIDGET,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE|STATIC_STRINGS));
}
static void
......
......@@ -190,14 +190,16 @@ gtk_action_class_init (GtkActionClass *klass)
klass->menu_item_type = GTK_TYPE_IMAGE_MENU_ITEM;
klass->toolbar_item_type = GTK_TYPE_TOOL_BUTTON;
#define STATIC_STRINGS G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
g_object_class_install_property (gobject_class,
PROP_NAME,
g_param_spec_string ("name",
P_("Name"),
P_("A unique name for the action."),
NULL,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_LABEL,
g_param_spec_string ("label",
......@@ -205,21 +207,21 @@ gtk_action_class_init (GtkActionClass *klass)
P_("The label used for menu items and buttons "
"that activate this action."),
NULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_SHORT_LABEL,
g_param_spec_string ("short-label",
P_("Short label"),
P_("A shorter label that may be used on toolbar buttons."),
NULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_TOOLTIP,
g_param_spec_string ("tooltip",
P_("Tooltip"),
P_("A tooltip for this action."),
NULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_STOCK_ID,
g_param_spec_string ("stock-id",
......@@ -227,7 +229,7 @@ gtk_action_class_init (GtkActionClass *klass)
P_("The stock icon displayed in widgets representing "
"this action."),
NULL,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_VISIBLE_HORIZONTAL,
g_param_spec_boolean ("visible-horizontal",
......@@ -235,7 +237,7 @@ gtk_action_class_init (GtkActionClass *klass)
P_("Whether the toolbar item is visible when the toolbar "
"is in a horizontal orientation."),
TRUE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
/**
* GtkAction:visible-overflown:
*
......@@ -251,7 +253,7 @@ gtk_action_class_init (GtkActionClass *klass)
P_("When TRUE, toolitem proxies for this action "
"are represented in the toolbar overflow menu."),
TRUE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_VISIBLE_VERTICAL,
g_param_spec_boolean ("visible-vertical",
......@@ -259,7 +261,7 @@ gtk_action_class_init (GtkActionClass *klass)
P_("Whether the toolbar item is visible when the toolbar "
"is in a vertical orientation."),
TRUE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_IS_IMPORTANT,
g_param_spec_boolean ("is-important",
......@@ -268,35 +270,35 @@ gtk_action_class_init (GtkActionClass *klass)
"When TRUE, toolitem proxies for this action "
"show text in GTK_TOOLBAR_BOTH_HORIZ mode."),
FALSE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_HIDE_IF_EMPTY,
g_param_spec_boolean ("hide-if-empty",
P_("Hide if empty"),
P_("When TRUE, empty menu proxies for this action are hidden."),
TRUE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_SENSITIVE,
g_param_spec_boolean ("sensitive",
P_("Sensitive"),
P_("Whether the action is enabled."),
TRUE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_VISIBLE,
g_param_spec_boolean ("visible",
P_("Visible"),
P_("Whether the action is visible."),
TRUE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_ACTION_GROUP,
g_param_spec_object ("action-group",
P_("Action Group"),
P_("The GtkActionGroup this GtkAction is associated with, or NULL (for internal use)."),
GTK_TYPE_ACTION_GROUP,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
/**
* GtkAction::activate:
......
......@@ -128,6 +128,8 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
gobject_class->get_property = gtk_action_group_get_property;
klass->get_action = gtk_action_group_real_get_action;
#define STATIC_STRINGS G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
g_object_class_install_property (gobject_class,
PROP_NAME,
g_param_spec_string ("name",
......@@ -135,21 +137,21 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
P_("A name for the action group."),
NULL,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
G_PARAM_CONSTRUCT_ONLY | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_SENSITIVE,
g_param_spec_boolean ("sensitive",
P_("Sensitive"),
P_("Whether the action group is enabled."),
TRUE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_VISIBLE,
g_param_spec_boolean ("visible",
P_("Visible"),
P_("Whether the action group is visible."),
TRUE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
/**
* GtkActionGroup::connect-proxy:
......
......@@ -102,6 +102,8 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
class->changed = NULL;
class->value_changed = NULL;
#define STATIC_STRINGS G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
/**
* GtkAdjustment:value:
*
......@@ -117,7 +119,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
/**
* GtkAdjustment:lower:
......@@ -134,7 +136,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
/**
* GtkAdjustment:upper:
......@@ -154,7 +156,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
/**
* GtkAdjustment:step-increment:
......@@ -171,7 +173,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
/**
* GtkAdjustment:page-increment:
......@@ -188,7 +190,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
/**
* GtkAdjustment:page-size:
......@@ -208,7 +210,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
adjustment_signals[CHANGED] =
......
......@@ -112,6 +112,8 @@ gtk_alignment_class_init (GtkAlignmentClass *class)
widget_class->size_request = gtk_alignment_size_request;
widget_class->size_allocate = gtk_alignment_size_allocate;
#define STATIC_STRINGS G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
g_object_class_install_property (gobject_class,
PROP_XALIGN,
g_param_spec_float("xalign",
......@@ -120,7 +122,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class)
0.0,
1.0,
0.5,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_YALIGN,
......@@ -130,7 +132,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class)
0.0,
1.0,
0.5,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_XSCALE,
g_param_spec_float("xscale",
......@@ -139,7 +141,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class)
0.0,
1.0,
1.0,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_YSCALE,
g_param_spec_float("yscale",
......@@ -148,7 +150,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class)
0.0,
1.0,
1.0,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));
/**
......@@ -166,10 +168,10 @@ gtk_alignment_class_init (GtkAlignmentClass *class)
0,
G_MAXINT,
0,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));
/**
* GtkAlignment:top-padding:
* GtkAlignment:bottom-padding:
*
* The padding to insert at the bottom of the widget.
*
......@@ -183,10 +185,10 @@ gtk_alignment_class_init (GtkAlignmentClass *class)
0,
G_MAXINT,
0,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));
/**
* GtkAlignment:top-padding:
* GtkAlignment:left-padding:
*
* The padding to insert at the left of the widget.
*
......@@ -200,10 +202,10 @@ gtk_alignment_class_init (GtkAlignmentClass *class)
0,
G_MAXINT,
0,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));
/**
* GtkAlignment:top-padding:
* GtkAlignment:right-padding:
*
* The padding to insert at the right of the widget.
*
......@@ -217,7 +219,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class)
0,
G_MAXINT,
0,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_type_class_add_private (gobject_class, sizeof (GtkAlignmentPrivate));
}
......
......@@ -93,6 +93,8 @@ gtk_arrow_class_init (GtkArrowClass *class)
gobject_class->set_property = gtk_arrow_set_property;
gobject_class->get_property = gtk_arrow_get_property;
#define STATIC_STRINGS G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
g_object_class_install_property (gobject_class,
PROP_ARROW_TYPE,
......@@ -101,7 +103,7 @@ gtk_arrow_class_init (GtkArrowClass *class)
P_("The direction the arrow should point"),
GTK_TYPE_ARROW_TYPE,
GTK_ARROW_RIGHT,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_SHADOW_TYPE,
g_param_spec_enum ("shadow-type",
......@@ -109,7 +111,7 @@ gtk_arrow_class_init (GtkArrowClass *class)
P_("Appearance of the shadow surrounding the arrow"),
GTK_TYPE_SHADOW_TYPE,
GTK_SHADOW_OUT,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));
widget_class->expose_event = gtk_arrow_expose;
}
......
......@@ -104,34 +104,36 @@ gtk_aspect_frame_class_init (GtkAspectFrameClass *class)
frame_class->compute_child_allocation = gtk_aspect_frame_compute_child_allocation;
#define STATIC_STRINGS G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
g_object_class_install_property (gobject_class,
PROP_XALIGN,
g_param_spec_float ("xalign",
P_("Horizontal Alignment"),
P_("X alignment of the child"),
0.0, 1.0, 0.5,
G_PARAM_READABLE | G_PARAM_WRITABLE ));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_YALIGN,
g_param_spec_float ("yalign",
P_("Vertical Alignment"),
P_("Y alignment of the child"),
0.0, 1.0, 0.5,
G_PARAM_READABLE | G_PARAM_WRITABLE ));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_RATIO,
g_param_spec_float ("ratio",
P_("Ratio"),
P_("Aspect ratio if obey_child is FALSE"),
MIN_RATIO, MAX_RATIO, 0.5,
G_PARAM_READABLE | G_PARAM_WRITABLE ));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_OBEY_CHILD,
g_param_spec_boolean ("obey-child",
P_("Obey child"),
P_("Force aspect ratio to match that of the frame's child"),
TRUE,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));
}
static void
......
......@@ -115,6 +115,7 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
/* FIXME we need to override the "spacing" property on GtkBox once
* libgobject allows that.
*/
#define STATIC_STRINGS G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("child-min-width",
......@@ -123,7 +124,7 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
0,
G_MAXINT,
DEFAULT_CHILD_MIN_WIDTH,
G_PARAM_READABLE));
G_PARAM_READABLE | STATIC_STRINGS));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("child-min-height",
......@@ -132,7 +133,7 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
0,
G_MAXINT,
DEFAULT_CHILD_MIN_HEIGHT,
G_PARAM_READABLE));
G_PARAM_READABLE | STATIC_STRINGS));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("child-internal-pad-x",
......@@ -141,7 +142,7 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
0,
G_MAXINT,
DEFAULT_CHILD_IPAD_X,
G_PARAM_READABLE));
G_PARAM_READABLE | STATIC_STRINGS));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("child-internal-pad-y",
......@@ -150,7 +151,7 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
0,
G_MAXINT,
DEFAULT_CHILD_IPAD_Y,
G_PARAM_READABLE));
G_PARAM_READABLE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_LAYOUT_STYLE,
g_param_spec_enum ("layout-style",
......@@ -158,7 +159,7 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
P_("How to layout the buttons in the box. Possible values are default, spread, edge, start and end"),
GTK_TYPE_BUTTON_BOX_STYLE,
GTK_BUTTONBOX_DEFAULT_STYLE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_SECONDARY,
......@@ -166,7 +167,7 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
P_("Secondary"),
P_("If TRUE, the child appears in a secondary group of children, suitable for, e.g., help buttons"),
FALSE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
}
static void
......
......@@ -124,6 +124,8 @@ gtk_box_class_init (GtkBoxClass *class)
container_class->set_child_property = gtk_box_set_child_property;
container_class->get_child_property = gtk_box_get_child_property;
#define STATIC_STRINGS G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
g_object_class_install_property (gobject_class,
PROP_SPACING,
g_param_spec_int ("spacing",
......@@ -132,7 +134,7 @@ gtk_box_class_init (GtkBoxClass *class)
0,
G_MAXINT,
0,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_HOMOGENEOUS,
......@@ -140,7 +142,7 @@ gtk_box_class_init (GtkBoxClass *class)
P_("Homogeneous"),
P_("Whether the children should all be the same size"),
FALSE,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_EXPAND,
......@@ -148,35 +150,35 @@ gtk_box_class_init (GtkBoxClass *class)
P_("Expand"),
P_("Whether the child should receive extra space when the parent grows"),
TRUE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_FILL,
g_param_spec_boolean ("fill",
P_("Fill"),
P_("Whether extra space given to the child should be allocated to the child or used as padding"),
TRUE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_PADDING,
g_param_spec_uint ("padding",
P_("Padding"),
P_("Extra space to put between the child and its neighbors, in pixels"),
0, G_MAXINT, 0,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_PACK_TYPE,
g_param_spec_enum ("pack-type",
P_("Pack type"),
P_("A GtkPackType indicating whether the child is packed with reference to the start or end of the parent"),
GTK_TYPE_PACK_TYPE, GTK_PACK_START,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_POSITION,
g_param_spec_int ("position",
P_("Position"),
P_("The index of the child in the parent"),
-1, G_MAXINT, 0,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
}
static void
......
......@@ -214,13 +214,15 @@ gtk_button_class_init (GtkButtonClass *klass)
klass->leave = gtk_button_update_state;
klass->activate = gtk_real_button_activate;
#define STATIC_STRINGS G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
g_object_class_install_property (gobject_class,
PROP_LABEL,
g_param_spec_string ("label",
P_("Label"),
P_("Text of the label widget inside the button, if the button contains a label widget"),
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
G_PARAM_READWRITE | STATIC_STRINGS | G_PARAM_CONSTRUCT));
g_object_class_install_property (gobject_class,
PROP_USE_UNDERLINE,
......@@ -228,7 +230,7 @@ gtk_button_class_init (GtkButtonClass *klass)
P_("Use underline"),
P_("If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key"),
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
G_PARAM_READWRITE | STATIC_STRINGS | G_PARAM_CONSTRUCT));
g_object_class_install_property (gobject_class,
PROP_USE_STOCK,
......@@ -236,7 +238,7 @@ gtk_button_class_init (GtkButtonClass *klass)
P_("Use stock"),
P_("If set, the label is used to pick a stock item instead of being displayed"),
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
G_PARAM_READWRITE | STATIC_STRINGS | G_PARAM_CONSTRUCT));
g_object_class_install_property (gobject_class,
PROP_FOCUS_ON_CLICK,
......@@ -244,7 +246,7 @@ gtk_button_class_init (GtkButtonClass *klass)
P_("Focus on click"),
P_("Whether the button grabs focus when it is clicked with the mouse"),
TRUE,
G_PARAM_READWRITE));
G_PARAM_READWRITE | STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_RELIEF,
......@@ -253,7 +255,7 @@ gtk_button_class_init (GtkButtonClass *klass)
P_("The border relief style"),
GTK_TYPE_RELIEF_STYLE,
GTK_RELIEF_NORMAL,
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_PARAM_READWRITE | STATIC_STRINGS));