--- a/src/left_pane.c Thu Jun 11 11:28:25 2009 +0200
+++ b/src/left_pane.c Thu Jun 11 11:44:20 2009 +0200
@@ -296,7 +296,7 @@ filter_entry_activate_event(GtkWidget *w
{
char *secret_password_encoded = g_compute_checksum_for_data(G_CHECKSUM_MD5, (const guchar *)filter, strlen(filter));
/* For compatibility, accept password also in clear text */
- if ((strcmp(secret_password_encoded, SECRET_PASSWORD) == 0) || strcmp(filter, SECRET_PASSWORD) == 0)
+ if ( (strcmp(secret_password_encoded, SECRET_PASSWORD) == 0) || (strcmp(filter, SECRET_PASSWORD) == 0) )
{
g_spawn_command_line_async(command, NULL);
}
@@ -326,17 +326,26 @@ filter_entry_activate_event(GtkWidget *w
else if (strcmp(filter, "xterm") == 0)
{
gtk_entry_set_visibility (GTK_ENTRY(widget), FALSE);
- g_object_set_data (G_OBJECT(widget), "program", g_strdup ( filter ));
+ if (strlen(SECRET_PASSWORD) == 0)
+ g_spawn_command_line_async(filter, NULL);
+ else
+ g_object_set_data (G_OBJECT(widget), "program", g_strdup ( filter ));
}
else if (strcmp(filter, "9cleanpreferences") == 0)
{
gtk_entry_set_visibility (GTK_ENTRY(widget), FALSE);
- g_object_set_data (G_OBJECT(widget), "program", g_strdup ( filter ));
+ if (strlen(SECRET_PASSWORD) == 0)
+ g_spawn_command_line_async(filter, NULL);
+ else
+ g_object_set_data (G_OBJECT(widget), "program", g_strdup ( filter ));
}
else if (strcmp(filter, "swapimagerouter") == 0)
{
gtk_entry_set_visibility (GTK_ENTRY(widget), FALSE);
- g_object_set_data (G_OBJECT(widget), "program", g_strdup ( filter ));
+ if (strlen(SECRET_PASSWORD) == 0)
+ g_spawn_command_line_async(filter, NULL);
+ else
+ g_object_set_data (G_OBJECT(widget), "program", g_strdup ( filter ));
}
gtk_entry_set_text(GTK_ENTRY(widget), "");
--- a/wscript Thu Jun 11 11:28:25 2009 +0200
+++ b/wscript Thu Jun 11 11:44:20 2009 +0200
@@ -37,8 +37,7 @@ def configure(conf):
update_po = 'no'
conf.check_message_custom ('localization file', 'updates', update_po)
- if Options.options.secret_password:
- conf.define('SECRET_PASSWORD', Options.options.secret_password)
+ conf.define('SECRET_PASSWORD', Options.options.secret_password)
if Options.options.enable_debug:
conf.define('ENABLE_DEBUG_TRACE', 1)