[evince/wip/app] shell: Use G_PARAM_STATIC_STRINGS
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/wip/app] shell: Use G_PARAM_STATIC_STRINGS
- Date: Wed, 13 Jun 2012 19:08:40 +0000 (UTC)
commit 0125170ce1d8bb5decab7b335e47be7a50a05294
Author: Christian Persch <chpe gnome org>
Date: Wed Jun 13 21:07:22 2012 +0200
shell: Use G_PARAM_STATIC_STRINGS
This saves some string copies.
shell/eggfindbar.c | 9 ++++++---
shell/ev-annotation-properties-dialog.c | 3 ++-
shell/ev-bookmark-action.c | 3 ++-
shell/ev-bookmarks.c | 3 ++-
shell/ev-message-area.c | 9 ++++++---
shell/ev-progress-message-area.c | 6 ++++--
shell/ev-sidebar-links.c | 3 ++-
shell/ev-sidebar-page.c | 3 ++-
shell/ev-sidebar.c | 3 ++-
9 files changed, 28 insertions(+), 14 deletions(-)
---
diff --git a/shell/eggfindbar.c b/shell/eggfindbar.c
index a6d2b08..22e62c3 100644
--- a/shell/eggfindbar.c
+++ b/shell/eggfindbar.c
@@ -149,7 +149,8 @@ egg_find_bar_class_init (EggFindBarClass *klass)
"Search string",
"The name of the string to be found",
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
/**
* EggFindBar:case_sensitive:
@@ -163,7 +164,8 @@ egg_find_bar_class_init (EggFindBarClass *klass)
"Case sensitive",
"TRUE for a case sensitive search",
FALSE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
/**
* EggFindBar:whole-words-only:
@@ -176,7 +178,8 @@ egg_find_bar_class_init (EggFindBarClass *klass)
"Whole words only",
"Whether search whole words only",
FALSE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_type_class_add_private (object_class, sizeof (EggFindBarPrivate));
diff --git a/shell/ev-annotation-properties-dialog.c b/shell/ev-annotation-properties-dialog.c
index a17bbf7..70fb1d7 100644
--- a/shell/ev-annotation-properties-dialog.c
+++ b/shell/ev-annotation-properties-dialog.c
@@ -234,7 +234,8 @@ ev_annotation_properties_dialog_class_init (EvAnnotationPropertiesDialogClass *k
"The type of annotation",
EV_TYPE_ANNOTATION_TYPE,
EV_ANNOTATION_TYPE_TEXT,
- G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
}
GtkWidget *
diff --git a/shell/ev-bookmark-action.c b/shell/ev-bookmark-action.c
index 3689d7a..6af919f 100644
--- a/shell/ev-bookmark-action.c
+++ b/shell/ev-bookmark-action.c
@@ -74,7 +74,8 @@ ev_bookmark_action_class_init (EvBookmarkActionClass *klass)
"Page",
"The bookmark page",
0, G_MAXUINT, 0,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE |
+ G_PARAM_STATIC_STRINGS));
}
GtkAction *
diff --git a/shell/ev-bookmarks.c b/shell/ev-bookmarks.c
index 5072fcb..22d3274 100644
--- a/shell/ev-bookmarks.c
+++ b/shell/ev-bookmarks.c
@@ -167,7 +167,8 @@ ev_bookmarks_class_init (EvBookmarksClass *klass)
"Metadata",
"The document metadata",
EV_TYPE_METADATA,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE));
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE |
+ G_PARAM_STATIC_STRINGS));
/* Signals */
signals[CHANGED] =
g_signal_new ("changed",
diff --git a/shell/ev-message-area.c b/shell/ev-message-area.c
index d37ed87..3d5c233 100644
--- a/shell/ev-message-area.c
+++ b/shell/ev-message-area.c
@@ -69,21 +69,24 @@ ev_message_area_class_init (EvMessageAreaClass *class)
"Text",
"The primary text of the message dialog",
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_SECONDARY_TEXT,
g_param_spec_string ("secondary-text",
"Secondary Text",
"The secondary text of the message dialog",
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_IMAGE,
g_param_spec_object ("image",
"Image",
"The image",
GTK_TYPE_WIDGET,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_type_class_add_private (gobject_class, sizeof (EvMessageAreaPrivate));
}
diff --git a/shell/ev-progress-message-area.c b/shell/ev-progress-message-area.c
index 2b5d241..ef4e016 100644
--- a/shell/ev-progress-message-area.c
+++ b/shell/ev-progress-message-area.c
@@ -63,14 +63,16 @@ ev_progress_message_area_class_init (EvProgressMessageAreaClass *class)
"Status",
"The status text of the progress area",
NULL,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_FRACTION,
g_param_spec_double ("fraction",
"Fraction",
"The fraction of total work that has been completed",
0.0, 1.0, 0.0,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_type_class_add_private (gobject_class, sizeof (EvProgressMessageAreaPrivate));
}
diff --git a/shell/ev-sidebar-links.c b/shell/ev-sidebar-links.c
index 9d8e495..c220f69 100644
--- a/shell/ev-sidebar-links.c
+++ b/shell/ev-sidebar-links.c
@@ -205,7 +205,8 @@ ev_sidebar_links_class_init (EvSidebarLinksClass *ev_sidebar_links_class)
"Model",
"Current Model",
GTK_TYPE_TREE_MODEL,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_override_property (g_object_class,
PROP_WIDGET,
"main-widget");
diff --git a/shell/ev-sidebar-page.c b/shell/ev-sidebar-page.c
index fdb8d4a..87bf890 100644
--- a/shell/ev-sidebar-page.c
+++ b/shell/ev-sidebar-page.c
@@ -86,7 +86,8 @@ ev_sidebar_page_default_init (EvSidebarPageInterface *iface)
"Main Widget",
"Main page widget, used to handle focus",
GTK_TYPE_WIDGET,
- G_PARAM_READABLE));
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
initialized = TRUE;
}
}
diff --git a/shell/ev-sidebar.c b/shell/ev-sidebar.c
index f5afe4e..bc71bdf 100644
--- a/shell/ev-sidebar.c
+++ b/shell/ev-sidebar.c
@@ -189,7 +189,8 @@ ev_sidebar_class_init (EvSidebarClass *ev_sidebar_class)
"Current page",
"The currently visible page",
GTK_TYPE_WIDGET,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]