[grisbi-cvs] grisbi/src fenetre_principale.c, 1.117, 1.118 gsb_file_config.c, 1.78, 1.79 gsb_scheduler_list.c, 1.69, 1.70

Pierre Biava pbiava at users.sourceforge.net
Sat Jun 27 22:50:42 CEST 2009


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

Modified Files:
	fenetre_principale.c gsb_file_config.c gsb_scheduler_list.c 
Log Message:
fixed bug 599

Index: fenetre_principale.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/fenetre_principale.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -d -r1.117 -r1.118
--- fenetre_principale.c	11 Jun 2009 20:51:55 -0000	1.117
+++ fenetre_principale.c	27 Jun 2009 20:50:40 -0000	1.118
@@ -1,9 +1,9 @@
 /* ************************************************************************** */
 /*  Fichier qui s'occupe de former les différentes fenêtres de travail        */
 /*                                                                            */
-/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)            */
-/*			2005-2008 Benjamin Drieu (bdrieu at april.org)	                      */
-/* 			http://www.grisbi.org				                              */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*          2005-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      */
@@ -46,15 +46,19 @@
 static GtkWidget *create_main_notebook (void );
 static gboolean gsb_gui_fill_main_notebook ( GtkWidget *notebook );
 static void gsb_gui_headings_private_update_label_markup ( GtkLabel *label, const gchar *text, gboolean escape_text );
+static gboolean gsb_gui_hpaned_size_allocate ( GtkWidget *hpaned,
+                        GtkAllocation *allocation,
+                        gpointer null );
 static gboolean gsb_gui_on_account_switch_page ( GtkNotebook *notebook,
-					  GtkNotebookPage *page,
-					  guint page_number,
-					  gpointer null );
+                        GtkNotebookPage *page,
+                        guint page_number,
+                        gpointer null );
 static gboolean on_simpleclick_event_run ( GtkWidget * button, GdkEvent * button_event,
-				    GCallback cb );
+                        GCallback cb );
 /*END_STATIC*/
 
 /*START_EXTERN*/
+extern gint mini_paned_width;
 extern GtkWidget *window;
 /*END_EXTERN*/
 
@@ -141,8 +145,12 @@
 
     /* Then create and fill the main hpaned. */
     main_hpaned = gtk_hpaned_new ();
-    g_signal_connect ( G_OBJECT (main_hpaned ), "destroy",
+    g_signal_connect ( G_OBJECT ( main_hpaned ), "destroy",
 		       G_CALLBACK ( gtk_widget_destroyed), &main_hpaned );
+    g_signal_connect ( G_OBJECT ( main_hpaned ),
+		       "size_allocate",
+		       G_CALLBACK ( gsb_gui_hpaned_size_allocate ),
+		       NULL );
     gtk_box_pack_start ( GTK_BOX(main_vbox), main_hpaned, TRUE, TRUE, 0 );
     gtk_paned_add1 ( GTK_PANED( main_hpaned ), create_navigation_pane ( ) );
     gtk_paned_add2 ( GTK_PANED( main_hpaned ), create_main_notebook ( ) );
@@ -156,6 +164,8 @@
 	gint width, height;
 
 	gtk_window_get_size ( GTK_WINDOW ( window ), &width, &height );
+    if ( height < mini_paned_width )
+        height = mini_paned_width;
 	gtk_paned_set_position ( GTK_PANED ( main_hpaned ), (gint) width / 4 );
     }
     gtk_widget_show ( main_hpaned );
@@ -307,9 +317,9 @@
  * \return		FALSE
  */
 gboolean gsb_gui_on_account_switch_page ( GtkNotebook *notebook,
-					  GtkNotebookPage *page,
-					  guint page_number,
-					  gpointer null )
+                        GtkNotebookPage *page,
+                        guint page_number,
+                        gpointer null )
 {
     switch ( page_number )
     {
@@ -335,7 +345,9 @@
  * \param text	String to display in headings bar.
  *
  */
-void gsb_gui_headings_private_update_label_markup ( GtkLabel *label, const gchar *text, gboolean escape_text )
+void gsb_gui_headings_private_update_label_markup ( GtkLabel *label,
+                        const gchar *text,
+                        gboolean escape_text )
 {
     const gchar* escstr = escape_text ? g_markup_escape_text ( text, -1 ) : text;
     gchar* tmpstr = g_strconcat ( "<b>", escstr, "</b>", NULL );
@@ -421,7 +433,7 @@
  *
  */
 gboolean on_simpleclick_event_run ( GtkWidget * button, GdkEvent * button_event,
-				    GCallback cb )
+                        GCallback cb )
 {
     if ( button_event -> type == GDK_BUTTON_PRESS )
     {
@@ -432,7 +444,19 @@
 }
 
 
+gboolean gsb_gui_hpaned_size_allocate ( GtkWidget *hpaned,
+                        GtkAllocation *allocation,
+                        gpointer null )
+{
+    gint paned_width;
+
+    paned_width = gtk_paned_get_position ( GTK_PANED ( hpaned ) );
+    
+    if ( paned_width  < mini_paned_width )
+        gtk_paned_set_position ( GTK_PANED ( hpaned ), mini_paned_width );
 
+    return FALSE;
+}
 /* Local Variables: */
 /* c-basic-offset: 4 */
 /* End: */

Index: gsb_scheduler_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_scheduler_list.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- gsb_scheduler_list.c	11 Jun 2009 20:51:55 -0000	1.69
+++ gsb_scheduler_list.c	27 Jun 2009 20:50:40 -0000	1.70
@@ -1,9 +1,9 @@
 /* ************************************************************************** */
 /*                                                                            */
-/*     Copyright (C)	2000-2008 Cédric Auger (cedric at grisbi.org)	      	  */
-/*			2004-2008 Benjamin Drieu (bdrieu at april.org)  	      			  */
+/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)            */
+/*          2004-2008 Benjamin Drieu (bdrieu at april.org)                       */
 /*      2009 Thomas Peel (thomas.peel at live.fr)                                */
-/* 			http://www.grisbi.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      */
@@ -59,24 +59,24 @@
 
 /*START_STATIC*/
 static gboolean gsb_scheduler_list_button_press ( GtkWidget *tree_view,
-					   GdkEventButton *ev );
+                        GdkEventButton *ev );
 static void gsb_scheduler_list_create_list_columns ( GtkWidget *tree_view );
 static GtkTreeModel *gsb_scheduler_list_create_model ( void );
 static GtkWidget *gsb_scheduler_list_create_tree_view (void);
 static gint gsb_scheduler_list_default_sort_function ( GtkTreeModel *model,
-						GtkTreeIter *iter_1,
-						GtkTreeIter *iter_2,
-						gpointer null );
+                        GtkTreeIter *iter_1,
+                        GtkTreeIter *iter_2,
+                        gpointer null );
 static gboolean gsb_scheduler_list_fill_transaction_row ( GtkTreeStore *store,
-						   GtkTreeIter *iter,
-						   const gchar *line[SCHEDULER_COL_VISIBLE_COLUMNS] );
+                        GtkTreeIter *iter,
+                        const gchar *line[SCHEDULER_COL_VISIBLE_COLUMNS] );
 static gboolean gsb_scheduler_list_fill_transaction_text ( gint scheduled_number,
-						    const gchar *line[SCHEDULER_COL_VISIBLE_COLUMNS]  );
+                        const gchar *line[SCHEDULER_COL_VISIBLE_COLUMNS]  );
 static GtkTreeIter *gsb_scheduler_list_get_iter_from_scheduled_number ( gint scheduled_number );
 static GSList *gsb_scheduler_list_get_iter_list_from_scheduled_number ( gint scheduled_number );
 static GtkTreeModel *gsb_scheduler_list_get_model ( void );
 static gboolean gsb_scheduler_list_key_press ( GtkWidget *tree_view,
-					GdkEventKey *ev );
+                        GdkEventKey *ev );
 static gboolean gsb_scheduler_list_popup_custom_periodicity_dialog (void);
 static gboolean gsb_scheduler_list_selection_changed ( GtkTreeSelection *selection,
                         gpointer null );
@@ -84,8 +84,8 @@
 static void gsb_scheduler_list_set_sorted_model ( GtkTreeModelSort *tree_model_sort );
 static void gsb_scheduler_list_set_tree_view ( GtkWidget *tree_view );
 static gboolean gsb_scheduler_list_size_allocate ( GtkWidget *tree_view,
-					    GtkAllocation *allocation,
-					    gpointer null );
+                        GtkAllocation *allocation,
+                        gpointer null );
 static gboolean gsb_scheduler_list_switch_expander ( gint scheduled_number );
 /*END_STATIC*/
 
@@ -421,9 +421,9 @@
  * perhaps later sort by different columns ??
  * */
 gint gsb_scheduler_list_default_sort_function ( GtkTreeModel *model,
-						GtkTreeIter *iter_1,
-						GtkTreeIter *iter_2,
-						gpointer null )
+                        GtkTreeIter *iter_1,
+                        GtkTreeIter *iter_2,
+                        gpointer null )
 {
     GDate *date_1;
     GDate *date_2;
@@ -694,7 +694,7 @@
  * \return TRUE : scheduled added, FALSE : not added (usually for children who didn't find their mother)
  * */
 gboolean gsb_scheduler_list_append_new_scheduled ( gint scheduled_number,
-						   GDate *end_date )
+                        GDate *end_date )
 {
     GDate *pGDateCurrent;
     gint virtual_transaction = 0;
@@ -1034,8 +1034,8 @@
  * \return FALSE
  * */
 gboolean gsb_scheduler_list_fill_transaction_row ( GtkTreeStore *store,
-						   GtkTreeIter *iter,
-						   const gchar *line[SCHEDULER_COL_VISIBLE_COLUMNS] )
+                        GtkTreeIter *iter,
+                        const gchar *line[SCHEDULER_COL_VISIBLE_COLUMNS] )
 {
     gint i;
 
@@ -1460,7 +1460,7 @@
  * \return FALSE
  * */
 gboolean gsb_scheduler_list_key_press ( GtkWidget *tree_view,
-					GdkEventKey *ev )
+                        GdkEventKey *ev )
 {
     gint scheduled_number;
 
@@ -1504,7 +1504,7 @@
  * \return FALSE
  * */
 gboolean gsb_scheduler_list_button_press ( GtkWidget *tree_view,
-					   GdkEventButton *ev )
+                        GdkEventButton *ev )
 {
 
     /* if double-click => edit the scheduled transaction */
@@ -1594,7 +1594,7 @@
  * \return FALSE
  * */
 gboolean gsb_scheduler_list_delete_scheduled_transaction_by_menu ( GtkWidget *button,
-								   gpointer null )
+                        gpointer null )
 {
     gsb_scheduler_list_delete_scheduled_transaction (0, TRUE);
     return FALSE;
@@ -1613,7 +1613,7 @@
  * \return FALSE
  * */
 gboolean gsb_scheduler_list_delete_scheduled_transaction ( gint scheduled_number,
-							   gboolean show_warning )
+                        gboolean show_warning )
 {
     gint result;
 
@@ -1747,7 +1747,7 @@
  * \return FALSE
  * */
 gboolean gsb_scheduler_list_change_scheduler_view ( enum scheduler_periodicity periodicity,
-						    gpointer item )
+                        gpointer item )
 {
     gchar * names[] = { _("Unique view"), _("Week view"), _("Month view"),
 			_("Two months view"), _("Quarter view"),
@@ -1891,11 +1891,11 @@
  * \return FALSE
  * */
 gboolean gsb_scheduler_list_size_allocate ( GtkWidget *tree_view,
-					    GtkAllocation *allocation,
-					    gpointer null )
+                        GtkAllocation *allocation,
+                        gpointer null )
 {
     gint i;
-    devel_debug (NULL);
+
     if (allocation -> width == scheduler_current_tree_view_width)
     {
         /* size of the tree view didn't change, but we received an allocated signal

Index: gsb_file_config.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_config.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- gsb_file_config.c	17 Jun 2009 19:39:51 -0000	1.78
+++ gsb_file_config.c	27 Jun 2009 20:50:40 -0000	1.79
@@ -71,6 +71,7 @@
 
 gint largeur_window;
 gint hauteur_window;
+gint mini_paned_width = 250;
 
 /* contient le nb de derniers fichiers ouverts */
 gsize nb_derniers_fichiers_ouverts = 0;
@@ -232,6 +233,8 @@
                         "General",
                         "Panel width",
                         NULL );
+    if ( etat.largeur_colonne_comptes_operation < mini_paned_width )
+        etat.largeur_colonne_comptes_operation = mini_paned_width;
 
     /* get input/output */
     etat.dernier_fichier_auto = g_key_file_get_integer ( config,
@@ -1178,6 +1181,7 @@
 
     largeur_window = 0;
     hauteur_window = 0;
+    etat.largeur_colonne_comptes_operation = mini_paned_width;
 
     etat.force_enregistrement = 1;
     etat.utilise_logo = 1;



More information about the cvs mailing list