[grisbi-cvs] grisbi/src gsb_scheduler_list.c,1.63,1.64
Pierre Biava
pbiava at users.sourceforge.net
Fri May 8 21:20:15 CEST 2009
Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv27056
Modified Files:
gsb_scheduler_list.c
Log Message:
Adding use simple click to select planned transactions
Index: gsb_scheduler_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_scheduler_list.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- gsb_scheduler_list.c 8 May 2009 17:21:15 -0000 1.63
+++ gsb_scheduler_list.c 8 May 2009 19:20:13 -0000 1.64
@@ -1,8 +1,8 @@
/* ************************************************************************** */
/* */
-/* Copyright (C) 2000-2008 Cédric Auger (cedric at grisbi.org) */
-/* 2004-2008 Benjamin Drieu (bdrieu at april.org) */
-/* http://www.grisbi.org */
+/* Copyright (C) 2000-2008 Cédric Auger (cedric at grisbi.org) */
+/* 2004-2008 Benjamin Drieu (bdrieu at april.org) */
+/* 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 */
@@ -42,6 +42,7 @@
#include "./gsb_data_payee.h"
#include "./gsb_data_scheduled.h"
#include "./gsb_form.h"
+#include "./gsb_form_scheduler.h"
#include "./fenetre_principale.h"
#include "./gsb_real.h"
#include "./gsb_scheduler.h"
@@ -1407,32 +1408,43 @@
gboolean gsb_scheduler_list_selection_changed ( GtkTreeSelection *selection,
gpointer null )
{
- gint tmp_number;
+ gint tmp_number = 0;
+ gint account_number;
/* wanted to set that function in gsb_scheduler_list_button_press but g_signal_connect_after
* seems not to work in that case... */
/* protect last_scheduled_number because when refill the list, set selection to 0 and so last_scheduled_number... */
- tmp_number = gsb_scheduler_list_get_current_scheduled_number ();
+ tmp_number = gsb_scheduler_list_get_current_scheduled_number ();
- if (tmp_number)
- last_scheduled_number = tmp_number;
+ if (tmp_number)
+ last_scheduled_number = tmp_number;
+
+ /* if etat.show_transaction_selected_in_form => edit the scheduled transaction */
+ if ( tmp_number != 0 && etat.show_transaction_selected_in_form )
+ gsb_scheduler_list_edit_transaction (tmp_number);
+ else if ( tmp_number == 0 )
+ {
+ gsb_form_scheduler_clean ( );
+ account_number = gsb_data_scheduled_get_account_number (tmp_number);
+ gsb_form_clean ( account_number );
+ }
/* sensitive/unsensitive the button execute */
gtk_widget_set_sensitive ( scheduler_button_execute,
- (tmp_number > 0)
- &&
- !gsb_data_scheduled_get_mother_scheduled_number (tmp_number));
+ (tmp_number > 0)
+ &&
+ !gsb_data_scheduled_get_mother_scheduled_number (tmp_number));
/* sensitive/unsensitive the button edit */
gtk_widget_set_sensitive ( scheduler_button_edit,
- (tmp_number > 0));
+ (tmp_number > 0));
/* sensitive/unsensitive the button delete */
gtk_widget_set_sensitive ( scheduler_button_delete,
- (tmp_number > 0));
+ (tmp_number > 0));
return FALSE;
}
@@ -1493,7 +1505,6 @@
gboolean gsb_scheduler_list_button_press ( GtkWidget *tree_view,
GdkEventButton *ev )
{
- devel_debug (NULL);
/* if double-click => edit the scheduled transaction */
More information about the cvs
mailing list