[grisbi-cvs] grisbi/src affichage.c, 1.151, 1.152 gsb_automem.c, 1.22, 1.23 gsb_data_account.c, 1.63, 1.64 gsb_data_account.h, 1.28, 1.29 gsb_file_config.c, 1.68, 1.69 gsb_reconcile.c, 1.29, 1.30 navigation.c, 1.109, 1.110 navigation.h, 1.19, 1.20 structures.h, 1.223, 1.224 tiers_onglet.c, 1.143, 1.144 utils_str.h, 1.38, 1.39

Pierre Biava pbiava at users.sourceforge.net
Sat Jan 31 21:11:06 CET 2009


Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12352/src

Modified Files:
	affichage.c gsb_automem.c gsb_data_account.c 
	gsb_data_account.h gsb_file_config.c gsb_reconcile.c 
	navigation.c navigation.h structures.h tiers_onglet.c 
	utils_str.h 
Log Message:
new feature see bug 467

Index: structures.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/structures.h,v
retrieving revision 1.223
retrieving revision 1.224
diff -u -d -r1.223 -r1.224
--- structures.h	4 Nov 2008 22:52:38 -0000	1.223
+++ structures.h	31 Jan 2009 20:11:04 -0000	1.224
@@ -79,6 +79,7 @@
     gint en_train_de_sauvegarder;
     gint en_train_de_charger;
     gint utilise_logo;
+    gint display_grisbi_title;   /* selection du titre principal de grisbi */
 
     gint utilise_fonte_listes;		/* TRUE to use a custom font for the lists */
     gchar *font_string;			/* contain the description of the font, or NULL */

Index: navigation.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/navigation.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- navigation.h	9 Oct 2008 19:39:09 -0000	1.19
+++ navigation.h	31 Jan 2009 20:11:04 -0000	1.20
@@ -25,6 +25,7 @@
 gint gsb_gui_navigation_get_current_account ( void );
 gint gsb_gui_navigation_get_current_page ( void );
 gint gsb_gui_navigation_get_current_report ( void );
+gint gsb_gui_navigation_get_last_account ( void );
 void gsb_gui_navigation_remove_account ( gint account_number );
 void gsb_gui_navigation_remove_report ( gint report_number );
 gboolean gsb_gui_navigation_select_next ();

Index: navigation.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/navigation.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- navigation.c	4 Jan 2009 18:31:54 -0000	1.109
+++ navigation.c	31 Jan 2009 20:11:04 -0000	1.110
@@ -33,6 +33,7 @@
 #include "./gsb_data_reconcile.h"
 #include "./gsb_data_report.h"
 #include "./utils_dates.h"
+#include "./gsb_file.h"
 #include "./gsb_form.h"
 #include "./gsb_form_scheduler.h"
 #include "./fenetre_principale.h"
@@ -45,11 +46,13 @@
 #include "./main.h"
 #include "./accueil.h"
 #include "./traitement_variables.h"
+#include "./utils_str.h"
 #include "./tiers_onglet.h"
 #include "./categories_onglet.h"
 #include "./imputation_budgetaire.h"
 #include "./transaction_list_select.h"
 #include "./transaction_list_sort.h"
+#include "./utils_str.h"
 #include "./fenetre_principale.h"
 #include "./include.h"
 #include "./balance_estimate_tab.h"
@@ -62,7 +65,6 @@
 static gboolean gsb_gui_navigation_check_key_press ( GtkWidget *tree_view,
 					      GdkEventKey *ev,
 					      GtkTreeModel *model );
-static gint gsb_gui_navigation_get_last_account ( void );
 static  gboolean gsb_gui_navigation_remove_account_iterator ( GtkTreeModel * tree_model, 
 							     GtkTreePath *path, 
 							     GtkTreeIter *iter, 
@@ -102,6 +104,7 @@
 extern GtkTreeStore *budgetary_line_tree_model ;
 extern GtkTreeStore * categ_tree_model ;
 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 ;
@@ -999,6 +1002,24 @@
     else
 	gtk_widget_hide (menu_import_rules);
 
+    /* Update the title of the file if needed */
+    if ( etat.display_grisbi_title == GSB_ACCOUNT_OWNER )
+    {
+         if (titre_fichier && strlen (titre_fichier) )
+            g_free (titre_fichier);
+        titre_fichier = my_strdup ( gsb_data_account_get_owner 
+                        (new_account) );
+        devel_debug ( titre_fichier );
+        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 );
+        }
+    }
+
     /* unset the last date written */
     gsb_date_free_last_date ();
 

Index: affichage.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/affichage.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -d -r1.151 -r1.152
--- affichage.c	24 Jan 2009 17:56:58 -0000	1.151
+++ affichage.c	31 Jan 2009 20:11:04 -0000	1.152
@@ -29,6 +29,7 @@
 #include "./gsb_automem.h"
 #include "./gsb_data_account.h"
 #include "./gsb_file.h"
+#include "./navigation.h"
 #include "./barre_outils.h"
 #include "./gsb_scheduler_list.h"
 #include "./gsb_select_icon.h"
@@ -40,6 +41,7 @@
 #include "./utils_font.h"
 #include "./structures.h"
 #include "./custom_list.h"
+#include "./utils_str.h"
 #include "./utils_buttons.h"
 #include "./gsb_select_icon.h"
 #include "./include.h"
@@ -51,8 +53,9 @@
 					    GtkWidget *vbox );
 static gboolean change_choix_utilise_logo ( GtkWidget *check_button,
 				     GtkWidget *hbox );
+static gboolean change_grisbi_title_type ( GtkRadioButton *button, GtkWidget *entry );
 static void change_logo_accueil ( GtkWidget * file_selector );
-static gboolean change_toolbar_display_mode ( GtkRadioButton * button );
+static gboolean change_toolbar_display_mode ( GtkRadioButton *button );
 static gboolean modification_logo_accueil ( );
 static  gboolean preferences_view_color_changed ( GtkWidget *color_button,
 						 GtkWidget *combobox );
@@ -87,6 +90,7 @@
 extern GtkWidget *hbox_title ;
 extern GtkWidget *label_titre_fichier ;
 extern GtkWidget *logo_accueil ;
+extern gchar *nom_fichier_comptes ;
 extern GdkColor split_background;
 extern GdkColor text_color[2];
 extern gchar *titre_fichier ;
@@ -343,6 +347,7 @@
     GtkWidget *hbox, *vbox_pref, *scrolled_window, *label;
     GtkWidget *paddingbox;
     GtkWidget *entry;
+    GtkWidget *radio, *radiogroup;
 
     vbox_pref = new_vbox_with_title_and_icon ( _("Addresses & titles"),
 					       "addresses.png" );
@@ -350,6 +355,56 @@
     /* Account file title */
     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);
+    /* Choice of title type */
+    hbox = gtk_hbox_new ( FALSE, 6 );
+    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) );
+    gtk_box_pack_start ( GTK_BOX( hbox ), radio, FALSE, FALSE, 0 );
+    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), 
+                        entry );
+
+    if (  gsb_data_account_get_owner ( 0 ) &&
+                        strlen ( gsb_data_account_get_owner ( 0 ) ) )
+    {
+        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_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 );
+    }
+
+    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) );
+    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 );
+    g_signal_connect ( G_OBJECT(radio), 
+                        "toggled",
+                        G_CALLBACK(change_grisbi_title_type), 
+                        entry );
+
     hbox = gtk_hbox_new ( FALSE, 6 );
     gtk_box_pack_start ( GTK_BOX ( paddingbox ), hbox,
 			 FALSE, FALSE, 0);
@@ -358,8 +413,10 @@
     gtk_box_pack_start ( GTK_BOX ( hbox ), label,
 			 FALSE, FALSE, 0);
 
-    entry = gsb_automem_entry_new (&titre_fichier,
-				   ((GCallback)update_homepage_title), NULL);
+    if ( etat.display_grisbi_title == GSB_ACCOUNTS_FILE )
+        gtk_widget_set_sensitive ( entry, TRUE);
+    else
+        gtk_widget_set_sensitive ( entry, FALSE);
     gtk_box_pack_start ( GTK_BOX ( hbox ), entry,
 			 TRUE, TRUE, 0);
 
@@ -566,9 +623,6 @@
     /* at the first use of grisbi,label_titre_fichier doesn't still exist */
     if (label_titre_fichier)
     {
-	gtk_label_set_text ( GTK_LABEL(label_titre_fichier),
-			     (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)) );
-
 	gchar* tmpstr = g_strconcat ("<span size=\"x-large\">",
 				     (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)),
 				     "</span>", NULL );
@@ -594,7 +648,7 @@
  *
  * \return FALSE
  */
-gboolean change_toolbar_display_mode ( GtkRadioButton * button )
+gboolean change_toolbar_display_mode ( GtkRadioButton *button )
 {
     if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button)) )
     {
@@ -859,6 +913,90 @@
     return FALSE;
 }
 
+/**
+ * Signal triggered when user configure display grisbi title
+ *
+ * \param button	Radio button that triggered event.
+ *
+ * \return FALSE
+ */
+gboolean change_grisbi_title_type ( GtkRadioButton *button, GtkWidget *entry )
+{
+    gint account_number;
+    gchar *tmpstr = NULL;
+
+    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" ));
+    }
+    
+    switch ( etat.display_grisbi_title )
+    {
+        case GSB_ACCOUNTS_FILE:
+        gtk_widget_set_sensitive ( entry, TRUE);
+        if (titre_fichier && strlen (titre_fichier) )
+                g_free (titre_fichier);
+        tmpstr = my_strdup ( gtk_entry_get_text (GTK_ENTRY (entry) ) );
+        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 );
+                g_free ( tmpstr );
+            }
+        }
+        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 ( );
+            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 );
+                g_free ( tmpstr );
+            }
+        }
+        break;
+        case GSB_FILENAME:
+        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 );
+        }
+        break;
+    }
+    return FALSE;
+}
+
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */

Index: gsb_reconcile.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_reconcile.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- gsb_reconcile.c	30 Jan 2009 18:40:04 -0000	1.29
+++ gsb_reconcile.c	31 Jan 2009 20:11:04 -0000	1.30
@@ -49,8 +49,8 @@
 #include "./gsb_transactions_list.h"
 #include "./gsb_data_transaction.h"
 #include "./include.h"
-#include "./gsb_real.h"
 #include "./erreur.h"
+#include "./gsb_real.h"
 /*END_INCLUDE*/
 
 /*START_STATIC*/
@@ -58,9 +58,6 @@
 				gpointer null );
 static gboolean gsb_reconcile_finish_reconciliation ( GtkWidget *button,
 					       gpointer null );
-//~ static gboolean gsb_reconcile_key_press_event ( GtkWidget *entry,
-					 //~ GdkEventKey *event,
-					 //~ gpointer null );
 static void gsb_reconcile_sensitive ( gboolean sensitive );
 /*END_STATIC*/
 

Index: gsb_automem.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_automem.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- gsb_automem.c	10 Jan 2009 18:50:21 -0000	1.22
+++ gsb_automem.c	31 Jan 2009 20:11:04 -0000	1.23
@@ -49,16 +49,6 @@
 						  gpointer null );
 static  gboolean gsb_automem_entry_changed (GtkWidget *entry,
 					   gpointer null );
-static  gboolean gsb_automem_radiobutton3_changed ( GtkWidget *checkbutton,
-						   gpointer value_ptr );
-static GtkWidget *gsb_automem_radiobutton3_new ( const gchar *choice1,
-					  const gchar *choice2,
-					  const gchar *choice3,
-					  gboolean *value );
-static GtkWidget *gsb_automem_radiobutton3_new_with_title ( GtkWidget *parent,
-						     const gchar *title,
-						     const gchar *choice1, const gchar *choice2, const gchar *choice3,
-						     gboolean *value );
 static GtkWidget *gsb_automem_radiobutton_new ( const gchar *choice1,
 					 const gchar *choice2,
 					 gboolean *value,
@@ -515,20 +505,20 @@
  *
  * \return A newly created paddingbox
  */
-GtkWidget *gsb_automem_radiobutton3_new_with_title ( GtkWidget *parent,
-						     const gchar *title,
-						     const gchar *choice1, const gchar *choice2, const gchar *choice3,
-						     gboolean *value )
-{
-    GtkWidget *paddingbox;
+//~ GtkWidget *gsb_automem_radiobutton3_new_with_title ( GtkWidget *parent,
+						     //~ const gchar *title,
+						     //~ const gchar *choice1, const gchar *choice2, const gchar *choice3,
+						     //~ gboolean *value )
+//~ {
+    //~ GtkWidget *paddingbox;
 
-    paddingbox = new_paddingbox_with_title (parent, FALSE, COLON(title));
-    gtk_box_pack_start (GTK_BOX(paddingbox),
-			gsb_automem_radiobutton3_new ( choice1, choice2, choice3,
-						       value ), 
-			FALSE, FALSE, 0 );
-    return paddingbox;
-}
+    //~ paddingbox = new_paddingbox_with_title (parent, FALSE, COLON(title));
+    //~ gtk_box_pack_start (GTK_BOX(paddingbox),
+			//~ gsb_automem_radiobutton3_new ( choice1, choice2, choice3,
+						       //~ value ), 
+			//~ FALSE, FALSE, 0 );
+    //~ return paddingbox;
+//~ }
 
 
 
@@ -544,57 +534,57 @@
  *
  * \return a vbox containing the radiobuttons
  */
-GtkWidget *gsb_automem_radiobutton3_new ( const gchar *choice1,
-					  const gchar *choice2,
-					  const gchar *choice3,
-					  gboolean *value )
-{
-    GtkWidget *button1, *button2, *button3, *vbox;
+//~ GtkWidget *gsb_automem_radiobutton3_new ( const gchar *choice1,
+					  //~ const gchar *choice2,
+					  //~ const gchar *choice3,
+					  //~ gboolean *value )
+//~ {
+    //~ GtkWidget *button1, *button2, *button3, *vbox;
 
-    vbox = gtk_vbox_new ( FALSE, 6 );
+    //~ vbox = gtk_vbox_new ( FALSE, 6 );
 
-    button1 = gtk_radio_button_new_with_mnemonic ( NULL, choice1 );
-    gtk_box_pack_start (GTK_BOX(vbox), button1, FALSE, FALSE, 0 );
-    button2 = gtk_radio_button_new_with_mnemonic ( gtk_radio_button_get_group (GTK_RADIO_BUTTON(button1)), 
-						   choice2 );
-    gtk_box_pack_start (GTK_BOX(vbox), button2, FALSE, FALSE, 0 );
-    button3 = gtk_radio_button_new_with_mnemonic ( gtk_radio_button_get_group (GTK_RADIO_BUTTON(button1)), 
-						   choice3 );
-    gtk_box_pack_start (GTK_BOX(vbox), button3, FALSE, FALSE, 0 );
+    //~ button1 = gtk_radio_button_new_with_mnemonic ( NULL, choice1 );
+    //~ gtk_box_pack_start (GTK_BOX(vbox), button1, FALSE, FALSE, 0 );
+    //~ button2 = gtk_radio_button_new_with_mnemonic ( gtk_radio_button_get_group (GTK_RADIO_BUTTON(button1)), 
+						   //~ choice2 );
+    //~ gtk_box_pack_start (GTK_BOX(vbox), button2, FALSE, FALSE, 0 );
+    //~ button3 = gtk_radio_button_new_with_mnemonic ( gtk_radio_button_get_group (GTK_RADIO_BUTTON(button1)), 
+						   //~ choice3 );
+    //~ gtk_box_pack_start (GTK_BOX(vbox), button3, FALSE, FALSE, 0 );
 
 
-    if (value)
-    {
-	switch (*value)
-	{
-	    case 0:
-		gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button1 ), TRUE );
-		break;
-	    case 1:
-		gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button2 ), TRUE );
-		break;
-	    default:
-		gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button3 ), TRUE );
-	}
-    }
+    //~ if (value)
+    //~ {
+	//~ switch (*value)
+	//~ {
+	    //~ case 0:
+		//~ gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button1 ), TRUE );
+		//~ break;
+	    //~ case 1:
+		//~ gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button2 ), TRUE );
+		//~ break;
+	    //~ default:
+		//~ gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( button3 ), TRUE );
+	//~ }
+    //~ }
 
-    /* we associate the value for all the buttons */
-    g_object_set_data ( G_OBJECT ( button1 ),
-			"pointer", value);
-    g_object_set_data ( G_OBJECT ( button2 ),
-			"pointer", value);
-    g_object_set_data ( G_OBJECT ( button3 ),
-			"pointer", value);
+    //~ /* we associate the value for all the buttons */
+    //~ g_object_set_data ( G_OBJECT ( button1 ),
+			//~ "pointer", value);
+    //~ g_object_set_data ( G_OBJECT ( button2 ),
+			//~ "pointer", value);
+    //~ g_object_set_data ( G_OBJECT ( button3 ),
+			//~ "pointer", value);
 
-    g_signal_connect ( G_OBJECT ( button1 ), "toggled",
-		       G_CALLBACK (gsb_automem_radiobutton3_changed), GINT_TO_POINTER (0));
-    g_signal_connect ( G_OBJECT ( button2 ), "toggled",
-		       G_CALLBACK (gsb_automem_radiobutton3_changed), GINT_TO_POINTER (1));
-    g_signal_connect ( G_OBJECT ( button3 ), "toggled",
-		       G_CALLBACK (gsb_automem_radiobutton3_changed), GINT_TO_POINTER (2));
+    //~ g_signal_connect ( G_OBJECT ( button1 ), "toggled",
+		       //~ G_CALLBACK (gsb_automem_radiobutton3_changed), GINT_TO_POINTER (0));
+    //~ g_signal_connect ( G_OBJECT ( button2 ), "toggled",
+		       //~ G_CALLBACK (gsb_automem_radiobutton3_changed), GINT_TO_POINTER (1));
+    //~ g_signal_connect ( G_OBJECT ( button3 ), "toggled",
+		       //~ G_CALLBACK (gsb_automem_radiobutton3_changed), GINT_TO_POINTER (2));
 
-    return vbox;
-}
+    //~ return vbox;
+//~ }
 
 /**
  * called for a change in automem_radiobutton3
@@ -604,26 +594,26 @@
  *
  * \return FALSE
  * */
-static gboolean gsb_automem_radiobutton3_changed ( GtkWidget *checkbutton,
-						   gpointer value_ptr )
-{
-    gboolean *value;
+//~ static gboolean gsb_automem_radiobutton3_changed ( GtkWidget *checkbutton,
+						   //~ gpointer value_ptr )
+//~ {
+    //~ gboolean *value;
 
-    /* as we have 3 buttons, this function will be always called 2 times,
-     * one for unset the button, and one for set the button,
-     * so we get only when the button is set */
-    if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)))
-	return FALSE;
+    //~ /* as we have 3 buttons, this function will be always called 2 times,
+     //~ * one for unset the button, and one for set the button,
+     //~ * so we get only when the button is set */
+    //~ if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)))
+	//~ return FALSE;
 
-    /* we are on the active button, so save the value for it */
-    value = g_object_get_data ( G_OBJECT (checkbutton), "pointer");
-    if (value)
-    {
-	*value = GPOINTER_TO_INT (value_ptr);
-	modification_fichier (TRUE);
-    }
-    return FALSE;
-}
+    //~ /* we are on the active button, so save the value for it */
+    //~ value = g_object_get_data ( G_OBJECT (checkbutton), "pointer");
+    //~ if (value)
+    //~ {
+	//~ *value = GPOINTER_TO_INT (value_ptr);
+	//~ modification_fichier (TRUE);
+    //~ }
+    //~ return FALSE;
+//~ }
 
 
 /**

Index: gsb_data_account.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- gsb_data_account.c	30 Jan 2009 18:40:04 -0000	1.63
+++ gsb_data_account.c	31 Jan 2009 20:11:04 -0000	1.64
@@ -2626,3 +2626,14 @@
 }
 
 
+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;
+}

Index: utils_str.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils_str.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- utils_str.h	14 Oct 2008 16:37:51 -0000	1.38
+++ utils_str.h	31 Jan 2009 20:11:04 -0000	1.39
@@ -32,5 +32,9 @@
 					       gint exponent );
 /* END_DECLARATION */
 
-
+typedef enum GSB_TITLE_NAME {
+    GSB_ACCOUNTS_FILE,
+    GSB_ACCOUNT_OWNER,
+    GSB_FILENAME,
+} GsbTitleType;
 #endif

Index: tiers_onglet.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/tiers_onglet.c,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -d -r1.143 -r1.144
--- tiers_onglet.c	10 Jan 2009 18:56:11 -0000	1.143
+++ tiers_onglet.c	31 Jan 2009 20:11:04 -0000	1.144
@@ -67,7 +67,7 @@
 static gboolean popup_payee_view_mode_menu ( GtkWidget * button );
 /*END_STATIC*/
 
-GtkWidget *arbre_tiers = NULL;
+//~ GtkWidget *arbre_tiers = NULL;
 
 gint no_devise_totaux_tiers;
 

Index: gsb_file_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_config.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- gsb_file_config.c	30 Jan 2009 18:40:04 -0000	1.68
+++ gsb_file_config.c	31 Jan 2009 20:11:04 -0000	1.69
@@ -342,6 +342,11 @@
 							 "Show closed accounts",
 							 NULL );
 
+    etat.display_grisbi_title = g_key_file_get_integer ( config,
+							 "Display",
+							 "Display grisbi title",
+							 NULL );
+
     /* get messages */
     for ( i = 0; messages[i].name; i ++ )
     {
@@ -647,6 +652,11 @@
 			     "Show closed accounts",
 			     etat.show_closed_accounts );
 
+    g_key_file_set_integer ( config,
+			     "Display",
+			     "Display grisbi title",
+			     etat.display_grisbi_title );
+
     /* save messages */
 
     for ( i = 0; messages[i].name; i ++ )
@@ -1162,9 +1172,10 @@
     etat.get_fyear_by_value_date = 0;        /* By default use transaction-date */
     etat.limit_completion_to_current_account = 0;        /* By default, do full search */
 
-    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. */
+    etat.display_grisbi_title = GSB_ACCOUNTS_FILE;  /* 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. */
 
     etat.show_closed_accounts = FALSE;
 

Index: gsb_data_account.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- gsb_data_account.h	4 Jan 2009 18:31:54 -0000	1.28
+++ gsb_data_account.h	31 Jan 2009 20:11:04 -0000	1.29
@@ -66,6 +66,7 @@
 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 );



More information about the cvs mailing list