[grisbi-cvs] [SCM] grisbi branch, grisbi-gtk3, updated. upstream_version_0_9_4-166-g113a0f2

Pierre Biava nobody at users.sourceforge.net
Tue Jan 3 22:31:01 CET 2012


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, grisbi-gtk3 has been updated
       via  113a0f24ac66923623cdaa5e896ff8c52e671ff1 (commit)
       via  a68c960fd0480560c4fa16b5c6007666b1945851 (commit)
       via  81bd449eae774aa00006e3b30d768b8cc824e1be (commit)
       via  40352c6c76b6c7aaab35586fe7526d0ed6b278da (commit)
       via  0f5109e6e3b4d1d0457550fc73a73264a36c6265 (commit)
       via  ac1636aebef3f5495cd26246b01879baf2be16d8 (commit)
      from  9cc4d65982a25609c38fa725085f6794e972f91f (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 113a0f24ac66923623cdaa5e896ff8c52e671ff1
Author: pbiava <pierre.biava at nerim.net>
Date:   Tue Jan 3 22:30:07 2012 +0100

    main.c: cleaning code

commit a68c960fd0480560c4fa16b5c6007666b1945851
Author: pbiava <pierre.biava at nerim.net>
Date:   Tue Jan 3 22:29:18 2012 +0100

    Changes to get the "My Documents" directory on Windows

commit 81bd449eae774aa00006e3b30d768b8cc824e1be
Author: pbiava <pierre.biava at nerim.net>
Date:   Tue Jan 3 22:03:34 2012 +0100

    rename functions and minors changes

commit 40352c6c76b6c7aaab35586fe7526d0ed6b278da
Author: pbiava <pierre.biava at nerim.net>
Date:   Tue Jan 3 18:43:24 2012 +0100

    Version change to separate the two branches: gtk-2 et gtk-3

commit 0f5109e6e3b4d1d0457550fc73a73264a36c6265
Author: pbiava <pierre.biava at nerim.net>
Date:   Tue Jan 3 18:35:13 2012 +0100

    removal of the module of memory profiling

commit ac1636aebef3f5495cd26246b01879baf2be16d8
Author: pbiava <pierre.biava at nerim.net>
Date:   Fri Dec 30 23:32:42 2011 +0100

    fixes bug 1432 (cherry picked from commit a1543698521ff056919923ebd7a996542b9d580e)

-----------------------------------------------------------------------

Changes:
diff --git a/configure.in b/configure.in
index ea6aeaf..88f79c9 100644
--- a/configure.in
+++ b/configure.in
@@ -1,8 +1,8 @@
 dnl Process this file with autoconf to produce a configure script.
 
-m4_define(grisbi_major_version, 0)
-m4_define(grisbi_minor_version, 9)
-m4_define(grisbi_micro_version, 4)
+m4_define(grisbi_major_version, 1)
+m4_define(grisbi_minor_version, 3)
+m4_define(grisbi_micro_version, 0)
 m4_define(grisbi_version, grisbi_major_version.grisbi_minor_version.grisbi_micro_version)
 
 AC_INIT([grisbi],[grisbi_version],[http://grisbi.tuxfamily.org/mantis/login_select_proj_page.php?ref=bug_report_page.php],[grisbi],[http://www.grisbi.org/index.fr.html])
@@ -172,9 +172,9 @@ dnl Check for libofx
 dnl ================================================================
 
 AC_ARG_WITH(ofx,
-	AS_HELP_STRING([--with-ofx],[build grisbi with ofx support (default=auto)]),
+	AS_HELP_STRING([--without-ofx],[build grisbi without ofx support (default=no)]),
 	[build_ofx=$withval]
-	[build_ofx=auto])
+	[build_ofx=no])
 
 PKG_CHECK_MODULES(LIBOFX, [libofx >= 0.7], have_ofx=yes, have_ofx=no)
 if test "$build_ofx" = yes -a "$with_ofx" = no; then
@@ -208,24 +208,6 @@ if test "x$enable_werror" = xyes ; then
 fi
 
 dnl ================================================================
-dnl GMemProfile support
-dnl ================================================================
-
-AC_ARG_ENABLE(gmemprofile,
- 	[AC_HELP_STRING([--enable-gmemprofile],
- 	[Outputs a summary of memory usage when grisbi terminates (default=no)])],,
- 	enable_gmemprofile=no)
-if test "x$enable_gmemprofile" = xyes ; then
-	GSB_GMEMPROFILE=1
-	AC_MSG_WARN([g_mem_profile is enabled])
-else
-	GSB_GMEMPROFILE=0
-fi
-AC_DEFINE_UNQUOTED([GSB_GMEMPROFILE], [${GSB_GMEMPROFILE}],
-	[define to 1 if g_mem_profile support is enabled])
-AC_SUBST(GSB_GMEMPROFILE)
-
-dnl ================================================================
 dnl NoOptim support
 dnl ================================================================
 
@@ -351,7 +333,7 @@ This is an unstable version of grisbi. It is for test purposes only.
 Please, DO NOT use it in a production environment. It will probably crash and you will lose your data.
 
 If you are looking for a stable release of grisbi (0.8.x), either download it from:
-http://www.grisbi.org/download.fr.html
+http://sourceforge.net/projects/grisbi/files/grisbi%20stable/
 
 Thanks,
 The grisbi team
diff --git a/grisbi.spec b/grisbi.spec
index e667610..e8050ea 100644
--- a/grisbi.spec
+++ b/grisbi.spec
@@ -1,5 +1,5 @@
 %define name    grisbi
-%define version 0.9.4
+%define version 1.3.0
 %define release %mkrel 1
 
 %define _disable_ld_no_undefined 1
diff --git a/src/gsb_dirs.c b/src/gsb_dirs.c
index f7aa647..543c935 100644
--- a/src/gsb_dirs.c
+++ b/src/gsb_dirs.c
@@ -24,9 +24,14 @@
 #endif
 
 #ifdef GTKOSXAPPLICATION
-#include <gtkosxapplication.h>
+    #include <gtkosxapplication.h>
 #endif
 
+#ifdef G_OS_WIN32
+    #include <shlobj.h>
+    #include <tchar.h>
+#endif /* !G_OS_WIN32 */
+
 #include "include.h"
 #include "gsb_dirs.h"
 #include "structures.h"
@@ -52,6 +57,7 @@ void gsb_dirs_init ( void )
 {
 #ifdef G_OS_WIN32
     gchar *win32_dir;
+    TCHAR tcHomePath[MAX_PATH];
 
     win32_dir = g_win32_get_package_installation_directory_of_module (NULL);
 
@@ -61,7 +67,9 @@ void gsb_dirs_init ( void )
     plugins_dir = g_build_filename ( win32_dir, "lib/grisbi", NULL );
     ui_dir = g_build_filename ( win32_dir, "share/ui", NULL );
 
-    home_dir = g_strdup ( g_getenv ( CSIDL_MYDOCUMENTS ) );
+    SHGetSpecialFolderPath(0, tcHomePath, CSIDL_PROFILE, FALSE);
+
+    home_dir = g_strdup ( ( gchar *) tcHomePath );
 
     user_config_dir = g_build_filename ( g_get_user_config_dir ( ),  "grisbi", NULL );
     user_data_dir = g_build_filename ( g_get_user_data_dir ( ),  "grisbi", NULL );
diff --git a/src/main.c b/src/main.c
index 944194d..8e05e9b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -89,25 +89,26 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
 #endif /* G_OS_WIN32 */
 
 /*START_STATIC*/
-static gboolean gsb_grisbi_change_state_window ( GtkWidget *window,
+static gboolean gsb_main_change_state_window ( GtkWidget *window,
                         GdkEventWindowState *event,
                         gpointer null );
-static GtkWidget *gsb_grisbi_create_main_menu ( GtkWidget *vbox );
+static GtkWidget *gsb_main_create_main_menu ( GtkWidget *vbox );
 static GtkWidget *gsb_main_create_main_window ( void );
 static void gsb_main_grisbi_shutdown ( void );
+static gboolean gsb_main_init_app ( void );
+static void gsb_main_load_file_if_necessary ( gchar *filename );
+static gboolean gsb_main_print_environment_var ( void );
 static gint gsb_main_set_debug_level ( void );
 static gint gsb_main_setup_command_line_options ( int argc, char **argv );
 static void gsb_main_show_version ( void );
-static gboolean gsb_grisbi_init_app ( void );
-static void gsb_main_load_file_if_necessary ( gchar *filename );
-static gboolean gsb_grisbi_print_environment_var ( void );
-static void gsb_grisbi_trappe_signal_sigsegv ( void );
+static void gsb_main_trappe_signal_sigsegv ( void );
+static gboolean gsb_main_window_delete_event (GtkWidget *window, gpointer data);
+static void gsb_main_window_destroy_event ( GObject* obj, gpointer data);
+static void gsb_main_window_set_size_and_position ( void );
+
 static void main_mac_osx ( int argc, char **argv );
 static void main_linux ( int argc, char **argv );
 static void main_win_32 (  int argc, char **argv );
-static gboolean main_window_delete_event (GtkWidget *window, gpointer data);
-static void main_window_destroy_event ( GObject* obj, gpointer data);
-static void main_window_set_size_and_position ( void );
 /*END_STATIC*/
 
 /* Fenetre principale de grisbi */
@@ -147,10 +148,6 @@ struct gsb_run_t run;
  */
 int main ( int argc, char **argv )
 {
-#if GSB_GMEMPROFILE
-    g_mem_set_vtable(glib_mem_profiler_table);
-#endif
-
 #ifdef G_OS_WIN32
     main_win_32 (  argc, argv );
 #else
@@ -204,7 +201,7 @@ void main_linux ( int argc, char **argv )
     if ( gsb_main_set_debug_level ( ) )
     {
         initialize_debugging ( );
-        gsb_grisbi_print_environment_var ( );
+        gsb_main_print_environment_var ( );
     }
 
     /* initialisation de gtk. arguments à NULL car traités au dessus */
@@ -216,15 +213,15 @@ void main_linux ( int argc, char **argv )
     go_plugins_init (NULL, NULL, NULL, NULL, TRUE, GO_TYPE_PLUGIN_LOADER_MODULE);
 
     /* on commence par détourner le signal SIGSEGV */
-    gsb_grisbi_trappe_signal_sigsegv ( );
+    gsb_main_trappe_signal_sigsegv ( );
 
     /* initialise les données de l'application */
-    first_use = gsb_grisbi_init_app ( );
+    first_use = gsb_main_init_app ( );
 
     /* create the toplevel window and the main menu */
     vbox = gsb_main_create_main_window ( );
-    gsb_grisbi_create_main_menu ( vbox );
-    main_window_set_size_and_position ( );
+    gsb_main_create_main_menu ( vbox );
+    gsb_main_window_set_size_and_position ( );
 
     gtk_widget_show ( main_window );
 
@@ -259,6 +256,7 @@ void main_mac_osx ( int argc, char **argv )
     GtkWidget *vbox;
     GtkWidget *menubar;
     GdkPixbuf *pixbuf;
+    gint return_value;
     gboolean first_use = FALSE;
     GtkOSXApplication *theApp;
 
@@ -289,7 +287,7 @@ void main_mac_osx ( int argc, char **argv )
     if ( gsb_main_set_debug_level ( ) )
     {
         initialize_debugging ( );
-        gsb_grisbi_print_environment_var ( );
+        gsb_main_print_environment_var ( );
     }
 
     /* initialisation de gtk. arguments à NULL car traités au dessus */
@@ -304,14 +302,14 @@ void main_mac_osx ( int argc, char **argv )
     theApp = g_object_new ( GTK_TYPE_OSX_APPLICATION, NULL );
 
     /* on commence par détourner le signal SIGSEGV */
-    gsb_grisbi_trappe_signal_sigsegv ( );
+    gsb_main_trappe_signal_sigsegv ( );
 
     /* parse command line parameter, exit with correct error code when needed */
     if ( !parse_options (argc, argv, &opt, &status ) )
         exit ( status );
 
     /* initialise les données de l'application */
-    first_use = gsb_grisbi_init_app ( );
+    first_use = gsb_main_init_app ( );
 
     vbox = gsb_main_create_main_window ( );
     {
@@ -332,12 +330,12 @@ void main_mac_osx ( int argc, char **argv )
                         NULL);
         g_signal_connect ( theApp,
                         "NSApplicationWillTerminate",
-                        G_CALLBACK ( main_window_destroy_event ),
+                        G_CALLBACK ( gsb_main_window_destroy_event ),
                         NULL );
     }
-    menubar = gsb_grisbi_create_main_menu ( vbox );
+    menubar = gsb_main_create_main_menu ( vbox );
     grisbi_osx_init_menus ( main_window, menubar );
-    main_window_set_size_and_position ( );
+    gsb_main_window_set_size_and_position ( );
 
     gtk_widget_show ( main_window );
 
@@ -387,15 +385,13 @@ void main_win_32 (  int argc, char **argv )
 {
 #ifdef G_OS_WIN32
     GtkWidget *vbox;
+    gint return_value;
     gboolean first_use = FALSE;
 
     /* Retrieve exception information and store them under grisbi.rpt file!
      * see http://jrfonseca.dyndns.org/projects/gnu-win32/software/drmingw/index.html for more information */
     LoadLibrary("exchndl.dll");
 
-    /* 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();
 
@@ -432,12 +428,12 @@ void main_win_32 (  int argc, char **argv )
     go_plugins_init (NULL, NULL, NULL, NULL, TRUE, GO_TYPE_PLUGIN_LOADER_MODULE);
 
     /* initialise les données de l'application */
-    first_use = gsb_grisbi_init_app ( );
+    first_use = gsb_main_init_app ( );
 
     /* create the toplevel window and the main menu */
     vbox = gsb_main_create_main_window ( );
-    gsb_grisbi_create_main_menu ( vbox );
-    main_window_set_size_and_position ( );
+    gsb_main_create_main_menu ( vbox );
+    gsb_main_window_set_size_and_position ( );
 
     gtk_widget_show ( main_window );
 
@@ -470,7 +466,7 @@ void main_win_32 (  int argc, char **argv )
  *
  *
  * */
-gboolean gsb_grisbi_print_environment_var ( void )
+gboolean gsb_main_print_environment_var ( void )
 {
     gchar *tmp_str;
 
@@ -503,7 +499,7 @@ gboolean gsb_grisbi_print_environment_var ( void )
  *
  *
  * */
-gboolean gsb_grisbi_init_app ( void )
+gboolean gsb_main_init_app ( void )
 {
     gboolean first_use = FALSE;
     gchar *string;
@@ -548,15 +544,15 @@ GtkWidget *gsb_main_create_main_window ( void )
 
     g_signal_connect ( G_OBJECT ( main_window ),
                         "delete_event",
-                        G_CALLBACK ( main_window_delete_event ),
+                        G_CALLBACK ( gsb_main_window_delete_event ),
                         NULL);
     g_signal_connect ( G_OBJECT ( main_window ),
                         "destroy",
-                        G_CALLBACK ( main_window_destroy_event ),
+                        G_CALLBACK ( gsb_main_window_destroy_event ),
                         NULL);
     g_signal_connect ( G_OBJECT ( main_window ),
                         "window-state-event",
-                        G_CALLBACK (gsb_grisbi_change_state_window),
+                        G_CALLBACK ( gsb_main_change_state_window ),
                         NULL );
     gtk_window_set_policy ( GTK_WINDOW ( main_window ), TRUE, TRUE, FALSE );
 /*     gtk_window_set_resizable ( GTK_WINDOW ( main_window ), TRUE );  */
@@ -584,7 +580,7 @@ GtkWidget *gsb_main_create_main_window ( void )
  *
  *
  * */
-GtkWidget *gsb_grisbi_create_main_menu ( GtkWidget *vbox )
+GtkWidget *gsb_main_create_main_menu ( GtkWidget *vbox )
 {
     GtkWidget *menu_bar;
     gchar *accel_filename;
@@ -612,7 +608,7 @@ GtkWidget *gsb_grisbi_create_main_menu ( GtkWidget *vbox )
  *
  *
  * */
-void main_window_set_size_and_position ( void )
+void gsb_main_window_set_size_and_position ( void )
 {
     /* set the size of the window */
     if ( conf.main_width && conf.main_height )
@@ -635,7 +631,7 @@ void main_window_set_size_and_position ( void )
  *
  *
  * */
-void gsb_grisbi_trappe_signal_sigsegv ( void )
+void gsb_main_trappe_signal_sigsegv ( void )
 {
 #ifndef G_OS_WIN32
     struct sigaction sig_sev;
@@ -699,7 +695,7 @@ void gsb_main_load_file_if_necessary ( gchar *filename )
  *
  * \return FALSE
  * */
-gboolean gsb_grisbi_change_state_window ( GtkWidget *window,
+gboolean gsb_main_change_state_window ( GtkWidget *window,
                         GdkEventWindowState *event,
                         gpointer null )
 {
@@ -727,7 +723,7 @@ gboolean gsb_main_grisbi_close ( void )
     /* sauvegarde la position de la fenetre principale */
     gtk_window_get_position ( GTK_WINDOW ( main_window ), &conf.root_x, &conf.root_y  );
 
-    if ( !main_window_delete_event ( main_window, NULL ) )
+    if ( !gsb_main_window_delete_event ( main_window, NULL ) )
         gtk_widget_destroy ( main_window );
 
     /* clean finish of the debug file */
@@ -741,7 +737,7 @@ gboolean gsb_main_grisbi_close ( void )
  * This function is called when the main window is deleted.
  * It proposes to save the file if necessary.
  */
-static gboolean main_window_delete_event (GtkWidget *window, gpointer data)
+static gboolean gsb_main_window_delete_event (GtkWidget *window, gpointer data)
 {
     /* need to save the config before gsb_file_close */
     gsb_file_config_save_config();
@@ -754,7 +750,7 @@ static gboolean main_window_delete_event (GtkWidget *window, gpointer data)
 /**
  * exit the gtk main loop when the main window is destroyed.
  */
-static void main_window_destroy_event ( GObject* obj, gpointer data)
+static void gsb_main_window_destroy_event ( GObject* obj, gpointer data)
 {
     free_variables();
     main_window = NULL;
@@ -1066,10 +1062,6 @@ void gsb_main_grisbi_shutdown ( void )
 
     /* liberation libgoffice */
     libgoffice_shutdown ( );
-
-#if GSB_GMEMPROFILE
-    g_mem_profile();
-#endif
 }
 
 
diff --git a/src/main.h b/src/main.h
index a2367b9..5dc5774 100644
--- a/src/main.h
+++ b/src/main.h
@@ -8,11 +8,11 @@
 /* END_INCLUDE_H */
 
 /* START_DECLARATION */
-gboolean gsb_main_grisbi_close ( void );
 gboolean gsb_main_get_debug_level ( void );
-gchar *gsb_main_get_print_locale_var ( void );
-gchar *gsb_main_get_print_dir_var ( void );
 GtkWidget *gsb_main_get_main_window ( void );
+gboolean gsb_main_grisbi_close ( void );
+gchar *gsb_main_get_print_dir_var ( void );
+gchar *gsb_main_get_print_locale_var ( void );
 gboolean gsb_main_set_grisbi_title ( gint account_number );
 int main (int argc, char **argv);
 /* END_DECLARATION */


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list