Re: Titles in Gtk::Dialogs



Hello,

I recieved  a warning whilst running your program regarding the order of
initialization in the Constructor.

//  Constructor initializer list is in the wrong order it should be:
    DialogTest::DialogTest() : vbox (Gtk::ORIENTATION_VERTICAL, 5), label ("Label") {
//  DialogTest::DialogTest() :    label ("Label"), vbox (Gtk::ORIENTATION_VERTICAL, 5) {
// 
//  My compiler g++ on Fedora 20 running Gnome with Xfce  shows the following warning regarding this.
//  In constructor ‘DialogTest::DialogTest()’:
//  warning: ‘DialogTest::label’ will be initialized after [-Wreorder]
//       Gtk::Label label;
The   Label looks normal under Gnome on my setup.

regards Mike


On Wednesday, 2 April 2014, 21:29, Glus Xof <gtglus gmail com> wrote:
Dear Mr. Kjell,

I just discovered that this behavior could be noticed in KDE Plasma Environment... but not in Gnome...

Glus


2014-04-02 21:24 GMT+02:00 Glus Xof <gtglus gmail com>:
Dear Mr Kjell,

I wrote the sample code as follows,

---
#include <gtkmm.h>

class DialogTest
:    public Gtk::Dialog
{
public:
    DialogTest();
    virtual ~DialogTest();
   
private:
    Gtk::Box vbox;
    Gtk::Label label;
};

DialogTest::DialogTest()
:    label ("Label"),
    vbox (Gtk::ORIENTATION_VERTICAL, 5)
{
    set_title ("Dialog Title");
    set_deletable (false);
   
    set_border_width (5);
   
    vbox.pack_start (label, true, true);
   
    get_content_area()->pack_start (vbox);
   
    add_button ("Close", Gtk::RESPONSE_CLOSE);
   
    show_all();
   
    run();
   
    hide();
}

DialogTest::~DialogTest()
{
}

int main (int argc, char *argv[])
{
    Glib::RefPtr<Gtk::Application>
        DialogTestApp = Gtk::Application::create (argc, argv, "dialogtest.app");

    DialogTest dialogtest;

    return DialogTestApp->run (dialogtest);
}
---

And I get still the same result as that described before by me...

I have a png window snapshot... but I don't know where can I upload it.

Glus


2014-04-02 18:37 GMT+02:00 Kjell Ahlstedt <kjell ahlstedt bredband net>:

I don't understand what what you mean. Are your dialog titles written twice?
I downloaded the latest versions of gtk+, gtkmm etc. from the git repository today. Then I added a title to one of the message dialogs in gtkmm-documentation/examples/book/dialogs/messagedialog. The attached file shows the dialog, with a title in the title bar. Are your dialogs different?

Kjell

2014-04-02 11:33, Glus Xof skrev:

2014-03-31 16:38 GMT+02:00 Glus Xof <gtglus gmail com>:
Hi guys,

In current last releases, titles assigned in Gtk::Dialog objects not only appear attached in window decorations but also at the top of the windows themself...

I lookup it up the reference unsuccessfully for the property/method in order to manage the visibility of this kind of "label"...

About this, I just discovered that a relation exists with dialogs decoration property: it appears when dialogs are decorated.

My code is compiled with Gtk+-3.0 (3.12.1) and Gtkmm-3.0 (3.11.9)...

I don't know if it's a new Gtk+ feature, but I'd like to suggest that the visibility of this "label" could be managed in order to choose (as it can be possible) the title showing window areas.

Could anyone help me ?
 
Glus






_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]