aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/callbacks.c
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2009-05-30 11:33:34 -0300
committerLeandro A. F. Pereira <leandro@hardinfo.org>2009-05-30 11:33:34 -0300
commit97084a46bd22f65cb4e7f8038297b5a1a1c7515c (patch)
tree1ada2c985a81b22990fa0639bfb5cd49d1cbbf56 /hardinfo2/callbacks.c
parentfea14ed5d2088500649c1a1350a407922bac253c (diff)
Add a label to the status bar to show if HardInfo is in remote or local mode
Diffstat (limited to 'hardinfo2/callbacks.c')
-rw-r--r--hardinfo2/callbacks.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/hardinfo2/callbacks.c b/hardinfo2/callbacks.c
index 289a2807..f1f6e335 100644
--- a/hardinfo2/callbacks.c
+++ b/hardinfo2/callbacks.c
@@ -52,10 +52,21 @@ void cb_manage_hosts()
void cb_connect_host(GtkAction * action)
{
+ Shell *shell = shell_get_main_shell();
gchar *name;
g_object_get(G_OBJECT(action), "name", &name, NULL);
- remote_connect_host(name);
+
+ if (remote_connect_host(name)) {
+ gchar *tmp;
+
+ tmp = g_strdup_printf("Remote: <b>%s</b>", name);
+ shell_set_remote_label(shell, tmp);
+
+ g_free(tmp);
+ } else {
+ cb_local_computer();
+ }
g_free(name);
}
@@ -78,6 +89,7 @@ void cb_local_computer()
shell_view_set_enabled(TRUE);
shell_status_update("Done.");
+ shell_set_remote_label(shell, "Local");
}
void cb_save_graphic()