Browse Source

Fixed selected text on Gtk::MessageDialog.

merge-requests/365/head
Ole Christian Eidheim 10 years ago
parent
commit
c6857421a9
  1. 2
      src/dialogs.cc
  2. 8
      src/juci.cc

2
src/dialogs.cc

@ -17,7 +17,7 @@ namespace sigc {
#endif #endif
} }
Dialog::Message::Message(const std::string &text): Gtk::MessageDialog(text, false, Gtk::MessageType::MESSAGE_INFO, Gtk::ButtonsType::BUTTONS_CLOSE, true) { Dialog::Message::Message(const std::string &text): Gtk::MessageDialog(text, false, Gtk::MessageType::MESSAGE_INFO, Gtk::ButtonsType::BUTTONS_NONE, true) {
auto g_application=g_application_get_default(); auto g_application=g_application_get_default();
auto gio_application=Glib::wrap(g_application, true); auto gio_application=Glib::wrap(g_application, true);
auto application=Glib::RefPtr<Application>::cast_static(gio_application); auto application=Glib::RefPtr<Application>::cast_static(gio_application);

8
src/juci.cc

@ -102,6 +102,14 @@ Application::Application() : Gtk::Application("no.sout.juci", Gio::APPLICATION_N
Glib::set_application_name("juCi++"); Glib::set_application_name("juCi++");
//Gtk::MessageDialog without buttons caused text to be selected, this prevents that
//Copied from https://mail.gnome.org/archives/gtk-app-devel-list/2007-October/msg00144.html
GtkSettings* settings = gtk_settings_get_default();
if(settings) {
g_object_set(settings, "gtk-label-select-on-focus", false, NULL);
}
//End copy
window=std::unique_ptr<Window>(new Window()); window=std::unique_ptr<Window>(new Window());
} }

Loading…
Cancel
Save