[Summary] About dialog rework

[Reviewed] GZharun
This commit is contained in:
Nikolay 2014-10-31 12:43:32 +02:00
parent c671e10d69
commit 12bc74714d
10 changed files with 1758 additions and 41 deletions

View file

@ -21,7 +21,8 @@
#include "ardour/filesystem_paths.h"
#include "i18n.h"
#include "about.h"
#include "about_dialog.h"
#include "license_dialog.h"
using namespace Gtk;
using namespace Gdk;
@ -30,42 +31,41 @@ using namespace ARDOUR;
using namespace PBD;
About::About ()
: ArdourDialog (_("About Tracks"))
: WavesDialog (_("about_dialog.xml"), true, false)
, _image_home ( get_v_box("image_home") )
, _about_button ( get_waves_button ("about_button") )
{
set_modal (true);
set_resizable (false);
get_vbox()->set_spacing (0);
string image_path;
if (find_file (ardour_data_search_path(), "splash.png", image_path)) {
Gtk::Image* image;
if ((image = manage (new Gtk::Image (image_path))) != 0) {
get_vbox()->pack_start (*image, false, false);
_image_home.pack_start (*image, false, false);
}
}
}
_about_button.signal_clicked.connect (sigc::mem_fun (*this, &About::about_button_pressed));
add_button("CLOSE", RESPONSE_OK);
set_default_response(RESPONSE_OK);
show_all ();
}
void
About::on_response (int response_id)
{
ArdourDialog::on_response (response_id);
switch (response_id) {
case RESPONSE_OK:
hide ();
break;
}
}
bool About::close_button_pressed (GdkEventButton*)
void
About::on_esc_pressed ()
{
hide();
}
void
About::about_button_pressed (WavesButton*)
{
LicenseDialog license_dialog;
license_dialog.set_position (WIN_POS_CENTER);
license_dialog.run ();
}
About::~About ()
{
}

View file

@ -0,0 +1,43 @@
/*
Copyright (C) 2014 Waves Audio Ltd.
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 __about_dialog_h__
#define __about_dialog_h__
#include "waves_dialog.h"
#include "ardour_button.h"
class About : public WavesDialog
{
public:
About();
~About();
protected:
void on_esc_pressed ();
private:
void close_button_pressed (WavesButton*);
void about_button_pressed (WavesButton*);
Gtk::VBox& _image_home;
WavesButton& _about_button;
};
#endif /* __about_dialog_h__ */

View file

@ -96,7 +96,7 @@
typedef uint64_t microseconds_t;
#include "about.h"
#include "about_dialog.h"
#include "actions.h"
#include "add_tracks_dialog.h"
#include "ambiguous_file_dialog.h"

View file

@ -67,7 +67,7 @@
#include "video_timeline.h"
#include "about.h"
#include "about_dialog.h"
#include "ardour_button.h"
#include "ardour_dialog.h"
#include "ardour_window.h"

View file

@ -0,0 +1,49 @@
/*
Copyright (C) 2014 Waves Audio Ltd.
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 "pbd/file_utils.h"
#include "ardour/filesystem_paths.h"
#include "i18n.h"
#include "license_dialog.h"
using namespace Gtk;
using namespace Gdk;
using namespace std;
using namespace ARDOUR;
using namespace PBD;
LicenseDialog::LicenseDialog ()
: WavesDialog (_("license_dialog.xml"), true, false)
{
set_modal (true);
set_resizable (false);
show_all ();
}
void
LicenseDialog::on_esc_pressed ()
{
hide();
}
LicenseDialog::~LicenseDialog ()
{
}

View file

@ -17,21 +17,19 @@
*/
#ifndef __ardour_gtk_about_h__
#define __ardour_gtk_about_h__
#ifndef __license_dialog_h__
#define __license_dialog_h__
#include "ardour_dialog.h"
#include "ardour_button.h"
#include "waves_dialog.h"
class About : public ArdourDialog
class LicenseDialog : public WavesDialog
{
public:
About();
~About();
LicenseDialog();
~LicenseDialog();
private:
bool close_button_pressed (GdkEventButton*);
void on_response (int);
protected:
void on_esc_pressed ();
};
#endif /* __ardour_gtk_about_h__ */
#endif /* __license_dialog_h__ */

View file

@ -269,6 +269,10 @@
43279460194F0062003C9FEA /* tracks_preferences.xml in Resources */ = {isa = PBXBuildFile; fileRef = 43279430194F0062003C9FEA /* tracks_preferences.xml */; };
4327947F194F009E003C9FEA /* tracks.menus.in in Resources */ = {isa = PBXBuildFile; fileRef = 43279475194F009E003C9FEA /* tracks.menus.in */; };
43B351ED194F04E00038C140 /* step_editing.bindings in Resources */ = {isa = PBXBuildFile; fileRef = 43B351C0194F04E00038C140 /* step_editing.bindings */; };
954DCFBD1A0239DA00B7160E /* about_dialog.cc in Sources */ = {isa = PBXBuildFile; fileRef = 954DCFBC1A0239DA00B7160E /* about_dialog.cc */; };
954DCFC11A023AAB00B7160E /* about_dialog.xml in Resources */ = {isa = PBXBuildFile; fileRef = 954DCFBF1A023AAB00B7160E /* about_dialog.xml */; };
954DCFC21A023AAB00B7160E /* license_dialog.xml in Resources */ = {isa = PBXBuildFile; fileRef = 954DCFC01A023AAB00B7160E /* license_dialog.xml */; };
95A134DE1A0239080008E3D6 /* license_dialog.cc in Sources */ = {isa = PBXBuildFile; fileRef = 95A134DD1A0239080008E3D6 /* license_dialog.cc */; };
CE1A907A199A37AE00ECA62B /* add_tracks_dialog.cc in Sources */ = {isa = PBXBuildFile; fileRef = CE1A9079199A37AE00ECA62B /* add_tracks_dialog.cc */; };
CE1C6DCE19879F04006BDB03 /* compact_meter_bridge.cc in Sources */ = {isa = PBXBuildFile; fileRef = CE1C6DCC19879F04006BDB03 /* compact_meter_bridge.cc */; };
CE1C6DCF19879F04006BDB03 /* compact_meter_strip.cc in Sources */ = {isa = PBXBuildFile; fileRef = CE1C6DCD19879F04006BDB03 /* compact_meter_strip.cc */; };
@ -281,7 +285,6 @@
CE294C6419CAD4E300D12768 /* meter_strip_gain_meter.xml in Resources */ = {isa = PBXBuildFile; fileRef = CE294C5C19CAD4E300D12768 /* meter_strip_gain_meter.xml */; };
CE294C6519CAD4E300D12768 /* mixer_bridge_view.xml in Resources */ = {isa = PBXBuildFile; fileRef = CE294C5D19CAD4E300D12768 /* mixer_bridge_view.xml */; };
CE294C6619CAD4E300D12768 /* time_info_box.xml in Resources */ = {isa = PBXBuildFile; fileRef = CE294C5E19CAD4E300D12768 /* time_info_box.xml */; };
CE294C7419CAD54500D12768 /* about.cc in Sources */ = {isa = PBXBuildFile; fileRef = CE294C6A19CAD54500D12768 /* about.cc */; };
CE294C7519CAD54500D12768 /* marker_io_dialog.cc in Sources */ = {isa = PBXBuildFile; fileRef = CE294C6B19CAD54500D12768 /* marker_io_dialog.cc */; };
CE294C7619CAD54500D12768 /* mixer_bridge_view.cc in Sources */ = {isa = PBXBuildFile; fileRef = CE294C6C19CAD54500D12768 /* mixer_bridge_view.cc */; };
CE294C7719CAD54500D12768 /* open_file_dialog_nix.cc in Sources */ = {isa = PBXBuildFile; fileRef = CE294C6D19CAD54500D12768 /* open_file_dialog_nix.cc */; };
@ -859,7 +862,6 @@
43279475194F009E003C9FEA /* tracks.menus.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = tracks.menus.in; path = ../tracks.menus.in; sourceTree = SOURCE_ROOT; };
4397595019CADAFC00740098 /* canvas.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = canvas.xcodeproj; path = ../../libs/canvas/macosx/canvas/canvas.xcodeproj; sourceTree = "<group>"; };
4397599619CB06AC00740098 /* gtkmm2ext.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = gtkmm2ext.xcodeproj; path = ../../libs/gtkmm2ext/macosx/gtkmm2ext/gtkmm2ext.xcodeproj; sourceTree = "<group>"; };
43B350F0194F04E00038C140 /* about.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = about.h; path = ../about.h; sourceTree = SOURCE_ROOT; };
43B350F1194F04E00038C140 /* actions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = actions.h; path = ../actions.h; sourceTree = SOURCE_ROOT; };
43B350F2194F04E00038C140 /* add_route_dialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = add_route_dialog.h; path = ../add_route_dialog.h; sourceTree = SOURCE_ROOT; };
43B350F3194F04E00038C140 /* add_video_dialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = add_video_dialog.h; path = ../add_video_dialog.h; sourceTree = SOURCE_ROOT; };
@ -1113,6 +1115,12 @@
43B351EE194F12FB0038C140 /* waves_audiobackend.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = waves_audiobackend.xcodeproj; path = ../../libs/backends/wavesaudio/macosx/waves_audiobackend.xcodeproj; sourceTree = "<group>"; };
43B351F4194F130C0038C140 /* libardour.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libardour.xcodeproj; path = ../../libs/ardour/macosx/libardour.xcodeproj; sourceTree = "<group>"; };
43B351FA194F131D0038C140 /* pbd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = pbd.xcodeproj; path = ../../libs/pbd/macosx/pbd.xcodeproj; sourceTree = "<group>"; };
954DCFBC1A0239DA00B7160E /* about_dialog.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = about_dialog.cc; path = ../about_dialog.cc; sourceTree = "<group>"; };
954DCFBE1A0239EC00B7160E /* about_dialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = about_dialog.h; path = ../about_dialog.h; sourceTree = "<group>"; };
954DCFBF1A023AAB00B7160E /* about_dialog.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = about_dialog.xml; sourceTree = "<group>"; };
954DCFC01A023AAB00B7160E /* license_dialog.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = license_dialog.xml; sourceTree = "<group>"; };
95A134DD1A0239080008E3D6 /* license_dialog.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = license_dialog.cc; path = ../license_dialog.cc; sourceTree = "<group>"; };
95A134DF1A02391F0008E3D6 /* license_dialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = license_dialog.h; path = ../license_dialog.h; sourceTree = "<group>"; };
CE1A9079199A37AE00ECA62B /* add_tracks_dialog.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = add_tracks_dialog.cc; path = ../add_tracks_dialog.cc; sourceTree = "<group>"; };
CE1A907E199A37BF00ECA62B /* add_tracks_dialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = add_tracks_dialog.h; path = ../add_tracks_dialog.h; sourceTree = "<group>"; };
CE1C6DCC19879F04006BDB03 /* compact_meter_bridge.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = compact_meter_bridge.cc; path = ../compact_meter_bridge.cc; sourceTree = "<group>"; };
@ -1129,7 +1137,6 @@
CE294C5C19CAD4E300D12768 /* meter_strip_gain_meter.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = meter_strip_gain_meter.xml; sourceTree = "<group>"; };
CE294C5D19CAD4E300D12768 /* mixer_bridge_view.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = mixer_bridge_view.xml; sourceTree = "<group>"; };
CE294C5E19CAD4E300D12768 /* time_info_box.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = time_info_box.xml; sourceTree = "<group>"; };
CE294C6A19CAD54500D12768 /* about.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = about.cc; path = ../about.cc; sourceTree = "<group>"; };
CE294C6B19CAD54500D12768 /* marker_io_dialog.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = marker_io_dialog.cc; path = ../marker_io_dialog.cc; sourceTree = "<group>"; };
CE294C6C19CAD54500D12768 /* mixer_bridge_view.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mixer_bridge_view.cc; path = ../mixer_bridge_view.cc; sourceTree = "<group>"; };
CE294C6D19CAD54500D12768 /* open_file_dialog_nix.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = open_file_dialog_nix.cc; path = ../open_file_dialog_nix.cc; sourceTree = "<group>"; };
@ -1200,7 +1207,8 @@
43279040194EFF38003C9FEA /* source */ = {
isa = PBXGroup;
children = (
CE294C6A19CAD54500D12768 /* about.cc */,
954DCFBC1A0239DA00B7160E /* about_dialog.cc */,
95A134DD1A0239080008E3D6 /* license_dialog.cc */,
CE294C6B19CAD54500D12768 /* marker_io_dialog.cc */,
CE294C6C19CAD54500D12768 /* mixer_bridge_view.cc */,
CE294C6D19CAD54500D12768 /* open_file_dialog_nix.cc */,
@ -1802,6 +1810,8 @@
43279429194F0062003C9FEA /* ui */ = {
isa = PBXGroup;
children = (
954DCFBF1A023AAB00B7160E /* about_dialog.xml */,
954DCFC01A023AAB00B7160E /* license_dialog.xml */,
CE294C5719CAD4E300D12768 /* add_tracks_dialog.xml */,
CE294C5819CAD4E300D12768 /* compact_meter_bridge.xml */,
CE294C5919CAD4E300D12768 /* compact_meter_strip.xml */,
@ -1844,6 +1854,8 @@
43279480194F00CB003C9FEA /* headers */ = {
isa = PBXGroup;
children = (
954DCFBE1A0239EC00B7160E /* about_dialog.h */,
95A134DF1A02391F0008E3D6 /* license_dialog.h */,
CE294C7E19CAD58500D12768 /* ardour_dropdown.h */,
CE294C7F19CAD58500D12768 /* marker_io_dialog.h */,
CE294C8019CAD58500D12768 /* mixer_bridge_view.h */,
@ -1860,7 +1872,6 @@
CEAFC777195445D90016ACF0 /* visibility.h */,
43B351D4194F04E00038C140 /* tracks_control_panel.h */,
43B351D5194F04E00038C140 /* tracks_control_panel.logic.h */,
43B350F0194F04E00038C140 /* about.h */,
43B350F1194F04E00038C140 /* actions.h */,
43B350F2194F04E00038C140 /* add_route_dialog.h */,
43B350F3194F04E00038C140 /* add_video_dialog.h */,
@ -2322,6 +2333,7 @@
43279376194F003A003C9FEA /* media_button.png in Resources */,
43279377194F003A003C9FEA /* media_button_active.png in Resources */,
43279378194F003A003C9FEA /* media_button_prelight.png in Resources */,
954DCFC21A023AAB00B7160E /* license_dialog.xml in Resources */,
43279379194F003A003C9FEA /* meter_bridge_on.png in Resources */,
4327937A194F003A003C9FEA /* meter_bridge_on_active.png in Resources */,
4327937B194F003A003C9FEA /* meter_bridge_on_prelight.png in Resources */,
@ -2390,6 +2402,7 @@
432793BA194F003A003C9FEA /* soloed-by-others.png in Resources */,
432793BB194F003A003C9FEA /* step-editing.png in Resources */,
432793BC194F003A003C9FEA /* strip_width.png in Resources */,
954DCFC11A023AAB00B7160E /* about_dialog.xml in Resources */,
432793BD194F003A003C9FEA /* systemlock.png in Resources */,
432793BE194F003A003C9FEA /* tav_exp.png in Resources */,
432793BF194F003A003C9FEA /* tav_shrink.png in Resources */,
@ -2542,9 +2555,10 @@
CEB0A9F219583F96006D269A /* session_close_dialog.cc in Sources */,
CE1C6DCE19879F04006BDB03 /* compact_meter_bridge.cc in Sources */,
CE1C6DCF19879F04006BDB03 /* compact_meter_strip.cc in Sources */,
95A134DE1A0239080008E3D6 /* license_dialog.cc in Sources */,
CE1C6DE01987A924006BDB03 /* master_bus_ui.cc in Sources */,
954DCFBD1A0239DA00B7160E /* about_dialog.cc in Sources */,
CE1A907A199A37AE00ECA62B /* add_tracks_dialog.cc in Sources */,
CE294C7419CAD54500D12768 /* about.cc in Sources */,
CE294C7519CAD54500D12768 /* marker_io_dialog.cc in Sources */,
CE294C7619CAD54500D12768 /* mixer_bridge_view.cc in Sources */,
CE294C7719CAD54500D12768 /* open_file_dialog_nix.cc in Sources */,

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<Dialog title="About" resizeable="False">
<Layout width="787"
height="417">
<VBox id="image_home"
x="0"
y="0"/>
<Button id="about_button"
winfont ="Arial Bold 10"
macfont ="Helvetica Bold 10"
text="ABOUT"
fgnormal="#6D6E72"
bgnormal="#CACAC5"
fgactive="#EDECE8"
bgactive="#6D6E72"
borderwidth="0 0 0 0"
bordercolor="#6D6E72"
width="69"
height="22"
x="360"
y="325"/>
</Layout>
</Dialog>

File diff suppressed because it is too large Load diff

View file

@ -32,7 +32,7 @@ gtk2_ardour_sources = [
'waves_zoom_control.cc',
'waves_ui.cc',
'waves_grid.cc',
'about.cc',
'about_dialog.cc',
'actions.cc',
'add_route_dialog.cc',
'add_tracks_dialog.cc',
@ -132,6 +132,7 @@ gtk2_ardour_sources = [
'latency_gui.cc',
'led.cc',
'level_meter.cc',
'license_dialog.cc',
'location_ui.cc',
'main.cc',
'main_clock.cc',