Remove old modal get_color API.
authorRobin Gareus <robin@gareus.org>
Fri, 10 Mar 2017 23:35:26 +0000 (00:35 +0100)
committerRobin Gareus <robin@gareus.org>
Fri, 10 Mar 2017 23:35:26 +0000 (00:35 +0100)
libs/gtkmm2ext/gtk_ui.cc
libs/gtkmm2ext/gtkmm2ext/gtk_ui.h

index c96c31b3dec8b082e62cc16e7bec49d98e4381cc..3ec7817edc79b4b78931f597266286d5211ab2fc 100644 (file)
@@ -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)
 {
index dbe1739ffc76cc599d5276f32e56134f4d02555f..55cb7e415d40c0ce4dff45ac04a3e389a3fec209 100644 (file)
@@ -157,7 +157,6 @@ class LIBGTKMM2EXT_API UI : public AbstractUI<UIRequest>
                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)