Add Windows specific code
This commit is contained in:
parent
34f311fa9f
commit
a7c16a7ef9
10
Makefile
Normal file → Executable file
10
Makefile
Normal file → Executable file
|
@ -3,8 +3,13 @@ CXXFLAGS+=-I./lib/wxsqlite3-1.9.9/include
|
|||
CXXFLAGS+=-I./lib/freechart/include
|
||||
|
||||
LDFLAGS+=`wx-config --libs`
|
||||
ifdef WIN32
|
||||
LDFLAGS+=-L./lib/wxsqlite3-1.9.9/lib/ -lwxcode_msw_wxsqlite3-2.8
|
||||
LDFLAGS+=-L./lib/freechart/lib -lwxcode_msw_freechart-2.8
|
||||
else
|
||||
LDFLAGS+=-L./lib/wxsqlite3-1.9.9/lib/ -lwxcode_gtk2u_wxsqlite3-2.8
|
||||
LDFLAGS+=-L./lib/freechart/lib -lwxcode_gtk2u_freechart-2.8
|
||||
endif
|
||||
|
||||
CXX=$(PREFIX)g++
|
||||
|
||||
|
@ -37,5 +42,10 @@ kc: $(OBJS)
|
|||
generate_locales:
|
||||
./tools/generate_locales.sh
|
||||
|
||||
ifdef WIN32
|
||||
package:
|
||||
./tools/package_win32.sh
|
||||
else
|
||||
package:
|
||||
./tools/package.sh
|
||||
endif
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-01-25 14:06+0100\n"
|
||||
"POT-Creation-Date: 2011-02-05 14:48+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -54,7 +54,7 @@ msgstr ""
|
|||
msgid "About"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/SearchPanel.cpp:90 src/view/grid/GridAccount.cpp:64
|
||||
#: src/view/SearchPanel.cpp:90 src/view/grid/GridAccount.cpp:67
|
||||
msgid "Account"
|
||||
msgstr ""
|
||||
|
||||
|
@ -91,7 +91,7 @@ msgstr ""
|
|||
msgid "Are you sure want to delete "
|
||||
msgstr ""
|
||||
|
||||
#: src/view/PreferencesPanel.cpp:657 src/view/grid/GridAccount.cpp:825
|
||||
#: src/view/PreferencesPanel.cpp:657 src/view/grid/GridAccount.cpp:828
|
||||
msgid "Are you sure want to delete : \n"
|
||||
msgstr ""
|
||||
|
||||
|
@ -112,11 +112,11 @@ msgstr ""
|
|||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/grid/GridAccount.cpp:1256 src/view/grid/GridAccount.cpp:1263
|
||||
#: src/view/grid/GridAccount.cpp:1259 src/view/grid/GridAccount.cpp:1266
|
||||
msgid "Cannot group these operations"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/grid/GridAccount.cpp:1382 src/view/grid/GridAccount.cpp:1388
|
||||
#: src/view/grid/GridAccount.cpp:1385 src/view/grid/GridAccount.cpp:1391
|
||||
msgid "Cannot ungroup these operations"
|
||||
msgstr ""
|
||||
|
||||
|
@ -124,7 +124,7 @@ msgstr ""
|
|||
msgid "Categories"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/SearchPanel.cpp:88 src/view/grid/GridAccount.cpp:64
|
||||
#: src/view/SearchPanel.cpp:88 src/view/grid/GridAccount.cpp:67
|
||||
msgid "Category"
|
||||
msgstr ""
|
||||
|
||||
|
@ -164,7 +164,7 @@ msgstr ""
|
|||
msgid "Cost repartition"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/grid/GridAccount.cpp:64
|
||||
#: src/view/grid/GridAccount.cpp:67
|
||||
msgid "Credit"
|
||||
msgstr ""
|
||||
|
||||
|
@ -180,7 +180,7 @@ msgstr ""
|
|||
msgid "Current value"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/grid/GridAccount.cpp:64
|
||||
#: src/view/grid/GridAccount.cpp:67
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
|
||||
|
@ -192,7 +192,7 @@ msgstr ""
|
|||
msgid "Date to"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/grid/GridAccount.cpp:64
|
||||
#: src/view/grid/GridAccount.cpp:67
|
||||
msgid "Debit"
|
||||
msgstr ""
|
||||
|
||||
|
@ -209,7 +209,7 @@ msgstr ""
|
|||
msgid "Descending"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/SearchPanel.cpp:85 src/view/grid/GridAccount.cpp:64
|
||||
#: src/view/SearchPanel.cpp:85 src/view/grid/GridAccount.cpp:67
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
|
@ -225,8 +225,8 @@ msgstr ""
|
|||
#: src/view/SearchPanel.cpp:142 src/view/SearchPanel.cpp:152
|
||||
#: src/view/SearchPanel.cpp:166 src/view/SearchPanel.cpp:177
|
||||
#: src/view/UsersDialog.cpp:88 src/view/UsersDialog.cpp:118
|
||||
#: src/view/grid/GridAccount.cpp:1256 src/view/grid/GridAccount.cpp:1263
|
||||
#: src/view/grid/GridAccount.cpp:1382 src/view/grid/GridAccount.cpp:1388
|
||||
#: src/view/grid/GridAccount.cpp:1259 src/view/grid/GridAccount.cpp:1266
|
||||
#: src/view/grid/GridAccount.cpp:1385 src/view/grid/GridAccount.cpp:1391
|
||||
#: src/view/grid/wxGridCellFormulaEditor.cpp:69
|
||||
msgid "Error"
|
||||
msgstr ""
|
||||
|
@ -240,7 +240,7 @@ msgid "Final value"
|
|||
msgstr ""
|
||||
|
||||
#: src/controller/KissCount.cpp:359 src/model/Database.cpp:331
|
||||
#: src/view/SearchPanel.cpp:76 src/view/grid/GridAccount.cpp:323
|
||||
#: src/view/SearchPanel.cpp:76 src/view/grid/GridAccount.cpp:326
|
||||
msgid "Fix"
|
||||
msgstr ""
|
||||
|
||||
|
@ -520,58 +520,58 @@ msgstr ""
|
|||
msgid "Users"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/grid/GridAccount.cpp:1033
|
||||
#: src/view/grid/GridAccount.cpp:1036
|
||||
msgid "Warning"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/grid/GridAccount.cpp:1033
|
||||
#: src/view/grid/GridAccount.cpp:1036
|
||||
msgid "You made a debit on a blocked account"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/wxUI.cpp:97
|
||||
#: src/view/wxUI.cpp:99
|
||||
msgid "april"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/wxUI.cpp:101
|
||||
#: src/view/wxUI.cpp:103
|
||||
msgid "august"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/wxUI.cpp:105
|
||||
#: src/view/wxUI.cpp:107
|
||||
msgid "december"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/wxUI.cpp:95
|
||||
#: src/view/wxUI.cpp:97
|
||||
msgid "february"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/wxUI.cpp:94
|
||||
#: src/view/wxUI.cpp:96
|
||||
msgid "january"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/wxUI.cpp:100
|
||||
#: src/view/wxUI.cpp:102
|
||||
msgid "july"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/wxUI.cpp:99
|
||||
#: src/view/wxUI.cpp:101
|
||||
msgid "june"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/wxUI.cpp:96
|
||||
#: src/view/wxUI.cpp:98
|
||||
msgid "march"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/wxUI.cpp:98
|
||||
#: src/view/wxUI.cpp:100
|
||||
msgid "may"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/wxUI.cpp:104
|
||||
#: src/view/wxUI.cpp:106
|
||||
msgid "november"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/wxUI.cpp:103
|
||||
#: src/view/wxUI.cpp:105
|
||||
msgid "october"
|
||||
msgstr ""
|
||||
|
||||
#: src/view/wxUI.cpp:102
|
||||
#: src/view/wxUI.cpp:104
|
||||
msgid "september"
|
||||
msgstr ""
|
||||
|
|
28
src/sha1.cpp
28
src/sha1.cpp
|
@ -28,9 +28,35 @@
|
|||
/* this is only to get definitions for memcpy(), ntohl() and htonl() */
|
||||
//#include "../git-compat-util.h"
|
||||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
#include "sha1.h"
|
||||
|
||||
#ifndef WIN32
|
||||
#include <arpa/inet.h>
|
||||
#else
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
|
||||
#define htons(n) (n)
|
||||
#define ntohs(n) (n)
|
||||
#define htonl(n) (n)
|
||||
#define ntohl(n) (n)
|
||||
|
||||
#else
|
||||
|
||||
#define htons(n) (((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8))
|
||||
#define ntohs(n) (((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8))
|
||||
|
||||
#define htonl(n) (((((unsigned long)(n) & 0xFF)) << 24) | \
|
||||
((((unsigned long)(n) & 0xFF00)) << 8) | \
|
||||
((((unsigned long)(n) & 0xFF0000)) >> 8) | \
|
||||
((((unsigned long)(n) & 0xFF000000)) >> 24))
|
||||
|
||||
#define ntohl(n) (((((unsigned long)(n) & 0xFF)) << 24) | \
|
||||
((((unsigned long)(n) & 0xFF00)) << 8) | \
|
||||
((((unsigned long)(n) & 0xFF0000)) >> 8) | \
|
||||
((((unsigned long)(n) & 0xFF000000)) >> 24))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
|
||||
/*
|
||||
|
|
|
@ -34,13 +34,13 @@ END_EVENT_TABLE()
|
|||
ButtonPanel::ButtonPanel(KissCount* kiss, wxUI *parent) : wxPanel(&(*parent)), _kiss(kiss), _wxUI(parent)
|
||||
{
|
||||
wxBoxSizer *hbox = new wxBoxSizer(wxHORIZONTAL);
|
||||
_account = new wxBitmapButton(this, BUTTON_ACCOUNT_ID, wxBitmap(wxT(ACCOUNT_ICON)), wxDefaultPosition, wxSize(128, 128));
|
||||
_stats = new wxBitmapButton(this, BUTTON_STATS_ID, wxBitmap(wxT(STATS_ICON)), wxDefaultPosition, wxSize(128, 128));
|
||||
_search = new wxBitmapButton(this, BUTTON_SEARCH_ID, wxBitmap(wxT(SEARCH_ICON)), wxDefaultPosition, wxSize(128, 128));
|
||||
_prefs = new wxBitmapButton(this, BUTTON_PREFS_ID, wxBitmap(wxT(PREFS_ICON)), wxDefaultPosition, wxSize(128, 128));
|
||||
_changeUser = new wxBitmapButton(this, BUTTON_CHANGE_USER_ID, wxBitmap(wxT(CHANGE_USER_ICON)), wxDefaultPosition, wxSize(128, 128));
|
||||
_about = new wxBitmapButton(this, BUTTON_ABOUT_ID, wxBitmap(wxT(ABOUT_ICON)), wxDefaultPosition, wxSize(128, 128));
|
||||
_quit = new wxBitmapButton(this, BUTTON_QUIT_ID, wxBitmap(wxT(QUIT_ICON)), wxDefaultPosition, wxSize(128, 128));
|
||||
_account = new wxBitmapButton(this, BUTTON_ACCOUNT_ID, wxBitmap(wxT(ACCOUNT_ICON), wxBITMAP_TYPE_PNG), wxDefaultPosition, wxSize(128, 128));
|
||||
_stats = new wxBitmapButton(this, BUTTON_STATS_ID, wxBitmap(wxT(STATS_ICON), wxBITMAP_TYPE_PNG), wxDefaultPosition, wxSize(128, 128));
|
||||
_search = new wxBitmapButton(this, BUTTON_SEARCH_ID, wxBitmap(wxT(SEARCH_ICON), wxBITMAP_TYPE_PNG), wxDefaultPosition, wxSize(128, 128));
|
||||
_prefs = new wxBitmapButton(this, BUTTON_PREFS_ID, wxBitmap(wxT(PREFS_ICON), wxBITMAP_TYPE_PNG), wxDefaultPosition, wxSize(128, 128));
|
||||
_changeUser = new wxBitmapButton(this, BUTTON_CHANGE_USER_ID, wxBitmap(wxT(CHANGE_USER_ICON), wxBITMAP_TYPE_PNG), wxDefaultPosition, wxSize(128, 128));
|
||||
_about = new wxBitmapButton(this, BUTTON_ABOUT_ID, wxBitmap(wxT(ABOUT_ICON), wxBITMAP_TYPE_PNG), wxDefaultPosition, wxSize(128, 128));
|
||||
_quit = new wxBitmapButton(this, BUTTON_QUIT_ID, wxBitmap(wxT(QUIT_ICON), wxBITMAP_TYPE_PNG), wxDefaultPosition, wxSize(128, 128));
|
||||
|
||||
SetSizer(hbox);
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ void PreferencesPanel::InitLanguage(User* user)
|
|||
|
||||
for (i=0; i<NB_SUPPORTED_LANGUAGES; i++)
|
||||
{
|
||||
_language->Append(languages[i].name, wxBitmap(languages[i].icon));
|
||||
_language->Append(languages[i].name, wxBitmap(languages[i].icon, wxBITMAP_TYPE_PNG));
|
||||
if (languages[i].language == _wxUI->_language)
|
||||
select = i;
|
||||
}
|
||||
|
|
|
@ -39,14 +39,17 @@ BEGIN_EVENT_TABLE(GridAccount, wxGrid)
|
|||
EVT_GRID_CELL_LEFT_CLICK(GridAccount::OnCellLeftClick )
|
||||
END_EVENT_TABLE()
|
||||
|
||||
enum {TREE, DESCRIPTION, OP_DATE, DEBIT, CREDIT, CATEGORY, ACCOUNT, OP_DELETE, CHECKED, NUMBER_COLS_OPS};
|
||||
|
||||
enum {GRID_ID};
|
||||
|
||||
GridAccount::GridAccount(KissCount* kiss, wxWindow *parent, wxWindowID id) : wxGrid(parent, id), _fixCosts(0), _week1(0),
|
||||
_week2(0), _week3(0), _week4(0), _kiss(kiss),
|
||||
_loadOperations(false),
|
||||
_curMonth(0), _curYear(0)
|
||||
{
|
||||
wxBitmap deleteBitmap(wxT(DELETE_ICON));
|
||||
wxBitmap checkedBitmap(wxT(CHECKED_ICON));
|
||||
wxBitmap deleteBitmap(wxT(DELETE_ICON), wxBITMAP_TYPE_PNG);
|
||||
wxBitmap checkedBitmap(wxT(CHECKED_ICON), wxBITMAP_TYPE_PNG);
|
||||
DEFAULT_FONT(font);
|
||||
int i;
|
||||
User* user = _kiss->GetUser();
|
||||
|
@ -70,7 +73,7 @@ GridAccount::GridAccount(KissCount* kiss, wxWindow *parent, wxWindowID id) : wxG
|
|||
SetReadOnly(0, i, true);
|
||||
SetCellAlignment(0, i, wxALIGN_CENTRE, wxALIGN_CENTRE);
|
||||
}
|
||||
SetCellRenderer(0, DELETE, new wxGridCellBitmapRenderer(deleteBitmap));
|
||||
SetCellRenderer(0, OP_DELETE, new wxGridCellBitmapRenderer(deleteBitmap));
|
||||
SetCellRenderer(0, CHECKED, new wxGridCellBitmapRenderer(checkedBitmap));
|
||||
|
||||
_accounts = new wxString[user->GetAccountsNumber()];
|
||||
|
@ -92,9 +95,9 @@ GridAccount::GridAccount(KissCount* kiss, wxWindow *parent, wxWindowID id) : wxG
|
|||
|
||||
AutoSizeColumn(TREE, false);
|
||||
AutoSizeColumn(CATEGORY, false);
|
||||
AutoSizeColumn(DATE, false);
|
||||
AutoSizeColumn(OP_DATE, false);
|
||||
AutoSizeColumn(ACCOUNT, false);
|
||||
AutoSizeColumn(DELETE, false);
|
||||
AutoSizeColumn(OP_DELETE, false);
|
||||
AutoSizeColumn(CHECKED, false);
|
||||
}
|
||||
|
||||
|
@ -226,9 +229,9 @@ void GridAccount::LoadOperations(std::vector<Operation>* operations, bool canAdd
|
|||
|
||||
AutoSizeColumn(TREE, false);
|
||||
AutoSizeColumn(CATEGORY, false);
|
||||
AutoSizeColumn(DATE, false);
|
||||
AutoSizeColumn(OP_DATE, false);
|
||||
AutoSizeColumn(ACCOUNT, false);
|
||||
AutoSizeColumn(DELETE, false);
|
||||
AutoSizeColumn(OP_DELETE, false);
|
||||
AutoSizeColumn(CHECKED, false);
|
||||
|
||||
_loadOperations = false;
|
||||
|
@ -302,7 +305,7 @@ void GridAccount::InsertOperation(User* user, Operation& op, int line, bool fix,
|
|||
SetCellRenderer(line, TREE, new wxGridCellTreeButtonRenderer());
|
||||
SetCellEditor(line, TREE, new wxGridCellTreeButtonEditor());
|
||||
|
||||
SetReadOnly(line, DATE, true);
|
||||
SetReadOnly(line, OP_DATE, true);
|
||||
SetReadOnly(line, CREDIT, true);
|
||||
SetReadOnly(line, DEBIT, true);
|
||||
SetReadOnly(line, CATEGORY, true);
|
||||
|
@ -332,12 +335,12 @@ void GridAccount::InsertOperation(User* user, Operation& op, int line, bool fix,
|
|||
{
|
||||
cat = user->GetCategory(op.category);
|
||||
|
||||
SetCellEditor(line, DATE, new CalendarEditor(op.day, month, year));
|
||||
SetCellEditor(line, OP_DATE, new CalendarEditor(op.day, month, year));
|
||||
description = op.description;
|
||||
UNESCAPE_CHARS(description);
|
||||
SetCellValue(line, DESCRIPTION, description);
|
||||
SetCellRenderer(line, DESCRIPTION, new wxGridCellTabStringRenderer ());
|
||||
SetCellValue(line, DATE, wxString::Format(wxT("%02d/%02d/%d"), op.day+1, month+1, year));
|
||||
SetCellValue(line, OP_DATE, wxString::Format(wxT("%02d/%02d/%d"), op.day+1, month+1, year));
|
||||
if (op.amount < 0)
|
||||
SetCellValue(line, DEBIT, wxString::Format(wxT("%.2lf"), -op.amount));
|
||||
else
|
||||
|
@ -347,8 +350,8 @@ void GridAccount::InsertOperation(User* user, Operation& op, int line, bool fix,
|
|||
SetCellValue(line, ACCOUNT, user->GetAccountName(op.account));
|
||||
if (!fix && !op.meta)
|
||||
SetCellValue(line, CATEGORY, cat.name);
|
||||
SetCellRenderer(line, DELETE, new wxGridCellBoolRenderer ());
|
||||
SetCellEditor(line, DELETE, new wxGridCellBoolEditor ());
|
||||
SetCellRenderer(line, OP_DELETE, new wxGridCellBoolRenderer ());
|
||||
SetCellEditor(line, OP_DELETE, new wxGridCellBoolEditor ());
|
||||
SetCellRenderer(line, CHECKED, new wxGridCellBoolRenderer ());
|
||||
SetCellEditor(line, CHECKED, new wxGridCellFastBoolEditor ());
|
||||
|
||||
|
@ -391,16 +394,16 @@ void GridAccount::InsertOperation(User* user, Operation& op, int line, bool fix,
|
|||
}
|
||||
else
|
||||
{
|
||||
SetCellEditor(line, DATE, new CalendarEditor(0, month, year));
|
||||
SetCellEditor(line, OP_DATE, new CalendarEditor(0, month, year));
|
||||
if (curDate.GetMonth() == month &&
|
||||
curDate.GetYear() == year)
|
||||
{
|
||||
if (!fix)
|
||||
SetCellValue(line, DATE, wxString::Format(wxT("%02d/%02d/%d"), curDate.GetDay(), month+1, year));
|
||||
SetCellEditor(line, DATE, new CalendarEditor(curDate.GetDay()-1, month, year));
|
||||
SetCellValue(line, OP_DATE, wxString::Format(wxT("%02d/%02d/%d"), curDate.GetDay(), month+1, year));
|
||||
SetCellEditor(line, OP_DATE, new CalendarEditor(curDate.GetDay()-1, month, year));
|
||||
}
|
||||
else
|
||||
SetCellEditor(line, DATE, new CalendarEditor(0, month, year));
|
||||
SetCellEditor(line, OP_DATE, new CalendarEditor(0, month, year));
|
||||
|
||||
if (fix)
|
||||
{
|
||||
|
@ -412,13 +415,13 @@ void GridAccount::InsertOperation(User* user, Operation& op, int line, bool fix,
|
|||
}
|
||||
|
||||
SetReadOnly(line, CHECKED, true);
|
||||
SetReadOnly(line, DELETE, true);
|
||||
SetReadOnly(line, OP_DELETE, true);
|
||||
}
|
||||
|
||||
SetCellAlignment(line, DATE, wxALIGN_CENTRE, wxALIGN_CENTRE);
|
||||
SetCellAlignment(line, OP_DATE, wxALIGN_CENTRE, wxALIGN_CENTRE);
|
||||
SetCellAlignment(line, DEBIT, wxALIGN_RIGHT, wxALIGN_CENTRE);
|
||||
SetCellAlignment(line, CREDIT, wxALIGN_RIGHT, wxALIGN_CENTRE);
|
||||
SetCellAlignment(line, DELETE, wxALIGN_CENTRE, wxALIGN_CENTRE);
|
||||
SetCellAlignment(line, OP_DELETE, wxALIGN_CENTRE, wxALIGN_CENTRE);
|
||||
SetCellAlignment(line, CHECKED, wxALIGN_CENTRE, wxALIGN_CENTRE);
|
||||
|
||||
AutoSizeRow(line);
|
||||
|
@ -430,7 +433,7 @@ void GridAccount::InsertOperation(User* user, Operation& op, int line, bool fix,
|
|||
// From http://nomadsync.cvs.sourceforge.net/nomadsync/nomadsync/src/
|
||||
void GridAccount::OnCellLeftClick(wxGridEvent& evt)
|
||||
{
|
||||
if (evt.GetCol() != TREE && evt.GetCol() != DELETE && evt.GetCol() != CHECKED) { evt.Skip() ; return;}
|
||||
if (evt.GetCol() != TREE && evt.GetCol() != OP_DELETE && evt.GetCol() != CHECKED) { evt.Skip() ; return;}
|
||||
|
||||
// This forces the cell to go into edit mode directly
|
||||
//m_waitForSlowClick = TRUE;
|
||||
|
@ -691,7 +694,7 @@ void GridAccount::OnOperationModified(wxGridEvent& event)
|
|||
op_complete--;
|
||||
}
|
||||
|
||||
value = GetCellValue(row, DATE);
|
||||
value = GetCellValue(row, OP_DATE);
|
||||
if (value.Length())
|
||||
{
|
||||
date.ParseFormat(value, wxT("%d/%m/%Y"));
|
||||
|
@ -820,7 +823,7 @@ void GridAccount::OnOperationModified(wxGridEvent& event)
|
|||
}
|
||||
}
|
||||
|
||||
if (col == DELETE)
|
||||
if (col == OP_DELETE)
|
||||
{
|
||||
wxMessageDialog dialog(this, _("Are you sure want to delete : \n")+new_op.description, wxT("KissCount"), wxYES_NO);
|
||||
if (dialog.ShowModal() == wxID_NO)
|
||||
|
@ -834,7 +837,7 @@ void GridAccount::OnOperationModified(wxGridEvent& event)
|
|||
// Modify a fix operation
|
||||
if (row < _fixCosts)
|
||||
{
|
||||
if (col == DELETE)
|
||||
if (col == OP_DELETE)
|
||||
{
|
||||
if (cur_op.parent.Length())
|
||||
user->UnGroup(_displayedOperations[row]);
|
||||
|
@ -942,7 +945,7 @@ void GridAccount::OnOperationModified(wxGridEvent& event)
|
|||
new_op.parent = cur_op.parent;
|
||||
new_op.childs = cur_op.childs;
|
||||
|
||||
if (col == DELETE)
|
||||
if (col == OP_DELETE)
|
||||
{
|
||||
if (cur_op.parent.Length())
|
||||
user->UnGroup(_displayedOperations[row]);
|
||||
|
@ -1077,7 +1080,7 @@ void GridAccount::OnOperationModified(wxGridEvent& event)
|
|||
SET_ROW_FONT(row, font);
|
||||
}
|
||||
|
||||
SetCellValue(row, DATE, wxString::Format(wxT("%02d/%02d/%d"), new_op.day+1, _curMonth+1, _curYear));
|
||||
SetCellValue(row, OP_DATE, wxString::Format(wxT("%02d/%02d/%d"), new_op.day+1, _curMonth+1, _curYear));
|
||||
|
||||
if (!_displayedOperations[row].amount)
|
||||
{
|
||||
|
|
|
@ -35,8 +35,6 @@
|
|||
|
||||
class KissCount;
|
||||
|
||||
enum {TREE, DESCRIPTION, DATE, DEBIT, CREDIT, CATEGORY, ACCOUNT, DELETE, CHECKED, NUMBER_COLS_OPS};
|
||||
|
||||
class GridAccount : public wxGrid
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
#define DEFAULT_FONT_SIZE 12
|
||||
#define DEFAULT_FONT(font_name) wxFont font_name(DEFAULT_FONT_SIZE, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, DEFAULT_FONT_NAME);
|
||||
|
||||
#define DELETE_ICON "ressources/icons/process-stop.png"
|
||||
#define CHECKED_ICON "ressources/icons/tick-icon.png"
|
||||
#define ACCOUNT_ICON "ressources/icons/administrator-icon.png"
|
||||
#define STATS_ICON "ressources/icons/chart-icon.png"
|
||||
#define SEARCH_ICON "ressources/icons/Search-icon.png"
|
||||
#define PREFS_ICON "ressources/icons/options-icon.png"
|
||||
#define CHANGE_USER_ICON "ressources/icons/Clients-icon.png"
|
||||
#define ABOUT_ICON "ressources/icons/windows-users-icon.png"
|
||||
#define QUIT_ICON "ressources/icons/system-log-out.png"
|
||||
#define DELETE_ICON "./ressources/icons/process-stop.png"
|
||||
#define CHECKED_ICON "./ressources/icons/tick-icon.png"
|
||||
#define ACCOUNT_ICON "./ressources/icons/administrator-icon.png"
|
||||
#define STATS_ICON "./ressources/icons/chart-icon.png"
|
||||
#define SEARCH_ICON "./ressources/icons/Search-icon.png"
|
||||
#define PREFS_ICON "./ressources/icons/options-icon.png"
|
||||
#define CHANGE_USER_ICON "./ressources/icons/Clients-icon.png"
|
||||
#define ABOUT_ICON "./ressources/icons/windows-users-icon.png"
|
||||
#define QUIT_ICON "./ressources/icons/system-log-out.png"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -37,6 +37,8 @@ wxUI::wxUI(KissCount* kiss, const wxString& title, const wxPoint& pos, const wxS
|
|||
: wxFrame(NULL, wxID_ANY, title, pos, size), _kiss(kiss), _buttonPanel(NULL), _accountPanel(NULL), _statsPanel(NULL),
|
||||
_searchPanel(NULL), _preferencesPanel(NULL), _curPanel(NULL), _locale(NULL), _needReload(false)
|
||||
{
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
_hbox = new wxBoxSizer(wxVERTICAL);
|
||||
_buttonPanel = new ButtonPanel(_kiss, this);
|
||||
|
||||
|
|
|
@ -34,6 +34,9 @@
|
|||
#include "grid/wxGridCellButtonRenderer.h"
|
||||
#include "grid/wxGridCellButtonEditor.h"
|
||||
|
||||
#undef _
|
||||
#define _(s) wxString(wxGetTranslation(s))
|
||||
|
||||
class KissCount;
|
||||
class ButtonPanel;
|
||||
class AccountPanel;
|
||||
|
|
21
tools/package_win32.sh
Executable file
21
tools/package_win32.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
DATE=`date +%d.%m.%Y`
|
||||
ARCH=`${PREFIX}gcc -dumpmachine | cut -d- -f1`
|
||||
VERSION=`cat src/controller/KissCount.h | grep APP_VERSION | cut -d\" -f2`
|
||||
DIR="KissCount_build_${VERSION}_${DATE}_${ARCH}"
|
||||
FILE="$DIR.tar.bz2"
|
||||
|
||||
rm -f "$FILE"
|
||||
rm -rf "$DIR"
|
||||
if [ "$1" == "clean" ] ; then
|
||||
make clean
|
||||
fi
|
||||
make || (echo "Compilation failed" ; exit 1)
|
||||
mkdir -p "$DIR"
|
||||
cp -r lib/freechart/lib/*.dll* lib/wxsqlite3-1.9.9/lib/*.dll* "$DIR"
|
||||
cp -r kc init.sql ressources tools/launch_kc.sh TODO CONTRIBUTORS COPYING README README.fr www "$DIR"
|
||||
find "$DIR" -type f -executable -exec ${PREFIX}strip \{\} \;
|
||||
tar -jcf "$FILE" "$DIR"
|
||||
rm -rf "$DIR"
|
||||
echo "Packaged into $FILE !"
|
Loading…
Reference in New Issue
Block a user