summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Scorgie <dscorgie@src.gnome.org>2006-11-05 19:54:49 +0000
committerDon Scorgie <dscorgie@src.gnome.org>2006-11-05 19:54:49 +0000
commit5cacc8b9de70e12b8a06a71d264a40234a8a9456 (patch)
tree7c6f0ffdd272b4c1a8a5cdae6afc658644d8f3c0
parente12d2c506c05c15436e25f61169a0a7826e3a75f (diff)
downloadyelp-5cacc8b9de70e12b8a06a71d264a40234a8a9456.tar.gz
Don't crash when saving session (bug #364790)
* src/yelp-main.c: Don't crash when saving session (bug #364790)
-rw-r--r--ChangeLog3
-rw-r--r--src/yelp-main.c18
2 files changed, 14 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f43c31a..e633467e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2006-11-05 Don Scorgie <dscorgie@cvs.gnome.org>
+ * src/yelp-main.c:
+ Don't crash when saving session (bug #364790)
+
* src/yelp-search-pager.c:
Replace ':' chars in search strings with ' '
Stops from crashing (bug #364768)
diff --git a/src/yelp-main.c b/src/yelp-main.c
index c3cfcce8..5203f6a2 100644
--- a/src/yelp-main.c
+++ b/src/yelp-main.c
@@ -46,6 +46,7 @@ static gchar *open_urls;
static gchar *startup_id;
static gchar **files;
static gboolean private = FALSE;
+static YelpBase *priv_base = NULL;
static DBusGConnection *connection;
@@ -113,7 +114,9 @@ main_start (const gchar *url)
GError *error = NULL;
base = yelp_base_new (private);
+
server_new_window (base, (gchar *) url, startup_id, &error);
+ priv_base = base;
gtk_main ();
@@ -157,14 +160,14 @@ main_save_session (GnomeClient *client,
DBusGProxy *proxy = NULL;
GError *error = NULL;
- proxy = main_dbus_get_proxy ();
- if (!proxy)
- g_error ("Unable to connect to bus again\n");
-
+ /*proxy = main_dbus_get_proxy ();
+ if (!proxy) {
+ g_warning ("Unable to connect to bus again\n");*/
+
- if (!org_gnome_YelpService_get_url_list (proxy, &open_windows,
- &error))
- g_error ("Cannot recieve window list - %s\n", error->message);
+ if (!server_get_url_list (priv_base, &open_windows,
+ &error))
+ g_warning ("Cannot recieve window list - %s\n", error->message);
if (open_windows != NULL) {
store_open_urls = TRUE;
@@ -214,6 +217,7 @@ main_restore_session (void)
YelpBase *yelp_base;
yelp_base = yelp_base_new (private);
+ priv_base = yelp_base;
if (!yelp_base) {
g_error ("Couldn't activate YelpBase");