mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge branch 'maint'
This commit is contained in:
commit
15d3eb48dc
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -23,7 +23,7 @@
|
|||||||
*.sh text eol=lf
|
*.sh text eol=lf
|
||||||
*.svg text eol=lf
|
*.svg text eol=lf
|
||||||
*.xsl text eol=lf
|
*.xsl text eol=lf
|
||||||
*.cmake test eol=lf
|
*.cmake text eol=lf
|
||||||
|
|
||||||
Makefile.TAGS text eol=lf
|
Makefile.TAGS text eol=lf
|
||||||
Makevars text eol=lf
|
Makevars text eol=lf
|
||||||
|
7
.github/workflows/README.md
vendored
Normal file
7
.github/workflows/README.md
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
Github Actions Continuous Integration Testing Workflows.
|
||||||
|
|
||||||
|
ci-tests.yml runs Ubuntu 18.04 and Ubuntu 20.04 using Github-provided virtual environments. The virtual environments are about twice as fast as Docker ones and getting Docker to run Ubuntu images was problematic. Note that updating Ubuntu 18.04 updates ICU4C from v60 to v65 and that causes conflicts with Boost, so don't.
|
||||||
|
|
||||||
|
ci-docker.yml runs tests in a Docker container running Arch Linux.
|
||||||
|
|
||||||
|
mac-tests.yml runs tests on macOS using a Github-provided virtual machine. Note that this test relies on a prebuilt tarball containing all of the dependencies. Instructions for building that tarball along with some support scripts may be found in utils/ci/macos-ci-deps.
|
15
.github/workflows/ci-docker.yml
vendored
Normal file
15
.github/workflows/ci-docker.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
name: ci-tests-docker
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
ci_tests_archlinux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Test Docker Action
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Test Action
|
||||||
|
uses: ./util/ci/actions/archlinux-test
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: TestLog
|
||||||
|
path: ${{ github.workspace }}/LastTest.log
|
75
.github/workflows/ci-tests.yml
vendored
Normal file
75
.github/workflows/ci-tests.yml
vendored
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
name: ci-tests
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
ci_tests_ubuntu-18:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
name: Ubuntu-18.04 Tests
|
||||||
|
env:
|
||||||
|
TZ: America/Los_Angeles
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install additional dependencies
|
||||||
|
run: sudo apt-get install -y cmake libxslt-dev xsltproc ninja-build libboost-all-dev libgtk-3-dev guile-2.2-dev libgwengui-gtk3-dev libaqbanking-dev libofx-dev libdbi-dev libdbd-sqlite3 libwebkit2gtk-4.0-dev googletest
|
||||||
|
- name: Install language packs.
|
||||||
|
run: sudo apt-get --reinstall install -y language-pack-en language-pack-fr
|
||||||
|
- run: |
|
||||||
|
echo "ROOT_DIR=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV
|
||||||
|
- name: Create Directories
|
||||||
|
run: |
|
||||||
|
pwd
|
||||||
|
mkdir $ROOT_DIR/inst
|
||||||
|
mkdir build
|
||||||
|
- name: Configure GnuCash
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cmake -G Ninja -DWITH_PYTHON=ON -DCMAKE_INSTALL_PREFIX=$ROOT_DIR/inst $GITHUB_WORKSPACE
|
||||||
|
- name: Build and Test GnuCash
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
ninja
|
||||||
|
ninja check
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
name: TestLog
|
||||||
|
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
|
||||||
|
ci_tests_ubuntu-20:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
name: Ubuntu-20.04 Tests
|
||||||
|
env:
|
||||||
|
TZ: America/Los_Angeles
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install apt utils
|
||||||
|
run: sudo apt-get install -y --no-install-recommends apt-utils
|
||||||
|
- name: Upgrade apt
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -y
|
||||||
|
sudo apt-get upgrade -y
|
||||||
|
- name: Install additional dependencies
|
||||||
|
run: sudo apt-get install -y cmake libxslt-dev xsltproc ninja-build libboost-all-dev libgtk-3-dev guile-2.2-dev libgwengui-gtk3-dev libaqbanking-dev libofx-dev libdbi-dev libdbd-sqlite3 libwebkit2gtk-4.0-dev googletest
|
||||||
|
- name: Install language packs.
|
||||||
|
run: sudo apt-get --reinstall install -y language-pack-en language-pack-fr
|
||||||
|
- run: |
|
||||||
|
echo "ROOT_DIR=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV
|
||||||
|
- name: Create Directories
|
||||||
|
run: |
|
||||||
|
pwd
|
||||||
|
mkdir $ROOT_DIR/inst
|
||||||
|
mkdir build
|
||||||
|
- name: Configure GnuCash
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cmake -G Ninja -DWITH_PYTHON=ON -DCMAKE_INSTALL_PREFIX=$ROOT_DIR/inst $GITHUB_WORKSPACE
|
||||||
|
- name: Build and Test GnuCash
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
ninja
|
||||||
|
ninja check
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
name: TestLog
|
||||||
|
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
|
55
.github/workflows/mac-tests.yaml
vendored
Normal file
55
.github/workflows/mac-tests.yaml
vendored
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
name: mac-tests
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
ci_tests_mac:
|
||||||
|
runs-on: macos-10.15
|
||||||
|
name: macOS Tests
|
||||||
|
env:
|
||||||
|
TZ: America/Los_Angeles
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- run: |
|
||||||
|
echo "PATH=$PATH:$HOME/gnucash/inst/bin" >> $GITHUB_ENV
|
||||||
|
echo "PREFIX=$HOME/gnucash/inst" >> $GITHUB_ENV
|
||||||
|
echo "SRCROOT=$HOME/gnucash/source" >> $GITHUB_ENV
|
||||||
|
- name: download dependency tarball
|
||||||
|
uses: carlosperate/download-file-action@v1.0.3
|
||||||
|
id: dependencies
|
||||||
|
with:
|
||||||
|
file-url: 'https://downloads.sourceforge.net/gnucash/Dependencies/gnucash-4.x-mac-dependencies.tar.xz'
|
||||||
|
file-name: gnucash-dependencies.tar.xz
|
||||||
|
- name: download googletest
|
||||||
|
uses: carlosperate/download-file-action@v1.0.3
|
||||||
|
|
||||||
|
id: googletest
|
||||||
|
with:
|
||||||
|
file-url: 'https://github.com/google/googletest/archive/release-1.10.0.tar.gz'
|
||||||
|
file-name: googletest.tar.gz
|
||||||
|
- run: |
|
||||||
|
cd $HOME
|
||||||
|
mkdir gnucash
|
||||||
|
cd gnucash
|
||||||
|
tar -xf $GITHUB_WORKSPACE/gnucash-dependencies.tar.xz
|
||||||
|
mkdir source
|
||||||
|
cd source
|
||||||
|
tar -xf $GITHUB_WORKSPACE/googletest.tar.gz
|
||||||
|
mv googletest-* googletest
|
||||||
|
cd ..
|
||||||
|
ls source
|
||||||
|
- name: Configure GnuCash
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -GNinja -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_PREFIX_PATH=$PREFIX -DWITH_PYTHON=ON -DGTEST_ROOT=$SRCROOT/googletest $GITHUB_WORKSPACE
|
||||||
|
- name: Build and Test GnuCash
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
ninja
|
||||||
|
ninja check
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
name: TestLog
|
||||||
|
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
|
||||||
|
if-no-files-found: ignore
|
@ -207,7 +207,7 @@ pkg_check_modules (GTHREAD REQUIRED gthread-2.0)
|
|||||||
pkg_check_modules (LIBXML2 REQUIRED libxml-2.0>=2.9.4)
|
pkg_check_modules (LIBXML2 REQUIRED libxml-2.0>=2.9.4)
|
||||||
pkg_check_modules (LIBXSLT REQUIRED libxslt)
|
pkg_check_modules (LIBXSLT REQUIRED libxslt)
|
||||||
if (WITH_GNUCASH)
|
if (WITH_GNUCASH)
|
||||||
if (WIN32 OR APPLE)
|
if (WIN32)
|
||||||
pkg_check_modules (WEBKIT REQUIRED IMPORTED_TARGET webkitgtk-3.0)
|
pkg_check_modules (WEBKIT REQUIRED IMPORTED_TARGET webkitgtk-3.0)
|
||||||
set(WEBKIT1 1 CACHE INTERNAL "WebKitGtk")
|
set(WEBKIT1 1 CACHE INTERNAL "WebKitGtk")
|
||||||
else()
|
else()
|
||||||
@ -279,7 +279,7 @@ string(REGEX MATCH "^[0-9]+[.]" SWIG_MAJOR ${SWIG_VERSION})
|
|||||||
|
|
||||||
# guile library and include dir
|
# guile library and include dir
|
||||||
pkg_check_modules (GUILE3 guile-3.0 QUIET)
|
pkg_check_modules (GUILE3 guile-3.0 QUIET)
|
||||||
pkg_check_modules (GUILE22 guile-2.2)
|
pkg_check_modules (GUILE22 guile-2.2 QUIET)
|
||||||
pkg_check_modules (GUILE2 guile-2.0>=2.0.9 QUIET)
|
pkg_check_modules (GUILE2 guile-2.0>=2.0.9 QUIET)
|
||||||
|
|
||||||
if (GUILE3_FOUND) # found guile-3.0
|
if (GUILE3_FOUND) # found guile-3.0
|
||||||
|
@ -157,6 +157,9 @@ gchar *gnc_locale_name (void);
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%rename ("gnc:ngettext") ngettext;
|
||||||
|
extern const char* ngettext (const char *msgid1, const char *msgid2,
|
||||||
|
unsigned long int n);
|
||||||
%rename ("gnc:gettext") gettext;
|
%rename ("gnc:gettext") gettext;
|
||||||
extern const char* gettext(const char*);
|
extern const char* gettext(const char*);
|
||||||
%rename ("gnc:C_gettext") wrap_C_;
|
%rename ("gnc:C_gettext") wrap_C_;
|
||||||
|
@ -27,13 +27,17 @@
|
|||||||
(define-module (gnucash core-utils)
|
(define-module (gnucash core-utils)
|
||||||
#:export (N_
|
#:export (N_
|
||||||
G_
|
G_
|
||||||
|
NG_
|
||||||
C_
|
C_
|
||||||
|
gnc:string-locale<?
|
||||||
|
gnc:string-locale>?
|
||||||
gnc:version))
|
gnc:version))
|
||||||
|
|
||||||
;; Guile 2 needs to find the symbols from the extension at compile time already
|
;; Guile 2 needs to find the symbols from the extension at compile time already
|
||||||
(eval-when (compile load eval expand)
|
(eval-when (compile load eval expand)
|
||||||
(load-extension "libgnucash-guile" "gnc_guile_bindings_init"))
|
(load-extension "libgnucash-guile" "gnc_guile_bindings_init"))
|
||||||
(use-modules (sw_core_utils))
|
(use-modules (sw_core_utils))
|
||||||
|
(use-modules (ice-9 i18n))
|
||||||
|
|
||||||
;; Export the swig-wrapped symbols in the public interface of this module
|
;; Export the swig-wrapped symbols in the public interface of this module
|
||||||
(module-use! (module-public-interface (current-module))
|
(module-use! (module-public-interface (current-module))
|
||||||
@ -43,6 +47,7 @@
|
|||||||
|
|
||||||
;; gettext functions
|
;; gettext functions
|
||||||
(define G_ gnc:gettext)
|
(define G_ gnc:gettext)
|
||||||
|
(define NG_ gnc:ngettext)
|
||||||
(define C_ gnc:C-gettext)
|
(define C_ gnc:C-gettext)
|
||||||
(define-syntax-rule (N_ x) x)
|
(define-syntax-rule (N_ x) x)
|
||||||
|
|
||||||
@ -54,3 +59,6 @@
|
|||||||
(define-public (_ x)
|
(define-public (_ x)
|
||||||
(issue-deprecation-warning "Using _ to call gettext is disallowed in guile-3 and will be removed in the future. Use G_ instead.")
|
(issue-deprecation-warning "Using _ to call gettext is disallowed in guile-3 and will be removed in the future. Use G_ instead.")
|
||||||
(gnc:gettext x))))
|
(gnc:gettext x))))
|
||||||
|
|
||||||
|
(define gnc:string-locale<? string-locale<?)
|
||||||
|
(define gnc:string-locale>? string-locale>?)
|
||||||
|
@ -81,20 +81,24 @@
|
|||||||
|
|
||||||
;; A few account related utility functions which used to be in engine-utilities.scm
|
;; A few account related utility functions which used to be in engine-utilities.scm
|
||||||
(define (gnc:account-map-descendants thunk account)
|
(define (gnc:account-map-descendants thunk account)
|
||||||
|
(issue-deprecation-warning "gnc:account-map-descendants is deprecated.")
|
||||||
(let ((descendants (or (gnc-account-get-descendants-sorted account) '())))
|
(let ((descendants (or (gnc-account-get-descendants-sorted account) '())))
|
||||||
(map thunk descendants)))
|
(map thunk descendants)))
|
||||||
|
|
||||||
(define (gnc:account-map-children thunk account)
|
(define (gnc:account-map-children thunk account)
|
||||||
|
(issue-deprecation-warning "gnc:account-map-children is deprecated.")
|
||||||
(let ((children (or (gnc-account-get-children-sorted account) '())))
|
(let ((children (or (gnc-account-get-children-sorted account) '())))
|
||||||
(map thunk children)))
|
(map thunk children)))
|
||||||
|
|
||||||
;; account related functions
|
;; account related functions
|
||||||
;; helper for sorting of account list
|
;; helper for sorting of account list
|
||||||
(define (account-full-name<? a b)
|
(define (account-full-name<? a b)
|
||||||
|
(issue-deprecation-warning "account-full-name<? is deprecated. use gnc:account-full-name<? instead.")
|
||||||
(string<? (gnc-account-get-full-name a) (gnc-account-get-full-name b)))
|
(string<? (gnc-account-get-full-name a) (gnc-account-get-full-name b)))
|
||||||
|
|
||||||
;; return maximum depth over accounts and their children, if any
|
;; return maximum depth over accounts and their children, if any
|
||||||
(define (accounts-get-children-depth accounts)
|
(define (accounts-get-children-depth accounts)
|
||||||
|
(issue-deprecation-warning "accounts-get-children-depth is deprecated. use gnc:accounts-get-children-depth instead.")
|
||||||
(apply max
|
(apply max
|
||||||
(map (lambda (acct)
|
(map (lambda (acct)
|
||||||
(let ((acct-depth (gnc-account-get-current-depth acct)))
|
(let ((acct-depth (gnc-account-get-current-depth acct)))
|
||||||
|
@ -1721,18 +1721,28 @@ gnc_scm2query (SCM query_scm)
|
|||||||
gnc_numeric
|
gnc_numeric
|
||||||
gnc_scm_to_numeric(SCM gncnum)
|
gnc_scm_to_numeric(SCM gncnum)
|
||||||
{
|
{
|
||||||
if (scm_is_signed_integer(scm_numerator(gncnum), INT64_MIN, INT64_MAX) &&
|
SCM num, denom;
|
||||||
scm_is_signed_integer(scm_denominator(gncnum), INT64_MIN, INT64_MAX))
|
|
||||||
return gnc_numeric_create(scm_to_int64(scm_numerator(gncnum)),
|
/* Not a number. */
|
||||||
scm_to_int64(scm_denominator(gncnum)));
|
if (!scm_is_number (gncnum))
|
||||||
return gnc_numeric_create(0, GNC_ERROR_OVERFLOW);
|
return gnc_numeric_error (GNC_ERROR_ARG);
|
||||||
|
|
||||||
|
num = scm_numerator (gncnum);
|
||||||
|
denom = scm_denominator (gncnum);
|
||||||
|
|
||||||
|
/* scm overflows 64-bit numbers */
|
||||||
|
if (!scm_is_signed_integer (num, INT64_MIN, INT64_MAX) ||
|
||||||
|
!scm_is_signed_integer (denom, INT64_MIN, INT64_MAX))
|
||||||
|
return gnc_numeric_error (GNC_ERROR_OVERFLOW);
|
||||||
|
|
||||||
|
return gnc_numeric_create (scm_to_int64 (num), scm_to_int64 (denom));
|
||||||
}
|
}
|
||||||
|
|
||||||
SCM
|
SCM
|
||||||
gnc_numeric_to_scm(gnc_numeric arg)
|
gnc_numeric_to_scm(gnc_numeric arg)
|
||||||
{
|
{
|
||||||
return scm_divide(scm_from_int64(arg.num),
|
return gnc_numeric_check (arg) ? SCM_BOOL_F :
|
||||||
scm_from_int64(arg.denom));
|
scm_divide (scm_from_int64 (arg.num), scm_from_int64 (arg.denom));
|
||||||
}
|
}
|
||||||
|
|
||||||
static SCM
|
static SCM
|
||||||
|
@ -354,7 +354,7 @@ static void go_option_menu_init(GOOptionMenu *option_menu)
|
|||||||
|
|
||||||
option_menu->button_label = GTK_LABEL(gtk_label_new(""));
|
option_menu->button_label = GTK_LABEL(gtk_label_new(""));
|
||||||
gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(option_menu->button_label), FALSE, TRUE, 0);
|
gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(option_menu->button_label), FALSE, TRUE, 0);
|
||||||
arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON);
|
arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
|
||||||
gtk_widget_set_margin_start (GTK_WIDGET(arrow), 5);
|
gtk_widget_set_margin_start (GTK_WIDGET(arrow), 5);
|
||||||
|
|
||||||
gtk_box_pack_end(GTK_BOX(box), arrow, FALSE, FALSE, 0);
|
gtk_box_pack_end(GTK_BOX(box), arrow, FALSE, FALSE, 0);
|
||||||
|
@ -1422,6 +1422,12 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Opening Balances</act:description>
|
<act:description>Opening Balances</act:description>
|
||||||
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>Retained Earnings</act:name>
|
<act:name>Retained Earnings</act:name>
|
||||||
|
@ -147,5 +147,11 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Opening Balances</act:description>
|
<act:description>Opening Balances</act:description>
|
||||||
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -783,6 +783,12 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Opening Balances</act:description>
|
<act:description>Opening Balances</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
|
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1396,6 +1396,12 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Opening Balances</act:description>
|
<act:description>Opening Balances</act:description>
|
||||||
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
|
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -684,5 +684,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Åbningssaldi</act:description>
|
<act:description>Åbningssaldi</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -964,5 +964,11 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Anfangsbestand</act:description>
|
<act:description>Anfangsbestand</act:description>
|
||||||
<act:parent type="new">1972cce2e2364f95b2b0bc014502661d</act:parent>
|
<act:parent type="new">1972cce2e2364f95b2b0bc014502661d</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -964,5 +964,11 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Anfangsbestand</act:description>
|
<act:description>Anfangsbestand</act:description>
|
||||||
<act:parent type="new">1972cce2e2364f95b2b0bc014502661d</act:parent>
|
<act:parent type="new">1972cce2e2364f95b2b0bc014502661d</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -739,5 +739,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Anfangsbestand</act:description>
|
<act:description>Anfangsbestand</act:description>
|
||||||
<act:parent type="new">1972cce2e2364f95b2b0bc014502661d</act:parent>
|
<act:parent type="new">1972cce2e2364f95b2b0bc014502661d</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -843,6 +843,12 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Anfangsbestand</act:description>
|
<act:description>Anfangsbestand</act:description>
|
||||||
<act:parent type="new">1972cce2e2364f95b2b0bc014502661d</act:parent>
|
<act:parent type="new">1972cce2e2364f95b2b0bc014502661d</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
|
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1192,6 +1192,12 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Anfangsbestand</act:description>
|
<act:description>Anfangsbestand</act:description>
|
||||||
<act:parent type="new">320d3cf62b418db6281c3cd8ec2e95c7</act:parent>
|
<act:parent type="new">320d3cf62b418db6281c3cd8ec2e95c7</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
|
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1269,6 +1269,12 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:code>9000</act:code>
|
<act:code>9000</act:code>
|
||||||
<act:parent type="new">26c3f10c1c7621661c1b813d6141280d</act:parent>
|
<act:parent type="new">26c3f10c1c7621661c1b813d6141280d</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>9008 Saldenvorträge Debitoren</act:name>
|
<act:name>9008 Saldenvorträge Debitoren</act:name>
|
||||||
|
@ -15678,6 +15678,12 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:code>9000</act:code>
|
<act:code>9000</act:code>
|
||||||
<act:parent type="new">e57d948c9a884e179bd090118b9212f8</act:parent>
|
<act:parent type="new">e57d948c9a884e179bd090118b9212f8</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>Saldenvorträge Debitoren</act:name>
|
<act:name>Saldenvorträge Debitoren</act:name>
|
||||||
|
@ -14305,6 +14305,12 @@ Den Bereich habe ich mit „9999“ bezeichet, damit er unterhalb der regulären
|
|||||||
</slot>
|
</slot>
|
||||||
</act:slots>
|
</act:slots>
|
||||||
<act:parent type="guid">ffca2686cb9963bea1089b796763dda0</act:parent>
|
<act:parent type="guid">ffca2686cb9963bea1089b796763dda0</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>9001-9007 Saldenvorträge, Sachkonten</act:name>
|
<act:name>9001-9007 Saldenvorträge, Sachkonten</act:name>
|
||||||
|
@ -786,5 +786,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Αρχικά υπόλοιπα</act:description>
|
<act:description>Αρχικά υπόλοιπα</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1420,6 +1420,12 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Opening Balances</act:description>
|
<act:description>Opening Balances</act:description>
|
||||||
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>Retained Earnings</act:name>
|
<act:name>Retained Earnings</act:name>
|
||||||
|
@ -149,6 +149,12 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Opening Balances</act:description>
|
<act:description>Opening Balances</act:description>
|
||||||
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
|
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -781,5 +781,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Opening Balances</act:description>
|
<act:description>Opening Balances</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1393,5 +1393,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Opening Balances</act:description>
|
<act:description>Opening Balances</act:description>
|
||||||
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -398,6 +398,12 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:parent type="new">c0b1160d2dd6b3059acc5083348b282f</act:parent>
|
<act:parent type="new">c0b1160d2dd6b3059acc5083348b282f</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>Grants</act:name>
|
<act:name>Grants</act:name>
|
||||||
|
@ -1137,6 +1137,12 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Opening Balances</act:description>
|
<act:description>Opening Balances</act:description>
|
||||||
<act:parent type="new">599b08659324698f0177ce3dbb513e5f</act:parent>
|
<act:parent type="new">599b08659324698f0177ce3dbb513e5f</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>Reserves and Surplus</act:name>
|
<act:name>Reserves and Surplus</act:name>
|
||||||
|
@ -753,5 +753,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Balances de apertura</act:description>
|
<act:description>Balances de apertura</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -830,5 +830,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Balances de apertura</act:description>
|
<act:description>Balances de apertura</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -397,6 +397,12 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Opening Balances</act:description>
|
<act:description>Opening Balances</act:description>
|
||||||
<act:parent type="new">7081f24a5685d4dfcb8f143f0b7ee31d</act:parent>
|
<act:parent type="new">7081f24a5685d4dfcb8f143f0b7ee31d</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
|
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1378,6 +1378,12 @@ Les utilisateurs gérant une entreprise sélectionneront ceci au lieu des autres
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Soldes initiaux</act:description>
|
<act:description>Soldes initiaux</act:description>
|
||||||
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>Gains enregistrés</act:name>
|
<act:name>Gains enregistrés</act:name>
|
||||||
|
@ -750,5 +750,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Soldes initiaux</act:description>
|
<act:description>Soldes initiaux</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1378,6 +1378,12 @@ Les utilisateurs gérant une entreprise sélectionneront ceci au lieu des autres
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Soldes initiaux</act:description>
|
<act:description>Soldes initiaux</act:description>
|
||||||
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>Gains enregistrés</act:name>
|
<act:name>Gains enregistrés</act:name>
|
||||||
|
@ -750,5 +750,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Soldes initiaux</act:description>
|
<act:description>Soldes initiaux</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1378,6 +1378,12 @@ Les utilisateurs gérant une entreprise sélectionneront ceci au lieu des autres
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Soldes initiaux</act:description>
|
<act:description>Soldes initiaux</act:description>
|
||||||
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>Gains enregistrés</act:name>
|
<act:name>Gains enregistrés</act:name>
|
||||||
|
@ -750,5 +750,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Soldes initiaux</act:description>
|
<act:description>Soldes initiaux</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -147,5 +147,11 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>יתרת פתיחה</act:description>
|
<act:description>יתרת פתיחה</act:description>
|
||||||
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -147,5 +147,11 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Početni saldo</act:description>
|
<act:description>Početni saldo</act:description>
|
||||||
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -800,6 +800,12 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Početni saldo</act:description>
|
<act:description>Početni saldo</act:description>
|
||||||
<act:parent type="new">73f3a388cebe42a3bc40ab8db179d32d</act:parent>
|
<act:parent type="new">73f3a388cebe42a3bc40ab8db179d32d</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
|
||||||
|
@ -1378,6 +1378,12 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Nyitóegyenlegek</act:description>
|
<act:description>Nyitóegyenlegek</act:description>
|
||||||
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>Céltartalékok</act:name>
|
<act:name>Céltartalékok</act:name>
|
||||||
|
@ -139,5 +139,11 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Nyitóegyenlegek</act:description>
|
<act:description>Nyitóegyenlegek</act:description>
|
||||||
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -728,5 +728,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Nyitóegyenlegek</act:description>
|
<act:description>Nyitóegyenlegek</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -144,5 +144,11 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Bilanci d'apertura</act:description>
|
<act:description>Bilanci d'apertura</act:description>
|
||||||
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -747,5 +747,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Bilanci d'apertura</act:description>
|
<act:description>Bilanci d'apertura</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1414,6 +1414,12 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>開始残高</act:description>
|
<act:description>開始残高</act:description>
|
||||||
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>内部留保</act:name>
|
<act:name>内部留保</act:name>
|
||||||
|
@ -147,5 +147,11 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>開始残高</act:description>
|
<act:description>開始残高</act:description>
|
||||||
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -775,5 +775,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>開始残高</act:description>
|
<act:description>開始残高</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1390,5 +1390,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>開始残高</act:description>
|
<act:description>開始残高</act:description>
|
||||||
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -129,5 +129,11 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Sākuma bilance</act:description>
|
<act:description>Sākuma bilance</act:description>
|
||||||
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -736,5 +736,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Kontu sākuma bilances</act:description>
|
<act:description>Kontu sākuma bilances</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1354,5 +1354,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Sākuma bilances</act:description>
|
<act:description>Sākuma bilances</act:description>
|
||||||
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -739,5 +739,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Opening Balances</act:description>
|
<act:description>Opening Balances</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1319,5 +1319,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Opening Balances</act:description>
|
<act:description>Opening Balances</act:description>
|
||||||
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -147,5 +147,11 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Beginsaldi</act:description>
|
<act:description>Beginsaldi</act:description>
|
||||||
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1387,5 +1387,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Openingsbalans</act:description>
|
<act:description>Openingsbalans</act:description>
|
||||||
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1414,6 +1414,12 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Bilanse otwarcia</act:description>
|
<act:description>Bilanse otwarcia</act:description>
|
||||||
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>Zyski zatrzymane</act:name>
|
<act:name>Zyski zatrzymane</act:name>
|
||||||
|
@ -147,5 +147,11 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>Bilanse otwarcia</act:description>
|
<act:description>Bilanse otwarcia</act:description>
|
||||||
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -775,5 +775,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Bilanse otwarcia</act:description>
|
<act:description>Bilanse otwarcia</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1387,5 +1387,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Bilanse otwarcia</act:description>
|
<act:description>Bilanse otwarcia</act:description>
|
||||||
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -728,5 +728,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Saldos Iniciais</act:description>
|
<act:description>Saldos Iniciais</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -746,5 +746,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Saldos iniciais</act:description>
|
<act:description>Saldos iniciais</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -843,6 +843,12 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>Остаток средств на начало периода</act:description>
|
<act:description>Остаток средств на начало периода</act:description>
|
||||||
<act:parent type="new">1972cce2e2364f95b2b0bc014502661d</act:parent>
|
<act:parent type="new">1972cce2e2364f95b2b0bc014502661d</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
|
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -3835,6 +3835,12 @@
|
|||||||
</slot>
|
</slot>
|
||||||
</act:slots>
|
</act:slots>
|
||||||
<act:parent type="new">cfd3ff3dffa577973d3c1c5def43e568</act:parent>
|
<act:parent type="new">cfd3ff3dffa577973d3c1c5def43e568</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>Ödenmemiş Sermaye(-)</act:name>
|
<act:name>Ödenmemiş Sermaye(-)</act:name>
|
||||||
@ -3871,6 +3877,12 @@
|
|||||||
</slot>
|
</slot>
|
||||||
</act:slots>
|
</act:slots>
|
||||||
<act:parent type="new">cfd3ff3dffa577973d3c1c5def43e568</act:parent>
|
<act:parent type="new">cfd3ff3dffa577973d3c1c5def43e568</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>Sermaye Düzeltmesi Olumsuz Farkları(-)</act:name>
|
<act:name>Sermaye Düzeltmesi Olumsuz Farkları(-)</act:name>
|
||||||
|
@ -1414,6 +1414,12 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>期初余额</act:description>
|
<act:description>期初余额</act:description>
|
||||||
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
<act:parent type="new">87e02e757b32b3059652cfe09fe9ae00</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
<gnc:account version="2.0.0">
|
<gnc:account version="2.0.0">
|
||||||
<act:name>留存收益</act:name>
|
<act:name>留存收益</act:name>
|
||||||
|
@ -147,5 +147,11 @@
|
|||||||
<act:commodity-scu>100</act:commodity-scu>
|
<act:commodity-scu>100</act:commodity-scu>
|
||||||
<act:description>期初余额</act:description>
|
<act:description>期初余额</act:description>
|
||||||
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
<act:parent type="new">b8b72887da1adf889f171923d23efbdd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -775,5 +775,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>期初余额</act:description>
|
<act:description>期初余额</act:description>
|
||||||
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
<act:parent type="new">3ab6a6d97b216c11333e48aa2b749a91</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -1387,5 +1387,11 @@
|
|||||||
</act:commodity>
|
</act:commodity>
|
||||||
<act:description>期初余额</act:description>
|
<act:description>期初余额</act:description>
|
||||||
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
<act:parent type="new">68d4074f91295062c0b773b4ae8de6bd</act:parent>
|
||||||
|
<act:slots>
|
||||||
|
<slot>
|
||||||
|
<slot:key>equity-type</slot:key>
|
||||||
|
<slot:value type="string">opening-balance</slot:value>
|
||||||
|
</slot>
|
||||||
|
</act:slots>
|
||||||
</gnc:account>
|
</gnc:account>
|
||||||
</gnc-account-example>
|
</gnc-account-example>
|
||||||
|
@ -226,7 +226,7 @@ if (MAC_INTEGRATION)
|
|||||||
file(APPEND ${ENV_FILE_OUT} "GIO_MODULE_DIR={SYS_LIB}/gio/modules\n")
|
file(APPEND ${ENV_FILE_OUT} "GIO_MODULE_DIR={SYS_LIB}/gio/modules\n")
|
||||||
file(APPEND ${ENV_FILE_OUT} "XDG_CONFIG_HOME={HOME}/Library/Application Support/${PACKAGE_NAME}/config\n")
|
file(APPEND ${ENV_FILE_OUT} "XDG_CONFIG_HOME={HOME}/Library/Application Support/${PACKAGE_NAME}/config\n")
|
||||||
file(APPEND ${ENV_FILE_OUT} "GDK_PIXBUF_MODULE_FILE={SYS_LIB}/gdk-pixbuf-2.0/2.10.0/loaders.cache\n")
|
file(APPEND ${ENV_FILE_OUT} "GDK_PIXBUF_MODULE_FILE={SYS_LIB}/gdk-pixbuf-2.0/2.10.0/loaders.cache\n")
|
||||||
file(APPEND ${ENV_FILE_OUT} "FONTCONFIG_FILE={GNC_HOME}/etc/fonts/fonts.conf\n")
|
file(APPEND ${ENV_FILE_OUT} "FONTCONFIG_PATH={GNC_HOME}/etc/fonts\n")
|
||||||
file(APPEND ${ENV_FILE_OUT} "OFX_DTD_PATH={GNC_HOME}/share/libofx/dtd\n")
|
file(APPEND ${ENV_FILE_OUT} "OFX_DTD_PATH={GNC_HOME}/share/libofx/dtd\n")
|
||||||
file(APPEND ${ENV_FILE_OUT} "GNC_DBD_DIR={SYS_LIB}/dbd\n")
|
file(APPEND ${ENV_FILE_OUT} "GNC_DBD_DIR={SYS_LIB}/dbd\n")
|
||||||
file(APPEND ${ENV_FILE_OUT} "GTK_IM_MODULE_FILE={GNC_HOME}/lib/gtk-3.0/3.0.0/immodules.cache\n")
|
file(APPEND ${ENV_FILE_OUT} "GTK_IM_MODULE_FILE={GNC_HOME}/lib/gtk-3.0/3.0.0/immodules.cache\n")
|
||||||
|
@ -64,10 +64,7 @@ GUILE_LOAD_PATH=@GNC_GUILE_LOAD_PATH@;{GUILE_LIBS};{GUILE_LOAD_PATH}
|
|||||||
GUILE_LOAD_COMPILED_PATH=@GNC_GUILE_LOAD_COMPILED_PATH@;{GUILE_COMPILED_LIBS};{GUILE_LOAD_COMPILED_PATH}
|
GUILE_LOAD_COMPILED_PATH=@GNC_GUILE_LOAD_COMPILED_PATH@;{GUILE_COMPILED_LIBS};{GUILE_LOAD_COMPILED_PATH}
|
||||||
|
|
||||||
# Tell Guile where to find GnuCash specific shared libraries
|
# Tell Guile where to find GnuCash specific shared libraries
|
||||||
GNC_LIBRARY_PATH={SYS_LIB};{GNC_LIB}
|
LTDL_LIBRARY_PATH={SYS_LIB};{GNC_LIB}
|
||||||
LD_LIBRARY_PATH={GNC_LIBRARY_PATH};{LD_LIBRARY_PATH}
|
|
||||||
# The same, but for GnuCash on OS X
|
|
||||||
DYLD_LIBRARY_PATH={GNC_LIBRARY_PATH};{DYLD_LIBRARY_PATH}
|
|
||||||
|
|
||||||
# For changing the language GnuCash uses, first refer to
|
# For changing the language GnuCash uses, first refer to
|
||||||
# to https://wiki.gnucash.org/wiki/Locale_Settings.
|
# to https://wiki.gnucash.org/wiki/Locale_Settings.
|
||||||
|
@ -367,6 +367,15 @@ gnc_search_dialog_display_results (GNCSearchWindow *sw)
|
|||||||
max_count = gnc_prefs_get_float(GNC_PREFS_GROUP_SEARCH_GENERAL, GNC_PREF_NEW_SEARCH_LIMIT);
|
max_count = gnc_prefs_get_float(GNC_PREFS_GROUP_SEARCH_GENERAL, GNC_PREF_NEW_SEARCH_LIMIT);
|
||||||
if (gnc_query_view_get_num_entries(GNC_QUERY_VIEW(sw->result_view)) < max_count)
|
if (gnc_query_view_get_num_entries(GNC_QUERY_VIEW(sw->result_view)) < max_count)
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (sw->new_rb), TRUE);
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (sw->new_rb), TRUE);
|
||||||
|
|
||||||
|
/* If there is only one item then select it */
|
||||||
|
if (gnc_query_view_get_num_entries (GNC_QUERY_VIEW(sw->result_view)) == 1)
|
||||||
|
{
|
||||||
|
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(sw->result_view));
|
||||||
|
GtkTreePath *path = gtk_tree_path_new_first ();
|
||||||
|
gtk_tree_selection_select_path (selection, path);
|
||||||
|
gtk_tree_path_free (path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -106,6 +106,7 @@ typedef struct _AccountWindow
|
|||||||
GtkTreeView * parent_tree;
|
GtkTreeView * parent_tree;
|
||||||
GtkWidget * parent_scroll;
|
GtkWidget * parent_scroll;
|
||||||
|
|
||||||
|
GtkWidget * opening_balance_button;
|
||||||
GtkWidget * opening_balance_edit;
|
GtkWidget * opening_balance_edit;
|
||||||
GtkWidget * opening_balance_date_edit;
|
GtkWidget * opening_balance_date_edit;
|
||||||
GtkWidget * opening_balance_page;
|
GtkWidget * opening_balance_page;
|
||||||
@ -205,6 +206,37 @@ gnc_account_commodity_from_type (AccountWindow * aw, gboolean update)
|
|||||||
aw->commodity_mode = new_mode;
|
aw->commodity_mode = new_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gnc_account_opening_balance_button_update (AccountWindow *aw, gnc_commodity *commodity)
|
||||||
|
{
|
||||||
|
Account *account = aw_get_account (aw);
|
||||||
|
Account *ob_account = gnc_account_lookup_by_opening_balance (gnc_book_get_root_account (aw->book), commodity);
|
||||||
|
gboolean has_splits = xaccAccountCountSplits (account, FALSE) > 0;
|
||||||
|
|
||||||
|
if (xaccAccountGetType (account) != ACCT_TYPE_EQUITY)
|
||||||
|
{
|
||||||
|
gtk_widget_set_sensitive (aw->opening_balance_button, FALSE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The opening balance flag can be edited, if the associated feature is enabled and
|
||||||
|
* there is no opening balance account or we are editing the only opening balance account
|
||||||
|
* and it has no splits assigned.
|
||||||
|
*/
|
||||||
|
if (!gnc_using_equity_type_opening_balance_account (gnc_get_current_book()))
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch(aw->dialog_type)
|
||||||
|
{
|
||||||
|
case EDIT_ACCOUNT:
|
||||||
|
gtk_widget_set_sensitive (aw->opening_balance_button, (ob_account == NULL || ob_account == account) && has_splits == 0);
|
||||||
|
break;
|
||||||
|
case NEW_ACCOUNT:
|
||||||
|
gtk_widget_set_sensitive (aw->opening_balance_button, ob_account == NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Copy the account values to the GUI widgets */
|
/* Copy the account values to the GUI widgets */
|
||||||
static void
|
static void
|
||||||
gnc_account_to_ui(AccountWindow *aw)
|
gnc_account_to_ui(AccountWindow *aw)
|
||||||
@ -268,6 +300,12 @@ gnc_account_to_ui(AccountWindow *aw)
|
|||||||
|
|
||||||
gtk_text_buffer_set_text (aw->notes_text_buffer, string, strlen(string));
|
gtk_text_buffer_set_text (aw->notes_text_buffer, string, strlen(string));
|
||||||
|
|
||||||
|
gnc_account_opening_balance_button_update (aw, commodity);
|
||||||
|
|
||||||
|
flag = xaccAccountGetIsOpeningBalance (account);
|
||||||
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (aw->opening_balance_button),
|
||||||
|
flag);
|
||||||
|
|
||||||
flag = xaccAccountGetTaxRelated (account);
|
flag = xaccAccountGetTaxRelated (account);
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (aw->tax_related_button),
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (aw->tax_related_button),
|
||||||
flag);
|
flag);
|
||||||
@ -434,6 +472,11 @@ gnc_ui_to_account(AccountWindow *aw)
|
|||||||
if (null_strcmp (string, old_string) != 0)
|
if (null_strcmp (string, old_string) != 0)
|
||||||
xaccAccountSetNotes (account, string);
|
xaccAccountSetNotes (account, string);
|
||||||
|
|
||||||
|
flag =
|
||||||
|
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (aw->opening_balance_button));
|
||||||
|
if (xaccAccountGetIsOpeningBalance (account) != flag)
|
||||||
|
xaccAccountSetIsOpeningBalance (account, flag);
|
||||||
|
|
||||||
flag =
|
flag =
|
||||||
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (aw->tax_related_button));
|
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (aw->tax_related_button));
|
||||||
if (xaccAccountGetTaxRelated (account) != flag)
|
if (xaccAccountGetTaxRelated (account) != flag)
|
||||||
@ -699,7 +742,7 @@ verify_children_compatible (AccountWindow *aw)
|
|||||||
gnc_label_set_alignment (label, 0.0, 0.0);
|
gnc_label_set_alignment (label, 0.0, 0.0);
|
||||||
|
|
||||||
/* make label large */
|
/* make label large */
|
||||||
gnc_widget_style_context_add_class (GTK_WIDGET(label), "gnc-class-emphasize-label");
|
gnc_widget_style_context_add_class (GTK_WIDGET(label), "gnc-class-title");
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||||
|
|
||||||
@ -856,6 +899,9 @@ gnc_common_ok (AccountWindow *aw)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* update opening balance account */
|
||||||
|
gnc_find_or_create_equity_account (root, EQUITY_OPENING_BALANCE, commodity);
|
||||||
|
|
||||||
LEAVE("passed");
|
LEAVE("passed");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -1271,11 +1317,33 @@ commodity_changed_cb (GNCGeneralSelect *gsl, gpointer data)
|
|||||||
AccountWindow *aw = data;
|
AccountWindow *aw = data;
|
||||||
gnc_commodity *currency;
|
gnc_commodity *currency;
|
||||||
GtkTreeSelection *selection;
|
GtkTreeSelection *selection;
|
||||||
|
Account *account = aw_get_account (aw);
|
||||||
|
|
||||||
currency = (gnc_commodity *) gnc_general_select_get_selected (gsl);
|
currency = (gnc_commodity *) gnc_general_select_get_selected (gsl);
|
||||||
if (!currency)
|
if (!currency)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (xaccAccountGetIsOpeningBalance (account))
|
||||||
|
{
|
||||||
|
Account *ob_account = gnc_account_lookup_by_opening_balance (gnc_book_get_root_account (aw->book), currency);
|
||||||
|
if (ob_account != account)
|
||||||
|
{
|
||||||
|
gchar *dialog_msg = _("An account with opening balance already exists for the desired currency.");
|
||||||
|
gchar *dialog_title = _("Cannot change currency");
|
||||||
|
GtkWidget *dialog = gtk_message_dialog_new (gnc_ui_get_main_window (NULL),
|
||||||
|
0,
|
||||||
|
GTK_MESSAGE_ERROR,
|
||||||
|
GTK_BUTTONS_OK,
|
||||||
|
"%s", dialog_title);
|
||||||
|
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(dialog),
|
||||||
|
"%s", dialog_msg);
|
||||||
|
gtk_dialog_run(GTK_DIALOG(dialog));
|
||||||
|
gtk_widget_destroy(dialog);
|
||||||
|
gnc_general_select_set_selected (gsl, xaccAccountGetCommodity (account));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gnc_amount_edit_set_fraction (GNC_AMOUNT_EDIT (aw->opening_balance_edit),
|
gnc_amount_edit_set_fraction (GNC_AMOUNT_EDIT (aw->opening_balance_edit),
|
||||||
gnc_commodity_get_fraction (currency));
|
gnc_commodity_get_fraction (currency));
|
||||||
gnc_amount_edit_set_print_info (GNC_AMOUNT_EDIT (aw->opening_balance_edit),
|
gnc_amount_edit_set_print_info (GNC_AMOUNT_EDIT (aw->opening_balance_edit),
|
||||||
@ -1283,6 +1351,7 @@ commodity_changed_cb (GNCGeneralSelect *gsl, gpointer data)
|
|||||||
|
|
||||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (aw->transfer_tree));
|
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (aw->transfer_tree));
|
||||||
gtk_tree_selection_unselect_all (selection);
|
gtk_tree_selection_unselect_all (selection);
|
||||||
|
gnc_account_opening_balance_button_update (aw, currency);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -1420,6 +1489,7 @@ gnc_account_window_create(GtkWindow *parent, AccountWindow *aw)
|
|||||||
g_signal_connect (G_OBJECT (selection), "changed",
|
g_signal_connect (G_OBJECT (selection), "changed",
|
||||||
G_CALLBACK (gnc_account_parent_changed_cb), aw);
|
G_CALLBACK (gnc_account_parent_changed_cb), aw);
|
||||||
|
|
||||||
|
aw->opening_balance_button = GTK_WIDGET(gtk_builder_get_object (builder, "opening_balance_button"));
|
||||||
aw->tax_related_button = GTK_WIDGET(gtk_builder_get_object (builder, "tax_related_button"));
|
aw->tax_related_button = GTK_WIDGET(gtk_builder_get_object (builder, "tax_related_button"));
|
||||||
aw->placeholder_button = GTK_WIDGET(gtk_builder_get_object (builder, "placeholder_button"));
|
aw->placeholder_button = GTK_WIDGET(gtk_builder_get_object (builder, "placeholder_button"));
|
||||||
aw->hidden_button = GTK_WIDGET(gtk_builder_get_object (builder, "hidden_button"));
|
aw->hidden_button = GTK_WIDGET(gtk_builder_get_object (builder, "hidden_button"));
|
||||||
|
@ -48,11 +48,11 @@ typedef struct
|
|||||||
GtkWidget * link_edit;
|
GtkWidget * link_edit;
|
||||||
|
|
||||||
GtkWidget *duplicate_title_label; // GtkLabel
|
GtkWidget *duplicate_title_label; // GtkLabel
|
||||||
GtkWidget *duplicate_table; // GtkTable
|
GtkWidget *duplicate_table; // GtkTable
|
||||||
GtkWidget *date_label; // GtkLabel
|
GtkWidget *date_label; // GtkLabel
|
||||||
GtkWidget *num_label; // GtkLabel
|
GtkWidget *num_label; // GtkLabel
|
||||||
GtkWidget *tnum_label; // GtkLabel
|
GtkWidget *tnum_label; // GtkLabel
|
||||||
GtkWidget *link_label; //GtkLabel
|
GtkWidget *link_label; // GtkLabel
|
||||||
} DupTransDialog;
|
} DupTransDialog;
|
||||||
|
|
||||||
/* Parses the string value and returns true if it is a
|
/* Parses the string value and returns true if it is a
|
||||||
@ -66,10 +66,10 @@ parse_num (const char *string, long int *num)
|
|||||||
if (string == NULL)
|
if (string == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!gnc_strisnum(string))
|
if (!gnc_strisnum (string))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
number = strtol(string, NULL, 10);
|
number = strtol (string, NULL, 10);
|
||||||
|
|
||||||
if ((number == LONG_MIN) || (number == LONG_MAX))
|
if ((number == LONG_MIN) || (number == LONG_MAX))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -81,17 +81,61 @@ parse_num (const char *string, long int *num)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gnc_dup_trans_output_cb(GtkSpinButton *spinbutton,
|
gnc_dup_inc_dec (GtkWidget *widget, const gchar *text, gint inc_dec)
|
||||||
gpointer user_data)
|
|
||||||
{
|
{
|
||||||
gboolean is_number;
|
|
||||||
long int num;
|
long int num;
|
||||||
gchar *txt = gtk_editable_get_chars(GTK_EDITABLE(spinbutton), 0, -1);
|
|
||||||
is_number = parse_num(txt, &num);
|
if (parse_num (text, &num))
|
||||||
g_free(txt);
|
{
|
||||||
if (!is_number)
|
gchar *format;
|
||||||
gtk_entry_set_text(GTK_ENTRY(spinbutton), "");
|
gchar *out;
|
||||||
return !is_number;
|
num = num + inc_dec;
|
||||||
|
|
||||||
|
if (num == -1)
|
||||||
|
num = 0;
|
||||||
|
|
||||||
|
if (g_str_has_prefix (text, "0"))
|
||||||
|
format = g_strdup_printf ("%s%ld%s", "%0", g_utf8_strlen (text, -1), "d");
|
||||||
|
else
|
||||||
|
format = g_strdup_printf ("%s", "%ld");
|
||||||
|
|
||||||
|
out = g_strdup_printf (format, num);
|
||||||
|
|
||||||
|
gtk_entry_set_text (GTK_ENTRY(widget), out);
|
||||||
|
g_free (format);
|
||||||
|
g_free (out);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gnc_dup_key_press_event_cb (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
|
||||||
|
{
|
||||||
|
const gchar *text = gtk_entry_get_text (GTK_ENTRY(widget));
|
||||||
|
|
||||||
|
if (gnc_strisnum (text))
|
||||||
|
{
|
||||||
|
GdkModifierType modifiers = gtk_accelerator_get_default_mod_mask ();
|
||||||
|
gint increment;
|
||||||
|
long int num;
|
||||||
|
|
||||||
|
if ((event->state & modifiers) == GDK_CONTROL_MASK ||
|
||||||
|
(event->state & modifiers) == GDK_MOD1_MASK)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (event->keyval == GDK_KEY_plus || event->keyval == GDK_KEY_KP_Add)
|
||||||
|
increment = 1;
|
||||||
|
else if (event->keyval == GDK_KEY_minus || event->keyval == GDK_KEY_KP_Subtract)
|
||||||
|
increment = -1;
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return gnc_dup_inc_dec (widget, text, increment);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -101,8 +145,9 @@ gnc_dup_trans_dialog_create (GtkWidget * parent, DupTransDialog *dt_dialog,
|
|||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
|
const gchar *tt = _("Use +- keys to increment/decrement number");
|
||||||
|
|
||||||
builder = gtk_builder_new();
|
builder = gtk_builder_new ();
|
||||||
gnc_builder_add_from_file (builder, "gnc-plugin-page-register.glade", "num_adjustment");
|
gnc_builder_add_from_file (builder, "gnc-plugin-page-register.glade", "num_adjustment");
|
||||||
gnc_builder_add_from_file (builder, "gnc-plugin-page-register.glade", "tnum_adjustment");
|
gnc_builder_add_from_file (builder, "gnc-plugin-page-register.glade", "tnum_adjustment");
|
||||||
gnc_builder_add_from_file (builder, "gnc-plugin-page-register.glade", "duplicate_transaction_dialog");
|
gnc_builder_add_from_file (builder, "gnc-plugin-page-register.glade", "duplicate_transaction_dialog");
|
||||||
@ -116,7 +161,7 @@ gnc_dup_trans_dialog_create (GtkWidget * parent, DupTransDialog *dt_dialog,
|
|||||||
|
|
||||||
/* parent */
|
/* parent */
|
||||||
if (parent != NULL)
|
if (parent != NULL)
|
||||||
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
|
gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(parent));
|
||||||
|
|
||||||
/* date widget */
|
/* date widget */
|
||||||
dt_dialog->date_label = GTK_WIDGET(gtk_builder_get_object (builder, "date_label"));
|
dt_dialog->date_label = GTK_WIDGET(gtk_builder_get_object (builder, "date_label"));
|
||||||
@ -126,13 +171,13 @@ gnc_dup_trans_dialog_create (GtkWidget * parent, DupTransDialog *dt_dialog,
|
|||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
|
|
||||||
date_edit = gnc_date_edit_new (date, FALSE, FALSE);
|
date_edit = gnc_date_edit_new (date, FALSE, FALSE);
|
||||||
gnc_date_activates_default(GNC_DATE_EDIT(date_edit), TRUE);
|
gnc_date_activates_default (GNC_DATE_EDIT(date_edit), TRUE);
|
||||||
hbox = GTK_WIDGET(gtk_builder_get_object (builder, "date_hbox"));
|
hbox = GTK_WIDGET(gtk_builder_get_object (builder, "date_hbox"));
|
||||||
gtk_widget_show (date_edit);
|
gtk_widget_show (date_edit);
|
||||||
|
|
||||||
gnc_date_make_mnemonic_target (GNC_DATE_EDIT(date_edit), dt_dialog->date_label);
|
gnc_date_make_mnemonic_target (GNC_DATE_EDIT(date_edit), dt_dialog->date_label);
|
||||||
|
|
||||||
gtk_box_pack_end (GTK_BOX (hbox), date_edit, TRUE, TRUE, 0);
|
gtk_box_pack_end (GTK_BOX(hbox), date_edit, TRUE, TRUE, 0);
|
||||||
dt_dialog->date_edit = date_edit;
|
dt_dialog->date_edit = date_edit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -147,31 +192,33 @@ gnc_dup_trans_dialog_create (GtkWidget * parent, DupTransDialog *dt_dialog,
|
|||||||
dt_dialog->num_label = GTK_WIDGET(gtk_builder_get_object (builder, "num_label"));
|
dt_dialog->num_label = GTK_WIDGET(gtk_builder_get_object (builder, "num_label"));
|
||||||
dt_dialog->tnum_label = GTK_WIDGET(gtk_builder_get_object (builder, "tnum_label"));
|
dt_dialog->tnum_label = GTK_WIDGET(gtk_builder_get_object (builder, "tnum_label"));
|
||||||
|
|
||||||
|
dt_dialog->num_edit = GTK_WIDGET(gtk_builder_get_object (builder, "num_entry"));
|
||||||
|
dt_dialog->tnum_edit = GTK_WIDGET(gtk_builder_get_object (builder, "tnum_entry"));
|
||||||
|
|
||||||
|
if (num_str)
|
||||||
|
gtk_entry_set_text (GTK_ENTRY(dt_dialog->num_edit), num_str);
|
||||||
|
if (tnum_str)
|
||||||
|
gtk_entry_set_text (GTK_ENTRY(dt_dialog->tnum_edit), tnum_str);
|
||||||
|
|
||||||
|
g_signal_connect (dt_dialog->num_edit, "key-press-event",
|
||||||
|
G_CALLBACK(gnc_dup_key_press_event_cb),
|
||||||
|
dt_dialog);
|
||||||
|
|
||||||
|
g_signal_connect (dt_dialog->tnum_edit, "key-press-event",
|
||||||
|
G_CALLBACK(gnc_dup_key_press_event_cb),
|
||||||
|
dt_dialog);
|
||||||
|
|
||||||
|
if (gnc_strisnum (num_str))
|
||||||
{
|
{
|
||||||
GtkWidget *num_spin, *tnum_spin;
|
gtk_widget_set_tooltip_text (GTK_WIDGET(dt_dialog->num_edit), tt);
|
||||||
long int num, tnum;
|
gnc_dup_inc_dec (GTK_WIDGET(dt_dialog->num_edit), num_str, 1);
|
||||||
|
|
||||||
num_spin = GTK_WIDGET(gtk_builder_get_object (builder, "num_spin"));
|
|
||||||
tnum_spin = GTK_WIDGET(gtk_builder_get_object (builder, "tnum_spin"));
|
|
||||||
dt_dialog->num_edit = num_spin;
|
|
||||||
dt_dialog->tnum_edit = tnum_spin;
|
|
||||||
|
|
||||||
gtk_entry_set_activates_default(GTK_ENTRY(num_spin), TRUE);
|
|
||||||
g_signal_connect(num_spin, "output",
|
|
||||||
G_CALLBACK(gnc_dup_trans_output_cb), dt_dialog);
|
|
||||||
g_signal_connect(tnum_spin, "output",
|
|
||||||
G_CALLBACK(gnc_dup_trans_output_cb), dt_dialog);
|
|
||||||
|
|
||||||
if (num_str && parse_num (num_str, &num))
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (num_spin), num + 1);
|
|
||||||
else
|
|
||||||
gtk_entry_set_text (GTK_ENTRY (num_spin), "");
|
|
||||||
|
|
||||||
if (tnum_str && parse_num (tnum_str, &tnum))
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (tnum_spin), tnum + 1);
|
|
||||||
else
|
|
||||||
gtk_entry_set_text (GTK_ENTRY (tnum_spin), "");
|
|
||||||
}
|
}
|
||||||
|
if (gnc_strisnum (tnum_str))
|
||||||
|
{
|
||||||
|
gtk_widget_set_tooltip_text (GTK_WIDGET(dt_dialog->tnum_edit), tt);
|
||||||
|
gnc_dup_inc_dec (GTK_WIDGET(dt_dialog->tnum_edit), tnum_str, 1);
|
||||||
|
}
|
||||||
|
|
||||||
/* Transaction Linked Document */
|
/* Transaction Linked Document */
|
||||||
{
|
{
|
||||||
dt_dialog->link_label = GTK_WIDGET(gtk_builder_get_object (builder, "link_label"));
|
dt_dialog->link_label = GTK_WIDGET(gtk_builder_get_object (builder, "link_label"));
|
||||||
@ -180,14 +227,14 @@ gnc_dup_trans_dialog_create (GtkWidget * parent, DupTransDialog *dt_dialog,
|
|||||||
|
|
||||||
gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, dt_dialog);
|
gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, dt_dialog);
|
||||||
|
|
||||||
g_object_unref(G_OBJECT(builder));
|
g_object_unref (G_OBJECT(builder));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gnc_dup_trans_dialog_internal (GtkWidget * parent,
|
gnc_dup_trans_dialog_internal (GtkWidget * parent,
|
||||||
const char* window_title, const char* title,
|
const char* window_title, const char* title,
|
||||||
gboolean show_date, time64 *date_p,
|
gboolean show_date, time64 *date_p, GDate *gdate_p,
|
||||||
GDate *gdate_p, const char *num, char **out_num,
|
const char *num, char **out_num,
|
||||||
const char *tnum, char **out_tnum,
|
const char *tnum, char **out_tnum,
|
||||||
const char *tlink, char **out_tlink)
|
const char *tlink, char **out_tlink)
|
||||||
{
|
{
|
||||||
@ -204,9 +251,9 @@ gnc_dup_trans_dialog_internal (GtkWidget * parent,
|
|||||||
if (!show_date)
|
if (!show_date)
|
||||||
{
|
{
|
||||||
// The "date" field isn't being asked for, so we make the widgets invisible
|
// The "date" field isn't being asked for, so we make the widgets invisible
|
||||||
gtk_widget_set_visible(dt_dialog->date_label, FALSE);
|
gtk_widget_set_visible (dt_dialog->date_label, FALSE);
|
||||||
if (dt_dialog->date_edit)
|
if (dt_dialog->date_edit)
|
||||||
gtk_widget_set_visible(dt_dialog->date_edit, FALSE);
|
gtk_widget_set_visible (dt_dialog->date_edit, FALSE);
|
||||||
// If no "date" field, there must be a "num" field, so give it focus
|
// If no "date" field, there must be a "num" field, so give it focus
|
||||||
if (out_num)
|
if (out_num)
|
||||||
gtk_widget_grab_focus (dt_dialog->num_edit);
|
gtk_widget_grab_focus (dt_dialog->num_edit);
|
||||||
@ -215,70 +262,70 @@ gnc_dup_trans_dialog_internal (GtkWidget * parent,
|
|||||||
{
|
{
|
||||||
GNCDateEdit *gde;
|
GNCDateEdit *gde;
|
||||||
|
|
||||||
gde = GNC_DATE_EDIT (dt_dialog->date_edit);
|
gde = GNC_DATE_EDIT(dt_dialog->date_edit);
|
||||||
entry = gde->date_entry;
|
entry = gde->date_entry;
|
||||||
gtk_widget_grab_focus (entry);
|
gtk_widget_grab_focus (entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window_title)
|
if (window_title)
|
||||||
gtk_window_set_title (GTK_WINDOW (dt_dialog->dialog), window_title);
|
gtk_window_set_title (GTK_WINDOW(dt_dialog->dialog), window_title);
|
||||||
|
|
||||||
if (title)
|
if (title)
|
||||||
{
|
{
|
||||||
gchar *full_text = g_strdup_printf("<b>%s</b>", title);
|
gchar *full_text = g_strdup_printf ("<b>%s</b>", title);
|
||||||
gtk_label_set_markup(GTK_LABEL (dt_dialog->duplicate_title_label), full_text);
|
gtk_label_set_markup (GTK_LABEL(dt_dialog->duplicate_title_label), full_text);
|
||||||
g_free(full_text);
|
g_free (full_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!out_num)
|
if (!out_num)
|
||||||
{
|
{
|
||||||
// The "num" field isn't being asked for, so we make the widgets invisible
|
// The "num" field isn't being asked for, so we make the widgets invisible
|
||||||
gtk_widget_set_visible(dt_dialog->num_label, FALSE);
|
gtk_widget_set_visible (dt_dialog->num_label, FALSE);
|
||||||
gtk_widget_set_visible(dt_dialog->num_edit, FALSE);
|
gtk_widget_set_visible (dt_dialog->num_edit, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tnum)
|
if (!tnum)
|
||||||
{
|
{
|
||||||
// The "tnum" field isn't being asked for, so we make the widgets invisible
|
// The "tnum" field isn't being asked for, so we make the widgets invisible
|
||||||
gtk_widget_set_visible(dt_dialog->tnum_label, FALSE);
|
gtk_widget_set_visible (dt_dialog->tnum_label, FALSE);
|
||||||
gtk_widget_set_visible(dt_dialog->tnum_edit, FALSE);
|
gtk_widget_set_visible (dt_dialog->tnum_edit, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!show_date && !tnum)
|
if (!show_date && !tnum)
|
||||||
{
|
{
|
||||||
// The "date" and the "tnum" fields aren't being asked for, this is a split copy
|
// The "date" and the "tnum" fields aren't being asked for, this is a split copy
|
||||||
gtk_label_set_markup(GTK_LABEL (dt_dialog->num_label), _("Action/Number"));
|
gtk_label_set_markup (GTK_LABEL(dt_dialog->num_label), _("Action/Number"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tnum)
|
if (tnum)
|
||||||
{
|
{
|
||||||
gtk_entry_set_activates_default(GTK_ENTRY(dt_dialog->num_edit), FALSE);
|
gtk_entry_set_activates_default (GTK_ENTRY(dt_dialog->num_edit), FALSE);
|
||||||
gtk_entry_set_activates_default(GTK_ENTRY(dt_dialog->tnum_edit), TRUE);
|
gtk_entry_set_activates_default (GTK_ENTRY(dt_dialog->tnum_edit), TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tlink)
|
if (tlink)
|
||||||
{
|
{
|
||||||
gtk_widget_set_visible(dt_dialog->link_label, TRUE);
|
gtk_widget_set_visible (dt_dialog->link_label, TRUE);
|
||||||
gtk_widget_set_visible(dt_dialog->link_edit, TRUE);
|
gtk_widget_set_visible (dt_dialog->link_edit, TRUE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gtk_widget_set_visible(dt_dialog->link_label, FALSE);
|
gtk_widget_set_visible (dt_dialog->link_label, FALSE);
|
||||||
gtk_widget_set_visible(dt_dialog->link_edit, FALSE);
|
gtk_widget_set_visible (dt_dialog->link_edit, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
result = gtk_dialog_run (GTK_DIALOG (dt_dialog->dialog));
|
result = gtk_dialog_run (GTK_DIALOG(dt_dialog->dialog));
|
||||||
|
|
||||||
if (result == GTK_RESPONSE_OK)
|
if (result == GTK_RESPONSE_OK)
|
||||||
{
|
{
|
||||||
if (date_p)
|
if (date_p)
|
||||||
*date_p = gnc_date_edit_get_date (GNC_DATE_EDIT (dt_dialog->date_edit));
|
*date_p = gnc_date_edit_get_date (GNC_DATE_EDIT(dt_dialog->date_edit));
|
||||||
if (gdate_p)
|
if (gdate_p)
|
||||||
gnc_date_edit_get_gdate (GNC_DATE_EDIT (dt_dialog->date_edit), gdate_p);
|
gnc_date_edit_get_gdate (GNC_DATE_EDIT(dt_dialog->date_edit), gdate_p);
|
||||||
if (out_num)
|
if (out_num)
|
||||||
*out_num = g_strdup (gtk_entry_get_text (GTK_ENTRY (dt_dialog->num_edit)));
|
*out_num = g_strdup (gtk_entry_get_text (GTK_ENTRY(dt_dialog->num_edit)));
|
||||||
if (tnum)
|
if (tnum)
|
||||||
*out_tnum = g_strdup (gtk_entry_get_text (GTK_ENTRY (dt_dialog->tnum_edit)));
|
*out_tnum = g_strdup (gtk_entry_get_text (GTK_ENTRY(dt_dialog->tnum_edit)));
|
||||||
if (tlink)
|
if (tlink)
|
||||||
{
|
{
|
||||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dt_dialog->link_edit)))
|
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dt_dialog->link_edit)))
|
||||||
@ -289,20 +336,23 @@ gnc_dup_trans_dialog_internal (GtkWidget * parent,
|
|||||||
else
|
else
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
|
|
||||||
gtk_widget_destroy(GTK_WIDGET(dt_dialog->dialog));
|
gtk_widget_destroy (GTK_WIDGET(dt_dialog->dialog));
|
||||||
g_free (dt_dialog);
|
g_free (dt_dialog);
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gnc_dup_trans_dialog (GtkWidget * parent, const char* title, gboolean show_date,
|
gnc_dup_trans_dialog (GtkWidget * parent, const char* title,
|
||||||
time64 *date_p, const char *num, char **out_num,
|
gboolean show_date, time64 *date_p,
|
||||||
|
const char *num, char **out_num,
|
||||||
const char *tnum, char **out_tnum,
|
const char *tnum, char **out_tnum,
|
||||||
const char *tlink, char **out_tlink)
|
const char *tlink, char **out_tlink)
|
||||||
{
|
{
|
||||||
return gnc_dup_trans_dialog_internal(parent, NULL, title, show_date, date_p, NULL,
|
return gnc_dup_trans_dialog_internal (parent, NULL, title,
|
||||||
num, out_num, tnum, out_tnum, tlink, out_tlink);
|
show_date, date_p, NULL,
|
||||||
|
num, out_num, tnum, out_tnum,
|
||||||
|
tlink, out_tlink);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
@ -310,29 +360,35 @@ gnc_dup_trans_dialog_gdate (GtkWidget * parent, GDate *gdate_p,
|
|||||||
const char *num, char **out_num)
|
const char *num, char **out_num)
|
||||||
{
|
{
|
||||||
time64 tmp_time;
|
time64 tmp_time;
|
||||||
g_assert(gdate_p);
|
g_assert (gdate_p);
|
||||||
|
|
||||||
tmp_time = gdate_to_time64 (*gdate_p);
|
tmp_time = gdate_to_time64 (*gdate_p);
|
||||||
return gnc_dup_trans_dialog_internal(parent, NULL, NULL, TRUE, &tmp_time, gdate_p,
|
return gnc_dup_trans_dialog_internal (parent, NULL, NULL, TRUE,
|
||||||
num, out_num, NULL, NULL, NULL, NULL);
|
&tmp_time, gdate_p,
|
||||||
|
num, out_num, NULL, NULL,
|
||||||
|
NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gnc_dup_time64_dialog (GtkWidget * parent, const char *window_title,
|
gnc_dup_time64_dialog (GtkWidget * parent, const char *window_title,
|
||||||
const char* title, time64 *date)
|
const char* title, time64 *date)
|
||||||
{
|
{
|
||||||
return gnc_dup_trans_dialog_internal(parent, window_title, title, TRUE, date, NULL,
|
return gnc_dup_trans_dialog_internal (parent, window_title, title, TRUE,
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
date, NULL,
|
||||||
|
NULL, NULL, NULL, NULL,
|
||||||
|
NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gnc_dup_date_dialog (GtkWidget * parent, const char* title, GDate *gdate_p)
|
gnc_dup_date_dialog (GtkWidget * parent, const char* title, GDate *gdate_p)
|
||||||
{
|
{
|
||||||
time64 tmp_time;
|
time64 tmp_time;
|
||||||
g_assert(gdate_p);
|
g_assert (gdate_p);
|
||||||
|
|
||||||
tmp_time = gdate_to_time64(*gdate_p);
|
tmp_time = gdate_to_time64 (*gdate_p);
|
||||||
return gnc_dup_trans_dialog_internal(parent, NULL, title, TRUE, &tmp_time, gdate_p,
|
return gnc_dup_trans_dialog_internal (parent, NULL, title, TRUE,
|
||||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
&tmp_time, gdate_p,
|
||||||
|
NULL, NULL, NULL, NULL,
|
||||||
|
NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,8 +50,9 @@
|
|||||||
* Return: TRUE if user closes dialog with 'OK' *
|
* Return: TRUE if user closes dialog with 'OK' *
|
||||||
\***********************************************************************/
|
\***********************************************************************/
|
||||||
gboolean
|
gboolean
|
||||||
gnc_dup_trans_dialog (GtkWidget * parent, const char* title, gboolean show_date,
|
gnc_dup_trans_dialog (GtkWidget * parent, const char* title,
|
||||||
time64 *date_p, const char *num, char **out_num,
|
gboolean show_date, time64 *date_p,
|
||||||
|
const char *num, char **out_num,
|
||||||
const char *tnum, char **out_tnum,
|
const char *tnum, char **out_tnum,
|
||||||
const char *tdoclink, char **out_tdoclink);
|
const char *tdoclink, char **out_tdoclink);
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -35,49 +35,49 @@ typedef struct gnc_option_win GNCOptionWin;
|
|||||||
|
|
||||||
typedef void (* GNCOptionWinCallback)(GNCOptionWin *, gpointer data);
|
typedef void (* GNCOptionWinCallback)(GNCOptionWin *, gpointer data);
|
||||||
|
|
||||||
GNCOptionWin * gnc_options_dialog_new_modal(gboolean modal, gchar *title,
|
GNCOptionWin * gnc_options_dialog_new_modal (gboolean modal, gchar *title,
|
||||||
const char *component_class,
|
const char *component_class,
|
||||||
GtkWindow *parent);
|
GtkWindow *parent);
|
||||||
GNCOptionWin * gnc_options_dialog_new(gchar *title, GtkWindow *parent);
|
GNCOptionWin * gnc_options_dialog_new (gchar *title, GtkWindow *parent);
|
||||||
GNCOptionWin * gnc_options_dialog_new_w_dialog(gchar *title, GtkWidget *dialog);
|
GNCOptionWin * gnc_options_dialog_new_w_dialog (gchar *title, GtkWidget *dialog);
|
||||||
void gnc_options_dialog_destroy(GNCOptionWin * win);
|
void gnc_options_dialog_destroy (GNCOptionWin * win);
|
||||||
void gnc_options_register_stocks (void);
|
void gnc_options_register_stocks (void);
|
||||||
|
|
||||||
GtkWidget * gnc_options_dialog_widget(GNCOptionWin * win);
|
GtkWidget * gnc_options_dialog_widget (GNCOptionWin * win);
|
||||||
GtkWidget * gnc_options_page_list(GNCOptionWin * win);
|
GtkWidget * gnc_options_page_list (GNCOptionWin * win);
|
||||||
GtkWidget * gnc_options_dialog_notebook(GNCOptionWin * win);
|
GtkWidget * gnc_options_dialog_notebook (GNCOptionWin * win);
|
||||||
|
|
||||||
void gnc_options_dialog_changed (GNCOptionWin *win);
|
void gnc_options_dialog_changed (GNCOptionWin *win);
|
||||||
|
|
||||||
void gnc_option_changed_widget_cb(GtkWidget *widget, GNCOption *option);
|
void gnc_option_changed_widget_cb (GtkWidget *widget, GNCOption *option);
|
||||||
void gnc_option_changed_option_cb(GtkWidget *dummy, GNCOption *option);
|
void gnc_option_changed_option_cb (GtkWidget *dummy, GNCOption *option);
|
||||||
|
|
||||||
void gnc_options_dialog_set_apply_cb(GNCOptionWin * win,
|
void gnc_options_dialog_set_apply_cb (GNCOptionWin * win,
|
||||||
GNCOptionWinCallback thunk,
|
GNCOptionWinCallback thunk,
|
||||||
gpointer cb_data);
|
gpointer cb_data);
|
||||||
void gnc_options_dialog_set_help_cb(GNCOptionWin * win,
|
void gnc_options_dialog_set_help_cb (GNCOptionWin * win,
|
||||||
GNCOptionWinCallback thunk,
|
|
||||||
gpointer cb_data);
|
|
||||||
void gnc_options_dialog_set_close_cb(GNCOptionWin * win,
|
|
||||||
GNCOptionWinCallback thunk,
|
GNCOptionWinCallback thunk,
|
||||||
gpointer cb_data);
|
gpointer cb_data);
|
||||||
|
void gnc_options_dialog_set_close_cb (GNCOptionWin * win,
|
||||||
|
GNCOptionWinCallback thunk,
|
||||||
|
gpointer cb_data);
|
||||||
|
|
||||||
void gnc_options_dialog_set_global_help_cb(GNCOptionWinCallback thunk,
|
void gnc_options_dialog_set_global_help_cb (GNCOptionWinCallback thunk,
|
||||||
gpointer cb_data);
|
gpointer cb_data);
|
||||||
|
|
||||||
void gnc_options_dialog_build_contents(GNCOptionWin *win,
|
void gnc_options_dialog_build_contents (GNCOptionWin *win,
|
||||||
GNCOptionDB *odb);
|
GNCOptionDB *odb);
|
||||||
|
|
||||||
void gnc_options_dialog_build_contents_full(GNCOptionWin *win,
|
void gnc_options_dialog_build_contents_full (GNCOptionWin *win,
|
||||||
GNCOptionDB *odb,
|
GNCOptionDB *odb,
|
||||||
gboolean show_dialog);
|
gboolean show_dialog);
|
||||||
|
|
||||||
/* Both apply_cb and close_cb should be scheme functions with 0 arguments.
|
/* Both apply_cb and close_cb should be scheme functions with 0 arguments.
|
||||||
* References to these functions will be held until the close_cb is called
|
* References to these functions will be held until the close_cb is called
|
||||||
*/
|
*/
|
||||||
void gnc_options_dialog_set_scm_callbacks (GNCOptionWin *win,
|
void gnc_options_dialog_set_scm_callbacks (GNCOptionWin *win,
|
||||||
SCM apply_cb,
|
SCM apply_cb,
|
||||||
SCM close_cb);
|
SCM close_cb);
|
||||||
|
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
/* Option Registration */
|
/* Option Registration */
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -409,6 +409,9 @@ tax_table_entries_refresh (TaxTableWindow *ttw)
|
|||||||
g_free (row_text[1]);
|
g_free (row_text[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (list)
|
||||||
|
g_list_free (list);
|
||||||
|
|
||||||
if (reference)
|
if (reference)
|
||||||
{
|
{
|
||||||
path = gtk_tree_row_reference_get_path (reference);
|
path = gtk_tree_row_reference_get_path (reference);
|
||||||
|
@ -89,35 +89,32 @@ gnc_account_sel_get_type (void)
|
|||||||
};
|
};
|
||||||
|
|
||||||
account_sel_type = g_type_register_static (GTK_TYPE_BOX,
|
account_sel_type = g_type_register_static (GTK_TYPE_BOX,
|
||||||
"GNCAccountSel",
|
"GNCAccountSel",
|
||||||
&account_sel_info, 0);
|
&account_sel_info, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return account_sel_type;
|
return account_sel_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static void
|
||||||
void
|
gnc_account_sel_event_cb (QofInstance *entity,
|
||||||
gnc_account_sel_event_cb( QofInstance *entity,
|
|
||||||
QofEventId event_type,
|
QofEventId event_type,
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
gpointer event_data )
|
gpointer event_data)
|
||||||
{
|
{
|
||||||
if ( ! ( event_type == QOF_EVENT_CREATE
|
if (!(event_type == QOF_EVENT_CREATE
|
||||||
|| event_type == QOF_EVENT_MODIFY
|
|| event_type == QOF_EVENT_MODIFY
|
||||||
|| event_type == QOF_EVENT_DESTROY )
|
|| event_type == QOF_EVENT_DESTROY)
|
||||||
|| !GNC_IS_ACCOUNT(entity) )
|
|| !GNC_IS_ACCOUNT(entity))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gas_populate_list( (GNCAccountSel*)user_data );
|
gas_populate_list ((GNCAccountSel*)user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static void
|
||||||
void
|
|
||||||
gnc_account_sel_class_init (GNCAccountSelClass *klass)
|
gnc_account_sel_class_init (GNCAccountSelClass *klass)
|
||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS(klass);
|
||||||
|
|
||||||
parent_class = g_type_class_peek_parent (klass);
|
parent_class = g_type_class_peek_parent (klass);
|
||||||
|
|
||||||
@ -137,14 +134,14 @@ gnc_account_sel_class_init (GNCAccountSelClass *klass)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
combo_changed_cb(GNCAccountSel *gas, gpointer combo)
|
combo_changed_cb (GNCAccountSel *gas, gpointer combo)
|
||||||
{
|
{
|
||||||
gint selected = gtk_combo_box_get_active (GTK_COMBO_BOX (combo));
|
gint selected = gtk_combo_box_get_active (GTK_COMBO_BOX(combo));
|
||||||
if (selected == gas->currentSelection)
|
if (selected == gas->currentSelection)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gas->currentSelection = selected;
|
gas->currentSelection = selected;
|
||||||
g_signal_emit_by_name(gas, "account_sel_changed");
|
g_signal_emit_by_name (gas, "account_sel_changed");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -159,37 +156,37 @@ gnc_account_sel_init (GNCAccountSel *gas)
|
|||||||
gas->newAccountButton = NULL;
|
gas->newAccountButton = NULL;
|
||||||
gas->currentSelection = -1;
|
gas->currentSelection = -1;
|
||||||
|
|
||||||
g_object_set(gas, "spacing", 2, (gchar*)NULL);
|
g_object_set (gas, "spacing", 2, (gchar*)NULL);
|
||||||
|
|
||||||
// Set the name for this widget so it can be easily manipulated with css
|
// Set the name for this widget so it can be easily manipulated with css
|
||||||
gtk_widget_set_name (GTK_WIDGET(gas), "gnc-id-account-select");
|
gtk_widget_set_name (GTK_WIDGET(gas), "gnc-id-account-select");
|
||||||
|
|
||||||
gas->store = gtk_list_store_new(NUM_ACCT_COLS, G_TYPE_STRING, G_TYPE_POINTER);
|
gas->store = gtk_list_store_new (NUM_ACCT_COLS, G_TYPE_STRING, G_TYPE_POINTER);
|
||||||
widget = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(gas->store));
|
widget = gtk_combo_box_new_with_model_and_entry (GTK_TREE_MODEL(gas->store));
|
||||||
gas->combo = GTK_COMBO_BOX(widget);
|
gas->combo = GTK_COMBO_BOX(widget);
|
||||||
gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(widget), ACCT_COL_NAME);
|
gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX(widget), ACCT_COL_NAME);
|
||||||
g_object_unref(gas->store);
|
g_object_unref (gas->store);
|
||||||
g_signal_connect_swapped(gas->combo, "changed",
|
g_signal_connect_swapped (gas->combo, "changed",
|
||||||
G_CALLBACK(combo_changed_cb), gas);
|
G_CALLBACK(combo_changed_cb), gas);
|
||||||
gtk_container_add( GTK_CONTAINER(gas), widget );
|
gtk_container_add (GTK_CONTAINER(gas), widget);
|
||||||
|
|
||||||
/* Add completion. */
|
/* Add completion. */
|
||||||
gnc_cbwe_require_list_item(GTK_COMBO_BOX(widget));
|
gnc_cbwe_require_list_item (GTK_COMBO_BOX(widget));
|
||||||
|
|
||||||
/* Get the accounts, place into combo list */
|
/* Get the accounts, place into combo list */
|
||||||
gas_populate_list( gas );
|
gas_populate_list (gas);
|
||||||
|
|
||||||
gas->eventHandlerId =
|
gas->eventHandlerId =
|
||||||
qof_event_register_handler( gnc_account_sel_event_cb, gas );
|
qof_event_register_handler (gnc_account_sel_event_cb, gas);
|
||||||
|
|
||||||
gas->initDone = TRUE;
|
gas->initDone = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gnc_account_sel_set_hexpand ( GNCAccountSel *gas, gboolean expand )
|
gnc_account_sel_set_hexpand (GNCAccountSel *gas, gboolean expand)
|
||||||
{
|
{
|
||||||
gtk_widget_set_hexpand( GTK_WIDGET(gas), expand );
|
gtk_widget_set_hexpand (GTK_WIDGET(gas), expand);
|
||||||
gtk_widget_set_hexpand( GTK_WIDGET(gas->combo), expand );
|
gtk_widget_set_hexpand (GTK_WIDGET(gas->combo), expand);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@ -198,9 +195,8 @@ typedef struct
|
|||||||
GList **outList;
|
GList **outList;
|
||||||
} account_filter_data;
|
} account_filter_data;
|
||||||
|
|
||||||
static
|
static void
|
||||||
void
|
gas_populate_list (GNCAccountSel *gas)
|
||||||
gas_populate_list( GNCAccountSel *gas )
|
|
||||||
{
|
{
|
||||||
account_filter_data atnd;
|
account_filter_data atnd;
|
||||||
Account *root;
|
Account *root;
|
||||||
@ -211,56 +207,52 @@ gas_populate_list( GNCAccountSel *gas )
|
|||||||
GList *accts, *ptr, *filteredAccts;
|
GList *accts, *ptr, *filteredAccts;
|
||||||
gchar *currentSel, *name;
|
gchar *currentSel, *name;
|
||||||
|
|
||||||
entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(gas->combo)));
|
entry = GTK_ENTRY(gtk_bin_get_child (GTK_BIN(gas->combo)));
|
||||||
currentSel = gtk_editable_get_chars(
|
currentSel = gtk_editable_get_chars (GTK_EDITABLE(entry), 0, -1 );
|
||||||
GTK_EDITABLE(entry), 0, -1 );
|
|
||||||
|
|
||||||
g_signal_handlers_block_by_func( gas->combo, combo_changed_cb , gas );
|
g_signal_handlers_block_by_func (gas->combo, combo_changed_cb , gas);
|
||||||
|
|
||||||
root = gnc_book_get_root_account( gnc_get_current_book() );
|
root = gnc_book_get_root_account (gnc_get_current_book ());
|
||||||
accts = gnc_account_get_descendants_sorted( root );
|
accts = gnc_account_get_descendants_sorted (root);
|
||||||
|
|
||||||
filteredAccts = NULL;
|
filteredAccts = NULL;
|
||||||
atnd.gas = gas;
|
atnd.gas = gas;
|
||||||
atnd.outList = &filteredAccts;
|
atnd.outList = &filteredAccts;
|
||||||
|
|
||||||
g_list_foreach( accts, gas_filter_accounts, (gpointer)&atnd );
|
g_list_foreach (accts, gas_filter_accounts, (gpointer)&atnd);
|
||||||
g_list_free( accts );
|
g_list_free (accts);
|
||||||
|
|
||||||
gtk_list_store_clear(gas->store);
|
gtk_list_store_clear (gas->store);
|
||||||
for (ptr = filteredAccts, i = 0; ptr; ptr = g_list_next(ptr), i++)
|
for (ptr = filteredAccts, i = 0; ptr; ptr = g_list_next(ptr), i++)
|
||||||
{
|
{
|
||||||
acc = ptr->data;
|
acc = ptr->data;
|
||||||
name = gnc_account_get_full_name(acc);
|
name = gnc_account_get_full_name (acc);
|
||||||
gtk_list_store_append(gas->store, &iter);
|
gtk_list_store_append (gas->store, &iter);
|
||||||
gtk_list_store_set(gas->store, &iter,
|
gtk_list_store_set (gas->store, &iter,
|
||||||
ACCT_COL_NAME, name,
|
ACCT_COL_NAME, name,
|
||||||
ACCT_COL_PTR, acc,
|
ACCT_COL_PTR, acc,
|
||||||
-1);
|
-1);
|
||||||
if (g_utf8_collate(name, currentSel) == 0)
|
if (g_utf8_collate (name, currentSel) == 0)
|
||||||
{
|
{
|
||||||
active = i;
|
active = i;
|
||||||
g_free(name);
|
g_free (name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the account which was in the text box before still exists, then
|
/* If the account which was in the text box before still exists, then
|
||||||
* reset to it. */
|
* reset to it. */
|
||||||
if (active != -1)
|
if (active != -1)
|
||||||
gtk_combo_box_set_active(GTK_COMBO_BOX(gas->combo), active);
|
gtk_combo_box_set_active (GTK_COMBO_BOX(gas->combo), active);
|
||||||
|
|
||||||
g_signal_handlers_unblock_by_func( gas->combo, combo_changed_cb , gas );
|
g_signal_handlers_unblock_by_func (gas->combo, combo_changed_cb , gas);
|
||||||
|
|
||||||
g_list_free( filteredAccts );
|
g_list_free (filteredAccts);
|
||||||
if ( currentSel )
|
if (currentSel)
|
||||||
{
|
g_free (currentSel);
|
||||||
g_free( currentSel );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static void
|
||||||
void
|
gas_filter_accounts (gpointer data, gpointer user_data)
|
||||||
gas_filter_accounts( gpointer data, gpointer user_data )
|
|
||||||
{
|
{
|
||||||
account_filter_data *atnd;
|
account_filter_data *atnd;
|
||||||
Account *a;
|
Account *a;
|
||||||
@ -268,53 +260,47 @@ gas_filter_accounts( gpointer data, gpointer user_data )
|
|||||||
atnd = (account_filter_data*)user_data;
|
atnd = (account_filter_data*)user_data;
|
||||||
a = (Account*)data;
|
a = (Account*)data;
|
||||||
/* Filter as we've been configured to do. */
|
/* Filter as we've been configured to do. */
|
||||||
if ( atnd->gas->acctTypeFilters )
|
if (atnd->gas->acctTypeFilters)
|
||||||
{
|
{
|
||||||
/* g_list_find is the poor-mans '(member ...)', especially
|
/* g_list_find is the poor-mans '(member ...)', especially
|
||||||
* easy when the data pointers in the list are just casted
|
* easy when the data pointers in the list are just casted
|
||||||
* account type identifiers. */
|
* account type identifiers. */
|
||||||
if ( g_list_find( atnd->gas->acctTypeFilters,
|
if (g_list_find (atnd->gas->acctTypeFilters,
|
||||||
GINT_TO_POINTER(xaccAccountGetType( a )) )
|
GINT_TO_POINTER(xaccAccountGetType (a)))
|
||||||
== NULL )
|
== NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( atnd->gas->acctCommodityFilters )
|
if (atnd->gas->acctCommodityFilters)
|
||||||
{
|
{
|
||||||
if ( g_list_find_custom( atnd->gas->acctCommodityFilters,
|
if (g_list_find_custom (atnd->gas->acctCommodityFilters,
|
||||||
GINT_TO_POINTER(xaccAccountGetCommodity( a )),
|
GINT_TO_POINTER(xaccAccountGetCommodity (a)),
|
||||||
gnc_commodity_compare_void)
|
gnc_commodity_compare_void)
|
||||||
== NULL )
|
== NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*atnd->outList = g_list_append (*atnd->outList, a);
|
||||||
|
|
||||||
*atnd->outList = g_list_append( *atnd->outList, a );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gnc_account_sel_new (void)
|
gnc_account_sel_new (void)
|
||||||
{
|
{
|
||||||
GNCAccountSel *gas;
|
GNCAccountSel *gas = g_object_new (GNC_TYPE_ACCOUNT_SEL, NULL);
|
||||||
|
|
||||||
gas = g_object_new (GNC_TYPE_ACCOUNT_SEL, NULL);
|
return GTK_WIDGET(gas);
|
||||||
|
|
||||||
return GTK_WIDGET (gas);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GNCAccountSel *gas;
|
GNCAccountSel *gas;
|
||||||
Account *acct;
|
Account *acct;
|
||||||
} gas_find_data;
|
} gas_find_data;
|
||||||
|
|
||||||
static
|
static gboolean
|
||||||
gboolean
|
|
||||||
gnc_account_sel_find_account (GtkTreeModel *model,
|
gnc_account_sel_find_account (GtkTreeModel *model,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
@ -322,93 +308,89 @@ gnc_account_sel_find_account (GtkTreeModel *model,
|
|||||||
{
|
{
|
||||||
Account *model_acc;
|
Account *model_acc;
|
||||||
|
|
||||||
gtk_tree_model_get(model, iter, ACCT_COL_PTR, &model_acc, -1);
|
gtk_tree_model_get (model, iter, ACCT_COL_PTR, &model_acc, -1);
|
||||||
if (data->acct != model_acc)
|
if (data->acct != model_acc)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
gtk_combo_box_set_active_iter(GTK_COMBO_BOX(data->gas->combo), iter);
|
gtk_combo_box_set_active_iter (GTK_COMBO_BOX(data->gas->combo), iter);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gnc_account_sel_set_account( GNCAccountSel *gas, Account *acct, gboolean set_default_acct )
|
gnc_account_sel_set_account (GNCAccountSel *gas, Account *acct,
|
||||||
|
gboolean set_default_acct)
|
||||||
{
|
{
|
||||||
gas_find_data data;
|
gas_find_data data;
|
||||||
|
|
||||||
if (set_default_acct)
|
if (set_default_acct)
|
||||||
{
|
{
|
||||||
gtk_combo_box_set_active(GTK_COMBO_BOX(gas->combo), 0);
|
gtk_combo_box_set_active (GTK_COMBO_BOX(gas->combo), 0);
|
||||||
if ( !acct )
|
if (!acct)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gtk_combo_box_set_active( GTK_COMBO_BOX(gas->combo), -1 );
|
gtk_combo_box_set_active (GTK_COMBO_BOX(gas->combo), -1 );
|
||||||
if ( !acct )
|
if (!acct)
|
||||||
{
|
{
|
||||||
GtkEntry *entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(gas->combo)));
|
GtkEntry *entry = GTK_ENTRY(gtk_bin_get_child (GTK_BIN(gas->combo)));
|
||||||
gtk_editable_delete_text(GTK_EDITABLE(entry), 0, -1);
|
gtk_editable_delete_text (GTK_EDITABLE(entry), 0, -1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data.gas = gas;
|
data.gas = gas;
|
||||||
data.acct = acct;
|
data.acct = acct;
|
||||||
gtk_tree_model_foreach(GTK_TREE_MODEL(gas->store),
|
gtk_tree_model_foreach (GTK_TREE_MODEL(gas->store),
|
||||||
(GtkTreeModelForeachFunc)gnc_account_sel_find_account,
|
(GtkTreeModelForeachFunc)gnc_account_sel_find_account,
|
||||||
&data);
|
&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
Account*
|
Account*
|
||||||
gnc_account_sel_get_account( GNCAccountSel *gas )
|
gnc_account_sel_get_account (GNCAccountSel *gas)
|
||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
Account *acc;
|
Account *acc;
|
||||||
|
|
||||||
if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(gas->combo), &iter))
|
if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX(gas->combo), &iter))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
gtk_tree_model_get(GTK_TREE_MODEL(gas->store), &iter,
|
gtk_tree_model_get (GTK_TREE_MODEL(gas->store), &iter,
|
||||||
ACCT_COL_PTR, &acc,
|
ACCT_COL_PTR, &acc,
|
||||||
-1);
|
-1);
|
||||||
return acc;
|
return acc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
gnc_account_sel_set_acct_filters( GNCAccountSel *gas, GList *typeFilters, GList *commodityFilters )
|
gnc_account_sel_set_acct_filters (GNCAccountSel *gas, GList *typeFilters,
|
||||||
|
GList *commodityFilters)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ( gas->acctTypeFilters != NULL )
|
if (gas->acctTypeFilters != NULL)
|
||||||
{
|
{
|
||||||
g_list_free( gas->acctTypeFilters );
|
g_list_free (gas->acctTypeFilters);
|
||||||
gas->acctTypeFilters = NULL;
|
gas->acctTypeFilters = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( gas->acctCommodityFilters != NULL)
|
if (gas->acctCommodityFilters != NULL)
|
||||||
{
|
{
|
||||||
g_list_free( gas->acctCommodityFilters );
|
g_list_free (gas->acctCommodityFilters);
|
||||||
gas->acctCommodityFilters = NULL;
|
gas->acctCommodityFilters = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If both filters are null, then no filters exist. */
|
/* If both filters are null, then no filters exist. */
|
||||||
if (( ! typeFilters ) && ( ! commodityFilters))
|
if ((!typeFilters) && (!commodityFilters))
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
/* This works because the GNCAccountTypes in the list are
|
/* This works because the GNCAccountTypes in the list are
|
||||||
* ints-casted-as-pointers. */
|
* ints-casted-as-pointers. */
|
||||||
if (typeFilters)
|
if (typeFilters)
|
||||||
{
|
gas->acctTypeFilters = g_list_copy (typeFilters);
|
||||||
gas->acctTypeFilters = g_list_copy( typeFilters );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Save the commodity filter list */
|
/* Save the commodity filter list */
|
||||||
if (commodityFilters)
|
if (commodityFilters)
|
||||||
{
|
gas->acctCommodityFilters = g_list_copy (commodityFilters);
|
||||||
gas->acctCommodityFilters = g_list_copy(commodityFilters);
|
|
||||||
}
|
|
||||||
|
|
||||||
gas_populate_list( gas );
|
gas_populate_list (gas);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -417,14 +399,12 @@ gnc_account_sel_finalize (GObject *object)
|
|||||||
GNCAccountSel *gas;
|
GNCAccountSel *gas;
|
||||||
|
|
||||||
g_return_if_fail (object != NULL);
|
g_return_if_fail (object != NULL);
|
||||||
g_return_if_fail (GNC_IS_ACCOUNT_SEL (object));
|
g_return_if_fail (GNC_IS_ACCOUNT_SEL(object));
|
||||||
|
|
||||||
gas = GNC_ACCOUNT_SEL (object);
|
gas = GNC_ACCOUNT_SEL(object);
|
||||||
|
|
||||||
if (gas->acctTypeFilters)
|
if (gas->acctTypeFilters)
|
||||||
{
|
|
||||||
g_list_free (gas->acctTypeFilters);
|
g_list_free (gas->acctTypeFilters);
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
@ -435,9 +415,9 @@ gnc_account_sel_dispose (GObject *object)
|
|||||||
GNCAccountSel *gas;
|
GNCAccountSel *gas;
|
||||||
|
|
||||||
g_return_if_fail (object != NULL);
|
g_return_if_fail (object != NULL);
|
||||||
g_return_if_fail (GNC_IS_ACCOUNT_SEL (object));
|
g_return_if_fail (GNC_IS_ACCOUNT_SEL(object));
|
||||||
|
|
||||||
gas = GNC_ACCOUNT_SEL (object);
|
gas = GNC_ACCOUNT_SEL(object);
|
||||||
|
|
||||||
if (gas->eventHandlerId)
|
if (gas->eventHandlerId)
|
||||||
{
|
{
|
||||||
@ -449,69 +429,75 @@ gnc_account_sel_dispose (GObject *object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gnc_account_sel_set_new_account_ability( GNCAccountSel *gas,
|
gnc_account_sel_set_new_account_ability (GNCAccountSel *gas,
|
||||||
gboolean state )
|
gboolean state)
|
||||||
{
|
{
|
||||||
g_return_if_fail (gas != NULL);
|
g_return_if_fail (gas != NULL);
|
||||||
|
|
||||||
if ( state == (gas->newAccountButton != NULL) )
|
if (state == (gas->newAccountButton != NULL))
|
||||||
{
|
{
|
||||||
/* We're already in that state; don't do anything. */
|
/* We're already in that state; don't do anything. */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( gas->newAccountButton )
|
if (gas->newAccountButton)
|
||||||
{
|
{
|
||||||
g_assert( state == TRUE );
|
g_assert (state == TRUE);
|
||||||
/* destroy the existing button. */
|
/* destroy the existing button. */
|
||||||
gtk_container_remove( GTK_CONTAINER(gas),
|
gtk_container_remove (GTK_CONTAINER(gas), gas->newAccountButton);
|
||||||
gas->newAccountButton );
|
gtk_widget_destroy (gas->newAccountButton);
|
||||||
gtk_widget_destroy( gas->newAccountButton );
|
|
||||||
gas->newAccountButton = NULL;
|
gas->newAccountButton = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create the button. */
|
/* create the button. */
|
||||||
gas->newAccountButton = gtk_button_new_with_label( _("New...") );
|
gas->newAccountButton = gtk_button_new_with_label (_("New..."));
|
||||||
g_signal_connect( gas->newAccountButton,
|
g_signal_connect (gas->newAccountButton,
|
||||||
"clicked",
|
"clicked",
|
||||||
G_CALLBACK( gas_new_account_click ),
|
G_CALLBACK(gas_new_account_click),
|
||||||
gas );
|
gas);
|
||||||
gtk_box_pack_start( GTK_BOX(gas), gas->newAccountButton,
|
|
||||||
FALSE, FALSE, 0 );
|
gtk_box_pack_start (GTK_BOX(gas), gas->newAccountButton,
|
||||||
|
FALSE, FALSE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gnc_account_sel_set_new_account_modal( GNCAccountSel *gas,
|
gnc_account_sel_set_new_account_modal (GNCAccountSel *gas,
|
||||||
gboolean state )
|
gboolean state)
|
||||||
{
|
{
|
||||||
g_return_if_fail (gas != NULL);
|
g_return_if_fail (gas != NULL);
|
||||||
gas->isModal = state;
|
gas->isModal = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gas_new_account_click( GtkButton *b, gpointer ud )
|
gas_new_account_click (GtkButton *b, gpointer ud)
|
||||||
{
|
{
|
||||||
GNCAccountSel *gas = (GNCAccountSel*)ud;
|
GNCAccountSel *gas = (GNCAccountSel*)ud;
|
||||||
GtkWindow *parent = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gas)));
|
Account *account = NULL;
|
||||||
|
GtkWindow *parent = GTK_WINDOW(gtk_widget_get_toplevel (GTK_WIDGET(gas)));
|
||||||
if (gas->isModal)
|
if (gas->isModal)
|
||||||
gnc_ui_new_accounts_from_name_window_with_types (parent, NULL,
|
{
|
||||||
gas->acctTypeFilters );
|
account = gnc_ui_new_accounts_from_name_window_with_types (parent, NULL,
|
||||||
|
gas->acctTypeFilters);
|
||||||
|
if (account)
|
||||||
|
gnc_account_sel_set_account (gas, account, FALSE);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
gnc_ui_new_account_with_types (parent, gnc_get_current_book(),
|
gnc_ui_new_account_with_types (parent, gnc_get_current_book(),
|
||||||
gas->acctTypeFilters );
|
gas->acctTypeFilters);
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
gnc_account_sel_get_num_account( GNCAccountSel *gas )
|
gnc_account_sel_get_num_account (GNCAccountSel *gas)
|
||||||
{
|
{
|
||||||
if (NULL == gas)
|
if (NULL == gas)
|
||||||
return 0;
|
return 0;
|
||||||
return gtk_tree_model_iter_n_children( GTK_TREE_MODEL(gas->store), NULL );
|
|
||||||
|
return gtk_tree_model_iter_n_children (GTK_TREE_MODEL(gas->store), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gnc_account_sel_purge_account( GNCAccountSel *gas,
|
gnc_account_sel_purge_account (GNCAccountSel *gas,
|
||||||
Account *target,
|
Account *target,
|
||||||
gboolean recursive)
|
gboolean recursive)
|
||||||
{
|
{
|
||||||
@ -520,43 +506,40 @@ gnc_account_sel_purge_account( GNCAccountSel *gas,
|
|||||||
Account *acc;
|
Account *acc;
|
||||||
gboolean more;
|
gboolean more;
|
||||||
|
|
||||||
if (!gtk_tree_model_get_iter_first(model, &iter))
|
if (!gtk_tree_model_get_iter_first (model, &iter))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!recursive)
|
if (!recursive)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
gtk_tree_model_get(model, &iter, ACCT_COL_PTR, &acc, -1);
|
gtk_tree_model_get (model, &iter, ACCT_COL_PTR, &acc, -1);
|
||||||
if (acc == target)
|
if (acc == target)
|
||||||
{
|
{
|
||||||
gtk_list_store_remove(gas->store, &iter);
|
gtk_list_store_remove (gas->store, &iter);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (gtk_tree_model_iter_next(model, &iter));
|
while (gtk_tree_model_iter_next (model, &iter));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
gtk_tree_model_get(model, &iter, ACCT_COL_PTR, &acc, -1);
|
gtk_tree_model_get (model, &iter, ACCT_COL_PTR, &acc, -1);
|
||||||
while (acc)
|
while (acc)
|
||||||
{
|
{
|
||||||
if (acc == target)
|
if (acc == target)
|
||||||
break;
|
break;
|
||||||
acc = gnc_account_get_parent(acc);
|
acc = gnc_account_get_parent (acc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (acc == target)
|
if (acc == target)
|
||||||
more = gtk_list_store_remove(gas->store, &iter);
|
more = gtk_list_store_remove (gas->store, &iter);
|
||||||
else
|
else
|
||||||
more = gtk_tree_model_iter_next(model, &iter);
|
more = gtk_tree_model_iter_next (model, &iter);
|
||||||
}
|
}
|
||||||
while (more);
|
while (more);
|
||||||
}
|
}
|
||||||
|
gtk_combo_box_set_active (GTK_COMBO_BOX(gas->combo), 0);
|
||||||
gtk_combo_box_set_active(GTK_COMBO_BOX(gas->combo), 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,12 +74,13 @@ GtkWidget* gnc_account_sel_new (void);
|
|||||||
* list, then it doesn't change the state of the GAS. If the account is
|
* list, then it doesn't change the state of the GAS. If the account is
|
||||||
* NULL, then the first list selection is made if set_default_acct is TRUE.
|
* NULL, then the first list selection is made if set_default_acct is TRUE.
|
||||||
**/
|
**/
|
||||||
void gnc_account_sel_set_account( GNCAccountSel *gas, Account *acct, gboolean set_default_acct );
|
void gnc_account_sel_set_account (GNCAccountSel *gas, Account *acct,
|
||||||
|
gboolean set_default_acct);
|
||||||
/**
|
/**
|
||||||
* Returns the currently-selected Account. If, for some reason the selection
|
* Returns the currently-selected Account. If, for some reason the selection
|
||||||
* is in a bad state, NULL will be returned.
|
* is in a bad state, NULL will be returned.
|
||||||
**/
|
**/
|
||||||
Account* gnc_account_sel_get_account( GNCAccountSel *gas );
|
Account* gnc_account_sel_get_account (GNCAccountSel *gas);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The GNCAccountSel can be setup to filter the accounts displayed.
|
* The GNCAccountSel can be setup to filter the accounts displayed.
|
||||||
@ -87,25 +88,24 @@ Account* gnc_account_sel_get_account( GNCAccountSel *gas );
|
|||||||
* @param commodityFilters A GList of gnc_commodity types which are allowed.
|
* @param commodityFilters A GList of gnc_commodity types which are allowed.
|
||||||
* The list is copied, of course.
|
* The list is copied, of course.
|
||||||
**/
|
**/
|
||||||
void gnc_account_sel_set_acct_filters( GNCAccountSel *gas, GList *typeFilters, GList *commodityFilters );
|
void gnc_account_sel_set_acct_filters (GNCAccountSel *gas, GList *typeFilters,
|
||||||
|
GList *commodityFilters);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Conditional inclusion of a new-account button to the right of the
|
* Conditional inclusion of a new-account button to the right of the
|
||||||
* combobox.
|
* combobox.
|
||||||
* @param state TRUE if the new-account button is desired, FALSE otherwise.
|
* @param state TRUE if the new-account button is desired, FALSE otherwise.
|
||||||
**/
|
**/
|
||||||
void gnc_account_sel_set_new_account_ability( GNCAccountSel *gas,
|
void gnc_account_sel_set_new_account_ability (GNCAccountSel *gas, gboolean state);
|
||||||
gboolean state );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Conditional call of the new-account window in modal mode.
|
* Conditional call of the new-account window in modal mode.
|
||||||
* @param state TRUE if the new-account window should be modal, FALSE otherwise.
|
* @param state TRUE if the new-account window should be modal, FALSE otherwise.
|
||||||
**/
|
**/
|
||||||
void gnc_account_sel_set_new_account_modal( GNCAccountSel *gas,
|
void gnc_account_sel_set_new_account_modal (GNCAccountSel *gas, gboolean state);
|
||||||
gboolean state );
|
|
||||||
|
|
||||||
gint gnc_account_sel_get_num_account( GNCAccountSel *gas );
|
gint gnc_account_sel_get_num_account (GNCAccountSel *gas);
|
||||||
void gnc_account_sel_purge_account( GNCAccountSel *gas, Account *acc, gboolean recursive);
|
void gnc_account_sel_purge_account (GNCAccountSel *gas, Account *acc, gboolean recursive);
|
||||||
void gnc_account_sel_set_hexpand ( GNCAccountSel *gas, gboolean expand);
|
void gnc_account_sel_set_hexpand (GNCAccountSel *gas, gboolean expand);
|
||||||
|
|
||||||
#endif /* GNC_ACCOUNT_SEL_H */
|
#endif /* GNC_ACCOUNT_SEL_H */
|
||||||
|
@ -112,6 +112,7 @@ static void
|
|||||||
gnc_popup_entry_init (GncPopupEntry *widget)
|
gnc_popup_entry_init (GncPopupEntry *widget)
|
||||||
{
|
{
|
||||||
GtkWidget *arrow;
|
GtkWidget *arrow;
|
||||||
|
GtkStyleContext *context;
|
||||||
|
|
||||||
widget->editing_canceled = FALSE;
|
widget->editing_canceled = FALSE;
|
||||||
|
|
||||||
@ -123,14 +124,17 @@ gnc_popup_entry_init (GncPopupEntry *widget)
|
|||||||
gtk_entry_set_visibility (GTK_ENTRY(widget->entry), TRUE);
|
gtk_entry_set_visibility (GTK_ENTRY(widget->entry), TRUE);
|
||||||
gtk_widget_show (widget->entry);
|
gtk_widget_show (widget->entry);
|
||||||
|
|
||||||
|
context = gtk_widget_get_style_context (widget->entry);
|
||||||
|
gtk_style_context_add_class (context, "combo");
|
||||||
|
|
||||||
widget->button = gtk_button_new ();
|
widget->button = gtk_button_new ();
|
||||||
gtk_widget_show (widget->button);
|
gtk_widget_show (widget->button);
|
||||||
|
|
||||||
arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON);
|
context = gtk_widget_get_style_context (widget->button);
|
||||||
gtk_widget_show (arrow);
|
gtk_style_context_add_class (context, "combo");
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT(arrow), "draw",
|
arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
|
||||||
G_CALLBACK(gnc_draw_arrow_cb), GINT_TO_POINTER(1));
|
gtk_widget_show (arrow);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER(widget->button), arrow);
|
gtk_container_add (GTK_CONTAINER(widget->button), arrow);
|
||||||
|
|
||||||
@ -144,6 +148,13 @@ gnc_popup_entry_init (GncPopupEntry *widget)
|
|||||||
gtk_widget_add_events (GTK_WIDGET(widget), GDK_KEY_RELEASE_MASK);
|
gtk_widget_add_events (GTK_WIDGET(widget), GDK_KEY_RELEASE_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gpw_grab_focus (GtkWidget *box)
|
||||||
|
{
|
||||||
|
GncPopupEntry *widget = GNC_POPUP_ENTRY(box);
|
||||||
|
gtk_widget_grab_focus (widget->entry);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gnc_popup_entry_class_init (GncPopupEntryClass *klass)
|
gnc_popup_entry_class_init (GncPopupEntryClass *klass)
|
||||||
{
|
{
|
||||||
@ -151,6 +162,7 @@ gnc_popup_entry_class_init (GncPopupEntryClass *klass)
|
|||||||
GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
|
GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
|
||||||
|
|
||||||
widget_class->key_press_event = gpw_key_press_event;
|
widget_class->key_press_event = gpw_key_press_event;
|
||||||
|
widget_class->grab_focus = gpw_grab_focus;
|
||||||
|
|
||||||
gobject_class->set_property = gpw_set_property;
|
gobject_class->set_property = gpw_set_property;
|
||||||
gobject_class->get_property = gpw_get_property;
|
gobject_class->get_property = gpw_get_property;
|
||||||
@ -249,7 +261,7 @@ gtk_cell_editable_key_press_event (GtkEntry *entry,
|
|||||||
if (qof_scan_date (date_string, &day, &month, &year))
|
if (qof_scan_date (date_string, &day, &month, &year))
|
||||||
{
|
{
|
||||||
when.tm_year = year - 1900;
|
when.tm_year = year - 1900;
|
||||||
when.tm_mon = month - 1 ;
|
when.tm_mon = month - 1;
|
||||||
when.tm_mday = day;
|
when.tm_mday = day;
|
||||||
|
|
||||||
if (!gnc_handle_date_accelerator (key_event, &when, date_string))
|
if (!gnc_handle_date_accelerator (key_event, &when, date_string))
|
||||||
@ -363,7 +375,7 @@ gnc_popup_get_button_width (void)
|
|||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
gtk_container_add (GTK_CONTAINER(window), button);
|
gtk_container_add (GTK_CONTAINER(window), button);
|
||||||
|
|
||||||
arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON);
|
arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
|
||||||
gtk_widget_show (arrow);
|
gtk_widget_show (arrow);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER(button), arrow);
|
gtk_container_add (GTK_CONTAINER(button), arrow);
|
||||||
|
@ -177,6 +177,7 @@ gnc_combott_init (GncCombott *combott)
|
|||||||
GtkWidget *arrow;
|
GtkWidget *arrow;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
GtkWidget *sep;
|
GtkWidget *sep;
|
||||||
|
GtkStyleContext *context;
|
||||||
|
|
||||||
GncCombottPrivate *priv = GNC_COMBOTT_GET_PRIVATE (combott);
|
GncCombottPrivate *priv = GNC_COMBOTT_GET_PRIVATE (combott);
|
||||||
|
|
||||||
@ -192,10 +193,7 @@ gnc_combott_init (GncCombott *combott)
|
|||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
gtk_box_set_homogeneous (GTK_BOX(hbox), FALSE);
|
gtk_box_set_homogeneous (GTK_BOX(hbox), FALSE);
|
||||||
|
|
||||||
arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON);
|
arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (arrow), "draw",
|
|
||||||
G_CALLBACK (gnc_draw_arrow_cb), GINT_TO_POINTER(1));
|
|
||||||
|
|
||||||
gtk_widget_set_margin_start (GTK_WIDGET(arrow), 5);
|
gtk_widget_set_margin_start (GTK_WIDGET(arrow), 5);
|
||||||
gtk_box_pack_end (GTK_BOX (hbox), arrow, FALSE, FALSE, 0);
|
gtk_box_pack_end (GTK_BOX (hbox), arrow, FALSE, FALSE, 0);
|
||||||
@ -207,10 +205,16 @@ gnc_combott_init (GncCombott *combott)
|
|||||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||||
priv->label = label;
|
priv->label = label;
|
||||||
|
|
||||||
|
context = gtk_widget_get_style_context (priv->label);
|
||||||
|
gtk_style_context_add_class (context, "combo");
|
||||||
|
|
||||||
button = gtk_button_new();
|
button = gtk_button_new();
|
||||||
gtk_container_add(GTK_CONTAINER(button), GTK_WIDGET(hbox));
|
gtk_container_add(GTK_CONTAINER(button), GTK_WIDGET(hbox));
|
||||||
priv->button = button;
|
priv->button = button;
|
||||||
|
|
||||||
|
context = gtk_widget_get_style_context (priv->button);
|
||||||
|
gtk_style_context_add_class (context, "combo");
|
||||||
|
|
||||||
gtk_container_add(GTK_CONTAINER(combott), GTK_WIDGET(button));
|
gtk_container_add(GTK_CONTAINER(combott), GTK_WIDGET(button));
|
||||||
|
|
||||||
g_signal_connect (button, "event",
|
g_signal_connect (button, "event",
|
||||||
|
@ -892,10 +892,7 @@ create_children (GNCDateEdit *gde)
|
|||||||
gtk_widget_show (GTK_WIDGET(gde->cal_label));
|
gtk_widget_show (GTK_WIDGET(gde->cal_label));
|
||||||
|
|
||||||
/* Graphic for the popup button. */
|
/* Graphic for the popup button. */
|
||||||
arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON);
|
arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (arrow), "draw",
|
|
||||||
G_CALLBACK (gnc_draw_arrow_cb), GINT_TO_POINTER(1));
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), arrow, TRUE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), arrow, TRUE, FALSE, 0);
|
||||||
gtk_widget_show (GTK_WIDGET(arrow));
|
gtk_widget_show (GTK_WIDGET(arrow));
|
||||||
|
@ -695,7 +695,7 @@ gnc_file_query_save (GtkWindow *parent, gboolean can_cancel)
|
|||||||
|
|
||||||
/* private utilities for file open; done in two stages */
|
/* private utilities for file open; done in two stages */
|
||||||
|
|
||||||
#define RESPONSE_NEW 1
|
#define RESPONSE_NO_FILE 1
|
||||||
#define RESPONSE_OPEN 2
|
#define RESPONSE_OPEN 2
|
||||||
#define RESPONSE_QUIT 3
|
#define RESPONSE_QUIT 3
|
||||||
#define RESPONSE_READONLY 4
|
#define RESPONSE_READONLY 4
|
||||||
@ -847,11 +847,11 @@ RESTART:
|
|||||||
gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), FALSE);
|
gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), FALSE);
|
||||||
|
|
||||||
gnc_gtk_dialog_add_button(dialog, _("_Open Read-Only"),
|
gnc_gtk_dialog_add_button(dialog, _("_Open Read-Only"),
|
||||||
"document-revert", RESPONSE_READONLY);
|
"emblem-readonly", RESPONSE_READONLY);
|
||||||
gnc_gtk_dialog_add_button(dialog, _("_Create New File"),
|
gnc_gtk_dialog_add_button(dialog, _("Open with _No File"),
|
||||||
"document-new", RESPONSE_NEW);
|
"document-new-symbolic", RESPONSE_NO_FILE);
|
||||||
gnc_gtk_dialog_add_button(dialog, _("Open _Anyway"),
|
gnc_gtk_dialog_add_button(dialog, _("Open _Anyway"),
|
||||||
"document-open", RESPONSE_OPEN);
|
"document-open-symbolic", RESPONSE_OPEN);
|
||||||
if (shutdown_cb)
|
if (shutdown_cb)
|
||||||
gtk_dialog_add_button(GTK_DIALOG(dialog),
|
gtk_dialog_add_button(GTK_DIALOG(dialog),
|
||||||
_("_Quit"), RESPONSE_QUIT);
|
_("_Quit"), RESPONSE_QUIT);
|
||||||
@ -861,7 +861,7 @@ RESTART:
|
|||||||
|
|
||||||
if (rc == GTK_RESPONSE_DELETE_EVENT)
|
if (rc == GTK_RESPONSE_DELETE_EVENT)
|
||||||
{
|
{
|
||||||
rc = shutdown_cb ? RESPONSE_QUIT : RESPONSE_NEW;
|
rc = shutdown_cb ? RESPONSE_QUIT : RESPONSE_NO_FILE;
|
||||||
}
|
}
|
||||||
switch (rc)
|
switch (rc)
|
||||||
{
|
{
|
||||||
@ -881,10 +881,9 @@ RESTART:
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Can't use the given file, so just create a new
|
/* Can't use the given file, so just create a new
|
||||||
* database so that the user will get a window that
|
* Gnucash window so they can choose File->New, File->Open
|
||||||
* they can click "Exit" on.
|
* or just "Exit".
|
||||||
*/
|
*/
|
||||||
gnc_file_new (parent);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,20 @@ gnc_options_dialog_set_new_book_option_values (GNCOptionDB *odb)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gnc_style_sheet_options_help_cb (GNCOptionWin *win, gpointer dat)
|
||||||
|
{
|
||||||
|
gnc_gnome_help (HF_HELP, HL_STYLE_SHEET);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gnc_options_dialog_set_style_sheet_options_help_cb (GNCOptionWin *win)
|
||||||
|
{
|
||||||
|
gnc_options_dialog_set_help_cb (win,
|
||||||
|
(GNCOptionWinCallback)gnc_style_sheet_options_help_cb,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gnc_commodity_help_cb (void)
|
gnc_commodity_help_cb (void)
|
||||||
{
|
{
|
||||||
|
@ -73,6 +73,11 @@ void gnc_options_dialog_set_book_options_help_cb (GNCOptionWin *win);
|
|||||||
*/
|
*/
|
||||||
void gnc_options_dialog_set_new_book_option_values (GNCOptionDB *odb);
|
void gnc_options_dialog_set_new_book_option_values (GNCOptionDB *odb);
|
||||||
|
|
||||||
|
/** Set the help callback to 'gnc_style_sheet_options_help_cb' to open a help browser
|
||||||
|
* and point it to the Style Sheet link in the Help file.
|
||||||
|
*/
|
||||||
|
void gnc_options_dialog_set_style_sheet_options_help_cb (GNCOptionWin *win);
|
||||||
|
|
||||||
/** Given a file name, find and load the requested pixmap. This
|
/** Given a file name, find and load the requested pixmap. This
|
||||||
* routine will display an error message if it can't find the file or
|
* routine will display an error message if it can't find the file or
|
||||||
* load the pixmap.
|
* load the pixmap.
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
#include "gnc-ui-util.h"
|
#include "gnc-ui-util.h"
|
||||||
#include "gnc-uri-utils.h"
|
#include "gnc-uri-utils.h"
|
||||||
#include "gnc-version.h"
|
#include "gnc-version.h"
|
||||||
|
#include "gnc-warnings.h"
|
||||||
#include "gnc-window.h"
|
#include "gnc-window.h"
|
||||||
#include "gnc-prefs.h"
|
#include "gnc-prefs.h"
|
||||||
#include "option-util.h"
|
#include "option-util.h"
|
||||||
@ -231,6 +232,8 @@ typedef struct GncMainWindowPrivate
|
|||||||
* group, the values are structures of type
|
* group, the values are structures of type
|
||||||
* MergedActionEntry. */
|
* MergedActionEntry. */
|
||||||
GHashTable *merged_actions_table;
|
GHashTable *merged_actions_table;
|
||||||
|
/** Set when restoring plugin pages */
|
||||||
|
gboolean restoring_pages;
|
||||||
} GncMainWindowPrivate;
|
} GncMainWindowPrivate;
|
||||||
|
|
||||||
GNC_DEFINE_TYPE_WITH_CODE(GncMainWindow, gnc_main_window, GTK_TYPE_WINDOW,
|
GNC_DEFINE_TYPE_WITH_CODE(GncMainWindow, gnc_main_window, GTK_TYPE_WINDOW,
|
||||||
@ -529,6 +532,14 @@ typedef struct
|
|||||||
} GncMainWindowSaveData;
|
} GncMainWindowSaveData;
|
||||||
|
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gnc_main_window_is_restoring_pages (GncMainWindow *window)
|
||||||
|
{
|
||||||
|
GncMainWindowPrivate *priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
|
||||||
|
return priv->restoring_pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Iterator function to walk all pages in all windows, calling the
|
/* Iterator function to walk all pages in all windows, calling the
|
||||||
* specified function for each page. */
|
* specified function for each page. */
|
||||||
void
|
void
|
||||||
@ -853,7 +864,7 @@ gnc_main_window_restore_window (GncMainWindow *window, GncMainWindowSaveData *da
|
|||||||
{
|
{
|
||||||
gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), desired_visibility);
|
gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), desired_visibility);
|
||||||
}
|
}
|
||||||
|
priv->restoring_pages = TRUE;
|
||||||
/* Now populate the window with pages. */
|
/* Now populate the window with pages. */
|
||||||
for (i = 0; i < page_count; i++)
|
for (i = 0; i < page_count; i++)
|
||||||
{
|
{
|
||||||
@ -865,7 +876,7 @@ gnc_main_window_restore_window (GncMainWindow *window, GncMainWindowSaveData *da
|
|||||||
while (gtk_events_pending ())
|
while (gtk_events_pending ())
|
||||||
gtk_main_iteration ();
|
gtk_main_iteration ();
|
||||||
}
|
}
|
||||||
|
priv->restoring_pages = FALSE;
|
||||||
/* Restore page ordering within the notebook. Use +1 notation so the
|
/* Restore page ordering within the notebook. Use +1 notation so the
|
||||||
* numbers in the page order match the page sections, at least for
|
* numbers in the page order match the page sections, at least for
|
||||||
* the one window case. */
|
* the one window case. */
|
||||||
@ -899,6 +910,9 @@ gnc_main_window_restore_window (GncMainWindow *window, GncMainWindowSaveData *da
|
|||||||
}
|
}
|
||||||
gtk_notebook_set_current_page (GTK_NOTEBOOK(priv->notebook),
|
gtk_notebook_set_current_page (GTK_NOTEBOOK(priv->notebook),
|
||||||
order[0] - 1);
|
order[0] - 1);
|
||||||
|
|
||||||
|
g_signal_emit_by_name (window, "page_changed",
|
||||||
|
g_list_nth_data (priv->usage_order, 0));
|
||||||
}
|
}
|
||||||
if (order)
|
if (order)
|
||||||
{
|
{
|
||||||
@ -1391,8 +1405,14 @@ gnc_main_window_quit(GncMainWindow *window)
|
|||||||
}
|
}
|
||||||
if (do_shutdown)
|
if (do_shutdown)
|
||||||
{
|
{
|
||||||
|
GList *w;
|
||||||
|
|
||||||
|
for (w = active_windows; w; w = g_list_next (w))
|
||||||
|
{
|
||||||
|
window = w->data;
|
||||||
|
window->window_quitting = TRUE; // set window_quitting on all windows
|
||||||
|
}
|
||||||
/* remove the preference callbacks from the main window */
|
/* remove the preference callbacks from the main window */
|
||||||
window->window_quitting = TRUE;
|
|
||||||
gnc_main_window_remove_prefs (window);
|
gnc_main_window_remove_prefs (window);
|
||||||
g_timeout_add(250, gnc_main_window_timed_quit, NULL);
|
g_timeout_add(250, gnc_main_window_timed_quit, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1410,6 +1430,32 @@ gnc_main_window_delete_event (GtkWidget *window,
|
|||||||
if (already_dead)
|
if (already_dead)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
if (g_list_length (active_windows) > 1)
|
||||||
|
{
|
||||||
|
gint response;
|
||||||
|
GtkWidget *dialog;
|
||||||
|
gchar *message = _("This window is closing and will not be restored.");
|
||||||
|
|
||||||
|
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||||
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
|
GTK_MESSAGE_QUESTION,
|
||||||
|
GTK_BUTTONS_NONE,
|
||||||
|
"%s", _("Close Window?"));
|
||||||
|
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(dialog),
|
||||||
|
"%s", message);
|
||||||
|
|
||||||
|
gtk_dialog_add_buttons (GTK_DIALOG(dialog),
|
||||||
|
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||||
|
_("_OK"), GTK_RESPONSE_YES,
|
||||||
|
(gchar *)NULL);
|
||||||
|
gtk_dialog_set_default_response (GTK_DIALOG(dialog), GTK_RESPONSE_YES);
|
||||||
|
response = gnc_dialog_run (GTK_DIALOG(dialog), GNC_PREF_WARN_CLOSING_WINDOW_QUESTION);
|
||||||
|
gtk_widget_destroy (dialog);
|
||||||
|
|
||||||
|
if (response == GTK_RESPONSE_CANCEL)
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!gnc_main_window_finish_pending(GNC_MAIN_WINDOW(window)))
|
if (!gnc_main_window_finish_pending(GNC_MAIN_WINDOW(window)))
|
||||||
{
|
{
|
||||||
/* Don't close the window. */
|
/* Don't close the window. */
|
||||||
@ -2581,6 +2627,8 @@ gnc_main_window_init (GncMainWindow *window, void *data)
|
|||||||
priv->event_handler_id =
|
priv->event_handler_id =
|
||||||
qof_event_register_handler(gnc_main_window_event_handler, window);
|
qof_event_register_handler(gnc_main_window_event_handler, window);
|
||||||
|
|
||||||
|
priv->restoring_pages = FALSE;
|
||||||
|
|
||||||
/* Get the show_color_tabs value preference */
|
/* Get the show_color_tabs value preference */
|
||||||
priv->show_color_tabs = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_COLOR);
|
priv->show_color_tabs = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_COLOR);
|
||||||
|
|
||||||
@ -2728,6 +2776,58 @@ gnc_main_window_destroy (GtkWidget *widget)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gnc_main_window_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
|
||||||
|
{
|
||||||
|
GncMainWindowPrivate *priv;
|
||||||
|
GdkModifierType modifiers;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GNC_IS_MAIN_WINDOW(widget), FALSE);
|
||||||
|
|
||||||
|
priv = GNC_MAIN_WINDOW_GET_PRIVATE(widget);
|
||||||
|
|
||||||
|
modifiers = gtk_accelerator_get_default_mod_mask ();
|
||||||
|
|
||||||
|
if ((event->state & modifiers) == (GDK_CONTROL_MASK | GDK_MOD1_MASK)) // Ctrl+Alt+
|
||||||
|
{
|
||||||
|
const gchar *account_key = C_ ("lower case key for short cut to 'Accounts'", "a");
|
||||||
|
guint account_keyval = gdk_keyval_from_name (account_key);
|
||||||
|
|
||||||
|
if ((account_keyval == event->keyval) || (account_keyval == gdk_keyval_to_lower (event->keyval)))
|
||||||
|
{
|
||||||
|
gint page = 0;
|
||||||
|
|
||||||
|
for (GList *item = priv->installed_pages; item; item = g_list_next (item))
|
||||||
|
{
|
||||||
|
const gchar *pname = gnc_plugin_page_get_plugin_name (GNC_PLUGIN_PAGE(item->data));
|
||||||
|
|
||||||
|
if (g_strcmp0 (pname, "GncPluginPageAccountTree") == 0)
|
||||||
|
{
|
||||||
|
gtk_notebook_set_current_page (GTK_NOTEBOOK(priv->notebook), page);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
page++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((GDK_KEY_Menu == event->keyval) || (GDK_KEY_space == event->keyval))
|
||||||
|
{
|
||||||
|
GList *menu = gtk_menu_get_for_attach_widget (GTK_WIDGET(priv->notebook));
|
||||||
|
|
||||||
|
if (menu)
|
||||||
|
{
|
||||||
|
gtk_menu_popup_at_widget (GTK_MENU(menu->data),
|
||||||
|
GTK_WIDGET(priv->notebook),
|
||||||
|
GDK_GRAVITY_SOUTH,
|
||||||
|
GDK_GRAVITY_SOUTH,
|
||||||
|
NULL);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Create a new gnc main window plugin.
|
/* Create a new gnc main window plugin.
|
||||||
*/
|
*/
|
||||||
GncMainWindow *
|
GncMainWindow *
|
||||||
@ -2762,6 +2862,11 @@ gnc_main_window_new (void)
|
|||||||
#endif
|
#endif
|
||||||
gnc_engine_add_commit_error_callback( gnc_main_window_engine_commit_error_callback, window );
|
gnc_engine_add_commit_error_callback( gnc_main_window_engine_commit_error_callback, window );
|
||||||
|
|
||||||
|
// set up a callback for noteboook navigation
|
||||||
|
g_signal_connect (G_OBJECT(window), "key-press-event",
|
||||||
|
G_CALLBACK(gnc_main_window_key_press_event),
|
||||||
|
NULL);
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3133,21 +3238,25 @@ gnc_main_window_close_page (GncPluginPage *page)
|
|||||||
priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
|
priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
|
||||||
if (priv->installed_pages == NULL)
|
if (priv->installed_pages == NULL)
|
||||||
{
|
{
|
||||||
GncPluginManager *manager = gnc_plugin_manager_get ();
|
if (window->window_quitting)
|
||||||
GList *plugins = gnc_plugin_manager_get_plugins (manager);
|
|
||||||
|
|
||||||
/* remove only the preference callbacks from the window plugins */
|
|
||||||
window->just_plugin_prefs = TRUE;
|
|
||||||
g_list_foreach (plugins, gnc_main_window_remove_plugin, window);
|
|
||||||
window->just_plugin_prefs = FALSE;
|
|
||||||
g_list_free (plugins);
|
|
||||||
|
|
||||||
/* remove the preference callbacks from the main window */
|
|
||||||
gnc_main_window_remove_prefs (window);
|
|
||||||
|
|
||||||
if (g_list_length(active_windows) > 1)
|
|
||||||
{
|
{
|
||||||
gtk_widget_destroy(GTK_WIDGET(window));
|
GncPluginManager *manager = gnc_plugin_manager_get ();
|
||||||
|
GList *plugins = gnc_plugin_manager_get_plugins (manager);
|
||||||
|
|
||||||
|
/* remove only the preference callbacks from the window plugins */
|
||||||
|
window->just_plugin_prefs = TRUE;
|
||||||
|
g_list_foreach (plugins, gnc_main_window_remove_plugin, window);
|
||||||
|
window->just_plugin_prefs = FALSE;
|
||||||
|
g_list_free (plugins);
|
||||||
|
|
||||||
|
/* remove the preference callbacks from the main window */
|
||||||
|
gnc_main_window_remove_prefs (window);
|
||||||
|
|
||||||
|
gtk_widget_destroy (GTK_WIDGET(window));
|
||||||
|
}
|
||||||
|
if (g_list_length (active_windows) > 1)
|
||||||
|
{
|
||||||
|
gtk_widget_destroy (GTK_WIDGET(window));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -348,6 +348,16 @@ gboolean gnc_main_window_popup_menu_cb (GtkWidget *widget,
|
|||||||
*/
|
*/
|
||||||
void gnc_main_window_restore_all_windows(const GKeyFile *keyfile);
|
void gnc_main_window_restore_all_windows(const GKeyFile *keyfile);
|
||||||
|
|
||||||
|
/** Check if the main window is restoring the plugin pages. This is
|
||||||
|
* used on report pages to delay the creation of the report till the
|
||||||
|
* page is focused.
|
||||||
|
*
|
||||||
|
* @param window When window whose pages should be checked.
|
||||||
|
*
|
||||||
|
* @return TRUE if pages are being restored
|
||||||
|
*/
|
||||||
|
gboolean gnc_main_window_is_restoring_pages (GncMainWindow *window);
|
||||||
|
|
||||||
/** Save the persistent state of all windows.
|
/** Save the persistent state of all windows.
|
||||||
*
|
*
|
||||||
* @param keyfile The GKeyFile to contain persistent window state.
|
* @param keyfile The GKeyFile to contain persistent window state.
|
||||||
|
@ -420,6 +420,7 @@ gnc_tree_model_account_get_column_type (GtkTreeModel *tree_model, int index)
|
|||||||
|
|
||||||
case GNC_TREE_MODEL_ACCOUNT_COL_HIDDEN:
|
case GNC_TREE_MODEL_ACCOUNT_COL_HIDDEN:
|
||||||
case GNC_TREE_MODEL_ACCOUNT_COL_PLACEHOLDER:
|
case GNC_TREE_MODEL_ACCOUNT_COL_PLACEHOLDER:
|
||||||
|
case GNC_TREE_MODEL_ACCOUNT_COL_OPENING_BALANCE:
|
||||||
return G_TYPE_BOOLEAN;
|
return G_TYPE_BOOLEAN;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -956,6 +957,11 @@ gnc_tree_model_account_get_value (GtkTreeModel *tree_model,
|
|||||||
g_value_set_boolean (value, xaccAccountGetPlaceholder (account));
|
g_value_set_boolean (value, xaccAccountGetPlaceholder (account));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case GNC_TREE_MODEL_ACCOUNT_COL_OPENING_BALANCE:
|
||||||
|
g_value_init (value, G_TYPE_BOOLEAN);
|
||||||
|
g_value_set_boolean (value, xaccAccountGetIsOpeningBalance (account));
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
break;
|
break;
|
||||||
|
@ -81,8 +81,9 @@ typedef enum
|
|||||||
GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO_SUB_ACCT,
|
GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO_SUB_ACCT,
|
||||||
GNC_TREE_MODEL_ACCOUNT_COL_HIDDEN,
|
GNC_TREE_MODEL_ACCOUNT_COL_HIDDEN,
|
||||||
GNC_TREE_MODEL_ACCOUNT_COL_PLACEHOLDER,
|
GNC_TREE_MODEL_ACCOUNT_COL_PLACEHOLDER,
|
||||||
|
GNC_TREE_MODEL_ACCOUNT_COL_OPENING_BALANCE,
|
||||||
|
|
||||||
GNC_TREE_MODEL_ACCOUNT_COL_LAST_VISIBLE = GNC_TREE_MODEL_ACCOUNT_COL_PLACEHOLDER,
|
GNC_TREE_MODEL_ACCOUNT_COL_LAST_VISIBLE = GNC_TREE_MODEL_ACCOUNT_COL_OPENING_BALANCE,
|
||||||
|
|
||||||
/* internal hidden columns */
|
/* internal hidden columns */
|
||||||
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_PRESENT,
|
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_PRESENT,
|
||||||
|
@ -164,7 +164,7 @@ gnc_tree_model_price_init (GncTreeModelPrice *model)
|
|||||||
}
|
}
|
||||||
|
|
||||||
priv = GNC_TREE_MODEL_PRICE_GET_PRIVATE(model);
|
priv = GNC_TREE_MODEL_PRICE_GET_PRIVATE(model);
|
||||||
priv->print_info = gnc_share_print_info_places(6);
|
priv->print_info = gnc_default_price_print_info(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -494,6 +494,29 @@ sort_by_placeholder (GtkTreeModel *f_model,
|
|||||||
return xaccAccountOrder(account_a, account_b);
|
return xaccAccountOrder(account_a, account_b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gint
|
||||||
|
sort_by_opening_balance (GtkTreeModel *f_model,
|
||||||
|
GtkTreeIter *f_iter_a,
|
||||||
|
GtkTreeIter *f_iter_b,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
const Account *account_a, *account_b;
|
||||||
|
gboolean flag_a, flag_b;
|
||||||
|
|
||||||
|
/* Find the accounts */
|
||||||
|
sort_cb_setup (f_model, f_iter_a, f_iter_b, &account_a, &account_b);
|
||||||
|
|
||||||
|
/* Get the opening balance flags. */
|
||||||
|
flag_a = xaccAccountGetIsOpeningBalance (account_a);
|
||||||
|
flag_b = xaccAccountGetIsOpeningBalance (account_b);
|
||||||
|
|
||||||
|
if (flag_a > flag_b)
|
||||||
|
return -1;
|
||||||
|
else if (flag_a < flag_b)
|
||||||
|
return 1;
|
||||||
|
return xaccAccountOrder(account_a, account_b);
|
||||||
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
sort_by_xxx_period_value (GtkTreeModel *f_model,
|
sort_by_xxx_period_value (GtkTreeModel *f_model,
|
||||||
GtkTreeIter *f_iter_a,
|
GtkTreeIter *f_iter_a,
|
||||||
@ -970,6 +993,14 @@ gnc_tree_view_account_new_with_root (Account *root, gboolean show_root)
|
|||||||
sort_by_placeholder,
|
sort_by_placeholder,
|
||||||
gnc_tree_view_account_placeholder_toggled);
|
gnc_tree_view_account_placeholder_toggled);
|
||||||
|
|
||||||
|
gnc_tree_view_add_toggle_column(view, _("Opening Balance"),
|
||||||
|
C_("Column header for 'Opening Balance'", "O"),
|
||||||
|
"opening-balance",
|
||||||
|
GNC_TREE_MODEL_ACCOUNT_COL_OPENING_BALANCE,
|
||||||
|
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||||
|
sort_by_opening_balance,
|
||||||
|
NULL);
|
||||||
|
|
||||||
/* Add function to each column that optionally sets a background color for accounts */
|
/* Add function to each column that optionally sets a background color for accounts */
|
||||||
col_list = gtk_tree_view_get_columns(GTK_TREE_VIEW(view));
|
col_list = gtk_tree_view_get_columns(GTK_TREE_VIEW(view));
|
||||||
for (node = col_list; node; node = node->next)
|
for (node = col_list; node; node = node->next)
|
||||||
|
@ -274,7 +274,7 @@ gnc_tree_view_init (GncTreeView *view, void *data)
|
|||||||
/* Create the last column which contains the column selection
|
/* Create the last column which contains the column selection
|
||||||
* widget. gnc_tree_view_add_text_column will do most of the
|
* widget. gnc_tree_view_add_text_column will do most of the
|
||||||
* work. */
|
* work. */
|
||||||
icon = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_SMALL_TOOLBAR);
|
icon = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR);
|
||||||
|
|
||||||
priv->column_menu_icon_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
priv->column_menu_icon_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
gtk_box_set_homogeneous (GTK_BOX(priv->column_menu_icon_box), FALSE);
|
gtk_box_set_homogeneous (GTK_BOX(priv->column_menu_icon_box), FALSE);
|
||||||
@ -288,9 +288,6 @@ gnc_tree_view_init (GncTreeView *view, void *data)
|
|||||||
|
|
||||||
gtk_widget_show_all (priv->column_menu_icon_box);
|
gtk_widget_show_all (priv->column_menu_icon_box);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT(icon), "draw",
|
|
||||||
G_CALLBACK(gnc_draw_arrow_cb), GINT_TO_POINTER(1));
|
|
||||||
|
|
||||||
column = gnc_tree_view_add_text_column (view, NULL, NULL, NULL, NULL,
|
column = gnc_tree_view_add_text_column (view, NULL, NULL, NULL, NULL,
|
||||||
-1, -1, NULL);
|
-1, -1, NULL);
|
||||||
g_object_set (G_OBJECT(column),
|
g_object_set (G_OBJECT(column),
|
||||||
|
@ -51,13 +51,14 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Links in the Help Files *****************************************/
|
/** Links in the Help Files *****************************************/
|
||||||
#define HL_USAGE "usage"
|
#define HL_USAGE_BSNSS "busnss-ar-setup1"
|
||||||
#define HL_USAGE_BSNSS "chapter_busnss"
|
|
||||||
#define HL_USAGE_INVOICE "busnss-ar-invoices1"
|
#define HL_USAGE_INVOICE "busnss-ar-invoices1"
|
||||||
|
#define HL_USAGE_VOUCHER "busnss-emply-newvchr"
|
||||||
#define HL_USAGE_BILL "busnss-ap-bills1"
|
#define HL_USAGE_BILL "busnss-ap-bills1"
|
||||||
#define HL_USAGE_CUSTOMER "busnss-ar-customers1"
|
#define HL_USAGE_CUSTOMER "busnss-ar-customers1"
|
||||||
#define HL_USAGE_VENDOR "busnss-ap-vendors1"
|
#define HL_USAGE_VENDOR "busnss-ap-vendors1"
|
||||||
#define HL_USAGE_EMPLOYEE "busnss-emply"
|
#define HL_USAGE_EMPLOYEE "busnss-emply"
|
||||||
|
#define HL_USAGE_JOB "busnss-ar-jobs1"
|
||||||
#define HL_ACC "acct-create"
|
#define HL_ACC "acct-create"
|
||||||
#define HL_ACCEDIT "acct-edit"
|
#define HL_ACCEDIT "acct-edit"
|
||||||
#define HL_COMMODITY "tool-commodity"
|
#define HL_COMMODITY "tool-commodity"
|
||||||
@ -65,10 +66,13 @@
|
|||||||
#define HL_GLOBPREFS "set-prefs"
|
#define HL_GLOBPREFS "set-prefs"
|
||||||
#define HL_PRINTCHECK "print-check"
|
#define HL_PRINTCHECK "print-check"
|
||||||
#define HL_RECNWIN "acct-reconcile"
|
#define HL_RECNWIN "acct-reconcile"
|
||||||
#define HL_SXEDITOR "tool-sched"
|
#define HL_SXEDITOR "trans-sched"
|
||||||
#define HL_BOOK_OPTIONS "book-options"
|
#define HL_BOOK_OPTIONS "book-options"
|
||||||
|
#define HL_STYLE_SHEET "change-style"
|
||||||
#define HL_CLOSE_BOOK "tool-close-book"
|
#define HL_CLOSE_BOOK "tool-close-book"
|
||||||
#define HL_USAGE_CUSTOMREP "report-custom"
|
#define HL_USAGE_CUSTOMREP "report-saving"
|
||||||
|
#define HL_IMPORT_BC "busnss-imp-bills-invoices"
|
||||||
|
#define HL_IMPORT_CUST "busnss-imp-customer-vendor"
|
||||||
|
|
||||||
/* GTK Windows - Common Response Codes */
|
/* GTK Windows - Common Response Codes */
|
||||||
|
|
||||||
|
@ -1423,13 +1423,6 @@ on_finish (GtkAssistant *gtkassistant,
|
|||||||
ENTER (" ");
|
ENTER (" ");
|
||||||
com = gnc_currency_edit_get_currency (GNC_CURRENCY_EDIT(data->currency_selector));
|
com = gnc_currency_edit_get_currency (GNC_CURRENCY_EDIT(data->currency_selector));
|
||||||
|
|
||||||
if (data->our_account_tree)
|
|
||||||
{
|
|
||||||
gnc_account_foreach_descendant (data->our_account_tree,
|
|
||||||
(AccountCb)starting_balance_helper,
|
|
||||||
data);
|
|
||||||
}
|
|
||||||
|
|
||||||
// delete before we suspend GUI events, and then muck with the model,
|
// delete before we suspend GUI events, and then muck with the model,
|
||||||
// because the model doesn't seem to handle this correctly.
|
// because the model doesn't seem to handle this correctly.
|
||||||
if (data->initial_category)
|
if (data->initial_category)
|
||||||
@ -1452,6 +1445,13 @@ on_finish (GtkAssistant *gtkassistant,
|
|||||||
|
|
||||||
gnc_resume_gui_refresh ();
|
gnc_resume_gui_refresh ();
|
||||||
|
|
||||||
|
if (data->our_account_tree)
|
||||||
|
{
|
||||||
|
gnc_account_foreach_descendant (data->our_account_tree,
|
||||||
|
(AccountCb)starting_balance_helper,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
|
||||||
if (when_completed)
|
if (when_completed)
|
||||||
{
|
{
|
||||||
(*when_completed)();
|
(*when_completed)();
|
||||||
|
@ -637,6 +637,7 @@ gnc_loan_assistant_create( LoanAssistantData *ldd )
|
|||||||
|
|
||||||
gtk_widget_set_halign (GTK_WIDGET(gas), GTK_ALIGN_FILL);
|
gtk_widget_set_halign (GTK_WIDGET(gas), GTK_ALIGN_FILL);
|
||||||
gnc_account_sel_set_hexpand (GNC_ACCOUNT_SEL(gas), true);
|
gnc_account_sel_set_hexpand (GNC_ACCOUNT_SEL(gas), true);
|
||||||
|
gnc_account_sel_set_new_account_modal (GNC_ACCOUNT_SEL(gas), true);
|
||||||
g_object_set (GTK_WIDGET(gas), "margin", 2, nullptr);
|
g_object_set (GTK_WIDGET(gas), "margin", 2, nullptr);
|
||||||
*(gas_data[i].loc) = gas;
|
*(gas_data[i].loc) = gas;
|
||||||
}
|
}
|
||||||
@ -730,6 +731,7 @@ gnc_loan_assistant_create( LoanAssistantData *ldd )
|
|||||||
gtk_widget_set_sensitive( GTK_WIDGET(ldd->optEscrowHBox), FALSE );
|
gtk_widget_set_sensitive( GTK_WIDGET(ldd->optEscrowHBox), FALSE );
|
||||||
ldd->optEscrowGAS = GNC_ACCOUNT_SEL(gnc_account_sel_new());
|
ldd->optEscrowGAS = GNC_ACCOUNT_SEL(gnc_account_sel_new());
|
||||||
gnc_account_sel_set_hexpand (GNC_ACCOUNT_SEL(ldd->optEscrowGAS), true);
|
gnc_account_sel_set_hexpand (GNC_ACCOUNT_SEL(ldd->optEscrowGAS), true);
|
||||||
|
gnc_account_sel_set_new_account_modal (GNC_ACCOUNT_SEL(ldd->optEscrowGAS), true);
|
||||||
gnc_account_sel_set_new_account_ability( ldd->optEscrowGAS, TRUE );
|
gnc_account_sel_set_new_account_ability( ldd->optEscrowGAS, TRUE );
|
||||||
gtk_container_add( GTK_CONTAINER(ldd->optEscrowHBox),
|
gtk_container_add( GTK_CONTAINER(ldd->optEscrowHBox),
|
||||||
GTK_WIDGET(ldd->optEscrowGAS) );
|
GTK_WIDGET(ldd->optEscrowGAS) );
|
||||||
|
@ -183,12 +183,21 @@ gui_to_fi(FinCalcDialog *fcd)
|
|||||||
GtkToggleButton *toggle;
|
GtkToggleButton *toggle;
|
||||||
gnc_numeric npp;
|
gnc_numeric npp;
|
||||||
int i;
|
int i;
|
||||||
|
const gchar *text;
|
||||||
|
|
||||||
if (fcd == NULL)
|
if (fcd == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
npp =
|
/* treat PAYMENT_PERIODS as a plain GtkEntry */
|
||||||
gnc_amount_edit_get_amount(GNC_AMOUNT_EDIT(fcd->amounts[PAYMENT_PERIODS]));
|
text = gtk_entry_get_text (GTK_ENTRY(GNC_AMOUNT_EDIT(fcd->amounts[PAYMENT_PERIODS])));
|
||||||
|
if (text && *text)
|
||||||
|
{
|
||||||
|
gnc_numeric out;
|
||||||
|
gboolean result = string_to_gnc_numeric (text, &out);
|
||||||
|
npp = gnc_numeric_convert (out, 1, GNC_HOW_RND_TRUNC);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
npp = gnc_numeric_zero ();
|
||||||
fcd->financial_info.npp = npp.num;
|
fcd->financial_info.npp = npp.num;
|
||||||
|
|
||||||
fcd->financial_info.ir =
|
fcd->financial_info.ir =
|
||||||
@ -338,10 +347,14 @@ can_calc_value(FinCalcDialog *fcd, FinCalcValue value, int *error_item)
|
|||||||
return missing;
|
return missing;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gnc_amount_edit_evaluate (GNC_AMOUNT_EDIT (fcd->amounts[i])))
|
/* treat PAYMENT_PERIODS as a plain GtkEntry */
|
||||||
|
if (i != PAYMENT_PERIODS)
|
||||||
{
|
{
|
||||||
*error_item = i;
|
if (!gnc_amount_edit_evaluate (GNC_AMOUNT_EDIT (fcd->amounts[i])))
|
||||||
return bad_exp;
|
{
|
||||||
|
*error_item = i;
|
||||||
|
return bad_exp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -371,17 +384,27 @@ can_calc_value(FinCalcDialog *fcd, FinCalcValue value, int *error_item)
|
|||||||
case PRESENT_VALUE:
|
case PRESENT_VALUE:
|
||||||
case PERIODIC_PAYMENT:
|
case PERIODIC_PAYMENT:
|
||||||
case FUTURE_VALUE:
|
case FUTURE_VALUE:
|
||||||
nvalue = gnc_amount_edit_get_amount
|
|
||||||
(GNC_AMOUNT_EDIT(fcd->amounts[PAYMENT_PERIODS]));
|
|
||||||
if (gnc_numeric_zero_p (nvalue))
|
|
||||||
{
|
{
|
||||||
*error_item = PAYMENT_PERIODS;
|
/* treat PAYMENT_PERIODS as a plain GtkEntry */
|
||||||
return _("The number of payments cannot be zero.");
|
GNCAmountEdit *edit = GNC_AMOUNT_EDIT(fcd->amounts[PAYMENT_PERIODS]);
|
||||||
}
|
const gchar *text = gtk_entry_get_text (GTK_ENTRY(edit));
|
||||||
if (gnc_numeric_negative_p (nvalue))
|
gboolean result = string_to_gnc_numeric (text, &nvalue);
|
||||||
{
|
|
||||||
*error_item = PAYMENT_PERIODS;
|
if (!result)
|
||||||
return _("The number of payments cannot be negative.");
|
{
|
||||||
|
*error_item = PAYMENT_PERIODS;
|
||||||
|
return bad_exp;
|
||||||
|
}
|
||||||
|
if (gnc_numeric_zero_p (nvalue))
|
||||||
|
{
|
||||||
|
*error_item = PAYMENT_PERIODS;
|
||||||
|
return _("The number of payments cannot be zero.");
|
||||||
|
}
|
||||||
|
if (gnc_numeric_negative_p (nvalue))
|
||||||
|
{
|
||||||
|
*error_item = PAYMENT_PERIODS;
|
||||||
|
return _("The number of payments cannot be negative.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user