Gtk--: GTK_OBJECT_CONSTRUCTED problem: minimal test case
- From: Robert_Gasch/PeopleSoft peoplesoft com
- To: gtk-list redhat com
- Subject: Gtk--: GTK_OBJECT_CONSTRUCTED problem: minimal test case
- Date: Wed, 7 Apr 1999 10:14:05 +0200
Hi,
I've played around some more with my test case for the
GTK_OBJECT_CONSTRUCTED errors/warnings that I've
been getting since upgrading to Gtk-- 0.99.x and have
reduced the test case to a seemingly minimal form.
The attached source still reproduces the error ... when
the HScale is not added to the Dialog anymore, the
error goes away ...
Hopefully one of the hard core Gtk(mm) developers
finds this useful ...
Greeitngs
--> Robert
---------------- cut here --------------------
#include <stdio.h>
#include <stdlib.h>
#include <gtk--.h>
#include <gtk/gtk.h>
class GuiDialogOAC : public Gtk_Dialog
{
public:
GuiDialogOAC ();
protected:
virtual void fillVBox ();
virtual gint delete_event_impl (GdkEventAny *e);
Gtk_HBox d_hBoxFoldOffset;
Gtk_Adjustment d_adjFoldOffset;
Gtk_HScale d_hsFoldOffset;
};
GuiDialogOAC::GuiDialogOAC()
: Gtk_Dialog (),
d_hBoxFoldOffset (TRUE, 0),
d_adjFoldOffset (20, 10, 100, 1),
d_hsFoldOffset (d_adjFoldOffset)
{
this->set_position (GTK_WIN_POS_MOUSE);
this->set_usize (250, 125);
this->get_vbox()->set_border_width (2);
fillVBox ();
this->show ();
}
void GuiDialogOAC::fillVBox ()
{
d_hBoxFoldOffset.pack_end (d_hsFoldOffset, TRUE, TRUE, 3);
d_hsFoldOffset.show ();
this->get_vbox()->pack_start (d_hBoxFoldOffset, TRUE, TRUE, 3);
d_hBoxFoldOffset.show ();
this->get_vbox()->show ();
}
gint GuiDialogOAC::delete_event_impl(GdkEventAny *)
{
this->hide ();
return 0;
}
int main (int argc, char *argv[])
{
Gtk_Main gtkMain (&argc, &argv);
GuiDialogOAC *testDialog;
testDialog = new GuiDialogOAC ();
testDialog->show ();
gtkMain.run ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]