13
0

Remove old modal get_color API.

This commit is contained in:
Robin Gareus 2017-03-11 00:35:26 +01:00
parent 05dfc1fdc1
commit 41216d200a
2 changed files with 0 additions and 37 deletions

View 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)
{

View 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)