gtk-rs / gtk

DEPRECATED, use https://github.com/gtk-rs/gtk3-rs repository instead!

Home Page:https://gtk-rs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MessageType for MessageDialog doesn't seem to do anything

marmistrz opened this issue · comments

I've launched the example MessageDialog code from the docs:

extern crate gtk;
use gtk::prelude::*;
use gtk::{ButtonsType, DialogFlags, MessageType, MessageDialog, Window};

fn main() {
    if gtk::init().is_err() {
        println!("Failed to initialize GTK.");
        return;
    }
    MessageDialog::new(None::<&Window>,
                       DialogFlags::empty(),
                       MessageType::Info,
                       ButtonsType::Ok,
                       "Hello World").run();
}

Changing MessageType::Info to MessageType::Error doesn't affect the dialog in any way. (see the screenshot). Is this correct?
error
I'd expect some icon reflecting the Dialog type to appear, which is missing in both cases, as in this example
example

This is a support request, not a bug in the bindings. And also generic to GTK :)

I don't know enough about the GTK API but this probably has to be used differently for getting the behaviour you want. Your best choice for getting an answer to this would be here: https://discourse.gnome.org/