[Openlanhouse-development] SF.net SVN: openlanhouse:[267] trunk/openlh-client/gnomeapplet/applet.c
Status: Pre-Alpha
Brought to you by:
n3rd3x
From: <n3...@us...> - 2008-08-28 10:19:40
|
Revision: 267 http://openlanhouse.svn.sourceforge.net/openlanhouse/?rev=267&view=rev Author: n3rd3x Date: 2008-08-28 10:19:49 +0000 (Thu, 28 Aug 2008) Log Message: ----------- clean fields after/before unblock/block Modified Paths: -------------- trunk/openlh-client/gnomeapplet/applet.c Modified: trunk/openlh-client/gnomeapplet/applet.c =================================================================== --- trunk/openlh-client/gnomeapplet/applet.c 2008-08-28 02:37:18 UTC (rev 266) +++ trunk/openlh-client/gnomeapplet/applet.c 2008-08-28 10:19:49 UTC (rev 267) @@ -443,10 +443,33 @@ } void +on_openlh_client_reset_fields (OpenlhApplet *self) +{ + void *fields[] = { + self->time, + self->time_elapsed, + self->time_left, + self->credit, + self->total_to_pay, + self->full_name, + NULL + }; + + guint i; + + for (i=0; fields[i]; i++) + { + gtk_label_set_text ((GtkLabel *) fields[i], ""); + } +} + +void on_openlh_client_unblock (DBusGProxy *proxy, GArray *array, OpenlhApplet *self) { + on_openlh_client_reset_fields (self); + gint *registred, *limited; registred = (gint *) g_array_index (array, gint, 0); limited = (gint *) g_array_index (array, gint, 1); @@ -458,7 +481,7 @@ on_openlh_client_block (DBusGProxy *proxy, OpenlhApplet *self) { - g_print ("Block\n"); + on_openlh_client_reset_fields (self); } /*End Openlh Client Signals*/ @@ -1143,4 +1166,4 @@ g_object_unref (self->builder); g_object_unref (self->error_label); -} \ No newline at end of file +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |