From aa049ff20314d8e1f06ead249950e3a9af1419bd Mon Sep 17 00:00:00 2001 From: zvon Date: Wed, 1 Apr 2020 16:07:37 +0200 Subject: [PATCH] Reorganize gtk and localization files --- Makefile | 24 ++++++++++---------- databasewindow.cpp => gtk/databasewindow.cpp | 8 +++---- databasewindow.hpp => gtk/databasewindow.hpp | 0 gtkfunctions.cpp => gtk/gtkfunctions.cpp | 6 ++--- gtkfunctions.hpp => gtk/gtkfunctions.hpp | 0 gui.cpp => gtk/gui.cpp | 8 +++---- mainwindow.cpp => gtk/mainwindow.cpp | 8 +++---- mainwindow.hpp => gtk/mainwindow.hpp | 2 +- progresswindow.cpp => gtk/progresswindow.cpp | 4 ++-- progresswindow.hpp => gtk/progresswindow.hpp | 0 searchwindow.cpp => gtk/searchwindow.cpp | 6 ++--- searchwindow.hpp => gtk/searchwindow.hpp | 0 seasonwindow.cpp => gtk/seasonwindow.cpp | 4 ++-- seasonwindow.hpp => gtk/seasonwindow.hpp | 0 progress.cpp | 2 +- cs.po => translations/cs.po | 0 en_US.po => translations/en_US.po | 0 17 files changed, 36 insertions(+), 36 deletions(-) rename databasewindow.cpp => gtk/databasewindow.cpp (98%) rename databasewindow.hpp => gtk/databasewindow.hpp (100%) rename gtkfunctions.cpp => gtk/gtkfunctions.cpp (95%) rename gtkfunctions.hpp => gtk/gtkfunctions.hpp (100%) rename gui.cpp => gtk/gui.cpp (90%) rename mainwindow.cpp => gtk/mainwindow.cpp (99%) rename mainwindow.hpp => gtk/mainwindow.hpp (98%) rename progresswindow.cpp => gtk/progresswindow.cpp (90%) rename progresswindow.hpp => gtk/progresswindow.hpp (100%) rename searchwindow.cpp => gtk/searchwindow.cpp (98%) rename searchwindow.hpp => gtk/searchwindow.hpp (100%) rename seasonwindow.cpp => gtk/seasonwindow.cpp (97%) rename seasonwindow.hpp => gtk/seasonwindow.hpp (100%) rename cs.po => translations/cs.po (100%) rename en_US.po => translations/en_US.po (100%) diff --git a/Makefile b/Makefile index 35d110c..5237c38 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ default: tv_rename .PHONY: clean clean: - rm -f *.o tv_rename tv_rename_gui + rm -Rf *.o tv_rename tv_rename_gui locale .PHONY: install install: tv_rename @@ -81,26 +81,26 @@ tv_rename_gui: $(GUIOBJECTS) $(LOCALES) strip tv_rename_gui filesystem_u_gui.o: unix/filesystem.cpp - $(CXX) $(CFLAGS) -c unix/filesystem.cpp -o filesystem_u_gui.o -DGUI + $(CXX) $(CFLAGS) -c $^ -o filesystem_u_gui.o -DGUI functions_gui.o: functions.cpp - $(CXX) $(CFLAGS) -c functions.cpp -o functions_gui.o -DGUI + $(CXX) $(CFLAGS) -c $^ -o functions_gui.o -DGUI tv_rename_gui.o: tv_rename.cpp - $(CXX) $(CFLAGS) -c tv_rename.cpp -o tv_rename_gui.o -DGUI -gui.o: gui.cpp + $(CXX) $(CFLAGS) -c $^ -o tv_rename_gui.o -DGUI +gui.o: gtk/gui.cpp $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI -mainwindow.o: mainwindow.cpp +mainwindow.o: gtk/mainwindow.cpp $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI -seasonwindow.o: seasonwindow.cpp +seasonwindow.o: gtk/seasonwindow.cpp $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI -databasewindow.o: databasewindow.cpp +databasewindow.o: gtk/databasewindow.cpp $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI -searchwindow.o: searchwindow.cpp +searchwindow.o: gtk/searchwindow.cpp $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI -gtkfunctions.o: gtkfunctions.cpp +gtkfunctions.o: gtk/gtkfunctions.cpp $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI progress_gui.o: progress.cpp $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI -progresswindow.o: progresswindow.cpp +progresswindow.o: gtk/progresswindow.cpp $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI .PHONY: windows @@ -138,6 +138,6 @@ tv_rename_stringtable.res: tv_rename_stringtable.rc locale/%/LC_MESSAGES: mkdir -p $@ -locale/%/LC_MESSAGES/tv_rename.mo: %.po locale/%/LC_MESSAGES +locale/%/LC_MESSAGES/tv_rename.mo: translations/%.po locale/%/LC_MESSAGES msgfmt -c $< -o $<.mo mv $<.mo $@ diff --git a/databasewindow.cpp b/gtk/databasewindow.cpp similarity index 98% rename from databasewindow.cpp rename to gtk/databasewindow.cpp index cee6d8d..4ecaffd 100644 --- a/databasewindow.cpp +++ b/gtk/databasewindow.cpp @@ -8,12 +8,12 @@ #include #include "databasewindow.hpp" -#include "filesystem.hpp" -#include "functions.hpp" #include "gtkfunctions.hpp" #include "progresswindow.hpp" -#include "resources_linux.h" -#include "tv_rename.hpp" +#include "../filesystem.hpp" +#include "../functions.hpp" +#include "../resources_linux.h" +#include "../tv_rename.hpp" DatabaseWindow::~DatabaseWindow() { auto children = get_children(); diff --git a/databasewindow.hpp b/gtk/databasewindow.hpp similarity index 100% rename from databasewindow.hpp rename to gtk/databasewindow.hpp diff --git a/gtkfunctions.cpp b/gtk/gtkfunctions.cpp similarity index 95% rename from gtkfunctions.cpp rename to gtk/gtkfunctions.cpp index 9d5a9ec..4080297 100644 --- a/gtkfunctions.cpp +++ b/gtk/gtkfunctions.cpp @@ -3,9 +3,9 @@ #include #include -#include "functions.hpp" -#include "resources_linux.h" -#include "tv_rename.hpp" +#include "../functions.hpp" +#include "../resources_linux.h" +#include "../tv_rename.hpp" void searchShow( Gtk::Entry *entry_show, Gtk::ComboBox *combo_possible, const Gtk::TreeModelColumn< std::string > &col_show, diff --git a/gtkfunctions.hpp b/gtk/gtkfunctions.hpp similarity index 100% rename from gtkfunctions.hpp rename to gtk/gtkfunctions.hpp diff --git a/gui.cpp b/gtk/gui.cpp similarity index 90% rename from gui.cpp rename to gtk/gui.cpp index c1e68b7..aceb7d8 100644 --- a/gui.cpp +++ b/gtk/gui.cpp @@ -1,14 +1,14 @@ -#include "functions.hpp" #include #include #include #include #include -#include "filesystem.hpp" #include "mainwindow.hpp" -#include "resources_linux.h" -#include "tv_rename.hpp" +#include "../filesystem.hpp" +#include "../functions.hpp" +#include "../resources_linux.h" +#include "../tv_rename.hpp" #define API_KEY "42B66F5E-C6BF-423F-ADF9-CC97163472F6" #define DOMAIN "tv_rename" diff --git a/mainwindow.cpp b/gtk/mainwindow.cpp similarity index 99% rename from mainwindow.cpp rename to gtk/mainwindow.cpp index 1bcbf80..88c3ba0 100644 --- a/mainwindow.cpp +++ b/gtk/mainwindow.cpp @@ -9,13 +9,13 @@ #include #include "databasewindow.hpp" -#include "filesystem.hpp" -#include "functions.hpp" #include "gtkfunctions.hpp" #include "mainwindow.hpp" #include "progresswindow.hpp" -#include "resources_linux.h" -#include "tv_rename.hpp" +#include "../filesystem.hpp" +#include "../functions.hpp" +#include "../resources_linux.h" +#include "../tv_rename.hpp" void MainWindow::chooseFile() { // create a dialog for choosing directory diff --git a/mainwindow.hpp b/gtk/mainwindow.hpp similarity index 98% rename from mainwindow.hpp rename to gtk/mainwindow.hpp index 2930b28..9b47b8b 100644 --- a/mainwindow.hpp +++ b/gtk/mainwindow.hpp @@ -14,8 +14,8 @@ #include #include -#include "network.hpp" #include "seasonwindow.hpp" +#include "../network.hpp" class MainWindow : public Gtk::Window { public: diff --git a/progresswindow.cpp b/gtk/progresswindow.cpp similarity index 90% rename from progresswindow.cpp rename to gtk/progresswindow.cpp index 7b8fdaa..b4804d9 100644 --- a/progresswindow.cpp +++ b/gtk/progresswindow.cpp @@ -1,9 +1,9 @@ #include #include -#include "functions.hpp" #include "progresswindow.hpp" -#include "resources_linux.h" +#include "../functions.hpp" +#include "../resources_linux.h" ProgressWindow::ProgressWindow() { set_title( _( GUI_WINDOW_PROGRESS ) ); diff --git a/progresswindow.hpp b/gtk/progresswindow.hpp similarity index 100% rename from progresswindow.hpp rename to gtk/progresswindow.hpp diff --git a/searchwindow.cpp b/gtk/searchwindow.cpp similarity index 98% rename from searchwindow.cpp rename to gtk/searchwindow.cpp index 8f5127c..d8b0db5 100644 --- a/searchwindow.cpp +++ b/gtk/searchwindow.cpp @@ -4,11 +4,11 @@ #include #include -#include "functions.hpp" #include "gtkfunctions.hpp" -#include "resources_linux.h" #include "searchwindow.hpp" -#include "tv_rename.hpp" +#include "../functions.hpp" +#include "../resources_linux.h" +#include "../tv_rename.hpp" void SearchWindow::search() { language_code = diff --git a/searchwindow.hpp b/gtk/searchwindow.hpp similarity index 100% rename from searchwindow.hpp rename to gtk/searchwindow.hpp diff --git a/seasonwindow.cpp b/gtk/seasonwindow.cpp similarity index 97% rename from seasonwindow.cpp rename to gtk/seasonwindow.cpp index 26c105c..df69c00 100644 --- a/seasonwindow.cpp +++ b/gtk/seasonwindow.cpp @@ -1,8 +1,8 @@ #include "seasonwindow.hpp" #include -#include "functions.hpp" -#include "resources_linux.h" +#include "../functions.hpp" +#include "../resources_linux.h" void SeasonWindow::confirm() { // go through all checkbuttons and save numbers diff --git a/seasonwindow.hpp b/gtk/seasonwindow.hpp similarity index 100% rename from seasonwindow.hpp rename to gtk/seasonwindow.hpp diff --git a/progress.cpp b/progress.cpp index d23034a..d461b19 100644 --- a/progress.cpp +++ b/progress.cpp @@ -17,7 +17,7 @@ #else // UNIX #ifdef GUI -#include "progresswindow.hpp" +#include "gtk/progresswindow.hpp" #endif // GUI #include diff --git a/cs.po b/translations/cs.po similarity index 100% rename from cs.po rename to translations/cs.po diff --git a/en_US.po b/translations/en_US.po similarity index 100% rename from en_US.po rename to translations/en_US.po