[grisbi-cvs] grisbi/src accueil.c, 1.212, 1.213 accueil.h, 1.16, 1.17 affichage.c, 1.166, 1.167 affichage_liste.c, 1.114, 1.115 gsb_account_property.c, 1.46, 1.47 gsb_data_account.c, 1.89, 1.90 gsb_data_account.h, 1.37, 1.38 gsb_file.c, 1.60, 1.61 gsb_file_config.c, 1.86, 1.87 gsb_file_load.c, 1.190, 1.191 gsb_file_save.c, 1.141, 1.142 gsb_transactions_list_sort.c, 1.19, 1.20 navigation.c, 1.130, 1.131 structures.h, 1.234, 1.235 traitement_variables.c, 1.178, 1.179 transaction_list.c, 1.49, 1.50 utils_str.h, 1.42, 1.43
Pierre Biava
pbiava at users.sourceforge.net
Fri Oct 2 23:35:06 CEST 2009
- Previous message: [grisbi-cvs] grisbi/po Makefile.in.in, 1.8, 1.9 cs.po, 1.58, 1.59 da.po, 1.65, 1.66 de.po, 1.125, 1.126 el.po, 1.29, 1.30 eo.po, 1.22, 1.23 es.po, 1.116, 1.117 fa.po, 1.52, 1.53 fr.po, 1.188, 1.189 grisbi.pot, 1.100, 1.101 he.po, 1.58, 1.59 it.po, 1.58, 1.59 nl.po, 1.57, 1.58 pl.po, 1.63, 1.64 pt_BR.po, 1.60, 1.61 ro.po, 1.58, 1.59 ru.po, 1.57, 1.58 zh_CN.po, 1.52, 1.53
- Next message: [grisbi-cvs] grisbi/src/plugins/openssl openssl.c, 1.18, 1.19 openssl.h, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20079/src
Modified Files:
accueil.c accueil.h affichage.c affichage_liste.c
gsb_account_property.c gsb_data_account.c gsb_data_account.h
gsb_file.c gsb_file_config.c gsb_file_load.c gsb_file_save.c
gsb_transactions_list_sort.c navigation.c structures.h
traitement_variables.c transaction_list.c utils_str.h
Log Message:
Adding sort the transactions by date and amount and minors minors corrections
Index: structures.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/structures.h,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -d -r1.234 -r1.235
--- structures.h 23 Sep 2009 20:28:21 -0000 1.234
+++ structures.h 2 Oct 2009 21:35:04 -0000 1.235
@@ -158,6 +158,7 @@
/* variables pour la liste des opérations */
gint show_transaction_selected_in_form; /* TRUE will show the selected transaction in the form */
gint show_transaction_gives_balance; /* TRUE si on visualise l'opération qui donne le solde du jour */
+ gboolean transactions_list_sort_by_date; /* Options for sorting by date */
gboolean transactions_list_sort_by_value_date; /* Options for sorting by value date */
/* archive stuff */
Index: gsb_account_property.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_account_property.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- gsb_account_property.c 1 Sep 2009 19:04:32 -0000 1.46
+++ gsb_account_property.c 2 Oct 2009 21:35:04 -0000 1.47
@@ -46,9 +46,11 @@
#include "./gsb_data_currency.h"
#include "./gsb_data_transaction.h"
#include "./utils_editables.h"
+#include "./gsb_file.h"
#include "./gsb_form.h"
#include "./gsb_form_scheduler.h"
#include "./navigation.h"
+#include "./accueil.h"
#include "./menu.h"
#include "./gsb_scheduler_list.h"
#include "./main.h"
@@ -75,6 +77,9 @@
gint *p_origin );
static gboolean gsb_account_property_changed_bank_label ( GtkWidget *combobox,
gpointer null );
+static gboolean gsb_account_property_focus_out ( GtkWidget *widget,
+ GdkEventFocus *event,
+ gint *p_origin );
static void gsb_account_property_iban_clear_label_data ( void );
static gint gsb_account_property_iban_control_iban ( gchar *iban );
static void gsb_account_property_iban_delete_text ( GtkEditable *entry,
@@ -165,6 +170,7 @@
PROPERTY_CLOSED_ACCOUNT,
PROPERTY_INIT_BALANCE,
PROPERTY_WANTED_BALANCE,
+ PROPERTY_HOLDER_NAME,
};
/*START_EXTERN*/
@@ -173,6 +179,7 @@
extern gint mise_a_jour_liste_echeances_manuelles_accueil;
extern gint mise_a_jour_soldes_minimaux;
extern gsb_real null_real;
+extern gchar *titre_fichier;
/*END_EXTERN*/
@@ -232,15 +239,20 @@
gtk_box_pack_start ( GTK_BOX(hbox), label, FALSE, FALSE, 0);
detail_nom_compte = gsb_autofunc_entry_new ( NULL,
- G_CALLBACK (gsb_account_property_changed),
- GINT_TO_POINTER (PROPERTY_NAME),
- G_CALLBACK (gsb_data_account_set_name),
+ G_CALLBACK ( gsb_account_property_changed ),
+ GINT_TO_POINTER ( PROPERTY_NAME ),
+ G_CALLBACK ( gsb_data_account_set_name ),
0 );
- gtk_box_pack_start ( GTK_BOX(hbox), detail_nom_compte, TRUE, TRUE, 0);
+ g_signal_connect ( G_OBJECT ( detail_nom_compte ),
+ "focus-out-event",
+ G_CALLBACK ( gsb_account_property_focus_out ),
+ GINT_TO_POINTER ( PROPERTY_NAME ) );
+
+ gtk_box_pack_start ( GTK_BOX ( hbox ), detail_nom_compte, TRUE, TRUE, 0 );
/* create the box of kind of account */
hbox = gtk_hbox_new ( FALSE, 6 );
- gtk_box_pack_start ( GTK_BOX(paddingbox), hbox, FALSE, FALSE, 0 );
+ gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, FALSE, 0 );
label = gtk_label_new ( COLON(_("Account type")) );
gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
@@ -300,11 +312,15 @@
gtk_size_group_add_widget ( GTK_SIZE_GROUP ( size_group ), label );
gtk_box_pack_start ( GTK_BOX(hbox), label, FALSE, FALSE, 0);
- detail_titulaire_compte = gsb_autofunc_entry_new (NULL,
+ detail_titulaire_compte = gsb_autofunc_entry_new ( NULL,
NULL,
NULL,
- G_CALLBACK (gsb_data_account_set_holder_name),
+ G_CALLBACK ( gsb_data_account_set_holder_name ),
0);
+ g_signal_connect ( G_OBJECT ( detail_titulaire_compte ),
+ "focus-out-event",
+ G_CALLBACK ( gsb_account_property_focus_out ),
+ GINT_TO_POINTER ( PROPERTY_HOLDER_NAME ) );
gtk_box_pack_start ( GTK_BOX(hbox), detail_titulaire_compte, TRUE, TRUE, 0);
/* address of the holder line */
@@ -522,7 +538,7 @@
gtk_size_group_add_widget ( GTK_SIZE_GROUP ( size_group ), label );
gtk_box_pack_start ( GTK_BOX ( hbox ), label, FALSE, FALSE, 0 );
- detail_solde_mini_autorise = gsb_autofunc_real_new (null_real,
+ detail_solde_mini_autorise = gsb_autofunc_real_new ( null_real,
G_CALLBACK (gsb_account_property_changed),
GINT_TO_POINTER (PROPERTY_WANTED_BALANCE),
G_CALLBACK (gsb_data_account_set_mini_balance_authorized),
@@ -701,6 +717,7 @@
gint origin = GPOINTER_TO_INT (p_origin);
gint account_number;
GtkWidget *image;
+ const gchar *tmpstr;
account_number = gsb_gui_navigation_get_current_account ();
if ( account_number == -1)
@@ -709,13 +726,8 @@
switch (origin)
{
case PROPERTY_NAME:
- /* update the scheduler list */
- gsb_scheduler_list_fill_list (gsb_scheduler_list_get_tree_view ());
-
- /*update the the view menu */
- gsb_navigation_update_account_label (account_number);
- /* no break here !! need to do the same to PROPERTY_CLOSED_ACCOUNT too */
-
+ gsb_gui_navigation_update_account ( account_number );
+ break;
case PROPERTY_CLOSED_ACCOUNT:
gsb_gui_navigation_update_account ( account_number );
gsb_menu_update_accounts_in_menus ();
@@ -1480,6 +1492,54 @@
label_no_compte = NULL;
label_cle_compte = NULL;
}
+
+gboolean gsb_account_property_focus_out ( GtkWidget *widget,
+ GdkEventFocus *event,
+ gint *p_origin )
+{
+ gint origin = GPOINTER_TO_INT (p_origin);
+ gint account_number;
+ const gchar *tmpstr;
+
+ account_number = gsb_gui_navigation_get_current_account ();
+ if ( account_number == -1)
+ return FALSE;
+
+ switch (origin)
+ {
+ case PROPERTY_NAME:
+ /* update the scheduler list */
+ gsb_scheduler_list_fill_list (gsb_scheduler_list_get_tree_view ());
+
+ /*update the the view menu */
+ gsb_navigation_update_account_label (account_number);
+ gsb_menu_update_accounts_in_menus ();
+
+ /* update the name of accounts in form */
+ gsb_account_update_combo_list ( gsb_form_scheduler_get_element_widget (
+ SCHEDULED_FORM_ACCOUNT), FALSE );
+
+ /* Replace trees contents. */
+ remplit_arbre_categ ();
+ remplit_arbre_imputation ();
+ payee_fill_tree ();
+ break;
+ case PROPERTY_HOLDER_NAME:
+ tmpstr = gtk_entry_get_text ( GTK_ENTRY ( widget ) );
+ titre_fichier = my_strdup ( tmpstr );
+ gsb_main_page_update_homepage_title ( titre_fichier );
+ gsb_file_update_window_title ( );
+ break;
+ }
+
+ /* update main page */
+ mise_a_jour_liste_comptes_accueil = 1;
+ mise_a_jour_liste_echeances_manuelles_accueil = 1;
+ mise_a_jour_soldes_minimaux = 1;
+ mise_a_jour_fin_comptes_passifs = 1;
+
+ return FALSE;
+}
/* Local Variables: */
/* c-basic-offset: 4 */
/* End: */
Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -d -r1.190 -r1.191
--- gsb_file_load.c 30 Aug 2009 17:59:47 -0000 1.190
+++ gsb_file_load.c 2 Oct 2009 21:35:04 -0000 1.191
@@ -207,10 +207,11 @@
/* to import older file than 0.6, makes the link between report and comparison structures */
static gint last_report_number;
-/* initial_file_title sert à garder le bon nom du fichier de compte */
-gchar *initial_file_title;
+/* initialization of titles for grisbi */
+gchar *initial_file_title = NULL;
+gchar *initial_holder_title = NULL;
-/** filled only when loading a version before 0.6, contains the order of the accounts
+/* filled only when loading a version before 0.6, contains the order of the accounts
* in the 0.6, the accounts are saved directly in the good order
* this is a list of the accounts number, in the good order */
static GSList *sort_accounts = NULL;
@@ -226,7 +227,7 @@
};
static GSList *payment_conversion_list = NULL;
-/** temporary structure to set the final date and the final balance of a reconcile
+/* temporary structure to set the final date and the final balance of a reconcile
* in the reconcile itself, and not in the account as before 0.6.0 */
struct reconcile_conversion_struct
{
@@ -419,7 +420,8 @@
}
-/** check if the xml file is the last structure (before 0.6) or
+/**
+ * check if the xml file is the last structure (before 0.6) or
* the new structure (after 0.6)
*
* \param file_content the grisbi file
@@ -726,9 +728,6 @@
else if ( !strcmp ( attribute_names[i],
"File_title" ) && strlen (attribute_values[i]))
{
- if ( titre_fichier )
- g_free ( titre_fichier );
- titre_fichier = my_strdup (attribute_values[i]);
initial_file_title = my_strdup (attribute_values[i]);
}
@@ -1388,6 +1387,10 @@
{
gsb_data_account_set_holder_name ( account_number,
attribute_values[i]);
+
+ if ( initial_holder_title == NULL
+ && attribute_values[i] && strlen ( attribute_values[i] ) )
+ initial_holder_title = g_strdup ( attribute_values[i] );
i++;
continue;
}
@@ -5786,6 +5789,7 @@
if ( titre_fichier )
g_free ( titre_fichier );
titre_fichier = my_strdup (text);
+ initial_file_title = my_strdup (text);
return;
}
Index: gsb_file.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- gsb_file.c 1 Sep 2009 19:04:32 -0000 1.60
+++ gsb_file.c 2 Oct 2009 21:35:04 -0000 1.61
@@ -49,17 +49,18 @@
#include "./gsb_file_save.h"
#include "./gsb_file_util.h"
#include "./navigation.h"
+#include "./accueil.h"
#include "./gsb_real.h"
#include "./gsb_status.h"
#include "./gsb_transactions_list.h"
#include "./traitement_variables.h"
#include "./main.h"
-#include "./accueil.h"
#include "./utils_str.h"
#include "./parametres.h"
#include "./affichage_liste.h"
#include "./transaction_list.h"
#include "./utils_files.h"
+#include "./utils_str.h"
#include "./fenetre_principale.h"
#include "./include.h"
#include "./erreur.h"
@@ -88,6 +89,8 @@
/*START_EXTERN*/
extern gchar *copy_old_filename;
+extern gchar *initial_file_title;
+extern gchar *initial_holder_title;
extern GtkWidget *main_hpaned;
extern GtkWidget *main_vbox;
extern gint max;
@@ -181,7 +184,8 @@
/* create the model */
if (!transaction_list_create ())
{
- dialogue_error (_("The model of the list couldn't be created... Bad things will happen very soon..."));
+ dialogue_error (_("The model of the list couldn't be created... "
+ "Bad things will happen very soon..."));
return;
}
@@ -194,14 +198,38 @@
0 );
gtk_widget_show ( tree_view_widget );
-
navigation_change_account ( GINT_TO_POINTER ( gsb_gui_navigation_get_current_account () ) );
/* Display accounts in menus */
gsb_menu_update_accounts_in_menus ();
+ /* Initialisation du titre pour grisbi */
+ if (titre_fichier && strlen (titre_fichier) )
+ g_free (titre_fichier);
+
+ switch ( etat.display_grisbi_title )
+ {
+ case GSB_ACCOUNTS_TITLE:
+ titre_fichier = my_strdup ( initial_file_title );
+ break;
+ case GSB_ACCOUNT_HOLDER:
+ if ( initial_holder_title && strlen ( initial_holder_title ) )
+ titre_fichier = my_strdup ( initial_holder_title );
+ else
+ {
+ etat.display_grisbi_title = GSB_ACCOUNTS_TITLE;
+ titre_fichier = my_strdup ( initial_file_title );
+ }
+ break;
+ case GSB_ACCOUNTS_FILE:
+ titre_fichier = my_strdup ( nom_fichier_comptes );
+ break;
+ }
+
/* Affiche le nom du fichier de comptes dans le titre de la fenetre */
gsb_file_update_window_title();
+ gsb_main_page_update_homepage_title ( titre_fichier );
+
gtk_notebook_set_current_page ( GTK_NOTEBOOK( notebook_general ), GSB_HOME_PAGE );
gtk_widget_show ( notebook_general );
@@ -989,12 +1017,12 @@
devel_debug ( "gsb_file_update_window_title" );
- if ( titre_fichier && strlen(titre_fichier) )
- titre = g_strdup(titre_fichier);
+ if ( titre_fichier && strlen ( titre_fichier ) )
+ titre = g_strdup ( titre_fichier );
else
{
if ( nom_fichier_comptes )
- titre = g_path_get_basename (nom_fichier_comptes);
+ titre = g_path_get_basename ( nom_fichier_comptes );
else
titre = g_strconcat ( "<", _("unnamed"), ">", NULL );
}
Index: traitement_variables.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/traitement_variables.c,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -d -r1.178 -r1.179
--- traitement_variables.c 10 Sep 2009 19:34:02 -0000 1.178
+++ traitement_variables.c 2 Oct 2009 21:35:04 -0000 1.179
@@ -147,6 +147,8 @@
extern gint display_three_lines;
extern gint display_two_lines;
extern gint id_timeout;
+extern gchar *initial_file_title;
+extern gchar *initial_holder_title;
extern gint mise_a_jour_fin_comptes_passifs;
extern gint mise_a_jour_liste_comptes_accueil;
extern gint mise_a_jour_liste_echeances_auto_accueil;
@@ -287,7 +289,16 @@
no_devise_totaux_categ = 1;
no_devise_totaux_ib = 1;
- titre_fichier = g_strdup(_("My accounts"));
+ /* initialization of titles */
+ titre_fichier = g_strdup( _("My accounts") );
+ if ( initial_file_title && strlen ( initial_file_title ) )
+ g_free ( initial_file_title );
+ initial_file_title = NULL;
+
+ if ( initial_holder_title && strlen ( initial_holder_title ) )
+ g_free ( initial_holder_title );
+ initial_holder_title = NULL;
+
adresse_commune = NULL;
adresse_secondaire = NULL;
Index: gsb_file_save.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_save.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -d -r1.141 -r1.142
--- gsb_file_save.c 12 Sep 2009 19:33:40 -0000 1.141
+++ gsb_file_save.c 2 Oct 2009 21:35:04 -0000 1.142
@@ -63,7 +63,6 @@
#include "./utils_str.h"
#include "./structures.h"
#include "./custom_list.h"
-#include "./utils_str.h"
#include "./gsb_data_form.h"
#include "./gsb_scheduler_list.h"
#include "./include.h"
@@ -157,7 +156,6 @@
extern GdkColor split_background;
extern gint tab_affichage_ope[TRANSACTION_LIST_ROWS_NB][CUSTOM_MODEL_VISIBLE_COLUMNS];
extern GdkColor text_color[2];
-extern gchar *titre_fichier;
extern gint transaction_col_width[CUSTOM_MODEL_N_VISIBLES_COLUMN];
extern gint valeur_echelle_recherche_date_import;
/*END_EXTERN*/
@@ -659,25 +657,10 @@
is_archive = TRUE;
/* save the file_title or the initial_file_title */
- if ( etat.display_grisbi_title == GSB_ACCOUNTS_FILE )
- {
- if ( titre_fichier && strlen (titre_fichier) )
- {
- if ( initial_file_title && strlen ( initial_file_title ) )
- g_free ( initial_file_title );
- initial_file_title = g_strdup ( titre_fichier );
- tmpstr = titre_fichier;
- }
- else
- tmpstr = "";
- }
+ if ( initial_file_title && strlen (initial_file_title) )
+ tmpstr = initial_file_title;
else
- {
- if ( initial_file_title && strlen (initial_file_title) )
- tmpstr = initial_file_title;
- else
- tmpstr = "";
- }
+ tmpstr = "";
/* save the general informations */
new_string = g_markup_printf_escaped ( "\t<General\n"
Index: navigation.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/navigation.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -d -r1.130 -r1.131
--- navigation.c 9 Sep 2009 17:30:42 -0000 1.130
+++ navigation.c 2 Oct 2009 21:35:04 -0000 1.131
@@ -39,11 +39,11 @@
#include "./fenetre_principale.h"
#include "./menu.h"
#include "./etats_onglet.h"
+#include "./accueil.h"
#include "./gsb_reconcile.h"
#include "./gsb_scheduler_list.h"
#include "./gsb_transactions_list.h"
#include "./main.h"
-#include "./accueil.h"
#include "./traitement_variables.h"
#include "./utils_str.h"
#include "./tiers_onglet.h"
@@ -100,8 +100,8 @@
/*START_EXTERN*/
+extern gchar *initial_holder_title;
extern GtkWidget *label_last_statement;
-extern GtkWidget *label_titre_fichier;
extern GtkWidget *menu_import_rules;
extern gint mise_a_jour_liste_comptes_accueil;
extern GtkWidget *notebook_general;
@@ -961,20 +961,20 @@
/* save the row_align of the last account */
gsb_data_account_set_row_align ( current_account,
- gsb_transactions_list_get_row_align ());
+ gsb_transactions_list_get_row_align ( ) );
/* set the appearance of the list according to the new account */
- transaction_list_sort_set_column (gsb_data_account_get_sort_column (new_account),
- gsb_data_account_get_sort_type (new_account));
+ transaction_list_sort_set_column ( gsb_data_account_get_sort_column (new_account ),
+ gsb_data_account_get_sort_type ( new_account ) );
gsb_transactions_list_update_tree_view ( new_account, FALSE );
- transaction_list_select ( gsb_data_account_get_current_transaction_number (new_account));
- gsb_transactions_list_set_row_align (gsb_data_account_get_row_align (new_account));
+ transaction_list_select ( gsb_data_account_get_current_transaction_number ( new_account ) );
+ gsb_transactions_list_set_row_align ( gsb_data_account_get_row_align ( new_account ) );
/* mise en place de la date du dernier relevé */
- gsb_navigation_update_statement_label (new_account);
+ gsb_navigation_update_statement_label ( new_account );
gsb_gui_sensitive_menu_item ( "EditMenu", "MoveToAnotherAccount",
- gsb_data_account_get_name (new_account),
+ gsb_data_account_get_name ( new_account ),
FALSE );
/* Sensitive menu items if something is selected. */
@@ -988,31 +988,30 @@
}
/* show or hide the rules button in toolbar */
- if (gsb_data_import_rule_account_has_rule (new_account))
- gtk_widget_show (menu_import_rules);
+ if ( gsb_data_import_rule_account_has_rule ( new_account ) )
+ gtk_widget_show ( menu_import_rules );
else
- gtk_widget_hide (menu_import_rules);
+ gtk_widget_hide ( menu_import_rules );
/* Update the title of the file if needed */
- if ( etat.display_grisbi_title == GSB_ACCOUNT_OWNER )
+ if ( etat.display_grisbi_title == GSB_ACCOUNT_HOLDER )
{
gchar * tmpstr;
- tmpstr = my_strdup ( gsb_data_account_get_owner (new_account) );
+ if (titre_fichier && strlen (titre_fichier) )
+ g_free (titre_fichier);
+
+ tmpstr = my_strdup ( gsb_data_account_get_holder_name ( new_account ) );
if ( tmpstr && strlen (tmpstr) > 0 )
{
- if (titre_fichier && strlen (titre_fichier) )
- g_free (titre_fichier);
titre_fichier = g_strdup ( tmpstr );
- }
- gsb_file_update_window_title ( );
- if (label_titre_fichier)
- {
- gchar* tmpstr = g_strconcat ("<span size=\"x-large\">",
- titre_fichier, "</span>", NULL );
- gtk_label_set_markup ( GTK_LABEL ( label_titre_fichier ), tmpstr );
g_free ( tmpstr );
}
+ else
+ titre_fichier = g_strdup ( initial_holder_title );
+
+ gsb_main_page_update_homepage_title ( titre_fichier );
+ gsb_file_update_window_title ( );
}
/* unset the last date written */
@@ -1694,7 +1693,7 @@
if ( gsb_gui_navigation_get_current_page ( ) == GSB_HOME_PAGE )
mise_a_jour_accueil ( TRUE );
else
- mise_a_jour_liste_comptes_accueil = ( TRUE );
+ mise_a_jour_liste_comptes_accueil = TRUE;
}
Index: affichage.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -d -r1.166 -r1.167
--- affichage.c 29 Aug 2009 08:36:40 -0000 1.166
+++ affichage.c 2 Oct 2009 21:35:04 -0000 1.167
@@ -32,6 +32,7 @@
#include "./navigation.h"
#include "./fenetre_principale.h"
#include "./barre_outils.h"
+#include "./accueil.h"
#include "./gsb_scheduler_list.h"
#include "./gsb_select_icon.h"
#include "./main.h"
@@ -93,6 +94,7 @@
extern GtkWidget *fenetre_preferences;
extern GtkWidget *hbox_title;
extern gchar *initial_file_title;
+extern gchar *initial_holder_title;
extern GtkWidget *label_titre_fichier;
extern GtkWidget *logo_accueil;
extern gchar *nom_fichier_comptes;
@@ -357,53 +359,52 @@
"addresses.png" );
/* Account file title */
- paddingbox = new_paddingbox_with_title ( vbox_pref, FALSE,
- _("Titles") );
+ paddingbox = new_paddingbox_with_title ( vbox_pref, FALSE, _("Titles") );
/* It first creates the entry of title */
- entry = gsb_automem_entry_new (&titre_fichier,
- ((GCallback)update_homepage_title), NULL);
+ entry = gsb_automem_entry_new ( &initial_file_title,
+ ( GCallback ) update_homepage_title, NULL );
+
/* Choice of title type */
hbox = gtk_hbox_new ( FALSE, 6 );
- gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox,
- FALSE, FALSE, 0);
+ gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox, FALSE, FALSE, 0);
+
radiogroup = radio = gtk_radio_button_new_with_label ( NULL,
_("Accounts file title") );
g_object_set_data ( G_OBJECT(radio), "display",
- GINT_TO_POINTER(GSB_ACCOUNTS_FILE) );
+ GINT_TO_POINTER ( GSB_ACCOUNTS_TITLE ) );
gtk_box_pack_start ( GTK_BOX( hbox ), radio, FALSE, FALSE, 0 );
- if ( etat.display_grisbi_title == GSB_ACCOUNTS_FILE )
+ if ( etat.display_grisbi_title == GSB_ACCOUNTS_TITLE )
gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (radio), TRUE );
g_signal_connect ( G_OBJECT(radio),
"toggled",
G_CALLBACK(change_grisbi_title_type),
entry );
- if ( gsb_data_account_get_owner ( 0 ) &&
- strlen ( gsb_data_account_get_owner ( 0 ) ) )
+ if ( initial_holder_title && strlen ( initial_holder_title ) )
{
radio = gtk_radio_button_new_with_label_from_widget (
- GTK_RADIO_BUTTON(radiogroup),
- _("Account owner name") );
- g_object_set_data ( G_OBJECT(radio), "display",
- GINT_TO_POINTER(GSB_ACCOUNT_OWNER) );
+ GTK_RADIO_BUTTON ( radiogroup ),
+ _("Account owner name") );
+ g_object_set_data ( G_OBJECT ( radio ), "display",
+ GINT_TO_POINTER ( GSB_ACCOUNT_HOLDER ) );
gtk_box_pack_start ( GTK_BOX( hbox ), radio, FALSE, FALSE, 0 );
- if ( etat.display_grisbi_title == GSB_ACCOUNT_OWNER )
- gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (radio), TRUE );
- g_signal_connect ( G_OBJECT(radio),
- "toggled",
- G_CALLBACK(change_grisbi_title_type),
- entry );
+ if ( etat.display_grisbi_title == GSB_ACCOUNT_HOLDER )
+ gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( radio ), TRUE );
+ g_signal_connect ( G_OBJECT ( radio ),
+ "toggled",
+ G_CALLBACK ( change_grisbi_title_type ),
+ entry );
}
radio = gtk_radio_button_new_with_label_from_widget (
GTK_RADIO_BUTTON(radiogroup),
_("Filename") );
g_object_set_data ( G_OBJECT(radio), "display",
- GINT_TO_POINTER(GSB_FILENAME) );
+ GINT_TO_POINTER ( GSB_ACCOUNTS_FILE ) );
gtk_box_pack_start ( GTK_BOX( hbox ), radio, FALSE, FALSE, 0 );
- if ( etat.display_grisbi_title == GSB_FILENAME )
- gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (radio), TRUE );
+ if ( etat.display_grisbi_title == GSB_ACCOUNTS_FILE )
+ gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (radio), TRUE );
g_signal_connect ( G_OBJECT(radio),
"toggled",
G_CALLBACK(change_grisbi_title_type),
@@ -417,7 +418,7 @@
gtk_box_pack_start ( GTK_BOX ( hbox ), label,
FALSE, FALSE, 0);
- if ( etat.display_grisbi_title == GSB_ACCOUNTS_FILE )
+ if ( etat.display_grisbi_title == GSB_ACCOUNTS_TITLE )
gtk_widget_set_sensitive ( entry, TRUE);
else
gtk_widget_set_sensitive ( entry, FALSE);
@@ -472,11 +473,6 @@
}
-
-
-
-
-
/* **************************************************************************************************************************** */
void change_logo_accueil ( GtkWidget * file_selector )
{
@@ -541,8 +537,6 @@
}
/* **************************************************************************************************************************** */
-
-
/* **************************************************************************************************************************** */
gboolean modification_logo_accueil ( )
{
@@ -625,17 +619,26 @@
gboolean update_homepage_title (GtkEntry *entry, gchar *value,
gint length, gint * position)
{
- /* at the first use of grisbi,label_titre_fichier doesn't still exist */
- if (label_titre_fichier)
+ if ( initial_file_title && strlen ( initial_file_title ) )
+ g_free ( initial_file_title );
+ initial_file_title = my_strdup ( gtk_entry_get_text ( GTK_ENTRY ( entry ) ) );
+
+ if ( initial_file_title && strlen ( initial_file_title ) > 0 )
{
- gchar* tmpstr = g_strconcat ("<span size=\"x-large\">",
- (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)),
- "</span>", NULL );
- gtk_label_set_markup ( GTK_LABEL ( label_titre_fichier ), tmpstr );
- g_free ( tmpstr );
+ gsb_main_page_update_homepage_title ( initial_file_title );
+
+ if ( etat.display_grisbi_title == GSB_ACCOUNTS_TITLE )
+ {
+ if ( titre_fichier && strlen ( titre_fichier ) )
+ g_free ( titre_fichier );
+ titre_fichier = my_strdup ( initial_file_title );
+ }
}
+ else
+ gtk_label_set_text ( GTK_LABEL ( label_titre_fichier ), "" );
+
/* Update window title */
- gsb_file_update_window_title();
+ gsb_file_update_window_title ( );
/* Mark file as modified */
if ( etat.modification_fichier == 0 )
@@ -954,77 +957,52 @@
if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button)) )
{
etat.display_grisbi_title = GPOINTER_TO_INT (g_object_get_data
- ( G_OBJECT(button), "display" ));
+ ( G_OBJECT ( button ), "display" ));
}
-
+
+ if (titre_fichier && strlen (titre_fichier) )
+ g_free (titre_fichier);
+
switch ( etat.display_grisbi_title )
{
- case GSB_ACCOUNTS_FILE:
- gtk_widget_set_sensitive ( entry, TRUE);
- if (initial_file_title && strlen (initial_file_title) )
- {
- gtk_entry_set_text ( GTK_ENTRY (entry), initial_file_title );
- if (titre_fichier && strlen (titre_fichier) )
- g_free (titre_fichier);
-
- titre_fichier = my_strdup ( initial_file_title );
- }
- else
- {
- gtk_entry_set_text ( GTK_ENTRY (entry), "" );
- titre_fichier = g_strdup ( _("My accounts") );
- }
- gsb_file_update_window_title ( );
- if (label_titre_fichier)
- {
- tmpstr = g_strconcat ("<span size=\"x-large\">",
- titre_fichier, "</span>", NULL );
- gtk_label_set_markup ( GTK_LABEL ( label_titre_fichier ), tmpstr );
- g_free ( tmpstr );
- }
+ case GSB_ACCOUNTS_TITLE:
+ gtk_widget_set_sensitive ( entry, TRUE);
+ if (initial_file_title && strlen (initial_file_title) )
+ {
+ gtk_entry_set_text ( GTK_ENTRY (entry), initial_file_title );
+ titre_fichier = my_strdup ( initial_file_title );
+ }
+ else
+ {
+ gtk_entry_set_text ( GTK_ENTRY (entry), _("My accounts") );
+ titre_fichier = g_strdup ( _("My accounts") );
+ }
break;
- case GSB_ACCOUNT_OWNER:
- gtk_widget_set_sensitive ( entry, FALSE);
- account_number = gsb_gui_navigation_get_current_account ( );
- if ( account_number == -1 )
- {
- account_number = gsb_gui_navigation_get_last_account ( );
+ case GSB_ACCOUNT_HOLDER:
+ gtk_widget_set_sensitive ( entry, FALSE);
+ account_number = gsb_gui_navigation_get_current_account ( );
if ( account_number == -1 )
- account_number = 0;
- }
- if (titre_fichier && strlen (titre_fichier) )
- g_free (titre_fichier);
- tmpstr = my_strdup ( gsb_data_account_get_owner
- (account_number) );
- if (tmpstr && strlen (tmpstr) )
- {
- titre_fichier = my_strdup ( tmpstr );
- g_free ( tmpstr );
- gsb_file_update_window_title ( );
- if (label_titre_fichier)
{
- tmpstr = g_strconcat ("<span size=\"x-large\">",
- titre_fichier, "</span>", NULL );
- gtk_label_set_markup ( GTK_LABEL ( label_titre_fichier ), tmpstr );
+ account_number = gsb_gui_navigation_get_last_account ( );
+ if ( account_number == -1 )
+ account_number = 0;
+ }
+ tmpstr = my_strdup ( gsb_data_account_get_holder_name (account_number) );
+ if (tmpstr && strlen (tmpstr) )
+ {
+ titre_fichier = my_strdup ( tmpstr );
g_free ( tmpstr );
}
- }
break;
- case GSB_FILENAME:
+ case GSB_ACCOUNTS_FILE:
gtk_widget_set_sensitive ( entry, FALSE);
- if (titre_fichier && strlen (titre_fichier) )
- g_free (titre_fichier);
- titre_fichier = g_path_get_basename (nom_fichier_comptes);
- gsb_file_update_window_title ( );
- if (label_titre_fichier)
- {
- tmpstr = g_strconcat ("<span size=\"x-large\">",
- titre_fichier, "</span>", NULL );
- gtk_label_set_markup ( GTK_LABEL ( label_titre_fichier ), tmpstr );
- g_free ( tmpstr );
- }
+ titre_fichier = g_path_get_basename ( nom_fichier_comptes );
break;
}
+ gsb_file_update_window_title ( );
+
+ gsb_main_page_update_homepage_title ( titre_fichier );
+
return FALSE;
}
Index: affichage_liste.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage_liste.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- affichage_liste.c 23 Sep 2009 20:28:20 -0000 1.114
+++ affichage_liste.c 2 Oct 2009 21:35:04 -0000 1.115
@@ -189,6 +189,14 @@
&conf.show_transaction_gives_balance,
G_CALLBACK ( gsb_transactions_list_display_show_gives_balance ), NULL ),
FALSE, FALSE, 0 );
+ /* Sorting the transactions by date */
+ gsb_automem_radiobutton_new_with_title ( vbox_pref,
+ _("Options for sorting by date"),
+ _("Sort by date and transaction number"),
+ _("Sort by date and transaction amount"),
+ &conf.transactions_list_sort_by_date,
+ G_CALLBACK ( gsb_transactions_list_display_sort_by_value_date ),
+ NULL );
/* Sorting the transactions by value date */
gsb_automem_radiobutton_new_with_title ( vbox_pref,
Index: accueil.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/accueil.c,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -d -r1.212 -r1.213
--- accueil.c 27 Sep 2009 15:30:49 -0000 1.212
+++ accueil.c 2 Oct 2009 21:35:04 -0000 1.213
@@ -155,43 +155,39 @@
/* en dessous, on met le titre du fichier s'il existe */
if ( titre_fichier )
{
- GtkWidget * eb;
- GtkStyle * style;
- gchar* tmpstr;
+ GtkWidget * eb;
+ GtkStyle * style;
- hbox_title = gtk_hbox_new ( FALSE, 0 );
+ hbox_title = gtk_hbox_new ( FALSE, 0 );
- eb = gtk_event_box_new ();
- style = gtk_widget_get_style ( eb );
- gtk_widget_modify_bg ( eb, 0, &(style -> bg[GTK_STATE_ACTIVE]) );
+ eb = gtk_event_box_new ();
+ style = gtk_widget_get_style ( eb );
+ gtk_widget_modify_bg ( eb, 0, &(style -> bg[GTK_STATE_ACTIVE]) );
- label_titre_fichier = gtk_label_new ( titre_fichier );
- tmpstr = g_strconcat ("<span size=\"x-large\">",
- titre_fichier, "</span>", NULL );
- gtk_label_set_markup ( GTK_LABEL ( label_titre_fichier ), tmpstr);
- g_free ( tmpstr );
+ label_titre_fichier = gtk_label_new ( titre_fichier );
+ gsb_main_page_update_homepage_title ( titre_fichier );
- if ( etat.utilise_logo )
- {
- logo_accueil = gtk_image_new_from_pixbuf (
- gsb_select_icon_get_logo_pixbuf ( ) );
- if ( ! logo_accueil )
+ if ( etat.utilise_logo )
+ {
logo_accueil = gtk_image_new_from_pixbuf (
- gsb_select_icon_get_default_logo_pixbuf ( ) );
- gtk_box_pack_start ( GTK_BOX ( hbox_title ), logo_accueil, FALSE, FALSE, 20 );
- gtk_widget_set_size_request ( hbox_title, -1, LOGO_HEIGHT + 20 );
- }
+ gsb_select_icon_get_logo_pixbuf ( ) );
+ if ( ! logo_accueil )
+ logo_accueil = gtk_image_new_from_pixbuf (
+ gsb_select_icon_get_default_logo_pixbuf ( ) );
+ gtk_box_pack_start ( GTK_BOX ( hbox_title ), logo_accueil, FALSE, FALSE, 20 );
+ gtk_widget_set_size_request ( hbox_title, -1, LOGO_HEIGHT + 20 );
+ }
- gtk_box_pack_end ( GTK_BOX ( hbox_title ), label_titre_fichier, TRUE, TRUE, 20 );
- gtk_container_set_border_width ( GTK_CONTAINER ( hbox_title ), 6 );
- gtk_container_add ( GTK_CONTAINER(eb), hbox_title );
- gtk_box_pack_start ( GTK_BOX ( base ), eb, FALSE, FALSE, 0 );
- gtk_widget_show_all ( eb );
+ gtk_box_pack_end ( GTK_BOX ( hbox_title ), label_titre_fichier, TRUE, TRUE, 20 );
+ gtk_container_set_border_width ( GTK_CONTAINER ( hbox_title ), 6 );
+ gtk_container_add ( GTK_CONTAINER(eb), hbox_title );
+ gtk_box_pack_start ( GTK_BOX ( base ), eb, FALSE, FALSE, 0 );
+ gtk_widget_show_all ( eb );
}
else
{
- label_titre_fichier = gtk_label_new ( NULL );
- gtk_box_pack_start ( GTK_BOX ( base ), label_titre_fichier, FALSE, FALSE, 0 );
+ label_titre_fichier = gtk_label_new ( NULL );
+ gtk_box_pack_start ( GTK_BOX ( base ), label_titre_fichier, FALSE, FALSE, 0 );
}
/* on crée le size_group pour l'alignement des tableaux */
@@ -2096,6 +2092,27 @@
}
+/**
+ * update the title of the main page
+ *
+ * */
+void gsb_main_page_update_homepage_title ( gchar *title )
+{
+ gchar * tmpstr;
+
+ /* at the first use of grisbi,label_titre_fichier doesn't still exist */
+ if ( !label_titre_fichier )
+ return;
+
+ if ( title && strlen ( title ) > 0 )
+ tmpstr = g_strconcat ("<span size=\"x-large\">", title, "</span>", NULL );
+ else
+ tmpstr = g_strconcat ("<span size=\"x-large\">", _("My accounts"), "</span>", NULL );
+
+ gtk_label_set_markup ( GTK_LABEL ( label_titre_fichier ), tmpstr );
+ g_free ( tmpstr );
+
+}
/* Local Variables: */
/* c-basic-offset: 4 */
/* End: */
Index: gsb_transactions_list_sort.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list_sort.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- gsb_transactions_list_sort.c 23 Sep 2009 20:28:21 -0000 1.19
+++ gsb_transactions_list_sort.c 2 Oct 2009 21:35:04 -0000 1.20
@@ -1,8 +1,9 @@
/* ************************************************************************** */
/* */
-/* Copyright (C) 2000-2008 Cédric Auger (cedric at grisbi.org) */
-/* 2003-2008 Benjamin Drieu (bdrieu at april.org) */
-/* http://www.grisbi.org */
+/* Copyright (C) 2000-2008 Cédric Auger (cedric at grisbi.org) */
+/* 2003-2008 Benjamin Drieu (bdrieu at april.org) */
+/* 2008-2009 Pierre Biava (grisbi at pierre.biava.name) */
+/* http://www.grisbi.org */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
@@ -53,46 +54,46 @@
/*START_STATIC*/
static gint gsb_transactions_list_sort_by_amount ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_bank ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_budget ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_category ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_chq ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_credit ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_date ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_debit ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_financial_year ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_mark ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_no ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_no_sort ( gint transaction_number_1,
- gint transaction_number_2,
- gint element_number );
+ gint transaction_number_2,
+ gint element_number );
static gint gsb_transactions_list_sort_by_notes ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_party ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_reconcile_nb ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_transaction_date_and_amount ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_transaction_date_and_no ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_type ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_value_date ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
static gint gsb_transactions_list_sort_by_voucher ( gint transaction_number_1,
- gint transaction_number_2 );
+ gint transaction_number_2 );
/*END_STATIC*/
@@ -111,8 +112,8 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort (CustomRecord **a,
- CustomRecord **b,
- CustomList *custom_list)
+ CustomRecord **b,
+ CustomList *custom_list)
{
gint account_number;
gint return_value;
@@ -178,7 +179,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_check_archive ( CustomRecord *record_1,
- CustomRecord *record_2 )
+ CustomRecord *record_2 )
{
gint return_value = 0;
@@ -233,7 +234,7 @@
* or the return_value if it's possible here
* */
gint gsb_transactions_list_sort_general_test ( CustomRecord *record_1,
- CustomRecord *record_2 )
+ CustomRecord *record_2 )
{
gint return_value = 0;
@@ -268,8 +269,8 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_no_sort ( gint transaction_number_1,
- gint transaction_number_2,
- gint element_number )
+ gint transaction_number_2,
+ gint element_number )
{
gchar* tmpstr;
@@ -369,17 +370,17 @@
* \return -1 if transaction_number_1 is above transaction_number_2
* */
gint gsb_transactions_list_sort_by_transaction_date_and_no ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
if ( !gsb_data_transaction_get_date (transaction_number_1) )
{
- return 1;
+ return 1;
}
if ( !gsb_data_transaction_get_date (transaction_number_2) )
{
- return -1;
+ return -1;
}
/* i tried to set in the transactions a value for date as a gint as yyyymmdd
@@ -387,11 +388,11 @@
* to increase the speed, but change nothing (perhaps 0,05sec for 250000 rows...)
* so let like that */
return_value = g_date_compare ( gsb_data_transaction_get_date (transaction_number_1),
- gsb_data_transaction_get_date (transaction_number_2));
+ gsb_data_transaction_get_date (transaction_number_2));
/* no difference in the dates, sort by number of transaction */
if ( !return_value )
- return_value = transaction_number_1 - transaction_number_2;
+ return_value = transaction_number_1 - transaction_number_2;
return return_value;
}
@@ -405,7 +406,7 @@
* \return -1 if amount_2 is above amount_number_1
* */
gint gsb_transactions_list_sort_by_transaction_date_and_amount ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
gsb_real amount_1;
@@ -421,14 +422,17 @@
}
return_value = g_date_compare ( gsb_data_transaction_get_date (transaction_number_1),
- gsb_data_transaction_get_date (transaction_number_2));
-
- /* no difference in the dates, sort by amount of transaction */
- amount_1 = gsb_data_transaction_get_amount ( transaction_number_1 );
- amount_2 = gsb_data_transaction_get_amount ( transaction_number_2 );
+ gsb_data_transaction_get_date (transaction_number_2));
- if ( !return_value )
+ if ( return_value == 0 )
+ {
+ /* no difference in the dates, sort by amount of transaction */
+ amount_1 = gsb_data_transaction_get_amount ( transaction_number_1 );
+ amount_2 = gsb_data_transaction_get_amount ( transaction_number_2 );
return_value = amount_2.mantissa - amount_1.mantissa;
+ if ( return_value == 0 )
+ return_value = transaction_number_1 - transaction_number_2;
+ }
return return_value;
}
@@ -445,15 +449,16 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_no ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
return transaction_number_1 - transaction_number_2;
}
-/** used to compare 2 iters and sort the by date first, and no
- * transaction after
+/**
+ * used to compare 2 iters and sort the by date first, and no
+ * or amount transaction after
* always put the white line below
* \param model the GtkTreeModel
* \param iter_1
@@ -461,9 +466,13 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_date ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
- return gsb_transactions_list_sort_by_transaction_date_and_no (
+ if ( conf.transactions_list_sort_by_date == 0 )
+ return gsb_transactions_list_sort_by_transaction_date_and_no (
+ transaction_number_1, transaction_number_2 );
+ else
+ return gsb_transactions_list_sort_by_transaction_date_and_amount (
transaction_number_1, transaction_number_2 );
}
@@ -479,7 +488,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_value_date ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
const GDate *value_date_1;
@@ -527,7 +536,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_party ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
@@ -569,7 +578,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_budget ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
@@ -618,7 +627,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_credit ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
@@ -643,7 +652,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_debit ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
@@ -668,7 +677,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_amount ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
@@ -693,7 +702,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_type ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
@@ -753,7 +762,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_reconcile_nb ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
@@ -792,7 +801,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_financial_year ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
@@ -841,7 +850,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_category ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
gchar *temp_1;
@@ -883,7 +892,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_mark ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
@@ -907,7 +916,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_voucher ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
const gchar *temp_1;
@@ -939,7 +948,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_notes ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
const gchar *temp_1;
@@ -972,7 +981,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_bank ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
const gchar *temp_1;
@@ -1005,7 +1014,7 @@
* \return -1 if iter_1 is above iter_2
* */
gint gsb_transactions_list_sort_by_chq ( gint transaction_number_1,
- gint transaction_number_2 )
+ gint transaction_number_2 )
{
gint return_value;
const gchar *temp_1;
Index: gsb_data_account.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- gsb_data_account.c 29 Aug 2009 08:36:41 -0000 1.89
+++ gsb_data_account.c 2 Oct 2009 21:35:04 -0000 1.90
@@ -2617,25 +2617,6 @@
*
*
* */
-gchar *gsb_data_account_get_owner (gint account_number)
-{
- struct_account *account;
-
- account = gsb_data_account_get_structure ( account_number );
-
- if (!account )
- return NULL;
-
- return account -> holder_name;
-}
-
-
-/**
- *
- *
- *
- *
- * */
gchar *gsb_data_account_get_bank_account_iban (gint account_number)
{
struct_account *account;
Index: utils_str.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_str.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- utils_str.h 23 May 2009 19:25:10 -0000 1.42
+++ utils_str.h 2 Oct 2009 21:35:04 -0000 1.43
@@ -38,8 +38,8 @@
/* END_DECLARATION */
typedef enum GSB_TITLE_NAME {
+ GSB_ACCOUNTS_TITLE,
+ GSB_ACCOUNT_HOLDER,
GSB_ACCOUNTS_FILE,
- GSB_ACCOUNT_OWNER,
- GSB_FILENAME,
} GsbTitleType;
#endif
Index: accueil.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/accueil.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- accueil.h 22 Jul 2009 19:45:42 -0000 1.16
+++ accueil.h 2 Oct 2009 21:35:04 -0000 1.17
@@ -19,6 +19,7 @@
void affiche_dialogue_soldes_minimaux ( void );
GtkWidget *creation_onglet_accueil ( void );
gboolean gsb_main_page_update_finished_scheduled_transactions ( gint scheduled_number );
+void gsb_main_page_update_homepage_title ( gchar *title );
void mise_a_jour_accueil ( gboolean force );
GtkWidget *onglet_accueil (void);
/* END_DECLARATION */
Index: transaction_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/transaction_list.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- transaction_list.c 23 Aug 2009 16:45:05 -0000 1.49
+++ transaction_list.c 2 Oct 2009 21:35:04 -0000 1.50
@@ -1985,8 +1985,6 @@
gint transaction_number;
CustomList *custom_list;
- devel_debug (NULL);
-
custom_list = transaction_model_get_model ();
g_return_if_fail ( custom_list != NULL );
Index: gsb_file_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_config.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- gsb_file_config.c 23 Sep 2009 20:28:20 -0000 1.86
+++ gsb_file_config.c 2 Oct 2009 21:35:04 -0000 1.87
@@ -96,7 +96,7 @@
gint i;
gint int_ret;
GError* err = NULL;
-
+
gsb_file_config_clean_config ();
filename = g_strconcat ( my_get_XDG_grisbirc_dir(), C_GRISBIRC, NULL );
@@ -329,6 +329,10 @@
"Display",
"Show transaction gives balance",
NULL );
+ conf.transactions_list_sort_by_date = g_key_file_get_integer ( config,
+ "Display",
+ "Transactions list sort by date",
+ NULL );
conf.transactions_list_sort_by_value_date = g_key_file_get_integer ( config,
"Display",
@@ -673,6 +677,11 @@
g_key_file_set_integer ( config,
"Display",
+ "Transactions list sort by date",
+ conf.transactions_list_sort_by_date );
+
+ g_key_file_set_integer ( config,
+ "Display",
"Transactions list sort by value date",
conf.transactions_list_sort_by_value_date );
@@ -1222,12 +1231,13 @@
etat.automatic_completion_payee = 1; /* by default automatic completion */
etat.limit_completion_to_current_account = 0; /* By default, do full search */
- etat.display_grisbi_title = GSB_ACCOUNTS_FILE; /* show Accounts file title par défaut */
+ etat.display_grisbi_title = GSB_ACCOUNTS_TITLE; /* show Accounts file title par défaut */
etat.display_toolbar = GSB_BUTTON_BOTH; /* How to display toolbar icons. */
etat.show_toolbar = TRUE; /* Show toolbar or not. */
etat.show_headings_bar = TRUE; /* Show toolbar or not. */
conf.show_transaction_selected_in_form = 1; /* show selected transaction in form */
conf.show_transaction_gives_balance = 1; /* show transaction that gives the balance of the day */
+ conf.transactions_list_sort_by_date = 0; /* Options for sorting by date */
conf.transactions_list_sort_by_value_date = 1; /* Options for sorting by value date */
etat.show_closed_accounts = FALSE;
Index: gsb_data_account.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- gsb_data_account.h 23 May 2009 19:25:10 -0000 1.37
+++ gsb_data_account.h 2 Oct 2009 21:35:04 -0000 1.38
@@ -67,7 +67,6 @@
gint gsb_data_account_get_nb_rows ( gint account_number );
gint gsb_data_account_get_no_account ( gpointer account_ptr );
gint gsb_data_account_get_no_account_by_name ( const gchar *account_name );
-gchar *gsb_data_account_get_owner (gint account_number);
gboolean gsb_data_account_get_r ( gint account_number );
gint gsb_data_account_get_reconcile_sort_type ( gint account_number );
gfloat gsb_data_account_get_row_align ( gint account_number );
- Previous message: [grisbi-cvs] grisbi/po Makefile.in.in, 1.8, 1.9 cs.po, 1.58, 1.59 da.po, 1.65, 1.66 de.po, 1.125, 1.126 el.po, 1.29, 1.30 eo.po, 1.22, 1.23 es.po, 1.116, 1.117 fa.po, 1.52, 1.53 fr.po, 1.188, 1.189 grisbi.pot, 1.100, 1.101 he.po, 1.58, 1.59 it.po, 1.58, 1.59 nl.po, 1.57, 1.58 pl.po, 1.63, 1.64 pt_BR.po, 1.60, 1.61 ro.po, 1.58, 1.59 ru.po, 1.57, 1.58 zh_CN.po, 1.52, 1.53
- Next message: [grisbi-cvs] grisbi/src/plugins/openssl openssl.c, 1.18, 1.19 openssl.h, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list