Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
homebank
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Adrien Dorsaz
homebank
Commits
00861ca6
Commit
00861ca6
authored
Jan 13, 2013
by
Maxime Doyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
last 4.5 changes
parent
56e90b93
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
22 deletions
+26
-22
Makefile.am
Makefile.am
+3
-1
configure.ac
configure.ac
+1
-1
src/gtk-chart.c
src/gtk-chart.c
+5
-4
src/hb-preferences.c
src/hb-preferences.c
+4
-4
src/ui-widgets.c
src/ui-widgets.c
+13
-12
No files found.
Makefile.am
View file @
00861ca6
# HomeBank Makefile.am
#SUBDIRS = src
#SUBDIRS = src
SUBDIRS
=
src data images
doc mime po
SUBDIRS
=
src data images
mime po doc
# don't forget to do a 'make check'
# don't forget to do a 'make check'
...
...
configure.ac
View file @
00861ca6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_PREREQ(2.52)
AC_INIT([homebank], [
4.5pre2
])
AC_INIT([homebank], [
trunk
])
AM_CONFIG_HEADER(config.h)
AM_CONFIG_HEADER(config.h)
...
...
src/gtk-chart.c
View file @
00861ca6
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#include <gtk/gtk.h>
#include <gtk/gtk.h>
#include "homebank.h"
#include "gtk-chart-colors.h"
#include "gtk-chart-colors.h"
#include "gtk-chart.h"
#include "gtk-chart.h"
...
@@ -235,7 +236,7 @@ GtkChart *chart;
...
@@ -235,7 +236,7 @@ GtkChart *chart;
/*
/*
**
**
*/
*/
double
GetBase10
(
double
num
)
static
double
GetBase10
(
double
num
)
{
{
double
result
;
double
result
;
double
cnt
;
double
cnt
;
...
@@ -252,7 +253,7 @@ double cnt;
...
@@ -252,7 +253,7 @@ double cnt;
/*
/*
**
**
*/
*/
double
GetUnit
(
double
value
)
static
double
GetUnit
(
double
value
)
{
{
double
truc
,
base10
,
unit
;
double
truc
,
base10
,
unit
;
...
@@ -274,7 +275,7 @@ double truc, base10, unit;
...
@@ -274,7 +275,7 @@ double truc, base10, unit;
/*
/*
** print a integer number
** print a integer number
*/
*/
gchar
*
chart_print_int
(
GtkChart
*
chart
,
gint
value
)
static
gchar
*
chart_print_int
(
GtkChart
*
chart
,
gint
value
)
{
{
//mystrfmon(chart->buffer, CHART_BUFFER_LENGTH-1, (gdouble)value, chart->minor);
//mystrfmon(chart->buffer, CHART_BUFFER_LENGTH-1, (gdouble)value, chart->minor);
...
@@ -297,7 +298,7 @@ gchar *chart_print_int(GtkChart *chart, gint value)
...
@@ -297,7 +298,7 @@ gchar *chart_print_int(GtkChart *chart, gint value)
/*
/*
** print a double number
** print a double number
*/
*/
gchar
*
chart_print_double
(
GtkChart
*
chart
,
gdouble
value
)
static
gchar
*
chart_print_double
(
GtkChart
*
chart
,
gdouble
value
)
{
{
mystrfmon
(
chart
->
buffer
,
CHART_BUFFER_LENGTH
-
1
,
value
,
chart
->
minor
);
mystrfmon
(
chart
->
buffer
,
CHART_BUFFER_LENGTH
-
1
,
value
,
chart
->
minor
);
...
...
src/hb-preferences.c
View file @
00861ca6
...
@@ -117,22 +117,22 @@ struct lconv *lc = localeconv();
...
@@ -117,22 +117,22 @@ struct lconv *lc = localeconv();
//see g_locale_to_utf8 here
//see g_locale_to_utf8 here
iResult
=
GetLocaleInfoA
(
LOCALE_USER_DEFAULT
,
LOCALE_SCURRENCY
,
wcBuffer
,
BUFFER_SIZE
);
iResult
=
GetLocaleInfoA
(
LOCALE_USER_DEFAULT
,
LOCALE_SCURRENCY
,
wcBuffer
,
BUFFER_SIZE
);
printf
(
"LOCALE_SCURRENCY='%s'
\n
"
,
buffer
);
DB
(
g_print
(
"LOCALE_SCURRENCY='%s'
\n
"
,
buffer
)
);
PREFS
->
base_cur
.
suffix_symbol
=
g_locale_to_utf8
(
buffer
,
-
1
,
NULL
,
&
toto
,
NULL
);
PREFS
->
base_cur
.
suffix_symbol
=
g_locale_to_utf8
(
buffer
,
-
1
,
NULL
,
&
toto
,
NULL
);
iResult
=
GetLocaleInfoA
(
LOCALE_USER_DEFAULT
,
LOCALE_SDECIMAL
,
wcBuffer
,
BUFFER_SIZE
);
iResult
=
GetLocaleInfoA
(
LOCALE_USER_DEFAULT
,
LOCALE_SDECIMAL
,
wcBuffer
,
BUFFER_SIZE
);
printf
(
"LOCALE_SDECIMAL='%s'
\n
"
,
buffer
);
DB
(
g_print
(
"LOCALE_SDECIMAL='%s'
\n
"
,
buffer
)
);
PREFS
->
base_cur
.
decimal_char
=
g_locale_to_utf8
(
buffer
,
-
1
,
NULL
,
&
toto
,
NULL
);
PREFS
->
base_cur
.
decimal_char
=
g_locale_to_utf8
(
buffer
,
-
1
,
NULL
,
&
toto
,
NULL
);
iResult
=
GetLocaleInfoA
(
LOCALE_USER_DEFAULT
,
LOCALE_STHOUSAND
,
wcBuffer
,
BUFFER_SIZE
);
iResult
=
GetLocaleInfoA
(
LOCALE_USER_DEFAULT
,
LOCALE_STHOUSAND
,
wcBuffer
,
BUFFER_SIZE
);
printf
(
"LOCALE_STHOUSAND='%s'
\n
"
,
buffer
);
DB
(
g_print
(
"LOCALE_STHOUSAND='%s'
\n
"
,
buffer
)
);
PREFS
->
base_cur
.
grouping_char
=
g_locale_to_utf8
(
buffer
,
-
1
,
NULL
,
&
toto
,
NULL
);
PREFS
->
base_cur
.
grouping_char
=
g_locale_to_utf8
(
buffer
,
-
1
,
NULL
,
&
toto
,
NULL
);
PREFS
->
base_cur
.
prefix_symbol
=
NULL
;
//g_strdup("");
PREFS
->
base_cur
.
prefix_symbol
=
NULL
;
//g_strdup("");
//PREFS->base_cur.suffix_symbol = NULL; //g_strdup("");
//PREFS->base_cur.suffix_symbol = NULL; //g_strdup("");
//PREFS->base_cur.decimal_char = g_strdup(".");
//PREFS->base_cur.decimal_char = g_strdup(".");
//PREFS->base_cur.grouping_char = NULL; //g_strdup("");
//PREFS->base_cur.grouping_char = NULL; //g_strdup("");
PREFS
->
base_cur
.
frac_digits
=
2
;
PREFS
->
base_cur
.
frac_digits
=
2
;
#else
#else
PREFS
->
base_cur
.
prefix_symbol
=
NULL
;
//g_strdup("");
PREFS
->
base_cur
.
prefix_symbol
=
NULL
;
//g_strdup("");
PREFS
->
base_cur
.
suffix_symbol
=
NULL
;
//g_strdup("");
PREFS
->
base_cur
.
suffix_symbol
=
NULL
;
//g_strdup("");
...
...
src/ui-widgets.c
View file @
00861ca6
...
@@ -414,9 +414,7 @@ GtkWidget *spinner;
...
@@ -414,9 +414,7 @@ GtkWidget *spinner;
return
spinner
;
return
spinner
;
}
}
/*
**
*/
GtkWidget
*
make_year
(
GtkWidget
*
label
)
GtkWidget
*
make_year
(
GtkWidget
*
label
)
{
{
GtkWidget
*
spinner
;
GtkWidget
*
spinner
;
...
@@ -473,9 +471,7 @@ set_sensitive (GtkCellLayout *cell_layout,
...
@@ -473,9 +471,7 @@ set_sensitive (GtkCellLayout *cell_layout,
g_object_set
(
cell
,
"sensitive"
,
sensitive
,
NULL
);
g_object_set
(
cell
,
"sensitive"
,
sensitive
,
NULL
);
}
}
/*
**
*/
GtkWidget
*
make_cycle
(
GtkWidget
*
label
,
gchar
**
items
)
GtkWidget
*
make_cycle
(
GtkWidget
*
label
,
gchar
**
items
)
{
{
GtkWidget
*
combobox
;
GtkWidget
*
combobox
;
...
@@ -485,18 +481,21 @@ guint i;
...
@@ -485,18 +481,21 @@ guint i;
for
(
i
=
0
;
items
[
i
]
!=
NULL
;
i
++
)
for
(
i
=
0
;
items
[
i
]
!=
NULL
;
i
++
)
{
{
gtk_combo_box_text_append_text
(
GTK_COMBO_BOX_TEXT
(
combobox
),
_
(
items
[
i
]));
if
(
*
items
[
i
]
!=
0
)
gtk_combo_box_text_append_text
(
GTK_COMBO_BOX_TEXT
(
combobox
),
_
(
items
[
i
]));
else
gtk_combo_box_text_append_text
(
GTK_COMBO_BOX_TEXT
(
combobox
),
""
);
}
}
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
combobox
),
0
);
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
combobox
),
0
);
gtk_combo_box_set_row_separator_func
(
GTK_COMBO_BOX
(
combobox
),
is_separator
,
NULL
,
NULL
);
if
(
label
)
if
(
label
)
gtk_label_set_mnemonic_widget
(
GTK_LABEL
(
label
),
combobox
);
gtk_label_set_mnemonic_widget
(
GTK_LABEL
(
label
),
combobox
);
gtk_combo_box_set_row_separator_func
(
GTK_COMBO_BOX
(
combobox
),
is_separator
,
NULL
,
NULL
);
return
combobox
;
return
combobox
;
}
}
GtkWidget
*
make_daterange
(
GtkWidget
*
label
,
gboolean
custom
)
GtkWidget
*
make_daterange
(
GtkWidget
*
label
,
gboolean
custom
)
{
{
GtkWidget
*
combobox
;
GtkWidget
*
combobox
;
...
@@ -509,7 +508,10 @@ guint i;
...
@@ -509,7 +508,10 @@ guint i;
for
(
i
=
0
;
items
[
i
]
!=
NULL
;
i
++
)
for
(
i
=
0
;
items
[
i
]
!=
NULL
;
i
++
)
{
{
gtk_combo_box_text_append_text
(
GTK_COMBO_BOX_TEXT
(
combobox
),
_
(
items
[
i
]));
if
(
*
items
[
i
]
!=
0
)
gtk_combo_box_text_append_text
(
GTK_COMBO_BOX_TEXT
(
combobox
),
_
(
items
[
i
]));
else
gtk_combo_box_text_append_text
(
GTK_COMBO_BOX_TEXT
(
combobox
),
""
);
}
}
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
combobox
),
0
);
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
combobox
),
0
);
...
@@ -534,10 +536,9 @@ guint i;
...
@@ -534,10 +536,9 @@ guint i;
gtk_combo_box_set_row_separator_func
(
GTK_COMBO_BOX
(
combobox
),
is_separator
,
NULL
,
NULL
);
gtk_combo_box_set_row_separator_func
(
GTK_COMBO_BOX
(
combobox
),
is_separator
,
NULL
,
NULL
);
return
combobox
;
return
combobox
;
}
}
/*
/*
**
**
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment