Initial TaskManager class and make room for Swap

Added the TaskManager class to hold system information and tasks.
Currently it provides username and hostname based on POSIX functions.
The Swap is now part of the system information and is being displayed in
the statusbar.
This commit is contained in:
Mike Massonnet
2010-04-30 15:28:57 +02:00
parent fdaf8b1b49
commit 9a49bf015a
7 changed files with 232 additions and 48 deletions

View File

@@ -15,10 +15,12 @@
#include <gtk/gtk.h>
#include "process-window.h"
#include "task-manager.h"
int main (int argc, char *argv[])
{
GtkWidget *window;
XtmTaskManager *task_manager;
#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
@@ -31,6 +33,9 @@ int main (int argc, char *argv[])
window = xtm_process_window_new ();
gtk_widget_show (window);
task_manager = xtm_task_manager_new ();
g_message ("Running as %s on %s", xtm_task_manager_get_username (task_manager), xtm_task_manager_get_hostname (task_manager));
g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
gtk_main ();