summaryrefslogtreecommitdiff
path: root/gtk/gtkbutton.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2005-03-21 06:02:43 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-03-21 06:02:43 +0000
commitb6c29a5f1a68daa37533427d623cbbaa21ee0ca1 (patch)
treece76d131a79f2cc29db5c5ea79559eb04be291d6 /gtk/gtkbutton.c
parent06609470188075407d1668c66f99c19f6da1c67f (diff)
downloadgtk+-b6c29a5f1a68daa37533427d623cbbaa21ee0ca1.tar.gz
: Mark param spec strings as static.
Diffstat (limited to 'gtk/gtkbutton.c')
-rw-r--r--gtk/gtkbutton.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 237a24971a..3b57518114 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -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));
/**
* GtkButton:xalign:
@@ -272,7 +274,7 @@ gtk_button_class_init (GtkButtonClass *klass)
0.0,
1.0,
0.5,
- G_PARAM_READABLE | G_PARAM_WRITABLE));
+ G_PARAM_READWRITE | STATIC_STRINGS));
/**
* GtkButton:yalign:
@@ -291,7 +293,7 @@ gtk_button_class_init (GtkButtonClass *klass)
0.0,
1.0,
0.5,
- G_PARAM_READABLE | G_PARAM_WRITABLE));
+ G_PARAM_READWRITE | STATIC_STRINGS));
/**
* GtkButton::image:
@@ -306,7 +308,7 @@ gtk_button_class_init (GtkButtonClass *klass)
P_("Image widget"),
P_("Child widget to appear next to the button text"),
GTK_TYPE_WIDGET,
- G_PARAM_READABLE | G_PARAM_WRITABLE));
+ G_PARAM_READWRITE | STATIC_STRINGS));
button_signals[PRESSED] =
g_signal_new ("pressed",
@@ -373,14 +375,14 @@ gtk_button_class_init (GtkButtonClass *klass)
P_("Default Spacing"),
P_("Extra space to add for CAN_DEFAULT buttons"),
GTK_TYPE_BORDER,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | STATIC_STRINGS));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boxed ("default-outside-border",
P_("Default Outside Spacing"),
P_("Extra space to add for CAN_DEFAULT buttons that is always drawn outside the border"),
GTK_TYPE_BORDER,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | STATIC_STRINGS));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("child-displacement-x",
P_("Child X Displacement"),
@@ -388,7 +390,7 @@ gtk_button_class_init (GtkButtonClass *klass)
G_MININT,
G_MAXINT,
0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | STATIC_STRINGS));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("child-displacement-y",
P_("Child Y Displacement"),
@@ -396,7 +398,7 @@ gtk_button_class_init (GtkButtonClass *klass)
G_MININT,
G_MAXINT,
0,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | STATIC_STRINGS));
/**
* GtkButton:displace-focus:
@@ -411,13 +413,13 @@ gtk_button_class_init (GtkButtonClass *klass)
P_("Displace focus"),
P_("Whether the child_displacement_x/_y properties should also affect the focus rectangle"),
FALSE,
- G_PARAM_READABLE));
+ G_PARAM_READABLE | STATIC_STRINGS));
gtk_settings_install_property (g_param_spec_boolean ("gtk-button-images",
P_("Show button images"),
P_("Whether stock icons should be shown in buttons"),
TRUE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE | STATIC_STRINGS));
g_type_class_add_private (gobject_class, sizeof (GtkButtonPrivate));
}