[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9.0-54-g1e6cfb6
Pierre Biava
nobody at users.sourceforge.net
Sat Mar 12 19:37:26 CET 2011
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, master has been updated
via 1e6cfb6dec97d899bac9c03383470462fb68eb4c (commit)
via 312d1b439c86115ea8751658b1e3f4a761e7181a (commit)
from 050ac7b2b4f404a339046cc55f75795c1afbb244 (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 1e6cfb6dec97d899bac9c03383470462fb68eb4c
Author: pbiava <pierre.biava at nerim.net>
Date: Sat Mar 12 19:04:40 2011 +0100
resets the variables when you remove the using the logo
(cherry picked from commit 2f67d1e6ab16634a6426e8431b0cac45137afa42)
commit 312d1b439c86115ea8751658b1e3f4a761e7181a
Author: pbiava <pierre.biava at nerim.net>
Date: Sat Mar 12 18:12:19 2011 +0100
Minor corrections in the management of the logo of Grisbi
(cherry picked from commit b2150119cb8248dc4b25b4eddf4e3604a0dcd844)
-----------------------------------------------------------------------
Changes:
diff --git a/src/affichage.c b/src/affichage.c
index 35348f4..1552026 100644
--- a/src/affichage.c
+++ b/src/affichage.c
@@ -170,8 +170,7 @@ GtkWidget * onglet_display_fonts ( void )
if (!pixbuf)
{
- preview = gtk_image_new_from_stock ( GTK_STOCK_MISSING_IMAGE,
- GTK_ICON_SIZE_BUTTON );
+ preview = gtk_image_new_from_pixbuf ( gsb_select_icon_get_default_logo_pixbuf ( ) );
}
else
{
@@ -294,16 +293,33 @@ gboolean change_choix_utilise_logo ( GtkWidget *check_button,
gtk_widget_hide ( logo_accueil );
else
{
+ GdkPixbuf *pixbuf = NULL;
+
/* Update homepage logo */
- logo_accueil = gtk_image_new_from_pixbuf (
- gsb_select_icon_get_logo_pixbuf ( ) );
- gtk_box_pack_start ( GTK_BOX ( hbox_title ), logo_accueil, FALSE, FALSE, 0 );
- gtk_widget_set_size_request ( hbox_title, -1, LOGO_HEIGHT + 20 );
- gtk_widget_show ( logo_accueil );
+ pixbuf = gsb_select_icon_get_logo_pixbuf ( );
+ if ( pixbuf == NULL )
+ {
+ pixbuf = gsb_select_icon_get_default_logo_pixbuf ( );
+ etat.is_pixmaps_dir = TRUE;
+ }
+ logo_accueil = gtk_image_new_from_pixbuf ( pixbuf );
+ if ( logo_accueil )
+ {
+ gtk_box_pack_start ( GTK_BOX ( hbox_title ), logo_accueil, FALSE, FALSE, 0 );
+ gtk_widget_set_size_request ( hbox_title, -1, -1 );
+ gtk_widget_show ( logo_accueil );
+ }
}
}
else
+ {
gtk_widget_destroy ( logo_accueil );
+ gtk_widget_set_size_request ( hbox_title, -1, -1 );
+ if ( etat.name_logo && strlen ( etat.name_logo ) )
+ g_free ( etat.name_logo );
+ etat.name_logo = NULL;
+ etat.is_pixmaps_dir = 0;
+ }
if ( etat.modification_fichier == 0 )
modification_fichier ( TRUE );
diff --git a/src/gsb_file_load.c b/src/gsb_file_load.c
index 87cda7b..9d2c683 100644
--- a/src/gsb_file_load.c
+++ b/src/gsb_file_load.c
@@ -881,11 +881,6 @@ void gsb_file_load_general_part ( const gchar **attribute_names,
etat.utilise_logo = utils_str_atoi ( attribute_values[i]);
}
- else if ( !strcmp ( attribute_names[i], "Is_pixmaps_dir" ) )
- {
- etat.is_pixmaps_dir = utils_str_atoi ( attribute_values[i] );
- }
-
else if ( !strcmp ( attribute_names[i], "Name_logo" ) )
{
GdkPixbuf *pixbuf = NULL;
@@ -912,6 +907,22 @@ void gsb_file_load_general_part ( const gchar **attribute_names,
}
}
+ else if ( !strcmp ( attribute_names[i], "Is_pixmaps_dir" ) )
+ {
+ etat.is_pixmaps_dir = utils_str_atoi ( attribute_values[i] );
+ if ( etat.is_pixmaps_dir && etat.name_logo == NULL )
+ {
+ GdkPixbuf *pixbuf = NULL;
+ gchar *chemin_logo = NULL;
+
+ chemin_logo = g_build_filename ( GRISBI_PIXMAPS_DIR, "grisbi-logo.png", NULL );
+ pixbuf = gdk_pixbuf_new_from_file ( chemin_logo, NULL );
+ gtk_window_set_default_icon ( pixbuf );
+ gsb_select_icon_set_logo_pixbuf ( pixbuf );
+ g_free ( chemin_logo );
+ }
+ }
+
else if ( !strcmp ( attribute_names[i],
"Remind_display_per_account" ))
{
diff --git a/src/gsb_file_save.c b/src/gsb_file_save.c
index d5ed1de..bc1598d 100644
--- a/src/gsb_file_save.c
+++ b/src/gsb_file_save.c
@@ -720,8 +720,8 @@ gulong gsb_file_save_general_part ( gulong iterator,
"\t\tImport_fyear_by_value_date=\"%d\"\n"
"\t\tReconcile_end_date=\"%d\"\n"
"\t\tUse_logo=\"%d\"\n"
- "\t\tIs_pixmaps_dir=\"%d\"\n"
"\t\tName_logo=\"%s\"\n"
+ "\t\tIs_pixmaps_dir=\"%d\"\n"
"\t\tRemind_display_per_account=\"%d\"\n"
"\t\tTransactions_view=\"%s\"\n"
"\t\tOne_line_showed=\"%d\"\n"
@@ -771,8 +771,8 @@ gulong gsb_file_save_general_part ( gulong iterator,
etat.get_fyear_by_value_date,
etat.reconcile_end_date,
etat.utilise_logo,
- etat.is_pixmaps_dir,
my_safe_null_str( etat.name_logo ),
+ etat.is_pixmaps_dir,
etat.retient_affichage_par_compte,
my_safe_null_str(transactions_view),
display_one_line,
hooks/post-receive
--
grisbi
More information about the cvs
mailing list