[grisbi-cvs] grisbi/src gsb_account_property.c, 1.16, 1.17 gsb_select_icon.c, 1.2, 1.3 utils.c, 1.46, 1.47 utils.h, 1.21, 1.22
Pierre Biava
pbiava at users.sourceforge.net
Mon Jan 5 23:17:53 CET 2009
Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29492/src
Modified Files:
gsb_account_property.c gsb_select_icon.c utils.c utils.h
Log Message:
correction apparente bug affichage bouton icone compte lors de l'ouverture de grisbi
Index: gsb_account_property.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_account_property.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- gsb_account_property.c 4 Jan 2009 18:31:54 -0000 1.16
+++ gsb_account_property.c 5 Jan 2009 22:17:51 -0000 1.17
@@ -115,9 +115,6 @@
/*END_EXTERN*/
-
-
-
/**
* create the page of account property
*
@@ -129,9 +126,10 @@
{
GtkWidget *onglet, *vbox, *scrolled_window, *hbox, *vbox2;
GtkWidget *label, *scrolled_window_text, *paddingbox;
- GtkWidget *hbox_account, *vbox_account, *align;
GtkSizeGroup * size_group;
+ devel_debug ( NULL );
+
/* la fenetre ppale est une vbox avec les détails en haut et appliquer en bas */
onglet = gtk_vbox_new ( FALSE, 5 );
gtk_container_set_border_width ( GTK_CONTAINER ( onglet ), 10 );
@@ -150,29 +148,13 @@
gtk_viewport_set_shadow_type ( GTK_VIEWPORT ( GTK_BIN ( scrolled_window ) -> child ),
GTK_SHADOW_NONE );
- paddingbox = new_paddingbox_with_title (vbox, TRUE, _("Account details"));
-
- hbox_account = hbox = gtk_hbox_new ( FALSE, 6 );
- gtk_box_pack_start ( GTK_BOX(paddingbox), hbox_account, FALSE, FALSE, 0 );
-
- /* Ajout d'un sélecteur d'icône pour les comptes */
- align = gtk_alignment_new (0.5,0.5,0.5,0.5);
- gtk_size_group_add_widget ( GTK_SIZE_GROUP ( size_group ), align );
- gtk_box_pack_start ( GTK_BOX(hbox_account), align, FALSE, FALSE, 0);
- bouton_icon = gtk_button_new ( );
- gtk_button_set_relief ( GTK_BUTTON ( bouton_icon ), GTK_RELIEF_NORMAL );
- gtk_widget_set_size_request ( bouton_icon, 60, 60 );
- g_signal_connect ( G_OBJECT( bouton_icon ),
- "pressed",
- G_CALLBACK(gsb_data_account_change_account_icon),
- NULL );
- gtk_container_add (GTK_CONTAINER (align), bouton_icon);
- vbox_account = gtk_vbox_new ( FALSE, 5 );
- gtk_box_pack_start ( GTK_BOX(hbox_account), vbox_account, TRUE, TRUE, 0);
+ /* création de la ligne des détails du compte */
+ paddingbox = new_paddingbox_with_button_title (vbox, TRUE, _("Account details"));
+ bouton_icon = g_object_get_data ( G_OBJECT ( paddingbox ), "bouton_icon" );
/* création de la ligne du nom du compte */
hbox = gtk_hbox_new ( FALSE, 6 );
- gtk_box_pack_start ( GTK_BOX(vbox_account), hbox, FALSE, FALSE, 0 );
+ gtk_box_pack_start ( GTK_BOX(paddingbox), hbox, FALSE, FALSE, 0 );
label = gtk_label_new ( COLON(_("Account name")) );
gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
@@ -189,7 +171,7 @@
/* create the box of kind of account */
hbox = gtk_hbox_new ( FALSE, 6 );
- gtk_box_pack_start ( GTK_BOX(vbox_account), hbox, FALSE, FALSE, 0 );
+ gtk_box_pack_start ( GTK_BOX(paddingbox), hbox, FALSE, FALSE, 0 );
label = gtk_label_new ( COLON(_("Account type")) );
gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
@@ -207,7 +189,7 @@
/* create the currency line */
hbox = gtk_hbox_new ( FALSE, 6 );
- gtk_box_pack_start ( GTK_BOX(vbox_account), hbox, FALSE, FALSE, 0 );
+ gtk_box_pack_start ( GTK_BOX(paddingbox), hbox, FALSE, FALSE, 0 );
label = gtk_label_new ( COLON(_("Account currency")) );
gtk_misc_set_alignment ( GTK_MISC(label), MISC_LEFT, MISC_VERT_CENTER );
@@ -221,14 +203,20 @@
G_CALLBACK ( gtk_widget_destroyed), &detail_devise_compte );
gtk_box_pack_start ( GTK_BOX(hbox), detail_devise_compte, TRUE, TRUE, 0);
-
/* create closed account line */
detail_compte_cloture = gsb_autofunc_checkbutton_new (_("Closed account"), FALSE,
G_CALLBACK (gsb_account_property_changed), GINT_TO_POINTER (PROPERTY_CLOSED_ACCOUNT),
G_CALLBACK (gsb_data_account_set_closed_account), 0 );
g_signal_connect ( G_OBJECT (detail_compte_cloture ), "destroy",
G_CALLBACK ( gtk_widget_destroyed), &detail_compte_cloture );
- gtk_box_pack_start ( GTK_BOX ( vbox_account ), detail_compte_cloture, FALSE, FALSE, 0 );
+ gtk_box_pack_start ( GTK_BOX ( paddingbox ), detail_compte_cloture, FALSE, FALSE, 0 );
+
+ /* set the callback for the button_icon */
+ g_signal_connect ( G_OBJECT( bouton_icon ),
+ "pressed",
+ G_CALLBACK(gsb_data_account_change_account_icon),
+ NULL );
+
/* création de la ligne du titulaire du compte */
paddingbox = new_paddingbox_with_title ( vbox, FALSE, _("Account holder"));
@@ -481,7 +469,7 @@
/* modification pour mettre à jour l'icône du sélecteur d'icône du compte */
image = gsb_data_account_get_account_icon_image ( current_account );
gtk_button_set_image ( GTK_BUTTON ( bouton_icon ), image );
-
+
gsb_autofunc_currency_set_currency_number (detail_devise_compte,
gsb_data_account_get_currency (current_account), current_account);
Index: utils.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- utils.c 13 Oct 2008 17:10:24 -0000 1.46
+++ utils.c 5 Jan 2009 22:17:51 -0000 1.47
@@ -266,6 +266,56 @@
return paddingbox;
}
+GtkWidget *new_paddingbox_with_button_title (GtkWidget * parent,
+ gboolean fill, gchar * title)
+{
+ GtkWidget *vbox, *hbox, *paddingbox, *label, *align, *button;
+ //~ GtkWidget *image;
+
+ vbox = gtk_vbox_new ( FALSE, 0 );
+ if ( GTK_IS_BOX(parent) )
+ {
+ gtk_box_pack_start ( GTK_BOX ( parent ), vbox,
+ fill, fill, 0);
+ }
+
+ /* Creating label */
+ label = gtk_label_new ( NULL );
+ gtk_misc_set_alignment ( GTK_MISC ( label ), 0, 1 );
+ gchar* tmp_str = g_strconcat ("<span weight=\"bold\">",
+ title, "</span>", NULL );
+ gtk_label_set_markup ( GTK_LABEL ( label ), tmp_str );
+ g_free(tmp_str);
+ gtk_box_pack_start ( GTK_BOX ( vbox ), label,
+ FALSE, FALSE, 0);
+ gtk_widget_show ( label );
+
+ /* Creating horizontal box */
+ hbox = gtk_hbox_new ( FALSE, 0 );
+ gtk_box_pack_start ( GTK_BOX ( vbox ), hbox,
+ fill, fill, 0);
+
+ /* add the button */
+ align = gtk_alignment_new (0.5, 0.1, 0.0, 0.0);
+ button = gtk_button_new ( );
+ gtk_widget_set_size_request ( button, 60, 60 );
+ gtk_widget_show (button);
+ gtk_container_add (GTK_CONTAINER (align), button);
+ gtk_box_pack_start ( GTK_BOX ( hbox ), align, FALSE, FALSE, 20 );
+
+ /* Then make the vbox itself */
+ paddingbox = gtk_vbox_new ( FALSE, 6 );
+ g_object_set_data ( G_OBJECT ( paddingbox ), "bouton_icon", button );
+ gtk_box_pack_start ( GTK_BOX ( hbox ), paddingbox,
+ TRUE, TRUE, 0);
+
+ if ( GTK_IS_BOX(parent) )
+ {
+ gtk_box_set_spacing ( GTK_BOX(parent), 18 );
+ }
+
+ return paddingbox;
+}
/**
* Function that makes a nice title with an optional icon. It is
Index: utils.h
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/utils.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- utils.h 13 Oct 2008 19:42:07 -0000 1.21
+++ utils.h 5 Jan 2009 22:17:51 -0000 1.22
@@ -15,6 +15,8 @@
gboolean met_en_prelight ( GtkWidget *event_box,
GdkEventMotion *event,
gpointer pointeur );
+GtkWidget *new_paddingbox_with_button_title (GtkWidget * parent,
+ gboolean fill, gchar * title);
GtkWidget *new_paddingbox_with_title (GtkWidget * parent, gboolean fill, gchar * title);
GtkWidget *new_vbox_with_title_and_icon ( gchar * title,
gchar * image_filename);
Index: gsb_select_icon.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_select_icon.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gsb_select_icon.c 4 Jan 2009 19:42:18 -0000 1.2
+++ gsb_select_icon.c 5 Jan 2009 22:17:51 -0000 1.3
@@ -2,7 +2,7 @@
/* */
/* copyright (c) 2000-2008 Cédric Auger (cedric at grisbi.org) */
/* 2004-2009 Benjamin Drieu (bdrieu at april.org) */
-/* 2000-2008 Pierre Biava (pierre at pierre.biava.name */
+/* 2000-2009 Pierre Biava (pierre at pierre.biava.name */
/* */
/* http://www.grisbi.org */
/* */
@@ -461,7 +461,7 @@
/**
- * ajoute le nouveau path. S'il existe déjà dans la liste on le suprrime
+ * ajoute le nouveau path. S'il existe déjà dans la liste on le supprime
* de telle façon qu'il n'existe qu'une fois et apparaisse en premier dans
* la liste
*
More information about the cvs
mailing list