From 97084a46bd22f65cb4e7f8038297b5a1a1c7515c Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sat, 30 May 2009 11:33:34 -0300 Subject: Add a label to the status bar to show if HardInfo is in remote or local mode --- hardinfo2/callbacks.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'hardinfo2/callbacks.c') 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: %s", 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() -- cgit v1.2.3