projects
/
browser-switch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update Fremantle screenshot
[browser-switch]
/
launcher.c
diff --git
a/launcher.c
b/launcher.c
index
5a7c773
..
eb16cf4
100644
(file)
--- a/
launcher.c
+++ b/
launcher.c
@@
-226,6
+226,8
@@
void microb_start_dbus_watch_remove(DBusConnection *conn) {
DBusError dbus_error;
DBusHandleMessageFunction filter_func = check_microb_started;
DBusError dbus_error;
DBusHandleMessageFunction filter_func = check_microb_started;
+ dbus_error_init(&dbus_error);
+
dbus_connection_remove_filter(conn, filter_func, NULL);
dbus_bus_remove_match(conn,
"type='signal',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='com.nokia.osso_browser'",
dbus_connection_remove_filter(conn, filter_func, NULL);
dbus_bus_remove_match(conn,
"type='signal',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='com.nokia.osso_browser'",
@@
-286,16
+288,18
@@
pid_t launch_microb_start_browser_process(DBusConnection *conn, int fd) {
int launch_microb_open_window(struct swb_context *ctx, char *uri,
int flags) {
int launch_microb_open_window(struct swb_context *ctx, char *uri,
int flags) {
- DBusGProxy *g_proxy;
+ static DBusGProxy *g_proxy = NULL;
GError *gerror = NULL;
GError *gerror = NULL;
- g_proxy = dbus_g_proxy_new_for_name(ctx->session_bus,
- "com.nokia.osso_browser",
- "/com/nokia/osso_browser/request",
- "com.nokia.osso_browser");
if (!g_proxy) {
if (!g_proxy) {
- log_msg("Couldn't get a com.nokia.osso_browser proxy\n");
- return 0;
+ g_proxy = dbus_g_proxy_new_for_name(ctx->session_bus,
+ "com.nokia.osso_browser",
+ "/com/nokia/osso_browser/request",
+ "com.nokia.osso_browser");
+ if (!g_proxy) {
+ log_msg("Couldn't get a com.nokia.osso_browser proxy\n");
+ return 0;
+ }
}
if (!strcmp(uri, "new_window")) {
}
if (!strcmp(uri, "new_window")) {
@@
-319,7
+323,7
@@
int launch_microb_open_window(struct swb_context *ctx, char *uri,
uri = "about:blank";
}
}
uri = "about:blank";
}
}
- if (!dbus_g_proxy_call(g_proxy, "load_url",
+ if (!dbus_g_proxy_call(g_proxy, "open_new_window",
&gerror,
G_TYPE_STRING, uri,
G_TYPE_INVALID,
&gerror,
G_TYPE_STRING, uri,
G_TYPE_INVALID,
@@
-329,7
+333,6
@@
int launch_microb_open_window(struct swb_context *ctx, char *uri,
return 0;
}
return 0;
}
- g_object_unref(g_proxy);
return 1;
}
return 1;
}