[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_7_98-11-g42ab306
Pierre Biava
nobody at users.sourceforge.net
Sun Jan 9 21:10:17 CET 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".
The branch, master has been updated
via 42ab3067adb050b15f1eb796734b0f013315ad52 (commit)
via f622836b2e055e3e2ae63a08b09bd2ab4936197d (commit)
from 32b5fb970cbb99e7204dc2f22b250f144c11927f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 42ab3067adb050b15f1eb796734b0f013315ad52
Author: pbiava <pierre.biava at nerim.net>
Date: Sun Jan 9 21:09:00 2011 +0100
minor corrections in the sorting of the list of transactions
commit f622836b2e055e3e2ae63a08b09bd2ab4936197d
Author: pbiava <pierre.biava at nerim.net>
Date: Sun Jan 9 19:46:10 2011 +0100
Minor changes
-----------------------------------------------------------------------
Changes:
diff --git a/src/bet_hist.c b/src/bet_hist.c
index 5ad7b5d..4107847 100644
--- a/src/bet_hist.c
+++ b/src/bet_hist.c
@@ -565,7 +565,7 @@ GtkWidget *bet_historical_get_data_tree_view ( GtkWidget *container )
GTK_TREE_VIEW_COLUMN ( column ) );
g_object_set ( G_OBJECT ( GTK_CELL_RENDERER ( cell ) ), "xalign", 1.0, NULL );
gtk_tree_view_column_set_alignment ( column, 1 );
- gtk_tree_view_column_set_clickable ( GTK_TREE_VIEW_COLUMN ( column ), TRUE );
+ gtk_tree_view_column_set_clickable ( GTK_TREE_VIEW_COLUMN ( column ), FALSE );
gtk_tree_view_column_set_expand ( GTK_TREE_VIEW_COLUMN ( column ), TRUE );
gtk_tree_view_column_set_resizable ( column, TRUE );
@@ -581,7 +581,7 @@ GtkWidget *bet_historical_get_data_tree_view ( GtkWidget *container )
GTK_TREE_VIEW_COLUMN ( column ) );
g_object_set ( G_OBJECT ( GTK_CELL_RENDERER ( cell ) ), "xalign", 1.0, NULL );
gtk_tree_view_column_set_alignment ( column, 1 );
- gtk_tree_view_column_set_clickable ( GTK_TREE_VIEW_COLUMN ( column ), TRUE );
+ gtk_tree_view_column_set_clickable ( GTK_TREE_VIEW_COLUMN ( column ), FALSE );
gtk_tree_view_column_set_expand ( GTK_TREE_VIEW_COLUMN ( column ), TRUE );
gtk_tree_view_column_set_resizable ( column, TRUE );
@@ -597,7 +597,7 @@ GtkWidget *bet_historical_get_data_tree_view ( GtkWidget *container )
GTK_TREE_VIEW_COLUMN ( column ) );
g_object_set ( G_OBJECT ( GTK_CELL_RENDERER ( cell ) ), "xalign", 1.0, NULL );
gtk_tree_view_column_set_alignment ( column, 1 );
- gtk_tree_view_column_set_clickable ( GTK_TREE_VIEW_COLUMN ( column ), TRUE );
+ gtk_tree_view_column_set_clickable ( GTK_TREE_VIEW_COLUMN ( column ), FALSE );
gtk_tree_view_column_set_expand ( GTK_TREE_VIEW_COLUMN ( column ), TRUE );
gtk_tree_view_column_set_resizable ( column, TRUE );
@@ -615,7 +615,7 @@ GtkWidget *bet_historical_get_data_tree_view ( GtkWidget *container )
GTK_TREE_VIEW_COLUMN ( column ) );
g_object_set ( G_OBJECT ( GTK_CELL_RENDERER ( cell ) ), "xalign", 1.0, NULL );
gtk_tree_view_column_set_alignment ( column, 1 );
- gtk_tree_view_column_set_clickable ( GTK_TREE_VIEW_COLUMN ( column ), TRUE );
+ gtk_tree_view_column_set_clickable ( GTK_TREE_VIEW_COLUMN ( column ), FALSE );
gtk_tree_view_column_set_expand ( GTK_TREE_VIEW_COLUMN ( column ), TRUE );
gtk_tree_view_column_set_resizable ( column, TRUE );
diff --git a/src/gsb_scheduler_list.c b/src/gsb_scheduler_list.c
index f580bfa..ae72a6c 100644
--- a/src/gsb_scheduler_list.c
+++ b/src/gsb_scheduler_list.c
@@ -384,7 +384,7 @@ void gsb_scheduler_list_create_list_columns ( GtkWidget *tree_view )
/* no sorting by columns for now */
gtk_tree_view_column_set_clickable ( GTK_TREE_VIEW_COLUMN ( scheduler_list_column[i] ),
- FALSE );
+ TRUE );
/* automatic and resizeable sizing */
gtk_tree_view_column_set_sizing ( GTK_TREE_VIEW_COLUMN ( scheduler_list_column[i] ),
diff --git a/src/gsb_transactions_list_sort.c b/src/gsb_transactions_list_sort.c
index cc903ce..13c22bd 100644
--- a/src/gsb_transactions_list_sort.c
+++ b/src/gsb_transactions_list_sort.c
@@ -510,7 +510,14 @@ gint gsb_transactions_list_sort_by_no ( gint transaction_number_1,
gint gsb_transactions_list_sort_by_date ( gint transaction_number_1,
gint transaction_number_2 )
{
- return gsb_transactions_list_sort_initial_by_secondary_key (
+ if ( conf.transactions_list_secondary_sorting == 1 )
+ return gsb_transactions_list_sort_by_transaction_date_and_amount (
+ transaction_number_1, transaction_number_2 );
+ else if ( conf.transactions_list_secondary_sorting == 2 )
+ return gsb_transactions_list_sort_by_transaction_date_and_party (
+ transaction_number_1, transaction_number_2 );
+ else
+ return gsb_transactions_list_sort_by_transaction_date_and_no (
transaction_number_1, transaction_number_2 );
}
@@ -554,13 +561,14 @@ gint gsb_transactions_list_sort_by_value_date ( gint transaction_number_1,
if (value_date_2)
return_value = 1;
else
- return_value = 0;
+ return gsb_transactions_list_sort_by_date (
+ transaction_number_1, transaction_number_2 );
}
if ( return_value )
return return_value;
else
- return gsb_transactions_list_sort_by_date (
+ return gsb_transactions_list_sort_initial_by_secondary_key (
transaction_number_1, transaction_number_2 );
}
@@ -1180,11 +1188,11 @@ gint gsb_transactions_list_sort_initial_by_primary_key_and_secondary_key ( gint
/* need to work a little more here because value date is not obligatory filled,
* if we compare 2 transactions and 1 has no value date, set the value date before */
value_date_1 = gsb_data_transaction_get_value_date ( transaction_number_1 );
- if ( !value_date_1 && conf.transactions_list_primary_sorting == 0 )
+ if ( !value_date_1 )
value_date_1 = gsb_data_transaction_get_date ( transaction_number_1 );
value_date_2 = gsb_data_transaction_get_value_date ( transaction_number_2 );
- if ( !value_date_2 && conf.transactions_list_primary_sorting == 0 )
+ if ( !value_date_2 )
value_date_2 = gsb_data_transaction_get_date ( transaction_number_2 );
if ( value_date_1 )
@@ -1222,29 +1230,14 @@ gint gsb_transactions_list_sort_initial_by_primary_key_and_secondary_key ( gint
gint gsb_transactions_list_sort_initial_by_secondary_key ( gint transaction_number_1,
gint transaction_number_2 )
{
- if ( conf.transactions_list_primary_sorting == 0 )
- {
- if ( conf.transactions_list_secondary_sorting == 1 )
- return gsb_transactions_list_sort_by_amount (
+ if ( conf.transactions_list_secondary_sorting == 1 )
+ return gsb_transactions_list_sort_by_amount (
transaction_number_1, transaction_number_2 );
- else if ( conf.transactions_list_secondary_sorting == 2 )
- return gsb_transactions_list_sort_by_party (
+ else if ( conf.transactions_list_secondary_sorting == 2 )
+ return gsb_transactions_list_sort_by_party (
transaction_number_1, transaction_number_2 );
- else
- return transaction_number_1 - transaction_number_2;
- }
else
- {
- if ( conf.transactions_list_secondary_sorting == 1 )
- return gsb_transactions_list_sort_by_transaction_date_and_amount (
- transaction_number_1, transaction_number_2 );
- else if ( conf.transactions_list_secondary_sorting == 2 )
- return gsb_transactions_list_sort_by_transaction_date_and_party (
- transaction_number_1, transaction_number_2 );
- else
- return gsb_transactions_list_sort_by_transaction_date_and_no (
- transaction_number_1, transaction_number_2 );
- }
+ return transaction_number_1 - transaction_number_2;
}
diff --git a/src/transaction_list_sort.c b/src/transaction_list_sort.c
index d32c452..06c43fd 100644
--- a/src/transaction_list_sort.c
+++ b/src/transaction_list_sort.c
@@ -248,7 +248,7 @@ gboolean transaction_list_sort_get_initial_sort ( void )
element_number = gsb_data_account_get_element_sort ( account_number,
gsb_data_account_get_sort_column ( account_number ) );
- if ( element_number == ELEMENT_DATE || element_number == ELEMENT_VALUE_DATE )
+ if ( element_number == ELEMENT_VALUE_DATE )
return TRUE;
else
return FALSE;
hooks/post-receive
--
grisbi
More information about the cvs
mailing list