mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 07:27:44 +01:00
[Summary] Added credits label in about dialog
This commit is contained in:
parent
ab51cc7f72
commit
d4b0e577f7
3 changed files with 41 additions and 1 deletions
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "pbd/file_utils.h"
|
||||
#include "ardour/filesystem_paths.h"
|
||||
#include "ardour/revision.h"
|
||||
|
||||
#include "i18n.h"
|
||||
#include "about_dialog.h"
|
||||
|
|
@ -34,6 +35,7 @@ About::About ()
|
|||
: WavesDialog (_("about_dialog.xml"), true, false)
|
||||
, _image_home ( get_v_box("image_home") )
|
||||
, _about_button ( get_waves_button ("about_button") )
|
||||
, _credits ( get_label("credits") )
|
||||
{
|
||||
set_modal (true);
|
||||
set_resizable (false);
|
||||
|
|
@ -47,11 +49,31 @@ About::About ()
|
|||
}
|
||||
}
|
||||
|
||||
init_credits ();
|
||||
_about_button.signal_clicked.connect (sigc::mem_fun (*this, &About::about_button_pressed));
|
||||
|
||||
show_all ();
|
||||
}
|
||||
|
||||
void
|
||||
About::init_credits ()
|
||||
{
|
||||
// Get version
|
||||
string revision = ARDOUR::revision;
|
||||
int pos = revision.rfind("-");
|
||||
revision.erase (pos, revision.size() - pos);
|
||||
|
||||
// Get current year
|
||||
// current date/time based on current system
|
||||
time_t now = time(0);
|
||||
// convert now to tm struct for UTC
|
||||
tm *timeinfo = gmtime(&now);
|
||||
string year = to_string(timeinfo->tm_year + 1900);
|
||||
|
||||
string text="Version : " + revision + "\nCopyright 2001-" + year + " Paul Devis\nWaves Audio Ltd. 2013-" + year;
|
||||
_credits.set_text (text);
|
||||
}
|
||||
|
||||
void
|
||||
About::on_esc_pressed ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,9 +35,11 @@ protected:
|
|||
private:
|
||||
void close_button_pressed (WavesButton*);
|
||||
void about_button_pressed (WavesButton*);
|
||||
void init_credits ();
|
||||
|
||||
Gtk::VBox& _image_home;
|
||||
WavesButton& _about_button;
|
||||
Gtk::Label& _credits;
|
||||
};
|
||||
|
||||
#endif /* __about_dialog_h__ */
|
||||
|
|
|
|||
|
|
@ -7,7 +7,23 @@
|
|||
<VBox id="image_home"
|
||||
x="0"
|
||||
y="0"/>
|
||||
|
||||
|
||||
<VBox x="293"
|
||||
y="270"
|
||||
width="200"
|
||||
height="60">
|
||||
<Label id="credits"
|
||||
width="200"
|
||||
height="60"
|
||||
text="-"
|
||||
justify="center"
|
||||
horzalignment="center"
|
||||
vertalignment="center"
|
||||
winfont ="Arial Bold 10"
|
||||
macfont ="Helvetica Bold 10"
|
||||
fgnormal="#FFFFFF"/>
|
||||
</VBox>
|
||||
|
||||
<Button id="about_button"
|
||||
winfont ="Arial Bold 10"
|
||||
macfont ="Helvetica Bold 10"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue