Add preliminary support for Opera Mobile
authorSteven Luo <steven+maemo@steven676.net>
Thu, 13 May 2010 09:19:23 +0000 (02:19 -0700)
committerSteven Luo <steven+maemo@steven676.net>
Thu, 13 May 2010 09:19:23 +0000 (02:19 -0700)
We do this the lazy way, using use_other_browser_cmd("opera %s").  The
Opera Labs post announcing Opera Mobile for Maemo
(http://labs.opera.com/news/2010/05/11/) says that "an extra empty tab
will get opened every time you open a link from an external
application", so I suspect we may need a different method of opening
links in an already open browser.

config-ui/browser-switchboard-cp.c
launcher.c

index c34778b..1b16242 100644 (file)
@@ -67,6 +67,7 @@ struct browser_entry browsers[] = {
        { "microb", "MicroB" }, /* First entry is the default! */
        { "tear", "Tear" },
        { "fennec", "Mobile Firefox (Fennec)" },
+       { "opera", "Opera Mobile" },
        { "midori", "Midori" },
        { "other", "Other" },
        { NULL, NULL },
index e3865c7..fd33933 100644 (file)
@@ -632,6 +632,8 @@ void update_default_browser(struct swb_context *ctx, char *default_browser) {
                /* Cheat and reuse launch_other_browser, since we don't appear
                   to need to do anything special */
                use_other_browser_cmd(ctx, "fennec %s");
+       else if (!strcmp(default_browser, "opera"))
+               use_other_browser_cmd(ctx, "opera %s");
        else if (!strcmp(default_browser, "midori"))
                use_other_browser_cmd(ctx, "midori %s");
        else if (!strcmp(default_browser, "other")) {