| 1056 place = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/browsers/place"); |
1056 place = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/browsers/place"); |
| 1057 |
1057 |
| 1058 /* if they are running gnome, use the gnome web browser */ |
1058 /* if they are running gnome, use the gnome web browser */ |
| 1059 if (purple_running_gnome() == TRUE) |
1059 if (purple_running_gnome() == TRUE) |
| 1060 { |
1060 { |
| 1061 command = g_strdup_printf("gnome-open %s", escaped); |
1061 char *tmp = g_find_program_in_path("xdg-open"); |
| |
1062 if (tmp == NULL) |
| |
1063 command = g_strdup_printf("gnome-open %s", escaped); |
| |
1064 else |
| |
1065 command = g_strdup_printf("xdg-open %s", escaped); |
| |
1066 g_free(tmp); |
| 1062 } |
1067 } |
| 1063 else if (purple_running_osx() == TRUE) |
1068 else if (purple_running_osx() == TRUE) |
| 1064 { |
1069 { |
| 1065 command = g_strdup_printf("open %s", escaped); |
1070 command = g_strdup_printf("open %s", escaped); |
| 1066 } |
1071 } |
| 1071 command = g_strdup_printf("%s -w %s", web_browser, escaped); |
1076 command = g_strdup_printf("%s -w %s", web_browser, escaped); |
| 1072 else if (place == PIDGIN_BROWSER_NEW_TAB) |
1077 else if (place == PIDGIN_BROWSER_NEW_TAB) |
| 1073 command = g_strdup_printf("%s -n %s", web_browser, escaped); |
1078 command = g_strdup_printf("%s -n %s", web_browser, escaped); |
| 1074 else |
1079 else |
| 1075 command = g_strdup_printf("%s %s", web_browser, escaped); |
1080 command = g_strdup_printf("%s %s", web_browser, escaped); |
| |
1081 } |
| |
1082 else if (!strcmp(web_browser, "xdg-open")) |
| |
1083 { |
| |
1084 command = g_strdup_printf("xdg-open %s", escaped); |
| 1076 } |
1085 } |
| 1077 else if (!strcmp(web_browser, "gnome-open")) |
1086 else if (!strcmp(web_browser, "gnome-open")) |
| 1078 { |
1087 { |
| 1079 command = g_strdup_printf("gnome-open %s", escaped); |
1088 command = g_strdup_printf("gnome-open %s", escaped); |
| 1080 } |
1089 } |