2 Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <wx/hyperlink.h>
21 #include "update_dialog.h"
26 UpdateDialog::UpdateDialog (wxWindow* parent, string stable, string test)
27 : wxDialog (parent, wxID_ANY, _("Update"))
29 wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL);
31 wxStaticText* message;
34 message = new wxStaticText (this, wxID_ANY, _("A new version of DCP-o-matic is available."));
36 message = new wxStaticText (this, wxID_ANY, _("New versions of DCP-o-matic are available."));
39 overall_sizer->Add (message, 1, wxTOP | wxLEFT | wxRIGHT, DCPOMATIC_DIALOG_BORDER);
41 wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
43 add_label_to_sizer (table, this, _("Stable version ") + std_to_wx (stable), true);
44 wxHyperlinkCtrl* h = new wxHyperlinkCtrl (this, wxID_ANY, "dcpomatic.com/download", "http://dcpomatic.com/download");
48 add_label_to_sizer (table, this, _("Test version ") + std_to_wx (test), true);
49 wxHyperlinkCtrl* h = new wxHyperlinkCtrl (this, wxID_ANY, "dcpomatic.com/test-download", "http://dcpomatic.com/test-download");
53 overall_sizer->Add (table, 1, wxEXPAND | wxLEFT | wxRIGHT, DCPOMATIC_DIALOG_BORDER);
55 wxSizer* buttons = CreateButtonSizer (wxOK);
57 overall_sizer->Add (buttons, 1, wxEXPAND | wxALL);
60 SetSizerAndFit (overall_sizer);