--- src/plugins/thunderbird.c 2007-01-10 17:04:06.000000000 -0600 +++ src/plugins/thunderbird.c 2007-01-10 17:09:02.000000000 -0600 @@ -27,6 +27,23 @@ static GHashTable *hash = NULL; +static const gchar const *possible_binaries[] = +{ + "thunderbird", + "mozilla-thunderbird", +}; + +static gchar *get_thunderbird_command(void) +{ + gchar *cmd = NULL; + gint i; + + for (i = 0; cmd == NULL && i < G_N_ELEMENTS(possible_binaries); i++) + cmd = g_find_program_in_path(possible_binaries[i]); + + return cmd; +} + static gboolean init (NstPlugin *plugin) { @@ -35,9 +52,11 @@ printf ("Init thunderbird plugin\n"); hash = g_hash_table_new (g_str_hash, g_str_equal); - t_cmd = g_find_program_in_path ("mozilla-thunderbird"); + t_cmd = get_thunderbird_command(); + if (t_cmd == NULL) return FALSE; + return TRUE; }