summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
878f7b0)
Chances are good we'll need to use the D-Bus proxy again at some point,
so instead of getting rid of it when launch_microb_open_window()
finishes, save it for later use.
Has the side effect of fixing a leak when we open a bookmarks window.
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) {
+ static DBusGProxy *g_proxy = 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");
- 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")) {
- g_object_unref(g_proxy);