X-Git-Url: http://git.maemo.org/git/?p=browser-switch;a=blobdiff_plain;f=launcher.c;h=f738c636eeaa4a6d8851762384b927b8993cc538;hp=6f25a28c0a783716c82c819cab279cfcf1e49b68;hb=99e0df6f43a0cb8756c9dbd7e11cf035574c3c8d;hpb=5a19c8657cd5a93c80f23d952e411e20517edd42;ds=sidebyside diff --git a/launcher.c b/launcher.c index 6f25a28..f738c63 100644 --- a/launcher.c +++ b/launcher.c @@ -32,8 +32,7 @@ #include "launcher.h" #include "dbus-server-bindings.h" -#define DEFAULT_BROWSER "/usr/bin/tear" -#define LAUNCH_DEFAULT_BROWSER launch_tear +#define LAUNCH_DEFAULT_BROWSER launch_microb static void launch_tear(struct swb_context *ctx, char *uri) { int status; @@ -47,8 +46,8 @@ static void launch_tear(struct swb_context *ctx, char *uri) { printf("launch_tear with uri '%s'\n", uri); /* We should be able to just call the D-Bus service to open Tear ... - but if Tear's not open, that cuases D-Bus to star Tear and then pass - it the OpenAddress call, which results in two browser windows. + but if Tear's not open, that cuases D-Bus to start Tear and then + pass it the OpenAddress call, which results in two browser windows. Properly fixing this probably requires Tear to provide a D-Bus method that opens an address in an existing window, but for now work around by just invoking Tear with exec() if it's not running. */ @@ -227,12 +226,8 @@ void update_default_browser(struct swb_context *ctx, char *default_browser) { return; if (!default_browser) { - /* No default_browser configured -- use DEFAULT_BROWSER if - installed, otherwise launch MicroB */ - if (!access(DEFAULT_BROWSER, X_OK)) - ctx->default_browser_launcher = LAUNCH_DEFAULT_BROWSER; - else - ctx->default_browser_launcher = launch_microb; + /* No default_browser configured -- use built-in default */ + ctx->default_browser_launcher = LAUNCH_DEFAULT_BROWSER; return; }