|
@@ -29,6 +29,10 @@ static void mssh_window_sendhost(GtkWidget *widget, gpointer data)
|
|
|
|
|
|
static void mssh_window_destroy(GtkWidget *widget, gpointer data)
|
|
static void mssh_window_destroy(GtkWidget *widget, gpointer data)
|
|
{
|
|
{
|
|
|
|
+ MSSHWindow *window = MSSH_WINDOW(data);
|
|
|
|
+
|
|
|
|
+ free(window->terms);
|
|
|
|
+ free(window->items);
|
|
gtk_main_quit();
|
|
gtk_main_quit();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -107,7 +111,7 @@ static void mssh_window_init(MSSHWindow* window)
|
|
g_signal_connect(G_OBJECT(window->file_sendhost), "activate",
|
|
g_signal_connect(G_OBJECT(window->file_sendhost), "activate",
|
|
G_CALLBACK(mssh_window_sendhost), window);
|
|
G_CALLBACK(mssh_window_sendhost), window);
|
|
g_signal_connect(G_OBJECT(window->file_quit), "activate",
|
|
g_signal_connect(G_OBJECT(window->file_quit), "activate",
|
|
- G_CALLBACK(mssh_window_destroy), NULL);
|
|
|
|
|
|
+ G_CALLBACK(mssh_window_destroy), window);
|
|
gtk_widget_add_accelerator(window->file_quit, "activate", accel_group,
|
|
gtk_widget_add_accelerator(window->file_quit, "activate", accel_group,
|
|
GDK_W, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
|
|
GDK_W, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
|
|
gtk_window_add_accel_group(GTK_WINDOW(window), accel_group);
|
|
gtk_window_add_accel_group(GTK_WINDOW(window), accel_group);
|
|
@@ -142,6 +146,11 @@ void mssh_window_new_session(MSSHWindow* window, char **env,
|
|
window->num_servers = num_servers;
|
|
window->num_servers = num_servers;
|
|
window->servers = servers;
|
|
window->servers = servers;
|
|
|
|
|
|
|
|
+ window->items = malloc(sizeof(GtkWidget) * num_servers);
|
|
|
|
+ window->terms = malloc(sizeof(GtkWidget) * num_servers);
|
|
|
|
+ memset(window->items, 0, sizeof(GtkWidget) * num_servers);
|
|
|
|
+ memset(window->terms, 0, sizeof(GtkWidget) * num_servers);
|
|
|
|
+
|
|
args[0] = strdup("ssh");
|
|
args[0] = strdup("ssh");
|
|
|
|
|
|
window->table = gtk_table_new(rows, 2, TRUE);
|
|
window->table = gtk_table_new(rows, 2, TRUE);
|