Commit 00861ca6 authored by Maxime Doyen's avatar Maxime Doyen

last 4.5 changes

parent 56e90b93
# 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'
......
...@@ -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)
......
...@@ -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);
......
...@@ -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("");
......
...@@ -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;
} }
/* /*
** **
*/ */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment