[Xfce4-commits] <midori:master> Use strings directly without katze_property_label
Christian Dywan
noreply at xfce.org
Thu Mar 7 20:02:01 CET 2013
Updating branch refs/heads/master
to dc7a18d77827abbb43e04379e9250d352896226d (commit)
from cfcc14ae275c2c09a211ed8fc0946f1012804471 (commit)
commit dc7a18d77827abbb43e04379e9250d352896226d
Author: Christian Dywan <christian at twotoasts.de>
Date: Thu Mar 7 20:00:11 2013 +0100
Use strings directly without katze_property_label
katze/katze-utils.c | 39 ---------------------------------------
katze/katze-utils.h | 4 ----
midori/midori-preferences.c | 11 +++++++----
midori/midori-websettings.c | 11 +++++------
4 files changed, 12 insertions(+), 53 deletions(-)
diff --git a/katze/katze-utils.c b/katze/katze-utils.c
index 0bd45f4..41b8d1f 100644
--- a/katze/katze-utils.c
+++ b/katze/katze-utils.c
@@ -781,45 +781,6 @@ katze_property_proxy (gpointer object,
return widget;
}
-/**
- * katze_property_label:
- * @object: a #GObject
- * @property: the name of a property
- *
- * Create a label widget displaying the name of the specified object's property.
- *
- * Return value: a new label widget
- *
- * Since 0.2.1 the label will be empty if the property proxy for the
- * same property would contain a label already.
- **/
-GtkWidget*
-katze_property_label (gpointer object,
- const gchar* property)
-{
- GObjectClass* class;
- GParamSpec* pspec;
- const gchar* nick;
- GtkWidget* widget;
-
- g_return_val_if_fail (G_IS_OBJECT (object), NULL);
-
- class = G_OBJECT_GET_CLASS (object);
- pspec = g_object_class_find_property (class, property);
- if (!pspec)
- {
- g_warning (_("Property '%s' is invalid for %s"),
- property, G_OBJECT_CLASS_NAME (class));
- return gtk_label_new (property);
- }
-
- nick = g_param_spec_get_nick (pspec);
- widget = gtk_label_new (nick);
- gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
-
- return widget;
-}
-
typedef struct
{
GtkWidget* widget;
diff --git a/katze/katze-utils.h b/katze/katze-utils.h
index 7638c40..def21ca 100644
--- a/katze/katze-utils.h
+++ b/katze/katze-utils.h
@@ -77,10 +77,6 @@ katze_property_proxy (gpointer object,
const gchar* property,
const gchar* hint);
-GtkWidget*
-katze_property_label (gpointer object,
- const gchar* property);
-
typedef enum {
KATZE_MENU_POSITION_CURSOR = 0,
KATZE_MENU_POSITION_LEFT,
diff --git a/midori/midori-preferences.c b/midori/midori-preferences.c
index 3749ea3..11678cd 100644
--- a/midori/midori-preferences.c
+++ b/midori/midori-preferences.c
@@ -298,7 +298,8 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
{
PAGE_NEW (GTK_STOCK_HOME, _("Startup"));
FRAME_NEW (NULL);
- label = katze_property_label (settings, "load-on-startup");
+ label = gtk_label_new (_("When Midori starts:"));
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
INDENTED_ADD (label);
button = katze_property_proxy (settings, "load-on-startup", NULL);
SPANNED_ADD (button);
@@ -424,12 +425,12 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
if (!g_getenv ("DESKTOP_SESSION"))
{
FRAME_NEW (NULL);
- INDENTED_ADD (katze_property_label (settings, "toolbar-style"));
+ INDENTED_ADD (gtk_label_new (_("Toolbar Style:")));
button = katze_property_proxy (settings, "toolbar-style", NULL);
SPANNED_ADD (button);
}
FRAME_NEW (NULL);
- label = katze_property_label (settings, "open-new-pages-in");
+ label = gtk_label_new (_("Open new pages in:"));
INDENTED_ADD (label);
button = katze_property_proxy (settings, "open-new-pages-in", NULL);
SPANNED_ADD (button);
@@ -501,7 +502,9 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
}
#endif
#endif
- label = katze_property_label (settings, "identify-as");
+ /* i18n: This refers to an application, not the 'user agent' string */
+ label = gtk_label_new (_("Identify as"));
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
INDENTED_ADD (label);
button = katze_property_proxy (settings, "identify-as", "custom-user-agent");
SPANNED_ADD (button);
diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c
index 212c785..132b526 100644
--- a/midori/midori-websettings.c
+++ b/midori/midori-websettings.c
@@ -277,7 +277,7 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
PROP_TOOLBAR_STYLE,
g_param_spec_enum (
"toolbar-style",
- _("Toolbar Style:"),
+ "Toolbar Style:",
_("The style of the toolbar"),
MIDORI_TYPE_TOOLBAR_STYLE,
MIDORI_TOOLBAR_DEFAULT,
@@ -287,7 +287,7 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
PROP_LOAD_ON_STARTUP,
g_param_spec_enum (
"load-on-startup",
- _("When Midori starts:"),
+ "When Midori starts:",
"What to do when Midori starts",
MIDORI_TYPE_STARTUP,
MIDORI_STARTUP_LAST_OPEN_PAGES,
@@ -324,7 +324,7 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
PROP_OPEN_NEW_PAGES_IN,
g_param_spec_enum (
"open-new-pages-in",
- _("Open new pages in:"),
+ "Open new pages in:",
"Where to open new pages",
MIDORI_TYPE_NEW_PAGE,
MIDORI_NEW_PAGE_TAB,
@@ -386,9 +386,8 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
PROP_IDENTIFY_AS,
g_param_spec_enum (
"identify-as",
- /* i18n: This refers to an application, not the 'user agent' string */
- _("Identify as"),
- _("What to identify as to web pages"),
+ "Identify as",
+ "What to identify as to web pages",
MIDORI_TYPE_IDENTITY,
MIDORI_IDENT_MIDORI,
flags));
More information about the Xfce4-commits
mailing list