Provide open_new_window and load_url methods with boolean fullscreen argument
authorSteven Luo <steven+maemo@steven676.net>
Sat, 25 Sep 2010 02:33:42 +0000 (19:33 -0700)
committerSteven Luo <steven+maemo@steven676.net>
Sun, 10 Oct 2010 01:34:09 +0000 (18:34 -0700)
MicroB implements an optional boolean argument to the open_new_window
and load_url methods in the com.nokia.osso_browser interface, which
allows the application to request that the new page be loaded in a
fullscreen window.  We need to provide this as well -- otherwise,
applications that use the argument will receive an error.

Provide versions of open_new_window and load_url with a fullscreen
argument, which is ignored for the moment.  It's not going to be
possible to implement the fullscreen behavior for all supported
browsers, but we should implement it for MicroB, at least.

Fixes the launching of the Flickr new account page from the Sharing
control panel in Fremantle:
https://garage.maemo.org/tracker/index.php?func=detail&aid=6444&group_id=1159&atid=4348
Thanks to Tom G for reporting.

dbus-server-bindings.c
dbus-server-bindings.h
dbus-server-glue.xml

index 748f557..1660110 100644 (file)
@@ -107,6 +107,15 @@ gboolean osso_browser_load_url(OssoBrowser *obj,
        return TRUE;
 }
 
+gboolean osso_browser_load_url_sb(OssoBrowser *obj,
+               const char *uri, gboolean fullscreen, GError **error) {
+       /* XXX don't ignore fullscreen requests */
+       if (!ctx.continuous_mode)
+               ignore_reconfig_requests();
+       open_address(uri);
+       return TRUE;
+}
+
 gboolean osso_browser_mime_open(OssoBrowser *obj,
                const char *uri, GError **error) {
        if (!ctx.continuous_mode)
@@ -123,6 +132,15 @@ gboolean osso_browser_open_new_window(OssoBrowser *obj,
        return TRUE;
 }
 
+gboolean osso_browser_open_new_window_sb(OssoBrowser *obj,
+               const char *uri, gboolean fullscreen, GError **error) {
+       /* XXX don't ignore fullscreen requests */
+       if (!ctx.continuous_mode)
+               ignore_reconfig_requests();
+       open_address(uri);
+       return TRUE;
+}
+
 gboolean osso_browser_top_application(OssoBrowser *obj,
                GError **error) {
        if (!ctx.continuous_mode)
index 232ac5d..0cae50d 100644 (file)
@@ -37,10 +37,14 @@ typedef struct _OssoBrowserClass {
 /* The com.nokia.osso_browser D-Bus interface */
 gboolean osso_browser_load_url(OssoBrowser *obj,
                 const char *uri, GError **error);
+gboolean osso_browser_load_url_sb(OssoBrowser *obj,
+                const char *uri, gboolean fullscreen, GError **error);
 gboolean osso_browser_mime_open(OssoBrowser *obj,
                 const char *uri, GError **error);
 gboolean osso_browser_open_new_window(OssoBrowser *obj,
                 const char *uri, GError **error);
+gboolean osso_browser_open_new_window_sb(OssoBrowser *obj,
+                const char *uri, gboolean fullscreen, GError **error);
 gboolean osso_browser_top_application(OssoBrowser *obj, GError **error);
 /* This is an "undocumented", non-standard extension; DO NOT USE */
 gboolean osso_browser_switchboard_launch_microb(OssoBrowser *obj,
index 1fd3062..b7212e7 100644 (file)
@@ -6,12 +6,22 @@
     <method name="load_url">
       <arg type="s" name="uri" direction="in" />
     </method>
+    <method name="load_url">
+      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="osso_browser_load_url_sb" />
+      <arg type="s" name="uri" direction="in" />
+      <arg type="b" name="fullscreen" direction="in" />
+    </method>
     <method name="mime_open">
       <arg type="s" name="uri" direction="in" />
     </method>
     <method name="open_new_window">
       <arg type="s" name="uri" direction="in" />
     </method>
+    <method name="open_new_window">
+      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="osso_browser_open_new_window_sb" />
+      <arg type="s" name="uri" direction="in" />
+      <arg type="b" name="fullscreen" direction="in" />
+    </method>
     <method name="top_application" />
     <method name="switchboard_launch_microb">
       <arg type="s" name="uri" direction="in" />