Re: bonobo_window_construct() trouble...
- From: murrayc t-online de (Murray Cumming)
- To: Murray Cumming <murrayc usa net>
- Cc: Jaka Mocnik <jaka gnu org>, Desktop Devel List <desktop-devel-list gnome org>, michael ximian com
- Subject: Re: bonobo_window_construct() trouble...
- Date: 06 May 2002 22:37:21 +0200
On Mon, 2002-05-06 at 22:05, Murray Cumming wrote:
> On Mon, 2002-05-06 at 21:42, Jaka Mocnik wrote:
> > I have encountered a bug in GGv - making it crash at startup - that only
> > happens on some people's installations. As I couldn't reproduce on my
> > system, I got an account from someone who suffered from this and behold:
> > it seemed to me that a call to bonobo_window_construct() is trashing
> > some of the memory. thorough inspection shows this in
> > bonobo_window_construct():
>
> Don't use bonobo_window_construct(). It is no longer needed. I'll take a
> look at ggv for you.
Here you go. By the way, most of that stuff in ggv_window_new() should
probably be in an instance_init function. When using the GObject system
_new() functions sh be purely convenience wrappers for g_object_new().
--
Murray Cumming
murrayc usa net
www.murrayc.com
? ggv.kdevprj
? ggv_bonobowindow.patch
? intltool-extract
? intltool-extract.in
? intltool-merge
? intltool-merge.in
? intltool-update
? intltool-update.in
? stamp-h.in
? bonobo/GNOME_GGV.server
? help/C/omf_timestamp
? po/Makefile.in.in
? src/cursors/Makefile
? src/cursors/Makefile.in
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/ggv/ChangeLog,v
retrieving revision 1.307
diff -u -p -r1.307 ChangeLog
--- ChangeLog 5 May 2002 19:48:35 -0000 1.307
+++ ChangeLog 6 May 2002 20:31:10 -0000
@@ -1,3 +1,9 @@
+2002-05-06 Murray Cumming <murrayc usa net>
+
+ * src/ggv-window.c: Replaced use of bonobo_window_construct() with
+ construct-time properties and bonobo_window_get_ui_container(),
+ now that BonoboWindow has been corrected.
+
2002-05-05 Jaka Mocnik <jaka gnu org>
* bonobo/ggv-postscript-view.c (verb_FileSaveMarked): set the current
Index: src/ggv-window.c
===================================================================
RCS file: /cvs/gnome/ggv/src/ggv-window.c,v
retrieving revision 1.25
diff -u -p -r1.25 ggv-window.c
--- src/ggv-window.c 5 May 2002 19:48:37 -0000 1.25
+++ src/ggv-window.c 6 May 2002 20:31:10 -0000
@@ -588,7 +588,7 @@ ggv_window_new(void)
}
CORBA_exception_free(&ev);
- win = GGV_WINDOW(g_object_new(GGV_TYPE_WINDOW, NULL));
+ win = GGV_WINDOW(g_object_new(GGV_TYPE_WINDOW, "win_name", "ggv", "title", _("Gnome Ghostview"), NULL));
win->control = control;
win->current_page = -2;
@@ -616,9 +616,6 @@ ggv_window_new(void)
gtk_box_pack_end(GTK_BOX(win->vbox), GTK_WIDGET(win->statusbar),
FALSE, FALSE, 0);
- ui_container = bonobo_ui_container_new();
- bonobo_window_construct(BONOBO_WINDOW(win), ui_container,
- "ggv", _("Gnome Ghostview"));
bonobo_window_set_contents(BONOBO_WINDOW(win), win->vbox);
gtk_drag_dest_set (GTK_WIDGET (win),
@@ -628,6 +625,8 @@ ggv_window_new(void)
GDK_ACTION_COPY | GDK_ACTION_ASK);
/* add menu and toolbar */
+ ui_container = bonobo_window_get_ui_container(BONOBO_WINDOW(win));
+ BONOBO_OBJREF(ui_container);
uic = bonobo_ui_component_new("ggv");
win->uic = uic;
bonobo_ui_component_set_container(uic, BONOBO_OBJREF(ui_container),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]