aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2011-01-13 19:52:25 -0600
committerSebastien Bacher <seb128@ubuntu.com>2011-01-13 19:52:25 -0600
commit79f9e4cb1fdeae11f1d645329e39344e27b004c5 (patch)
tree4628ece4d30eb7d6ef9d65864bf27a669d6a5494 /src
parent7c301f7d517f5df2d04cd30851bc8ec1727efcb3 (diff)
parent57fd55ea02809fd1a018ea9c1c429ff3d144a19b (diff)
downloadlibayatana-appindicator-79f9e4cb1fdeae11f1d645329e39344e27b004c5.tar.gz
libayatana-appindicator-79f9e4cb1fdeae11f1d645329e39344e27b004c5.tar.bz2
libayatana-appindicator-79f9e4cb1fdeae11f1d645329e39344e27b004c5.zip
Import upstream version 0.2.91
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/Makefile.in4
-rw-r--r--src/app-indicator.c16
3 files changed, 12 insertions, 12 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index a5ea29b..069247f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -101,11 +101,11 @@ DBUS_SPECS = \
gen-%.xml.h: %.xml
@echo "Building $@ from $<"
- @echo "extern const char * _$(subst -,_,$(subst .,_,$(basename $<)));" > $@
+ @echo "extern const char * _$(subst -,_,$(subst .,_,$(basename $(notdir $<))));" > $@
gen-%.xml.c: %.xml
@echo "Building $@ from $<"
- @echo "const char * _$(subst -,_,$(subst .,_,$(basename $<))) = " > $@
+ @echo "const char * _$(subst -,_,$(subst .,_,$(basename $(notdir $<)))) = " > $@
@sed -e "s:\":\\\\\":g" -e s:^:\": -e s:\$$:\\\\n\": $< >> $@
@echo ";" >> $@
diff --git a/src/Makefile.in b/src/Makefile.in
index 75da889..7457ff8 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1089,11 +1089,11 @@ $(marshal_c): $(marshal_h)
gen-%.xml.h: %.xml
@echo "Building $@ from $<"
- @echo "extern const char * _$(subst -,_,$(subst .,_,$(basename $<)));" > $@
+ @echo "extern const char * _$(subst -,_,$(subst .,_,$(basename $(notdir $<))));" > $@
gen-%.xml.c: %.xml
@echo "Building $@ from $<"
- @echo "const char * _$(subst -,_,$(subst .,_,$(basename $<))) = " > $@
+ @echo "const char * _$(subst -,_,$(subst .,_,$(basename $(notdir $<)))) = " > $@
@sed -e "s:\":\\\\\":g" -e s:^:\": -e s:\$$:\\\\n\": $< >> $@
@echo ";" >> $@
diff --git a/src/app-indicator.c b/src/app-indicator.c
index babdaf5..40959bf 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -909,21 +909,21 @@ bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar *
AppIndicatorPrivate *priv = app->priv;
if (g_strcmp0(property, "Id") == 0) {
- return g_variant_new_string(app->priv->id);
+ return g_variant_new_string(app->priv->id ? app->priv->id : "");
} else if (g_strcmp0(property, "Category") == 0) {
GEnumValue *enum_value;
enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (APP_INDICATOR_TYPE_INDICATOR_CATEGORY), priv->category);
- return g_variant_new_string(enum_value->value_nick);
+ return g_variant_new_string(enum_value->value_nick ? enum_value->value_nick : "");
} else if (g_strcmp0(property, "Status") == 0) {
GEnumValue *enum_value;
enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (APP_INDICATOR_TYPE_INDICATOR_STATUS), priv->status);
- return g_variant_new_string(enum_value->value_nick);
+ return g_variant_new_string(enum_value->value_nick ? enum_value->value_nick : "");
} else if (g_strcmp0(property, "IconName") == 0) {
- return g_variant_new_string(priv->icon_name);
+ return g_variant_new_string(priv->icon_name ? priv->icon_name : "");
} else if (g_strcmp0(property, "AttentionIconName") == 0) {
- return g_variant_new_string(priv->attention_icon_name);
+ return g_variant_new_string(priv->attention_icon_name ? priv->attention_icon_name : "");
} else if (g_strcmp0(property, "IconThemePath") == 0) {
- return g_variant_new_string(priv->icon_theme_path);
+ return g_variant_new_string(priv->icon_theme_path ? priv->icon_theme_path : "");
} else if (g_strcmp0(property, "Menu") == 0) {
if (priv->menuservice != NULL) {
GValue strval = { 0 };
@@ -936,9 +936,9 @@ bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar *
return g_variant_new("o", "/");
}
} else if (g_strcmp0(property, "XAyatanaLabel") == 0) {
- return g_variant_new_string(priv->label);
+ return g_variant_new_string(priv->label ? priv->label : "");
} else if (g_strcmp0(property, "XAyatanaLabelGuide") == 0) {
- return g_variant_new_string(priv->label_guide);
+ return g_variant_new_string(priv->label_guide ? priv->label_guide : "");
} else if (g_strcmp0(property, "XAyatanaOrderingIndex") == 0) {
return g_variant_new_uint32(priv->ordering_index);
}