Some more interning

This avoids more strdups at startup.
This commit is contained in:
Matthias Clasen 2017-11-18 08:18:11 -05:00
parent 997f0de4d5
commit a8531605db
20 changed files with 62 additions and 67 deletions

View File

@ -1063,7 +1063,7 @@ get_component_paddings (GtkCalendar *calendar,
if (day_padding) if (day_padding)
{ {
gtk_style_context_save (context); gtk_style_context_save (context);
gtk_style_context_add_class (context, "day-number"); gtk_style_context_add_class (context, I_("day-number"));
gtk_style_context_get_padding (context, day_padding); gtk_style_context_get_padding (context, day_padding);
gtk_style_context_restore (context); gtk_style_context_restore (context);
} }
@ -1071,7 +1071,7 @@ get_component_paddings (GtkCalendar *calendar,
if (day_name_padding) if (day_name_padding)
{ {
gtk_style_context_save (context); gtk_style_context_save (context);
gtk_style_context_add_class (context, "day-name"); gtk_style_context_add_class (context, I_("day-name"));
gtk_style_context_get_padding (context, day_name_padding); gtk_style_context_get_padding (context, day_name_padding);
gtk_style_context_restore (context); gtk_style_context_restore (context);
} }
@ -1079,7 +1079,7 @@ get_component_paddings (GtkCalendar *calendar,
if (week_padding) if (week_padding)
{ {
gtk_style_context_save (context); gtk_style_context_save (context);
gtk_style_context_add_class (context, "week-number"); gtk_style_context_add_class (context, I_("week-number"));
gtk_style_context_get_padding (context, week_padding); gtk_style_context_get_padding (context, week_padding);
gtk_style_context_restore (context); gtk_style_context_restore (context);
} }

View File

@ -131,10 +131,8 @@ gtk_cell_area_context_class_init (GtkCellAreaContextClass *class)
g_param_spec_int ("minimum-width", g_param_spec_int ("minimum-width",
P_("Minimum Width"), P_("Minimum Width"),
P_("Minimum cached width"), P_("Minimum cached width"),
-1, -1, G_MAXINT, -1,
G_MAXINT, GTK_PARAM_READABLE));
-1,
G_PARAM_READABLE));
/** /**
* GtkCellAreaContext:natural-width: * GtkCellAreaContext:natural-width:
@ -150,10 +148,8 @@ gtk_cell_area_context_class_init (GtkCellAreaContextClass *class)
g_param_spec_int ("natural-width", g_param_spec_int ("natural-width",
P_("Minimum Width"), P_("Minimum Width"),
P_("Minimum cached width"), P_("Minimum cached width"),
-1, -1, G_MAXINT, -1,
G_MAXINT, GTK_PARAM_READABLE));
-1,
G_PARAM_READABLE));
/** /**
* GtkCellAreaContext:minimum-height: * GtkCellAreaContext:minimum-height:
@ -169,10 +165,8 @@ gtk_cell_area_context_class_init (GtkCellAreaContextClass *class)
g_param_spec_int ("minimum-height", g_param_spec_int ("minimum-height",
P_("Minimum Height"), P_("Minimum Height"),
P_("Minimum cached height"), P_("Minimum cached height"),
-1, -1, G_MAXINT, -1,
G_MAXINT, GTK_PARAM_READABLE));
-1,
G_PARAM_READABLE));
/** /**
* GtkCellAreaContext:natural-height: * GtkCellAreaContext:natural-height:
@ -188,10 +182,8 @@ gtk_cell_area_context_class_init (GtkCellAreaContextClass *class)
g_param_spec_int ("natural-height", g_param_spec_int ("natural-height",
P_("Minimum Height"), P_("Minimum Height"),
P_("Minimum cached height"), P_("Minimum cached height"),
-1, -1, G_MAXINT, -1,
G_MAXINT, GTK_PARAM_READABLE));
-1,
G_PARAM_READABLE));
} }
/************************************************************* /*************************************************************

View File

@ -553,7 +553,7 @@ gtk_color_chooser_widget_init (GtkColorChooserWidget *cc)
gtk_container_add (GTK_CONTAINER (box), button); gtk_container_add (GTK_CONTAINER (box), button);
cc->priv->settings = g_settings_new ("org.gtk.Settings.ColorChooser"); cc->priv->settings = g_settings_new ("org.gtk.Settings.ColorChooser");
variant = g_settings_get_value (cc->priv->settings, "custom-colors"); variant = g_settings_get_value (cc->priv->settings, I_("custom-colors"));
g_variant_iter_init (&iter, variant); g_variant_iter_init (&iter, variant);
i = 0; i = 0;
p = NULL; p = NULL;
@ -587,7 +587,7 @@ gtk_color_chooser_widget_init (GtkColorChooserWidget *cc)
gtk_container_add (GTK_CONTAINER (cc), box); gtk_container_add (GTK_CONTAINER (cc), box);
gtk_container_add (GTK_CONTAINER (box), cc->priv->editor); gtk_container_add (GTK_CONTAINER (box), cc->priv->editor);
g_settings_get (cc->priv->settings, "selected-color", "(bdddd)", g_settings_get (cc->priv->settings, I_("selected-color"), "(bdddd)",
&selected, &selected,
&color.red, &color.green, &color.blue, &color.alpha); &color.red, &color.green, &color.blue, &color.alpha);
if (selected) if (selected)

View File

@ -26,6 +26,7 @@
#include "gtkgesturelongpress.h" #include "gtkgesturelongpress.h"
#include "gtkintl.h" #include "gtkintl.h"
#include "gtksnapshot.h" #include "gtksnapshot.h"
#include "gtkprivate.h"
struct _GtkColorPlanePrivate struct _GtkColorPlanePrivate
{ {
@ -516,7 +517,7 @@ gtk_color_plane_class_init (GtkColorPlaneClass *class)
"Hue Adjustment", "Hue Adjustment",
"Hue Adjustment", "Hue Adjustment",
GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT,
G_PARAM_WRITABLE | GTK_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY)); G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
@ -525,7 +526,7 @@ gtk_color_plane_class_init (GtkColorPlaneClass *class)
"Saturation Adjustment", "Saturation Adjustment",
"Saturation Adjustment", "Saturation Adjustment",
GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT,
G_PARAM_WRITABLE | GTK_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY)); G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
@ -534,7 +535,7 @@ gtk_color_plane_class_init (GtkColorPlaneClass *class)
"Value Adjustment", "Value Adjustment",
"Value Adjustment", "Value Adjustment",
GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT,
G_PARAM_WRITABLE | GTK_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY)); G_PARAM_CONSTRUCT_ONLY));
} }

View File

@ -22,6 +22,7 @@
#include "gtkicontheme.h" #include "gtkicontheme.h"
#include "gtksettingsprivate.h" #include "gtksettingsprivate.h"
#include "gtkstyleproviderprivate.h" #include "gtkstyleproviderprivate.h"
#include "gtkintl.h"
/* /*
* The idea behind this value (and the '-gtk-icon-theme' CSS property) is * The idea behind this value (and the '-gtk-icon-theme' CSS property) is
@ -134,7 +135,7 @@ gtk_css_icon_theme_value_new (GtkIconTheme *icontheme)
result = _gtk_css_value_new (GtkCssValue, &GTK_CSS_VALUE_ICON_THEME); result = _gtk_css_value_new (GtkCssValue, &GTK_CSS_VALUE_ICON_THEME);
result->icontheme = g_object_ref (icontheme); result->icontheme = g_object_ref (icontheme);
g_object_set_data (G_OBJECT (icontheme), "-gtk-css-value", result); g_object_set_data (G_OBJECT (icontheme), I_("-gtk-css-value"), result);
result->changed_id = g_signal_connect (icontheme, "changed", G_CALLBACK (gtk_css_value_icon_theme_changed_cb), result); result->changed_id = g_signal_connect (icontheme, "changed", G_CALLBACK (gtk_css_value_icon_theme_changed_cb), result);
return result; return result;

View File

@ -1218,8 +1218,7 @@ parse_simple_selector (GtkCssParser *parser,
name = _gtk_css_parser_try_ident (parser, FALSE); name = _gtk_css_parser_try_ident (parser, FALSE);
if (name) if (name)
{ {
selector = gtk_css_selector_new (&GTK_CSS_SELECTOR_NAME, selector = gtk_css_selector_new (&GTK_CSS_SELECTOR_NAME, selector);
selector);
selector->name.name = g_intern_string (name); selector->name.name = g_intern_string (name);
g_free (name); g_free (name);
parsed_something = TRUE; parsed_something = TRUE;

View File

@ -33,6 +33,7 @@
#include "gtkcssstylepropertyprivate.h" #include "gtkcssstylepropertyprivate.h"
#include "gtkcsstransitionprivate.h" #include "gtkcsstransitionprivate.h"
#include "gtkprivate.h" #include "gtkprivate.h"
#include "gtkintl.h"
#include "gtksettings.h" #include "gtksettings.h"
#include "gtkstyleanimationprivate.h" #include "gtkstyleanimationprivate.h"
#include "gtkstylepropertyprivate.h" #include "gtkstylepropertyprivate.h"
@ -158,7 +159,7 @@ gtk_css_static_style_get_default (void)
default_style = gtk_css_static_style_new_compute (GTK_STYLE_PROVIDER (settings), default_style = gtk_css_static_style_new_compute (GTK_STYLE_PROVIDER (settings),
NULL, NULL,
NULL); NULL);
g_object_set_data_full (G_OBJECT (settings), "gtk-default-style", g_object_set_data_full (G_OBJECT (settings), I_("gtk-default-style"),
default_style, clear_default_style); default_style, clear_default_style);
} }

View File

@ -8436,14 +8436,14 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
P_("Search mode"), P_("Search mode"),
P_("Search mode"), P_("Search mode"),
FALSE, FALSE,
G_PARAM_READWRITE)); GTK_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_SUBTITLE, g_object_class_install_property (gobject_class, PROP_SUBTITLE,
g_param_spec_string ("subtitle", g_param_spec_string ("subtitle",
P_("Subtitle"), P_("Subtitle"),
P_("Subtitle"), P_("Subtitle"),
"", "",
G_PARAM_READABLE)); GTK_PARAM_READABLE));
_gtk_file_chooser_install_properties (gobject_class); _gtk_file_chooser_install_properties (gobject_class);

View File

@ -3409,7 +3409,7 @@ gtk_flow_box_class_init (GtkFlowBoxClass *class)
P_("The selection mode"), P_("The selection mode"),
GTK_TYPE_SELECTION_MODE, GTK_TYPE_SELECTION_MODE,
GTK_SELECTION_SINGLE, GTK_SELECTION_SINGLE,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY); GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/** /**
* GtkFlowBox:activate-on-single-click: * GtkFlowBox:activate-on-single-click:
@ -3422,7 +3422,7 @@ gtk_flow_box_class_init (GtkFlowBoxClass *class)
P_("Activate on Single Click"), P_("Activate on Single Click"),
P_("Activate row on a single click"), P_("Activate row on a single click"),
TRUE, TRUE,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY); GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/** /**
* GtkFlowBox:homogeneous: * GtkFlowBox:homogeneous:
@ -3435,7 +3435,7 @@ gtk_flow_box_class_init (GtkFlowBoxClass *class)
P_("Homogeneous"), P_("Homogeneous"),
P_("Whether the children should all be the same size"), P_("Whether the children should all be the same size"),
FALSE, FALSE,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY); GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/** /**
* GtkFlowBox:min-children-per-line: * GtkFlowBox:min-children-per-line:
@ -3453,7 +3453,7 @@ gtk_flow_box_class_init (GtkFlowBoxClass *class)
P_("The minimum number of children to allocate " P_("The minimum number of children to allocate "
"consecutively in the given orientation."), "consecutively in the given orientation."),
0, G_MAXUINT, 0, 0, G_MAXUINT, 0,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY); GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/** /**
* GtkFlowBox:max-children-per-line: * GtkFlowBox:max-children-per-line:
@ -3467,7 +3467,7 @@ gtk_flow_box_class_init (GtkFlowBoxClass *class)
P_("The maximum amount of children to request space for " P_("The maximum amount of children to request space for "
"consecutively in the given orientation."), "consecutively in the given orientation."),
1, G_MAXUINT, DEFAULT_MAX_CHILDREN_PER_LINE, 1, G_MAXUINT, DEFAULT_MAX_CHILDREN_PER_LINE,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY); GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/** /**
* GtkFlowBox:row-spacing: * GtkFlowBox:row-spacing:
@ -3479,7 +3479,7 @@ gtk_flow_box_class_init (GtkFlowBoxClass *class)
P_("Vertical spacing"), P_("Vertical spacing"),
P_("The amount of vertical space between two children"), P_("The amount of vertical space between two children"),
0, G_MAXUINT, 0, 0, G_MAXUINT, 0,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY); GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/** /**
* GtkFlowBox:column-spacing: * GtkFlowBox:column-spacing:
@ -3491,7 +3491,7 @@ gtk_flow_box_class_init (GtkFlowBoxClass *class)
P_("Horizontal spacing"), P_("Horizontal spacing"),
P_("The amount of horizontal space between two children"), P_("The amount of horizontal space between two children"),
0, G_MAXUINT, 0, 0, G_MAXUINT, 0,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY); GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (object_class, LAST_PROP, props); g_object_class_install_properties (object_class, LAST_PROP, props);

View File

@ -244,7 +244,7 @@ gtk_lock_button_init (GtkLockButton *button)
update_state (button); update_state (button);
context = gtk_widget_get_style_context (GTK_WIDGET (button)); context = gtk_widget_get_style_context (GTK_WIDGET (button));
gtk_style_context_add_class (context, "lock"); gtk_style_context_add_class (context, I_("lock"));
} }
static void static void

View File

@ -22,6 +22,7 @@
#include "gtkmenutrackeritem.h" #include "gtkmenutrackeritem.h"
#include "gtkactionmuxer.h" #include "gtkactionmuxer.h"
#include "gtkdebug.h" #include "gtkdebug.h"
#include "gtkintl.h"
#include "gtkactionmuxer.h" #include "gtkactionmuxer.h"
@ -141,7 +142,7 @@ gtk_menu_tracker_item_role_get_type (void)
}; };
GType type; GType type;
type = g_enum_register_static ("GtkMenuTrackerItemRole", values); type = g_enum_register_static (I_("GtkMenuTrackerItemRole"), values);
g_once_init_leave (&gtk_menu_tracker_item_role_type, type); g_once_init_leave (&gtk_menu_tracker_item_role_type, type);
} }

View File

@ -64,6 +64,7 @@
#include "gtkgesturelongpress.h" #include "gtkgesturelongpress.h"
#include "gtkbox.h" #include "gtkbox.h"
#include "gtkmodelbutton.h" #include "gtkmodelbutton.h"
#include "gtkprivate.h"
/** /**
* SECTION:gtkplacessidebar * SECTION:gtkplacessidebar
@ -4683,56 +4684,56 @@ gtk_places_sidebar_class_init (GtkPlacesSidebarClass *class)
P_("Location to Select"), P_("Location to Select"),
P_("The location to highlight in the sidebar"), P_("The location to highlight in the sidebar"),
G_TYPE_FILE, G_TYPE_FILE,
G_PARAM_READWRITE); GTK_PARAM_READWRITE);
properties[PROP_OPEN_FLAGS] = properties[PROP_OPEN_FLAGS] =
g_param_spec_flags ("open-flags", g_param_spec_flags ("open-flags",
P_("Open Flags"), P_("Open Flags"),
P_("Modes in which the calling application can open locations selected in the sidebar"), P_("Modes in which the calling application can open locations selected in the sidebar"),
GTK_TYPE_PLACES_OPEN_FLAGS, GTK_TYPE_PLACES_OPEN_FLAGS,
GTK_PLACES_OPEN_NORMAL, GTK_PLACES_OPEN_NORMAL,
G_PARAM_READWRITE); GTK_PARAM_READWRITE);
properties[PROP_SHOW_RECENT] = properties[PROP_SHOW_RECENT] =
g_param_spec_boolean ("show-recent", g_param_spec_boolean ("show-recent",
P_("Show recent files"), P_("Show recent files"),
P_("Whether the sidebar includes a builtin shortcut for recent files"), P_("Whether the sidebar includes a builtin shortcut for recent files"),
TRUE, TRUE,
G_PARAM_READWRITE); GTK_PARAM_READWRITE);
properties[PROP_SHOW_DESKTOP] = properties[PROP_SHOW_DESKTOP] =
g_param_spec_boolean ("show-desktop", g_param_spec_boolean ("show-desktop",
P_("Show “Desktop”"), P_("Show “Desktop”"),
P_("Whether the sidebar includes a builtin shortcut to the Desktop folder"), P_("Whether the sidebar includes a builtin shortcut to the Desktop folder"),
TRUE, TRUE,
G_PARAM_READWRITE); GTK_PARAM_READWRITE);
properties[PROP_SHOW_ENTER_LOCATION] = properties[PROP_SHOW_ENTER_LOCATION] =
g_param_spec_boolean ("show-enter-location", g_param_spec_boolean ("show-enter-location",
P_("Show “Enter Location”"), P_("Show “Enter Location”"),
P_("Whether the sidebar includes a builtin shortcut to manually enter a location"), P_("Whether the sidebar includes a builtin shortcut to manually enter a location"),
FALSE, FALSE,
G_PARAM_READWRITE); GTK_PARAM_READWRITE);
properties[PROP_LOCAL_ONLY] = properties[PROP_LOCAL_ONLY] =
g_param_spec_boolean ("local-only", g_param_spec_boolean ("local-only",
P_("Local Only"), P_("Local Only"),
P_("Whether the sidebar only includes local files"), P_("Whether the sidebar only includes local files"),
FALSE, FALSE,
G_PARAM_READWRITE); GTK_PARAM_READWRITE);
properties[PROP_SHOW_TRASH] = properties[PROP_SHOW_TRASH] =
g_param_spec_boolean ("show-trash", g_param_spec_boolean ("show-trash",
P_("Show “Trash”"), P_("Show “Trash”"),
P_("Whether the sidebar includes a builtin shortcut to the Trash location"), P_("Whether the sidebar includes a builtin shortcut to the Trash location"),
TRUE, TRUE,
G_PARAM_READWRITE); GTK_PARAM_READWRITE);
properties[PROP_SHOW_OTHER_LOCATIONS] = properties[PROP_SHOW_OTHER_LOCATIONS] =
g_param_spec_boolean ("show-other-locations", g_param_spec_boolean ("show-other-locations",
P_("Show “Other locations”"), P_("Show “Other locations”"),
P_("Whether the sidebar includes an item to show external locations"), P_("Whether the sidebar includes an item to show external locations"),
FALSE, FALSE,
G_PARAM_READWRITE); GTK_PARAM_READWRITE);
properties[PROP_SHOW_STARRED_LOCATION] = properties[PROP_SHOW_STARRED_LOCATION] =
g_param_spec_boolean ("show-starred-location", g_param_spec_boolean ("show-starred-location",
P_("Show “Starred Location”"), P_("Show “Starred Location”"),
P_("Whether the sidebar includes an item to show starred files"), P_("Whether the sidebar includes an item to show starred files"),
FALSE, FALSE,
G_PARAM_READWRITE); GTK_PARAM_READWRITE);
/** /**
@ -4744,7 +4745,7 @@ gtk_places_sidebar_class_init (GtkPlacesSidebarClass *class)
* Since: 3.18 * Since: 3.18
*/ */
properties[PROP_POPULATE_ALL] = properties[PROP_POPULATE_ALL] =
g_param_spec_boolean ("populate-all", g_param_spec_boolean (I_("populate-all"),
P_("Populate all"), P_("Populate all"),
P_("Whether to emit ::populate-popup for popups that are not menus"), P_("Whether to emit ::populate-popup for popups that are not menus"),
FALSE, FALSE,

View File

@ -22,6 +22,7 @@
#include <gio/gvfs.h> #include <gio/gvfs.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "gtkprivate.h"
#include "gtkintl.h" #include "gtkintl.h"
#include "gtkmarshalers.h" #include "gtkmarshalers.h"
#include "gtkplacesviewprivate.h" #include "gtkplacesviewprivate.h"
@ -2193,21 +2194,21 @@ gtk_places_view_class_init (GtkPlacesViewClass *klass)
P_("Local Only"), P_("Local Only"),
P_("Whether the sidebar only includes local files"), P_("Whether the sidebar only includes local files"),
FALSE, FALSE,
G_PARAM_READWRITE); GTK_PARAM_READWRITE);
properties[PROP_LOADING] = properties[PROP_LOADING] =
g_param_spec_boolean ("loading", g_param_spec_boolean ("loading",
P_("Loading"), P_("Loading"),
P_("Whether the view is loading locations"), P_("Whether the view is loading locations"),
FALSE, FALSE,
G_PARAM_READABLE); GTK_PARAM_READABLE);
properties[PROP_FETCHING_NETWORKS] = properties[PROP_FETCHING_NETWORKS] =
g_param_spec_boolean ("fetching-networks", g_param_spec_boolean ("fetching-networks",
P_("Fetching networks"), P_("Fetching networks"),
P_("Whether the view is fetching networks"), P_("Whether the view is fetching networks"),
FALSE, FALSE,
G_PARAM_READABLE); GTK_PARAM_READABLE);
properties[PROP_OPEN_FLAGS] = properties[PROP_OPEN_FLAGS] =
g_param_spec_flags ("open-flags", g_param_spec_flags ("open-flags",
@ -2215,7 +2216,7 @@ gtk_places_view_class_init (GtkPlacesViewClass *klass)
P_("Modes in which the calling application can open locations selected in the sidebar"), P_("Modes in which the calling application can open locations selected in the sidebar"),
GTK_TYPE_PLACES_OPEN_FLAGS, GTK_TYPE_PLACES_OPEN_FLAGS,
GTK_PLACES_OPEN_NORMAL, GTK_PLACES_OPEN_NORMAL,
G_PARAM_READWRITE); GTK_PARAM_READWRITE);
g_object_class_install_properties (object_class, LAST_PROP, properties); g_object_class_install_properties (object_class, LAST_PROP, properties);

View File

@ -289,7 +289,7 @@ gtk_recent_manager_class_init (GtkRecentManagerClass *klass)
P_("Filename"), P_("Filename"),
P_("The full path to the file to be used to store and read the list"), P_("The full path to the file to be used to store and read the list"),
NULL, NULL,
(G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE))); (G_PARAM_CONSTRUCT_ONLY | GTK_PARAM_READWRITE)));
/** /**
* GtkRecentManager:size: * GtkRecentManager:size:
@ -303,10 +303,8 @@ gtk_recent_manager_class_init (GtkRecentManagerClass *klass)
g_param_spec_int ("size", g_param_spec_int ("size",
P_("Size"), P_("Size"),
P_("The size of the recently used resources list"), P_("The size of the recently used resources list"),
-1, -1, G_MAXINT, 0,
G_MAXINT, GTK_PARAM_READABLE));
0,
G_PARAM_READABLE));
/** /**
* GtkRecentManager::changed: * GtkRecentManager::changed:

View File

@ -258,7 +258,7 @@ gtk_revealer_class_init (GtkRevealerClass *klass)
P_("Child Revealed"), P_("Child Revealed"),
P_("Whether the child is revealed and the animation target reached"), P_("Whether the child is revealed and the animation target reached"),
FALSE, FALSE,
G_PARAM_READABLE); GTK_PARAM_READABLE);
g_object_class_install_properties (object_class, LAST_PROP, props); g_object_class_install_properties (object_class, LAST_PROP, props);

View File

@ -370,7 +370,7 @@ gtk_search_entry_init (GtkSearchEntry *entry)
if (GTK_IS_ACCESSIBLE (atk_obj)) if (GTK_IS_ACCESSIBLE (atk_obj))
atk_object_set_name (atk_obj, _("Search")); atk_object_set_name (atk_obj, _("Search"));
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (entry)), "search"); gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (entry)), I_("search"));
} }
/** /**

View File

@ -302,7 +302,7 @@ add_child (GtkWidget *widget,
g_signal_connect (widget, "child-notify::position", g_signal_connect (widget, "child-notify::position",
G_CALLBACK (on_position_updated), sidebar); G_CALLBACK (on_position_updated), sidebar);
g_object_set_data (G_OBJECT (item), "stack-child", widget); g_object_set_data (G_OBJECT (item), I_("stack-child"), widget);
g_hash_table_insert (priv->rows, widget, row); g_hash_table_insert (priv->rows, widget, row);
gtk_container_add (GTK_CONTAINER (priv->list), row); gtk_container_add (GTK_CONTAINER (priv->list), row);
} }

View File

@ -1532,7 +1532,7 @@ gtk_text_attr_appearance_new (const GtkTextAppearance *appearance)
if (!klass.type) if (!klass.type)
klass.type = gtk_text_attr_appearance_type = klass.type = gtk_text_attr_appearance_type =
pango_attr_type_register ("GtkTextAttrAppearance"); pango_attr_type_register (I_("GtkTextAttrAppearance"));
result = g_slice_new (GtkTextAttrAppearance); result = g_slice_new (GtkTextAttrAppearance);
result->attr.klass = &klass; result->attr.klass = &klass;

View File

@ -32,6 +32,7 @@
#include "gtkadjustment.h" #include "gtkadjustment.h"
#include "gtkintl.h" #include "gtkintl.h"
#include "gtktooltip.h" #include "gtktooltip.h"
#include "gtkprivate.h"
/** /**
@ -168,7 +169,7 @@ gtk_volume_button_class_init (GtkVolumeButtonClass *klass)
P_("Use symbolic icons"), P_("Use symbolic icons"),
P_("Whether to use symbolic icons"), P_("Whether to use symbolic icons"),
TRUE, TRUE,
G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY)); GTK_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY));
/* Bind class to template /* Bind class to template
*/ */

View File

@ -6475,7 +6475,7 @@ void
_gtk_widget_set_captured_event_handler (GtkWidget *widget, _gtk_widget_set_captured_event_handler (GtkWidget *widget,
GtkCapturedEventHandler callback) GtkCapturedEventHandler callback)
{ {
g_object_set_data (G_OBJECT (widget), "captured-event-handler", callback); g_object_set_data (G_OBJECT (widget), I_("captured-event-handler"), callback);
} }
static gboolean static gboolean
@ -6576,7 +6576,7 @@ _gtk_widget_captured_event (GtkWidget *widget,
return_val = _gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_CAPTURE); return_val = _gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_CAPTURE);
handler = g_object_get_data (G_OBJECT (widget), "captured-event-handler"); handler = g_object_get_data (G_OBJECT (widget), I_("captured-event-handler"));
if (!handler) if (!handler)
goto out; goto out;
@ -15458,8 +15458,7 @@ gtk_widget_init_legacy_controller (GtkWidget *widget)
GtkEventController *controller; GtkEventController *controller;
controller = _gtk_event_controller_legacy_new (widget); controller = _gtk_event_controller_legacy_new (widget);
g_object_set_data_full (G_OBJECT (widget), g_object_set_data_full (G_OBJECT (widget), I_("gtk-widget-legacy-event-controller"),
"gtk-widget-legacy-event-controller",
controller, g_object_unref); controller, g_object_unref);
} }