diff options
author | André Nusser <andre.nusser@googlemail.com> | 2017-04-15 21:23:08 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2017-04-15 21:23:08 +0200 |
commit | 22cece741c2159b04f3de40d1f8eabc61da1e497 (patch) | |
tree | 2101eb8911b1d101886a47b39617a0727986c916 /plugingui | |
parent | 84954cd78d6e0fa8eff24e7a0558f48748e4ba47 (diff) |
Add GPL to resources instead of using getGPLText function.
Diffstat (limited to 'plugingui')
-rw-r--r-- | plugingui/Makefile.am | 2 | ||||
-rw-r--r-- | plugingui/mainwindow.cc | 25 | ||||
-rw-r--r-- | plugingui/mainwindow.h | 4 |
3 files changed, 5 insertions, 26 deletions
diff --git a/plugingui/Makefile.am b/plugingui/Makefile.am index 83a4411..1dcff20 100644 --- a/plugingui/Makefile.am +++ b/plugingui/Makefile.am @@ -2,7 +2,7 @@ noinst_PROGRAMS = plugingui rcgen noinst_LTLIBRARIES = libdggui.la resource_data.cc : rcgen - (cd resources; ../rcgen * > ../resource_data.cc) + (cd resources; ../rcgen * ../../COPYING > ../resource_data.cc) libdggui_la_CPPFLAGS = \ $(GUI_CPPFLAGS) \ diff --git a/plugingui/mainwindow.cc b/plugingui/mainwindow.cc index 5c729b0..cbc3265 100644 --- a/plugingui/mainwindow.cc +++ b/plugingui/mainwindow.cc @@ -32,29 +32,6 @@ #include <string> -namespace -{ - -std::string getGPLText() -{ - return - "DrumGizmo is free software; you can redistribute it and/or modify " - "it under the terms of the GNU Lesser General Public License as published by " - "the Free Software Foundation; either version 3 of the License, or " - "(at your option) any later version.\n" - "\n" - "DrumGizmo 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 Lesser General Public License for more details.\n" - "\n" - "You should have received a copy of the GNU Lesser General Public License " - "along with DrumGizmo; if not, write to the Free Software " - "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.\n"; -} - -} // anonymous namespace - namespace GUI { @@ -74,7 +51,7 @@ MainWindow::MainWindow(Settings& settings, void* native_window) tabs.addTab("Main", &main_tab); tabs.addTab("GPL", &gpl_text_field); - gpl_text_field.setText(getGPLText()); + gpl_text_field.setText(gpl.data()); gpl_text_field.adaptTextOnResize(true); gpl_text_field.setReadOnly(true); } diff --git a/plugingui/mainwindow.h b/plugingui/mainwindow.h index 4b5dad1..a20f9dc 100644 --- a/plugingui/mainwindow.h +++ b/plugingui/mainwindow.h @@ -60,7 +60,7 @@ private: void repaintEvent(RepaintEvent* repaintEvent) override final; TabWidget tabs{this}; - + MainTab main_tab{this}; // TODO use some nice textfield widget here TextEdit gpl_text_field{&tabs}; @@ -77,6 +77,8 @@ private: Settings& settings; SettingsNotifier settings_notifier{settings}; + + Resource gpl{":../../COPYING"}; }; } // GUI:: |