From 41216d200a8ea30c14a5b7dd133088a658a6f4f9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 11 Mar 2017 00:35:26 +0100 Subject: [PATCH] Remove old modal get_color API. --- libs/gtkmm2ext/gtk_ui.cc | 36 ------------------------------- libs/gtkmm2ext/gtkmm2ext/gtk_ui.h | 1 - 2 files changed, 37 deletions(-) diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index c96c31b3de..3ec7817edc 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -756,42 +756,6 @@ UI::just_hide_it (GdkEventAny* /*ev*/, Window *win) return true; } -Gdk::Color -UI::get_color (const string& prompt, bool& picked, const Gdk::Color* initial) -{ - Gdk::Color color; - - ColorSelectionDialog color_dialog (prompt); - - color_dialog.set_modal (true); - color_dialog.get_cancel_button()->signal_clicked().connect (bind (mem_fun (*this, &UI::color_selection_done), false)); - color_dialog.get_ok_button()->signal_clicked().connect (bind (mem_fun (*this, &UI::color_selection_done), true)); - color_dialog.signal_delete_event().connect (mem_fun (*this, &UI::color_selection_deleted)); - - if (initial) { - color_dialog.get_colorsel()->set_current_color (*initial); - } - - color_dialog.show_all (); - color_picked = false; - picked = false; - - Main::run(); - - color_dialog.hide_all (); - - if (color_picked) { - Gdk::Color f_rgba = color_dialog.get_colorsel()->get_current_color (); - color.set_red(f_rgba.get_red()); - color.set_green(f_rgba.get_green()); - color.set_blue(f_rgba.get_blue()); - - picked = true; - } - - return color; -} - void UI::color_selection_done (bool status) { diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h index dbe1739ffc..55cb7e415d 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h @@ -157,7 +157,6 @@ class LIBGTKMM2EXT_API UI : public AbstractUI call_slot (boost::bind (&UI::delete_in_self, this, obj)); } - Gdk::Color get_color (const std::string& prompt, bool& picked, const Gdk::Color *initial = 0); /* starting is sent just before we enter the main loop, stopping just after we return from it (at the top level)