aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/callbacks.c
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2009-05-09 17:47:37 -0300
committerLeandro A. F. Pereira <leandro@hardinfo.org>2009-05-09 17:47:37 -0300
commit2714d9d18c8ccb050c7569ec63049fbfe4aaabc0 (patch)
treee0040af565006a52f87ec057ec844b385c0627ab /hardinfo2/callbacks.c
parentd6f07d7b0e2e0bfef721ce51fbf42754c29568b2 (diff)
Make loading modules from the menubar possible
Diffstat (limited to 'hardinfo2/callbacks.c')
-rw-r--r--hardinfo2/callbacks.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/hardinfo2/callbacks.c b/hardinfo2/callbacks.c
index 36788bd1..77cb4732 100644
--- a/hardinfo2/callbacks.c
+++ b/hardinfo2/callbacks.c
@@ -50,6 +50,32 @@ void cb_manage_hosts()
host_manager_show(shell->window);
}
+void cb_connect_host(GtkAction * action)
+{
+ gchar *name;
+
+ g_object_get(G_OBJECT(action), "name", &name, NULL);
+ remote_connect_host(name);
+
+ g_free(name);
+}
+
+void cb_local_computer()
+{
+ Shell *shell = shell_get_main_shell();
+
+ shell_status_update("Unloading modules...");
+ module_unload_all();
+
+ shell_status_update("Loading local modules...");
+ shell->tree->modules = modules_load_all();
+
+ g_slist_foreach(shell->tree->modules, shell_add_modules_to_gui, shell->tree);
+ gtk_tree_view_expand_all(GTK_TREE_VIEW(shell->tree->view));
+
+ shell_view_set_enabled(TRUE);
+}
+
void cb_save_graphic()
{
Shell *shell = shell_get_main_shell();