GTK implementation of MessageBox

Hmm, ok. I’d suggest code like this, then: typedef struct { int type; int result; } DialogData; static gboolean display_dialog(gpointer user_data) { DialogData *dialog_data = user_data; GtkWidget *dialog; if (dialog_data->type & MB_YESNO) dialog = gtk_message_dialog_new(…); else dialog = gtk_message_dialog_new(…); // Set title, etc. dialog_data->result = gtk_dialog_run(…); gtk_main_quit(); // Quits the main loop run in MessageBox() … Read more

GtkDialog mapped without a transient parent

You fix this warning by giving the GtkDialog a parent to be modal to. The relevant functions are gtk_window_set_transient_for() (which sets this window to always be on top of, or transient for, another one) and optionally gtk_window_set_modal() to make it a modal dialog. This is ultimately what the various GtkDialog constructors do.

Is recent GTK 3.22 still Boehm GC friendly (thread issue)?

Gtk does not call any signal handler from a non-main thread. Any worker thread you found in a Gtk application interacts with the main thread via a message queue. You can see that in the Glib source. For example, see the implementation of g_dbus_connection_signal_subscribe() and schedule_callbacks() in gdbusconnection.c.(A worker thread calls g_source_attach(…, subscriber->context), where the … Read more

Very large tabs in Eclipse panes on Ubuntu

You can edit Eclipse’s CSS instead of messing with the GTK theme. In your Eclipse directory find the file plugins/org.eclipse.platform_4.2.*/css/e4_default_gtk.css (there’s an * in there, because I guess that the version may change in the future or may be different already). In this file there’s a CSS class: .MPartStack { font-size: 11; swt-simple: false; swt-mru-visible: … Read more

How do you find out which version of GTK+ is installed on Ubuntu?

This suggestion will tell you which minor version of 2.0 is installed. Different major versions will have different package names because they can co-exist on the system (in order to support applications built with older versions). Even for development files, which normally would only let you have one version on the system, you can have … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)