aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libindicate/server.c24
-rw-r--r--libindicate/server.h8
2 files changed, 16 insertions, 16 deletions
diff --git a/libindicate/server.c b/libindicate/server.c
index 076433a..497debd 100644
--- a/libindicate/server.c
+++ b/libindicate/server.c
@@ -37,8 +37,8 @@ static gboolean get_indicator_count_by_type (IndicateServer * server, gchar * ty
static gboolean get_indicator_list (IndicateServer * server, GArray ** indicators, GError ** error);
static gboolean get_indicator_list_by_type (IndicateServer * server, gchar * type, guint ** indicators, GError ** error);
static gboolean get_indicator_property (IndicateServer * server, guint id, gchar * property, gchar ** value, GError **error);
-static gboolean get_indicator_property_group (IndicateServer * server, guint id, GPtrArray * properties, GPtrArray ** value, GError **error);
-static gboolean get_indicator_properties (IndicateServer * server, guint id, GPtrArray ** properties, GError **error);
+static gboolean get_indicator_property_group (IndicateServer * server, guint id, GPtrArray * properties, gchar *** value, GError **error);
+static gboolean get_indicator_properties (IndicateServer * server, guint id, gchar *** properties, GError **error);
static gboolean show_indicator_to_user (IndicateServer * server, guint id, GError ** error);
static guint get_next_id (IndicateServer * server);
@@ -183,8 +183,8 @@ indicate_server_add_indicator (IndicateServer * server, IndicateIndicator * indi
g_signal_emit(server, signals[INDICATOR_ADDED], 0, indicate_indicator_get_id(indicator), indicate_indicator_get_indicator_type(indicator), TRUE);
}
- g_signal_connect(indicator, INDICATE_INDICATOR_SIGNAL_SHOW, indicator_show_cb, server);
- g_signal_connect(indicator, INDICATE_INDICATOR_SIGNAL_HIDE, indicator_hide_cb, server);
+ g_signal_connect(indicator, INDICATE_INDICATOR_SIGNAL_SHOW, G_CALLBACK(indicator_show_cb), server);
+ g_signal_connect(indicator, INDICATE_INDICATOR_SIGNAL_HIDE, G_CALLBACK(indicator_hide_cb), server);
return;
}
@@ -300,7 +300,7 @@ get_indicator_count_by_type (IndicateServer * server, gchar * type, guint * coun
cbt.type = NULL;
}
- g_slist_foreach(server->indicators, count_by_type, &cbt);
+ g_slist_foreach(server->indicators, (GFunc)count_by_type, &cbt);
*count = cbt.count;
return TRUE;
@@ -368,7 +368,7 @@ get_indicator_list_by_type (IndicateServer * server, gchar * type, guint ** indi
static IndicateIndicator *
get_indicator (IndicateServer * server, guint id, GError **error)
{
- g_return_val_if_fail(INDICATE_IS_SERVER(server), TRUE);
+ g_return_val_if_fail(INDICATE_IS_SERVER(server), NULL);
GSList * iter;
for (iter = server->indicators; iter != NULL; iter = iter->next) {
@@ -396,12 +396,12 @@ get_indicator_property (IndicateServer * server, guint id, gchar * property, gch
return FALSE;
}
- *value = indicate_indicator_get_property(indicator, property);
+ *value = g_strdup(indicate_indicator_get_property(indicator, property));
return TRUE;
}
static gboolean
-get_indicator_property_group (IndicateServer * server, guint id, GPtrArray * properties, GPtrArray ** value, GError **error)
+get_indicator_property_group (IndicateServer * server, guint id, GPtrArray * properties, gchar *** value, GError **error)
{
IndicateIndicator * indicator = get_indicator(server, id, error);
if (indicator == NULL) {
@@ -419,13 +419,13 @@ get_indicator_property_group (IndicateServer * server, guint id, GPtrArray * pro
}
}
g_ptr_array_add(array, NULL);
- *value = (GPtrArray *)g_ptr_array_free(array, FALSE);
+ *value = (gchar **)g_ptr_array_free(array, FALSE);
return TRUE;
}
static gboolean
-get_indicator_properties (IndicateServer * server, guint id, GPtrArray ** properties, GError **error)
+get_indicator_properties (IndicateServer * server, guint id, gchar *** properties, GError **error)
{
IndicateIndicator * indicator = get_indicator(server, id, error);
if (indicator == NULL) {
@@ -581,7 +581,7 @@ indicate_server_get_indicator_property (IndicateServer * server, guint id, gchar
}
gboolean
-indicate_server_get_indicator_property_group (IndicateServer * server, guint id, GPtrArray * properties, GPtrArray ** value, GError **error)
+indicate_server_get_indicator_property_group (IndicateServer * server, guint id, GPtrArray * properties, gchar *** value, GError **error)
{
IndicateServerClass * class = INDICATE_SERVER_GET_CLASS(server);
@@ -602,7 +602,7 @@ indicate_server_get_indicator_property_group (IndicateServer * server, guint id,
}
gboolean
-indicate_server_get_indicator_properties (IndicateServer * server, guint id, GPtrArray ** properties, GError **error)
+indicate_server_get_indicator_properties (IndicateServer * server, guint id, gchar *** properties, GError **error)
{
IndicateServerClass * class = INDICATE_SERVER_GET_CLASS(server);
diff --git a/libindicate/server.h b/libindicate/server.h
index 75a1ffb..fe3ec28 100644
--- a/libindicate/server.h
+++ b/libindicate/server.h
@@ -47,8 +47,8 @@ struct _IndicateServerClass {
gboolean (*get_indicator_list) (IndicateServer * server, GArray ** indicators, GError ** error);
gboolean (*get_indicator_list_by_type) (IndicateServer * server, gchar * type, guint ** indicators, GError ** error);
gboolean (*get_indicator_property) (IndicateServer * server, guint id, gchar * property, gchar ** value, GError **error);
- gboolean (*get_indicator_property_group) (IndicateServer * server, guint id, GPtrArray * properties, GPtrArray ** value, GError **error);
- gboolean (*get_indicator_properties) (IndicateServer * server, guint id, GPtrArray ** properties, GError **error);
+ gboolean (*get_indicator_property_group) (IndicateServer * server, guint id, GPtrArray * properties, gchar *** value, GError **error);
+ gboolean (*get_indicator_properties) (IndicateServer * server, guint id, gchar *** properties, GError **error);
gboolean (*show_indicator_to_user) (IndicateServer * server, guint id, GError ** error);
guint (*get_next_id) (IndicateServer * server);
};
@@ -86,8 +86,8 @@ gboolean indicate_server_get_indicator_count_by_type (IndicateServer * server, g
gboolean indicate_server_get_indicator_list (IndicateServer * server, GArray ** indicators, GError ** error);
gboolean indicate_server_get_indicator_list_by_type (IndicateServer * server, gchar * type, guint ** indicators, GError ** error);
gboolean indicate_server_get_indicator_property (IndicateServer * server, guint id, gchar * property, gchar ** value, GError **error);
-gboolean indicate_server_get_indicator_property_group (IndicateServer * server, guint id, GPtrArray * properties, GPtrArray ** value, GError **error);
-gboolean indicate_server_get_indicator_properties (IndicateServer * server, guint id, GPtrArray ** properties, GError **error);
+gboolean indicate_server_get_indicator_property_group (IndicateServer * server, guint id, GPtrArray * properties, gchar *** value, GError **error);
+gboolean indicate_server_get_indicator_properties (IndicateServer * server, guint id, gchar *** properties, GError **error);
gboolean indicate_server_show_indicator_to_user (IndicateServer * server, guint id, GError ** error);
G_END_DECLS