blob: a2e2c926f2f926f061be6ff420dac5d3f991d52e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
--- 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;
}
|