Remove ArdourPrompter wrapper

This commit is contained in:
Robin Gareus 2017-07-17 05:18:48 +02:00
parent eb1e423b75
commit 1f5ebc5485
24 changed files with 32 additions and 95 deletions

View file

@ -78,6 +78,7 @@
#include "gtkmm2ext/window_title.h" #include "gtkmm2ext/window_title.h"
#include "widgets/fastmeter.h" #include "widgets/fastmeter.h"
#include "widgets/prompter.h"
#include "ardour/ardour.h" #include "ardour/ardour.h"
#include "ardour/audio_backend.h" #include "ardour/audio_backend.h"
@ -163,7 +164,6 @@ typedef uint64_t microseconds_t;
#include "opts.h" #include "opts.h"
#include "pingback.h" #include "pingback.h"
#include "processor_box.h" #include "processor_box.h"
#include "prompter.h"
#include "public_editor.h" #include "public_editor.h"
#include "rc_option_editor.h" #include "rc_option_editor.h"
#include "route_time_axis.h" #include "route_time_axis.h"
@ -2886,7 +2886,7 @@ ARDOUR_UI::quick_snapshot_session (bool switch_to_it)
bool bool
ARDOUR_UI::process_snapshot_session_prompter (ArdourPrompter& prompter, bool switch_to_it) ARDOUR_UI::process_snapshot_session_prompter (Prompter& prompter, bool switch_to_it)
{ {
string snapname; string snapname;
@ -2932,7 +2932,7 @@ ARDOUR_UI::process_snapshot_session_prompter (ArdourPrompter& prompter, bool swi
void void
ARDOUR_UI::snapshot_session (bool switch_to_it) ARDOUR_UI::snapshot_session (bool switch_to_it)
{ {
ArdourPrompter prompter (true); Prompter prompter (true);
prompter.set_name ("Prompter"); prompter.set_name ("Prompter");
prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT); prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
@ -2977,7 +2977,7 @@ ARDOUR_UI::rename_session ()
return; return;
} }
ArdourPrompter prompter (true); Prompter prompter (true);
string name; string name;
prompter.set_name ("Prompter"); prompter.set_name ("Prompter");
@ -3119,7 +3119,7 @@ ARDOUR_UI::transport_rec_enable_blink (bool onoff)
} }
bool bool
ARDOUR_UI::process_save_template_prompter (ArdourPrompter& prompter) ARDOUR_UI::process_save_template_prompter (Prompter& prompter)
{ {
string name; string name;
@ -3148,7 +3148,7 @@ ARDOUR_UI::process_save_template_prompter (ArdourPrompter& prompter)
void void
ARDOUR_UI::save_template () ARDOUR_UI::save_template ()
{ {
ArdourPrompter prompter (true); Prompter prompter (true);
if (!check_audioengine (_main_window)) { if (!check_audioengine (_main_window)) {
return; return;

View file

@ -125,7 +125,6 @@ class ConnectionEditor;
class DuplicateRouteDialog; class DuplicateRouteDialog;
class MainClock; class MainClock;
class Mixer_UI; class Mixer_UI;
class ArdourPrompter;
class PublicEditor; class PublicEditor;
class SaveAsDialog; class SaveAsDialog;
class SessionDialog; class SessionDialog;
@ -154,6 +153,7 @@ namespace Gtk {
} }
namespace ArdourWidgets { namespace ArdourWidgets {
class Prompter;
class Tabbable; class Tabbable;
} }
@ -652,7 +652,7 @@ private:
void open_session (); void open_session ();
void open_recent_session (); void open_recent_session ();
bool process_save_template_prompter (ArdourPrompter& prompter); bool process_save_template_prompter (ArdourWidgets::Prompter& prompter);
void save_template (); void save_template ();
void manage_templates (); void manage_templates ();
@ -697,7 +697,7 @@ private:
guint32 last_key_press_time; guint32 last_key_press_time;
bool process_snapshot_session_prompter (ArdourPrompter& prompter, bool switch_to_it); bool process_snapshot_session_prompter (ArdourWidgets::Prompter& prompter, bool switch_to_it);
void snapshot_session (bool switch_to_it); void snapshot_session (bool switch_to_it);
void quick_snapshot_session (bool switch_to_it); //does not promtp for name, just makes a timestamped file void quick_snapshot_session (bool switch_to_it); //does not promtp for name, just makes a timestamped file

View file

@ -48,7 +48,6 @@
#include "automation_time_axis.h" #include "automation_time_axis.h"
#include "keyboard.h" #include "keyboard.h"
#include "playlist_selector.h" #include "playlist_selector.h"
#include "prompter.h"
#include "public_editor.h" #include "public_editor.h"
#include "audio_region_view.h" #include "audio_region_view.h"
#include "audio_streamview.h" #include "audio_streamview.h"

View file

@ -32,7 +32,6 @@
#include "ardour/session_handle.h" #include "ardour/session_handle.h"
#include "gui_object.h" #include "gui_object.h"
#include "prompter.h"
#include "selectable.h" #include "selectable.h"
namespace PBD { namespace PBD {

View file

@ -31,13 +31,14 @@
#include "canvas/item.h" #include "canvas/item.h"
#include "canvas/rectangle.h" #include "canvas/rectangle.h"
#include "widgets/prompter.h"
#include "editor.h" #include "editor.h"
#include "marker.h" #include "marker.h"
#include "selection.h" #include "selection.h"
#include "editing.h" #include "editing.h"
#include "gui_thread.h" #include "gui_thread.h"
#include "actions.h" #include "actions.h"
#include "prompter.h"
#include "editor_drag.h" #include "editor_drag.h"
#include "pbd/i18n.h" #include "pbd/i18n.h"
@ -1612,7 +1613,7 @@ Editor::rename_marker(ArdourMarker *marker)
return; return;
} }
ArdourPrompter dialog (true); ArdourWidgets::Prompter dialog (true);
string txt; string txt;
dialog.set_prompt (_("New Name:")); dialog.set_prompt (_("New Name:"));

View file

@ -46,6 +46,8 @@
#include "ardour/session.h" #include "ardour/session.h"
#include "ardour/types.h" #include "ardour/types.h"
#include "widgets/prompter.h"
#include "actions.h" #include "actions.h"
#include "ardour_ui.h" #include "ardour_ui.h"
#include "editor.h" #include "editor.h"
@ -58,7 +60,6 @@
#include "region_gain_line.h" #include "region_gain_line.h"
#include "automation_time_axis.h" #include "automation_time_axis.h"
#include "control_point.h" #include "control_point.h"
#include "prompter.h"
#include "selection.h" #include "selection.h"
#include "keyboard.h" #include "keyboard.h"
#include "editing.h" #include "editing.h"
@ -2352,7 +2353,7 @@ Editor::mouse_rename_region (ArdourCanvas::Item* /*item*/, GdkEvent* /*event*/)
{ {
using namespace Gtkmm2ext; using namespace Gtkmm2ext;
ArdourPrompter prompter (false); ArdourWidgets::Prompter prompter (false);
prompter.set_prompt (_("Name for region:")); prompter.set_prompt (_("Name for region:"));
prompter.set_initial_text (clicked_regionview->region()->name()); prompter.set_initial_text (clicked_regionview->region()->name());

View file

@ -42,6 +42,7 @@
#include "widgets/choice.h" #include "widgets/choice.h"
#include "widgets/popup.h" #include "widgets/popup.h"
#include "widgets/prompter.h"
#include "ardour/audio_track.h" #include "ardour/audio_track.h"
#include "ardour/audioregion.h" #include "ardour/audioregion.h"
@ -2121,7 +2122,7 @@ Editor::choose_new_marker_name(string &name) {
return true; return true;
} }
ArdourPrompter dialog (true); Prompter dialog (true);
dialog.set_prompt (_("New Name:")); dialog.set_prompt (_("New Name:"));

View file

@ -45,7 +45,6 @@
#include "gui_thread.h" #include "gui_thread.h"
#include "keyboard.h" #include "keyboard.h"
#include "marker.h" #include "marker.h"
#include "prompter.h"
#include "route_group_dialog.h" #include "route_group_dialog.h"
#include "route_time_axis.h" #include "route_time_axis.h"
#include "time_axis_view.h" #include "time_axis_view.h"

View file

@ -32,12 +32,12 @@
#include "ardour/session_directory.h" #include "ardour/session_directory.h"
#include "widgets/choice.h" #include "widgets/choice.h"
#include "widgets/prompter.h"
#include "editor_snapshots.h" #include "editor_snapshots.h"
#include "ardour_ui.h" #include "ardour_ui.h"
#include "pbd/i18n.h" #include "pbd/i18n.h"
#include "utils.h" #include "utils.h"
#include "prompter.h"
using namespace std; using namespace std;
using namespace PBD; using namespace PBD;
@ -143,7 +143,7 @@ EditorSnapshots::popup_context_menu (int button, int32_t time, std::string snaps
void void
EditorSnapshots::rename (std::string old_name) EditorSnapshots::rename (std::string old_name)
{ {
ArdourPrompter prompter(true); ArdourWidgets::Prompter prompter(true);
string new_name; string new_name;

View file

@ -48,7 +48,6 @@
#include "widgets/slider_controller.h" #include "widgets/slider_controller.h"
#include "widgets/tooltips.h" #include "widgets/tooltips.h"
#include "prompter.h"
#include "plugin_ui.h" #include "plugin_ui.h"
#include "gui_thread.h" #include "gui_thread.h"
#include "automation_controller.h" #include "automation_controller.h"

View file

@ -33,7 +33,6 @@
#include "gui_thread.h" #include "gui_thread.h"
#include "keyboard.h" #include "keyboard.h"
#include "location_ui.h" #include "location_ui.h"
#include "prompter.h"
#include "utils.h" #include "utils.h"
#include "public_editor.h" #include "public_editor.h"
#include "ui_config.h" #include "ui_config.h"

View file

@ -82,7 +82,6 @@
#include "plugin_selector.h" #include "plugin_selector.h"
#include "plugin_ui.h" #include "plugin_ui.h"
#include "point_selection.h" #include "point_selection.h"
#include "prompter.h"
#include "region_view.h" #include "region_view.h"
#include "rgb_macros.h" #include "rgb_macros.h"
#include "selection.h" #include "selection.h"

View file

@ -63,7 +63,6 @@
#include "public_editor.h" #include "public_editor.h"
#include "mouse_cursors.h" #include "mouse_cursors.h"
#include "ardour_ui.h" #include "ardour_ui.h"
#include "prompter.h"
#include "utils.h" #include "utils.h"
#include "route_sorter.h" #include "route_sorter.h"
#include "actions.h" #include "actions.h"

View file

@ -63,7 +63,6 @@
#include "ardour_window.h" #include "ardour_window.h"
#include "ardour_ui.h" #include "ardour_ui.h"
#include "prompter.h"
#include "plugin_ui.h" #include "plugin_ui.h"
#include "utils.h" #include "utils.h"
#include "gui_thread.h" #include "gui_thread.h"

View file

@ -41,6 +41,7 @@
#include "gtkmm2ext/rgb_macros.h" #include "gtkmm2ext/rgb_macros.h"
#include "widgets/choice.h" #include "widgets/choice.h"
#include "widgets/prompter.h"
#include "widgets/tooltips.h" #include "widgets/tooltips.h"
#include "ardour/amp.h" #include "ardour/amp.h"
@ -3222,7 +3223,7 @@ ProcessorBox::idle_delete_processor (boost::weak_ptr<Processor> weak_processor)
void void
ProcessorBox::rename_processor (boost::shared_ptr<Processor> processor) ProcessorBox::rename_processor (boost::shared_ptr<Processor> processor)
{ {
ArdourPrompter name_prompter (true); Prompter name_prompter (true);
string result; string result;
name_prompter.set_title (_("Rename Processor")); name_prompter.set_title (_("Rename Processor"));
name_prompter.set_prompt (_("New name:")); name_prompter.set_prompt (_("New name:"));

View file

@ -1,26 +0,0 @@
/*
Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "prompter.h"
ArdourPrompter::ArdourPrompter (bool modal)
: ArdourWidgets::Prompter (modal)
{
}

View file

@ -1,31 +0,0 @@
/*
Copyright (C) 2002 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __ardour_gtk_prompter_h__
#define __ardour_gtk_prompter_h__
#include "widgets/prompter.h"
class ArdourPrompter : public ArdourWidgets::Prompter
{
public:
ArdourPrompter (bool modal = false);
};
#endif /* __ardour_gtk_prompter_h__ */

View file

@ -59,6 +59,7 @@
#include "gtkmm2ext/utils.h" #include "gtkmm2ext/utils.h"
#include "widgets/ardour_button.h" #include "widgets/ardour_button.h"
#include "widgets/prompter.h"
#include "widgets/tooltips.h" #include "widgets/tooltips.h"
#include "ardour_ui.h" #include "ardour_ui.h"
@ -74,7 +75,6 @@
#include "paste_context.h" #include "paste_context.h"
#include "playlist_selector.h" #include "playlist_selector.h"
#include "point_selection.h" #include "point_selection.h"
#include "prompter.h"
#include "public_editor.h" #include "public_editor.h"
#include "region_view.h" #include "region_view.h"
#include "rgb_macros.h" #include "rgb_macros.h"
@ -1125,7 +1125,7 @@ RouteTimeAxisView::set_align_choice (RadioMenuItem* mitem, AlignChoice choice, b
void void
RouteTimeAxisView::rename_current_playlist () RouteTimeAxisView::rename_current_playlist ()
{ {
ArdourPrompter prompter (true); Prompter prompter (true);
string name; string name;
boost::shared_ptr<Track> tr = track(); boost::shared_ptr<Track> tr = track();
@ -1226,7 +1226,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt, vector<boost::shared_ptr<Playl
// TODO: The prompter "new" button should be de-activated if the user // TODO: The prompter "new" button should be de-activated if the user
// specifies a playlist name which already exists in the session. // specifies a playlist name which already exists in the session.
ArdourPrompter prompter (true); Prompter prompter (true);
if (copy) { if (copy) {
prompter.set_title (_("New Copy Playlist")); prompter.set_title (_("New Copy Playlist"));

View file

@ -54,6 +54,7 @@
#include "widgets/ardour_button.h" #include "widgets/ardour_button.h"
#include "widgets/binding_proxy.h" #include "widgets/binding_proxy.h"
#include "widgets/prompter.h"
#include "ardour_dialog.h" #include "ardour_dialog.h"
#include "ardour_ui.h" #include "ardour_ui.h"
@ -66,7 +67,6 @@
#include "latency_gui.h" #include "latency_gui.h"
#include "mixer_strip.h" #include "mixer_strip.h"
#include "plugin_pin_dialog.h" #include "plugin_pin_dialog.h"
#include "prompter.h"
#include "rgb_macros.h" #include "rgb_macros.h"
#include "route_time_axis.h" #include "route_time_axis.h"
#include "route_ui.h" #include "route_ui.h"
@ -1670,7 +1670,7 @@ RouteUI::verify_new_route_name (const std::string& name)
void void
RouteUI::route_rename () RouteUI::route_rename ()
{ {
ArdourPrompter name_prompter (true); ArdourWidgets::Prompter name_prompter (true);
string result; string result;
bool done = false; bool done = false;
@ -1896,7 +1896,7 @@ RouteUI::adjust_latency ()
} }
bool bool
RouteUI::process_save_template_prompter (ArdourPrompter& prompter, const std::string& dir) RouteUI::process_save_template_prompter (Prompter& prompter, const std::string& dir)
{ {
std::string path; std::string path;
std::string safe_name; std::string safe_name;
@ -1936,7 +1936,7 @@ RouteUI::save_as_template ()
return; return;
} }
ArdourPrompter prompter (true); // modal Prompter prompter (true); // modal
prompter.set_title (_("Save As Template")); prompter.set_title (_("Save As Template"));
prompter.set_prompt (_("Template name:")); prompter.set_prompt (_("Template name:"));

View file

@ -57,6 +57,7 @@ namespace Gtk {
namespace ArdourWidgets { namespace ArdourWidgets {
class ArdourButton; class ArdourButton;
class Prompter;
} }
class ArdourWindow; class ArdourWindow;
@ -242,7 +243,7 @@ public:
virtual void map_frozen (); virtual void map_frozen ();
void adjust_latency (); void adjust_latency ();
bool process_save_template_prompter (ArdourPrompter& prompter, const std::string& dir); bool process_save_template_prompter (ArdourWidgets::Prompter& prompter, const std::string& dir);
void save_as_template (); void save_as_template ();
static Gtkmm2ext::ActiveState solo_active_state (boost::shared_ptr<ARDOUR::Stripable>); static Gtkmm2ext::ActiveState solo_active_state (boost::shared_ptr<ARDOUR::Stripable>);

View file

@ -31,9 +31,9 @@
#include "ardour/tempo_map_importer.h" #include "ardour/tempo_map_importer.h"
#include "gtkmm2ext/utils.h" #include "gtkmm2ext/utils.h"
#include "widgets/prompter.h"
#include "gui_thread.h" #include "gui_thread.h"
#include "prompter.h"
#include "session_import_dialog.h" #include "session_import_dialog.h"
#include "pbd/i18n.h" #include "pbd/i18n.h"
@ -285,7 +285,7 @@ SessionImportDialog::end_dialog ()
std::pair<bool, string> std::pair<bool, string>
SessionImportDialog::open_rename_dialog (string text, string name) SessionImportDialog::open_rename_dialog (string text, string name)
{ {
ArdourPrompter prompter(true); ArdourWidgets::Prompter prompter(true);
string new_name; string new_name;
prompter.set_name ("Prompter"); prompter.set_name ("Prompter");

View file

@ -63,7 +63,6 @@
#include "ardour_ui.h" #include "ardour_ui.h"
#include "editing.h" #include "editing.h"
#include "gui_thread.h" #include "gui_thread.h"
#include "prompter.h"
#include "sfdb_ui.h" #include "sfdb_ui.h"
#include "editing.h" #include "editing.h"
#include "gain_meter.h" #include "gain_meter.h"

View file

@ -46,7 +46,6 @@
#include "widgets/focus_entry.h" #include "widgets/focus_entry.h"
#include "prompter.h"
#include "axis_view.h" #include "axis_view.h"
#include "enums.h" #include "enums.h"
#include "editing.h" #include "editing.h"

View file

@ -199,7 +199,6 @@ gtk2_ardour_sources = [
'processor_selection.cc', 'processor_selection.cc',
'patch_change_dialog.cc', 'patch_change_dialog.cc',
'progress_reporter.cc', 'progress_reporter.cc',
'prompter.cc',
'public_editor.cc', 'public_editor.cc',
'quantize_dialog.cc', 'quantize_dialog.cc',
'rc_option_editor.cc', 'rc_option_editor.cc',