From 2714d9d18c8ccb050c7569ec63049fbfe4aaabc0 Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sat, 9 May 2009 17:47:37 -0300 Subject: Make loading modules from the menubar possible --- hardinfo2/callbacks.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'hardinfo2/callbacks.c') 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(); -- cgit v1.2.3