After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 163382 - Gtk-WARNING from running a Gtk::MessageDialog
Gtk-WARNING from running a Gtk::MessageDialog
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.2
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2005-01-08 23:17 UTC by Ralph Hilken
Modified: 2005-02-01 20:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for Gtk::MessageDialog in gtkmm-2.2.12 (1.63 KB, patch)
2005-02-01 20:42 UTC, Chris Vine
none Details | Review

Description Ralph Hilken 2005-01-08 23:17:43 UTC
Just run the example from Chapter 13 - Dialogs of the online book for GTKMM,
loacted at: (http://www.gtkmm.org/gtkmm2/docs/tutorial/html/ch13.html)

void ExampleWindow::on_button_info_clicked()
{
  Gtk::MessageDialog dialog(*this, "This is an INFO MessageDialog");
  dialog.run();
}

It works for me, BUT I get a console error message of:

"Gtk-WARNING **: Ignoring the separator setting"

"Gtk-WARNING **: Ignoring the separator setting"


I googled for this error, and found 150+ listings, all from end users wondering
why their various apps will not work, but not from developers writing code. 
Latest one was dated from end of December 2004.

Tried setting 
   dialog.set_has_separator(false)
or 
   dialog.set_has_separator(true)
but no effect on end result.

My specifc environment is Red Hat FC1 with gtk 2.4.7 and gtkmm 2.2.12 installed
over it in a dev directory.
Comment 1 Murray Cumming 2005-01-25 09:57:54 UTC
I don't see this (with gtkmm 2.5, but I don't think anything has changed) when
running gtkmm/examples/dialogs/messagedialog, so I guess that it was fixed
somewhere, probably in GTK+.
Comment 2 Chris Vine 2005-01-30 18:44:04 UTC
This warning occurs with Gtk::MessageDialog in gtkmm-2.2 when it is used with
gtk+-2.4 or gtk+-2.6.  It does not occur with gtkmm-2.4/2.5, nor with gtkmm-2.2
if used with gtk+-2.2.

The warning is harmless, but there are people who use gtkmm-2.2 with later
versions of gtk+, say because they are still using gcc-2.95 (or because of old
code which has not been rewritten to deal with the API changes between gtkmm-2.2
and gtkmm-2.4, which is why gtkmm-2.2 is parallel installable with gtkmm-2.4 in
the first place), so it would be handy to deal with this if gtkmm-2.2 is still
being maintained.

I looked into this some time ago when I first noticed these warnings, and the
background to it is that a call to gtk_dialog_set_has_separator() does not now
do anything with a GtkMessageDialog object in gtk+-2.4 and 2.6.  It does do
something in gtk+-2.0 and 2.2 (it puts a line between the buttons in the message
box and the text above).  Someone seems to have taken the view that this was not
desirable behaviour for that kind of dialog and it was made a null-op in
gtk+2.4.  A warning about this was added to gtk+2.4 - it reports that the call
is ignored, as reported in the bug report.  The call to
Gtk::Dialog::set_has_separator() in the constructors of Gtk::MessageBox was
accordingly also removed in gtkmm-2.4, as was the use_separator argument of the
constructors.

The resolution would be to remove the call to it in the constructors of
Gtk::MessageBox in gtkmm-2.2 also (but keep the use_separator argument of the
constructors so as not to break any code) where both (a) gtkmm-2.2 is compiled
against gtk+-2.4 or above and (b) the use_separator argument is passed the
default value of false (where it is passed a value of true the warning emitted
by gtk+ that it is ignored would still be useful).  gtk/gtkversion.h has
defines/macros which enable this.  

If you are willing to make this change to an old version of gtkmm I can send you
a patch.
Comment 3 Murray Cumming 2005-01-31 08:46:05 UTC
> If you are willing to make this change to an old version of gtkmm I can send you
> a patch.

That would be fine. However, I don't think this is a major problem - it's only a
 warning.
Comment 4 Chris Vine 2005-02-01 20:42:37 UTC
Created attachment 36842 [details] [review]
Patch for Gtk::MessageDialog in gtkmm-2.2.12

Here is the patch for Gtk::MessageDialog in gtkmm-2.2.	I have prepared it
against version gtkmm-2.2.12 as I do not have CVS installed for that version,
but if you need it against CVS please let me know (and give me the branch
name).