[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1323 - gnunet-gtk/src/plugins/stats
From: |
grothoff |
Subject: |
[GNUnet-SVN] r1323 - gnunet-gtk/src/plugins/stats |
Date: |
Fri, 8 Jul 2005 15:11:28 -0700 (PDT) |
Author: grothoff
Date: 2005-07-08 15:11:24 -0700 (Fri, 08 Jul 2005)
New Revision: 1323
Added:
gnunet-gtk/src/plugins/stats/Makefile.am
Removed:
gnunet-gtk/src/plugins/stats/statistics.h
Modified:
gnunet-gtk/src/plugins/stats/statistics.c
Log:
update
Added: gnunet-gtk/src/plugins/stats/Makefile.am
===================================================================
--- gnunet-gtk/src/plugins/stats/Makefile.am 2005-07-08 20:51:27 UTC (rev
1322)
+++ gnunet-gtk/src/plugins/stats/Makefile.am 2005-07-08 22:11:24 UTC (rev
1323)
@@ -0,0 +1,19 @@
+INCLUDES = \
+ -I$(top_srcdir)/intl \
+ -I$(top_srcdir)/src/include \
+ @GTK_CFLAGS@ \
+ @GNUNETGTK_CFLAGS@
+
+plugindir = $(libdir)/GNUnet
+
+plugin_LTLIBRARIES = \
+ libgnunetgtkmodule_stats.la
+
+libgnunetgtkmodule_stats_la_SOURCES = \
+ statistics.c
+libgnunetgtkmodule_stats_la_LIBADD = \
+ $(top_builddir)/src/common/libgnunetgtk_common.la \
+ -lgnunetutil \
+ -lgnunetstats_api
+libgnunetgtkmodule_stats_la_LDFLAGS = \
+ -export-dynamic -avoid-version -module
Modified: gnunet-gtk/src/plugins/stats/statistics.c
===================================================================
--- gnunet-gtk/src/plugins/stats/statistics.c 2005-07-08 20:51:27 UTC (rev
1322)
+++ gnunet-gtk/src/plugins/stats/statistics.c 2005-07-08 22:11:24 UTC (rev
1323)
@@ -1,5 +1,6 @@
/*
This file is part of GNUnet
+ (C) 2004, 2005 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@ -24,14 +25,17 @@
- add any more StatEntries, update menu accordingly.
*/
-#include "gnunet_afs_esed2.h"
-#include "statistics.h"
-#include "helper.h"
-#include "main.h"
-#include <glib.h>
+#include "platform.h"
+#include "gnunetgtk_common.h"
+#include <GNUnet/gnunet_stats_lib.h>
#define UPDATE_INTERVAL (30 * cronSECONDS)
+#define STAT_CONNECTIVITY 0
+#define STAT_CPU_LOAD 1
+#define STAT_IN_TRAFFIC 2
+#define STAT_OUT_TRAFFIC 3
+
typedef struct {
char * statName;
long long value;
@@ -481,19 +485,7 @@
gtk_widget_draw(GTK_WIDGET(notebook), NULL);
}
-static GtkItemFactoryEntry statWindowMenu[] = {
- {
- gettext_noop("/Close display"),
- NULL,
- statClose,
- 0,
- "<Item>"
- }
-};
-static gint statWindowMenuItems
- = sizeof (statWindowMenu) / sizeof (statWindowMenu[0]);
-
/**
*/
static void addClosePopupMenu(GtkWidget * widget) {
@@ -911,37 +903,19 @@
}
-/**
- * Display the statistics.
- */
-void displayStatistics(GtkWidget * widget,
- gpointer data) {
- int dptr;
- GtkWidget * wid;
- dptr = (int) data;
- if ( (dptr < 0) ||
- (dptr >= STATS_COUNT) ) {
- BREAK();
- } else {
- wid = create_main_window(dptr);
- if (wid != NULL)
- addToNotebook(_(stats[dptr].paneName),
- wid);
- }
-}
-void initGTKStatistics() {
+
+void init_stats() {
MUTEX_CREATE_RECURSIVE(&lock);
+ wid = create_main_window(dptr);
+ if (wid != NULL)
+ addToNotebook(_(stats[dptr].paneName),
+ wid);
+
}
-void doneGTKStatistics() {
- unsigned int i;
- for (i=0;i<lsv_size;i++)
- FREE(lastStatValues[i].statName);
- GROW(lastStatValues,
- lsv_size,
- 0);
+void done_stats() {
MUTEX_DESTROY(&lock);
}
Deleted: gnunet-gtk/src/plugins/stats/statistics.h
===================================================================
--- gnunet-gtk/src/plugins/stats/statistics.h 2005-07-08 20:51:27 UTC (rev
1322)
+++ gnunet-gtk/src/plugins/stats/statistics.h 2005-07-08 22:11:24 UTC (rev
1323)
@@ -1,49 +0,0 @@
-/*
- This file is part of GNUnet
-
- GNUnet is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
- option) any later version.
-
- GNUnet is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
-
-/**
- * @file applications/afs/gtkui/statistics.h
- * @author Christian Grothoff
- **/
-
-#ifndef GTKUI_STATISTICS_H
-#define GTKUI_STATISTICS_H
-
-#include "platform.h"
-#include <gtk/gtk.h>
-#include <gtk/gtktext.h>
-
-/**
- * Display the statistics.
- */
-void displayStatistics(GtkWidget * widget,
- gpointer data);
-
-
-void initGTKStatistics();
-
-void doneGTKStatistics();
-
-#define STAT_CONNECTIVITY 0
-#define STAT_CPU_LOAD 1
-#define STAT_IN_TRAFFIC 2
-#define STAT_OUT_TRAFFIC 3
-
-
-#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1323 - gnunet-gtk/src/plugins/stats,
grothoff <=