From c241a7d94b9c4d64122ca380ce42c48a338798c1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 21 Oct 2007 18:29:02 +0200 Subject: add missing config.h inclusion to all files --- src/lassi-avahi.c | 4 ++++ src/lassi-clipboard.c | 4 ++++ src/lassi-grab.c | 3 +++ src/lassi-order.c | 18 +++++++++++------- src/lassi-osd.c | 4 ++++ src/lassi-prefs.c | 4 ++++ src/lassi-server.c | 4 ++++ src/lassi-tray.c | 18 +++++++++++------- 8 files changed, 45 insertions(+), 14 deletions(-) diff --git a/src/lassi-avahi.c b/src/lassi-avahi.c index 258c199..18d0148 100644 --- a/src/lassi-avahi.c +++ b/src/lassi-avahi.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include diff --git a/src/lassi-clipboard.c b/src/lassi-clipboard.c index 270817c..144211d 100644 --- a/src/lassi-clipboard.c +++ b/src/lassi-clipboard.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include diff --git a/src/lassi-grab.c b/src/lassi-grab.c index 9c7a685..36e7c34 100644 --- a/src/lassi-grab.c +++ b/src/lassi-grab.c @@ -1,3 +1,6 @@ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/src/lassi-order.c b/src/lassi-order.c index ceeb3f1..cd3402c 100644 --- a/src/lassi-order.c +++ b/src/lassi-order.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include @@ -5,7 +9,7 @@ #include "lassi-order.h" int lassi_list_compare(GList *i, GList *j) { - + for (; i && j; i = i->next, j = j->next) { int c; @@ -49,7 +53,7 @@ GList *lassi_list_merge(GList *a, GList *b) { for (ib = p; ib; ib = ib->next) { if (strcmp(ia->data, ib->data) == 0) { - + /* Found a common entry, hence copy everything since * the last one we found from b to a */ @@ -79,13 +83,13 @@ GList *lassi_list_merge(GList *a, GList *b) { for (d = a; d; d = d->next) if (strcmp(c->data, d->data) == 0) break; - + if (!d) a = g_list_append(a, g_strdup(c->data)); } g_assert(lassi_list_nodups(a)); - + return a; } @@ -94,7 +98,7 @@ GList* lassi_list_copy(GList *l) { for (; l; l = l->next) r = g_list_prepend(r, g_strdup(l->data)); - + return g_list_reverse(r); } @@ -111,7 +115,7 @@ void lassi_list_free(GList *i) { int main(int argc, char *argv[]) { GList *a = NULL, *b = NULL, *c = NULL, *d = NULL, *i; - + a = g_list_append(a, "eins"); a = g_list_append(a, "zwei"); a = g_list_append(a, "vier"); @@ -133,7 +137,7 @@ int main(int argc, char *argv[]) { d = g_list_append(d, "drei"); d = g_list_append(d, "neun"); d = g_list_append(d, "zwei"); - + a = lassi_list_merge(a, b); a = lassi_list_merge(a, c); a = lassi_list_merge(a, d); diff --git a/src/lassi-osd.c b/src/lassi-osd.c index 6736a3f..46b7315 100644 --- a/src/lassi-osd.c +++ b/src/lassi-osd.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include diff --git a/src/lassi-prefs.c b/src/lassi-prefs.c index ecce244..edf7522 100644 --- a/src/lassi-prefs.c +++ b/src/lassi-prefs.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include diff --git a/src/lassi-server.c b/src/lassi-server.c index b99164b..8dcef29 100644 --- a/src/lassi-server.c +++ b/src/lassi-server.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/src/lassi-tray.c b/src/lassi-tray.c index 72fc310..9726fc6 100644 --- a/src/lassi-tray.c +++ b/src/lassi-tray.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include @@ -11,7 +15,7 @@ #define ICON_BUSY "network-workgroup" static void on_prefs_activate(GtkMenuItem *menuitem, LassiTrayInfo *i) { - lassi_prefs_show(&i->server->prefs_info); + lassi_prefs_show(&i->server->prefs_info); } static void on_tray_activate(GtkStatusIcon *status_icon, LassiTrayInfo *i) { @@ -31,7 +35,7 @@ int lassi_tray_init(LassiTrayInfo *i, LassiServer *server) { i->server = server; notify_init("Mango Lassi"); - + i->status_icon = gtk_status_icon_new_from_icon_name(ICON_IDLE); i->menu = gtk_menu_new(); @@ -44,12 +48,12 @@ int lassi_tray_init(LassiTrayInfo *i, LassiServer *server) { g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(gtk_main_quit), NULL); gtk_menu_shell_append(GTK_MENU_SHELL(i->menu), item); gtk_widget_show_all(i->menu); - + g_signal_connect(G_OBJECT(i->status_icon), "popup_menu", G_CALLBACK(on_tray_popup_menu), i); g_signal_connect(G_OBJECT(i->status_icon), "activate", G_CALLBACK(on_tray_activate), i); lassi_tray_update(i, 0); - + return 0; } @@ -65,7 +69,7 @@ void lassi_tray_update(LassiTrayInfo *i, int n_connected) { t = g_strdup("1 desktop connected."); else t = g_strdup_printf("%i desktops connected.", n_connected); - + gtk_status_icon_set_tooltip(i->status_icon, t); g_free(t); @@ -80,7 +84,7 @@ void lassi_tray_show_notification(LassiTrayInfo *i, char *summary, char *body, L }; NotifyNotification *n; - + n = notify_notification_new_with_status_icon(summary, body, icon_name[icon], i->status_icon); notify_notification_set_timeout(n, 10000); notify_notification_set_urgency(n, NOTIFY_URGENCY_LOW); @@ -95,6 +99,6 @@ void lassi_tray_done(LassiTrayInfo *i) { g_object_unref(G_OBJECT(i->status_icon)); notify_uninit(); - + memset(i, 0, sizeof(*i)); } -- cgit