[grisbi-cvs] grisbi/src gtk_combofix.c, 1.53, 1.54 main.c, 1.132, 1.133

Martin Stromberger fabiolla at users.sourceforge.net
Thu Dec 11 20:07:22 CET 2008


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

Modified Files:
	gtk_combofix.c main.c 
Log Message:
replaced gtk_window_set_policy with gtk_window_set_resizable and window-position for main-window

Index: gtk_combofix.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gtk_combofix.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- gtk_combofix.c	13 Nov 2008 19:32:44 -0000	1.53
+++ gtk_combofix.c	11 Dec 2008 19:07:20 -0000	1.54
@@ -1,7 +1,7 @@
 /* ComboFix Widget
  *
- *     Copyright (C)	2001-2008 Cédric Auger (cedric at grisbi.org) 
- *			2003-2008 Benjamin Drieu (bdrieu at april.org) 
+ *     Copyright (C)	2001-2008 Cédric Auger (cedric at grisbi.org)
+ *			2003-2008 Benjamin Drieu (bdrieu at april.org)
  * 			http://www.grisbi.org
  *
  * This library is free software; you can redistribute it and/or
@@ -145,7 +145,7 @@
  * \param force TRUE and the text must be in the list
  * \param sort TRUE and the list will be sorted automatickly
  * \param max_items the minimum of characters to show the popup
- * 
+ *
  * \return the new widget
  * */
 GtkWidget *gtk_combofix_new ( GSList *list )
@@ -177,7 +177,7 @@
  * \param force TRUE and the text must be in the list
  * \param sort TRUE and the list will be sorted automatickly
  * \param max_items the minimum of characters to show the popup
- * 
+ *
  * \return the new widget
  * */
 GtkWidget *gtk_combofix_new_complex ( GSList *list )
@@ -580,10 +580,8 @@
 		   "key-press-event",
 		   G_CALLBACK (gtk_combofix_popup_key_press_event),
 		   combofix );
-gtk_window_set_policy ( GTK_WINDOW ( combofix->popup ),
-			FALSE,
-			FALSE,
-			TRUE );
+gtk_window_set_resizable ( GTK_WINDOW ( combofix->popup ), FALSE );
+
 g_signal_connect ( G_OBJECT ( combofix->popup ),
 		   "button-press-event",
 		   G_CALLBACK ( gtk_combofix_button_press ),
@@ -1285,7 +1283,7 @@
  * show the popup with all the content, not according to the entry
  *
  * \param combofix
- * 
+ *
  * return FALSE
  * */
 static gboolean gtk_combofix_show_popup ( GtkComboFix *combofix )
@@ -1299,7 +1297,7 @@
     gtk_widget_grab_focus ( GTK_WIDGET ( combofix -> entry ));
     gtk_window_set_modal (GTK_WINDOW (combofix -> popup), TRUE);
     return FALSE;
-} 
+}
 
 
 
@@ -1432,7 +1430,7 @@
  * Called when a button press event is triggered on the tree view.
  * Select an entry if clicked.
  *
- * \param tree_view	GtkTreeView that triggered event.  It should be the tree view 
+ * \param tree_view	GtkTreeView that triggered event.  It should be the tree view
 			attached to a gtk combofix.
  * \param ev		Triggered event.
  * \param combofix	The GtkComboFix that contains tree view.
@@ -1494,13 +1492,13 @@
     gchar *string;
 
     tree_selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW (combofix -> tree_view));
-    
+
     /* if there is no selection, go away */
     if (!gtk_tree_selection_get_selected ( tree_selection,
 					   NULL,
 					   &iter ))
 	return FALSE;
-    
+
     gtk_tree_model_get ( GTK_TREE_MODEL (combofix -> model_sort),
 			 &iter,
 			 COMBOFIX_COL_REAL_STRING, &string,
@@ -1534,7 +1532,7 @@
 	return FALSE;
 
     tree_selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW (combofix -> tree_view));
-    
+
     if (gtk_tree_selection_get_selected ( tree_selection,
 					  NULL,
 					  &sorted_iter ))
@@ -1792,7 +1790,7 @@
  * \param iter_1
  * \param iter_2
  * \param combofix
- * 
+ *
  * \return -1 if iter_1 before iter_2 ...
  * */
 static gint gtk_combofix_default_sort_func ( GtkTreeModel *model_sort,
@@ -1820,7 +1818,7 @@
 			 COMBOFIX_COL_VISIBLE_STRING, &string_2,
 			 COMBOFIX_COL_SEPARATOR, &separator_2,
 			 -1 );
-    
+
     if (!combofix -> mixed_sort)
 	return_value = list_number_1 - list_number_2;
 

Index: main.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/main.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- main.c	16 Nov 2008 20:34:25 -0000	1.132
+++ main.c	11 Dec 2008 19:07:20 -0000	1.133
@@ -81,7 +81,7 @@
 extern gchar *nom_fichier_comptes ;
 /*END_EXTERN*/
 
-/**                                                                              
+/**
  * Main function
  *
  * @param argc number of arguments
@@ -116,7 +116,7 @@
     /* we store the path of the running file to use it for pixmaps, help and locales .... */
     win32_set_app_path(argv[0]);
     /* needed to be able to use the "common" installation of GTK libraries */
-    win32_make_sure_the_gtk2_dlls_path_is_in_PATH(); 
+    win32_make_sure_the_gtk2_dlls_path_is_in_PATH();
 #endif
 
     bindtextdomain ("grisbi-tips", LOCALEDIR);
@@ -182,7 +182,7 @@
 		       "delete_event",
 		       G_CALLBACK ( main_window_delete_event ),
 		       NULL);
-    g_signal_connect ( G_OBJECT ( window ), 
+    g_signal_connect ( G_OBJECT ( window ),
 		       "destroy",
 		       G_CALLBACK ( main_window_destroy_event ),
 		       NULL);
@@ -190,11 +190,8 @@
 		       "window-state-event",
 		       G_CALLBACK (gsb_grisbi_change_state_window),
 		       NULL );
-    
-    gtk_window_set_policy ( GTK_WINDOW ( window ),
-			    TRUE,
-			    TRUE,
-			    FALSE );
+
+    gtk_window_set_resizable ( GTK_WINDOW ( window ), TRUE );
 
     /* create the main window : a vbox */
     window_vbox_principale = gtk_vbox_new ( FALSE, 0 );
@@ -202,7 +199,7 @@
 			window_vbox_principale );
     gtk_widget_show ( window_vbox_principale );
     g_signal_connect ( G_OBJECT(window_vbox_principale), "destroy",
-    			G_CALLBACK(gtk_widget_destroyed), 
+    			G_CALLBACK(gtk_widget_destroyed),
 			&window_vbox_principale);
 
     /* We create the statusbar first. */
@@ -230,20 +227,23 @@
 				      largeur_window, hauteur_window );
     else
 	gtk_window_set_default_size ( GTK_WINDOW ( window ),
-				      800, 600 );
+				      900, 600 );
+
+    /* display window centered */
+    gtk_window_set_position ( GTK_WINDOW (window), GTK_WIN_POS_CENTER );
 
     gtk_widget_show ( window );
 
     /* check the command line, if there is something to open */
 
-    if (opt.fichier) 
+    if (opt.fichier)
     {
 	nom_fichier_comptes = opt.fichier;
 
 	if (!gsb_file_open_file(nom_fichier_comptes))
 	    nom_fichier_comptes = NULL;
     }
-    else 
+    else
     {
 	/* open the last file if needed, nom_fichier_comptes was filled while loading the configuration */
 	if ( etat.dernier_fichier_auto
@@ -271,7 +271,7 @@
 	gtk_window_maximize (GTK_WINDOW (window));
 
     gtk_main ();
-   
+
 
     gsb_plugins_release ( );
 



More information about the cvs mailing list