-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
207 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
src/controllers/accountviewcontroller.cpp | ||
src/controllers/transactiondialogcontroller.cpp | ||
src/models/transaction.cpp | ||
src/ui/application.cpp | ||
src/ui/controls/comboboxdialog.cpp | ||
src/ui/controls/entrydialog.cpp | ||
src/ui/controls/grouprow.cpp | ||
src/ui/controls/transactionrow.cpp | ||
src/ui/views/accountview.cpp | ||
src/ui/views/groupdialog.cpp | ||
src/ui/views/mainwindow.cpp | ||
src/ui/views/preferencesdialog.cpp | ||
src/ui/views/shortcutsdialog.cpp | ||
src/ui/views/transactiondialog.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
i18n = import('i18n') | ||
# define GETTEXT_PACKAGE and LOCALE_DIR | ||
add_project_arguments('-DGETTEXT_PACKAGE="' + meson.project_name() + '"', language:'cpp') | ||
add_project_arguments('-DLOCALE_DIR="' + join_paths(get_option('prefix'), get_option('localedir')) + '"', language:'cpp') | ||
i18n.gettext(meson.project_name()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include "stringhelpers.hpp" | ||
|
||
using namespace NickvisionMoney::Helpers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
#include <stdexcept> | ||
#include <string> | ||
|
||
namespace NickvisionMoney::Helpers::StringHelpers | ||
{ | ||
/** | ||
* Formats a string similarly to sprintf in C | ||
* | ||
* @param format The source string | ||
* @param args The arguments to be added | ||
* @returns The formatted string | ||
*/ | ||
template <typename... Args> | ||
std::string format(const std::string& format, Args... args) | ||
{ | ||
int size_s{ std::snprintf(nullptr, 0, format.c_str(), args...) + 1 }; // Extra space for '\0' | ||
if (size_s <= 0) | ||
{ | ||
throw std::runtime_error("Error during formatting."); | ||
} | ||
size_t size{ static_cast<size_t>(size_s) }; | ||
std::unique_ptr<char[]> buf{ new char[size] }; | ||
std::snprintf(buf.get(), size, format.c_str(), args...); | ||
return { buf.get(), buf.get() + size - 1 }; // We don't want the '\0' inside | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#pragma once | ||
|
||
#include <libintl.h> | ||
|
||
#define _(String) gettext(String) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.