mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 18:45:10 +00:00
Build fixes for bmpx
Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr> Signed-off-by: Pavel Labath <pavelo@centrum.sk>
This commit is contained in:
parent
f1bc24f199
commit
3b5d5f33b3
16
src/bmpx.cc
16
src/bmpx.cc
@ -42,7 +42,7 @@ static DBusGProxy *remote_object;
|
|||||||
static int connected = 0;
|
static int connected = 0;
|
||||||
static char *unknown = "unknown";
|
static char *unknown = "unknown";
|
||||||
|
|
||||||
void fail(GError *error);
|
void fail(GError *error, struct information *);
|
||||||
|
|
||||||
void update_bmpx()
|
void update_bmpx()
|
||||||
{
|
{
|
||||||
@ -58,15 +58,15 @@ void update_bmpx()
|
|||||||
bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
|
bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
|
||||||
if (bus == NULL) {
|
if (bus == NULL) {
|
||||||
NORM_ERR("BMPx error 1: %s\n", error->message);
|
NORM_ERR("BMPx error 1: %s\n", error->message);
|
||||||
fail(error);
|
fail(error, current_info);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
remote_object = dbus_g_proxy_new_for_name(bus, BMP_DBUS_SERVICE,
|
remote_object = dbus_g_proxy_new_for_name(bus, BMP_DBUS_SERVICE,
|
||||||
BMP_DBUS_PATH, BMP_DBUS_INTERFACE);
|
BMP_DBUS_PATH__BMP, BMP_DBUS_INTERFACE__BMP);
|
||||||
if (!remote_object) {
|
if (!remote_object) {
|
||||||
NORM_ERR("BMPx error 2: %s\n", error->message);
|
NORM_ERR("BMPx error 2: %s\n", error->message);
|
||||||
fail(error);
|
fail(error, current_info);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ void update_bmpx()
|
|||||||
G_TYPE_INVALID, G_TYPE_INT, ¤t_track, G_TYPE_INVALID)) {
|
G_TYPE_INVALID, G_TYPE_INT, ¤t_track, G_TYPE_INVALID)) {
|
||||||
} else {
|
} else {
|
||||||
NORM_ERR("BMPx error 3: %s\n", error->message);
|
NORM_ERR("BMPx error 3: %s\n", error->message);
|
||||||
fail(error);
|
fail(error, current_info);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,17 +103,17 @@ void update_bmpx()
|
|||||||
g_value_get_string(g_hash_table_lookup(metadata, "location"));
|
g_value_get_string(g_hash_table_lookup(metadata, "location"));
|
||||||
} else {
|
} else {
|
||||||
NORM_ERR("BMPx error 4: %s\n", error->message);
|
NORM_ERR("BMPx error 4: %s\n", error->message);
|
||||||
fail(error);
|
fail(error, current_info);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hash_table_destroy(metadata);
|
g_hash_table_destroy(metadata);
|
||||||
} else {
|
} else {
|
||||||
fail(error);
|
fail(error, current_info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void fail(GError *error)
|
void fail(GError *error, struct information *current_info)
|
||||||
{
|
{
|
||||||
if (error) {
|
if (error) {
|
||||||
g_error_free(error);
|
g_error_free(error);
|
||||||
|
Loading…
Reference in New Issue
Block a user