[grisbi-cvs] [SCM] grisbi branch, master, updated. c2a76b67923dd2e87449ead42e1b01d00035988d

Rémi Cardona nobody at users.sourceforge.net
Wed Jun 9 00:26:31 CEST 2010


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  c2a76b67923dd2e87449ead42e1b01d00035988d (commit)
       via  9bb13d322c7c1c06e99421f1a556d16a7705f7af (commit)
       via  60615942229e98d62ee0a14f77b81290a6e1be13 (commit)
       via  3eec8c7a354708e486d87bd7fccee8b821b2e130 (commit)
       via  6cc532a304b1659f0c73604a29c38306044a2e21 (commit)
      from  631031ce724b2bbad18e98eb3181295ce30370f0 (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 c2a76b67923dd2e87449ead42e1b01d00035988d
Author: Rémi Cardona <remi at gentoo.org>
Date:   Tue Jun 8 23:29:13 2010 +0200

    main: fix window maximization detection

commit 9bb13d322c7c1c06e99421f1a556d16a7705f7af
Author: Rémi Cardona <remi at gentoo.org>
Date:   Mon Jun 7 23:59:40 2010 +0200

    gtk_combofix: reuse set_list() from new_complex()

commit 60615942229e98d62ee0a14f77b81290a6e1be13
Author: Rémi Cardona <remi at gentoo.org>
Date:   Thu Jun 3 09:34:36 2010 +0200

    gtk_combofix: "complex" is always set to 1, delete it

commit 3eec8c7a354708e486d87bd7fccee8b821b2e130
Author: Rémi Cardona <remi at gentoo.org>
Date:   Mon May 17 08:31:23 2010 +0200

    dialog: fix memory leak in make_hint()

commit 6cc532a304b1659f0c73604a29c38306044a2e21
Author: Rémi Cardona <remi at gentoo.org>
Date:   Mon May 17 01:31:09 2010 +0200

    dialog: constify parameters of make_hint()

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

Changes:
diff --git a/src/dialog.c b/src/dialog.c
index 288dbb1..c0ea2a2 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -580,13 +580,17 @@ gint question_conditional_yes_no_get_no_struct ( struct conditional_message *msg
  *
  * \return a pango formated string with the two arguments concatenated. It returns a newly allocated string which must be freed when no more used.
  */
-gchar *make_hint ( gchar *hint, gchar *text )
+gchar *make_hint ( const gchar *hint, const gchar *text )
 {
-    gchar *tmp_str;
+    gchar *tmp_str, *tmp_markup_str;
+
+    tmp_markup_str = g_markup_printf_escaped (
+                     "<span size=\"larger\" weight=\"bold\">%s</span>\n\n", hint );
+
+    tmp_str = g_strconcat ( tmp_markup_str, text, NULL );
+
+    g_free ( tmp_markup_str );
 
-    tmp_str = g_strconcat ( g_markup_printf_escaped (
-                        "<span size=\"larger\" weight=\"bold\">%s</span>\n\n", hint ),
-                        text, NULL );
     return tmp_str;
 }
 
diff --git a/src/dialog.h b/src/dialog.h
index a13c833..5757073 100644
--- a/src/dialog.h
+++ b/src/dialog.h
@@ -33,7 +33,7 @@ gboolean dialogue_update_struct_message ( GtkWidget *checkbox,
 G_MODULE_EXPORT void dialogue_warning ( gchar *text );
 void dialogue_warning_hint ( gchar *text, gchar *hint );
 gchar *make_blue ( gchar *text );
-gchar *make_hint ( gchar *hint, gchar *text );
+gchar *make_hint ( const gchar *hint, const gchar *text );
 gchar *make_pango_attribut ( gchar *attribut, gchar *text );
 gchar *make_red ( gchar *text );
 gboolean question_conditional_yes_no ( gchar *var );
diff --git a/src/gtk_combofix.c b/src/gtk_combofix.c
index 62d42f9..54336cb 100644
--- a/src/gtk_combofix.c
+++ b/src/gtk_combofix.c
@@ -154,47 +154,17 @@ guint gtk_combofix_get_type ( void )
  * */
 GtkWidget *gtk_combofix_new_complex ( GSList *list )
 {
-    GtkTreeIter iter;
-    GSList *tmp_list;
-    gint list_number = 0;
-    gint length;
-
     GtkComboFix *combofix = GTK_COMBOFIX ( gtk_type_new ( gtk_combofix_get_type () ) );
 
     /* set the fields of the combofix */
 
     combofix -> force = FALSE;
-    combofix -> complex = 1;
     combofix -> auto_sort = TRUE;
     combofix -> max_items = 0;
     combofix -> visible_items = 0;
     combofix -> case_sensitive = FALSE;
 
-    tmp_list = list;
-    length = g_slist_length (list);
-
-    while ( tmp_list )
-    {
-        gtk_combofix_fill_store ( combofix,
-                      tmp_list -> data,
-                      list_number );
-
-        /* set the separator */
-        if (list_number < (length-1))
-        {
-            gtk_tree_store_append ( combofix -> store,
-                        &iter,
-                        NULL );
-            gtk_tree_store_set ( combofix -> store,
-                     &iter,
-                     COMBOFIX_COL_LIST_NUMBER, list_number,
-                     COMBOFIX_COL_SEPARATOR, TRUE,
-                     -1 );
-        }
-
-        list_number++;
-        tmp_list = tmp_list -> next;
-    }
+    gtk_combofix_set_list (combofix, list);
 
    return ( GTK_WIDGET ( combofix ) );
 }
@@ -360,48 +330,42 @@ void gtk_combofix_set_mixed_sort ( GtkComboFix *combofix,
 gboolean gtk_combofix_set_list ( GtkComboFix *combofix,
                         GSList *list )
 {
+    GSList *tmp_list;
+    gint list_number = 0;
+    gint length;
+    GtkTreeIter iter;
+
     g_return_val_if_fail (combofix, FALSE );
     g_return_val_if_fail (GTK_IS_COMBOFIX (combofix), FALSE);
 
     gtk_tree_store_clear (combofix -> store);
 
-    if (combofix -> complex)
-    {
-        GSList *tmp_list;
-        gint list_number = 0;
-        gint length;
-        GtkTreeIter iter;
+    tmp_list = list;
+    length = g_slist_length (list);
 
-        tmp_list = list;
-        length = g_slist_length (list);
+    while ( tmp_list )
+    {
+        gtk_combofix_fill_store ( combofix,
+                      tmp_list -> data,
+                      list_number );
 
-        while ( tmp_list )
+        /* set the separator */
+        if (list_number < (length-1))
         {
-            gtk_combofix_fill_store ( combofix,
-                          tmp_list -> data,
-                          list_number );
-
-            /* set the separator */
-            if (list_number < (length-1))
-            {
-            gtk_tree_store_append ( combofix -> store,
-                        &iter,
-                        NULL );
-            gtk_tree_store_set ( combofix -> store,
-                         &iter,
-                         COMBOFIX_COL_LIST_NUMBER, list_number,
-                         COMBOFIX_COL_SEPARATOR, TRUE,
-                         -1 );
-            }
-            list_number++;
-            tmp_list = tmp_list -> next;
+        gtk_tree_store_append ( combofix -> store,
+                    &iter,
+                    NULL );
+        gtk_tree_store_set ( combofix -> store,
+                     &iter,
+                     COMBOFIX_COL_LIST_NUMBER, list_number,
+                     COMBOFIX_COL_SEPARATOR, TRUE,
+                     -1 );
         }
+        list_number++;
+        tmp_list = tmp_list -> next;
     }
-    else
-    {
-        gtk_combofix_fill_store ( combofix, list, 0 );
-}
-return TRUE;
+
+    return TRUE;
 }
 
 
diff --git a/src/gtk_combofix.h b/src/gtk_combofix.h
index 3c9110b..d40ee6d 100644
--- a/src/gtk_combofix.h
+++ b/src/gtk_combofix.h
@@ -81,8 +81,6 @@ struct _GtkComboFix
 
     gint visible_items;
     GtkWidget *popup;
-    /* complex combofix */
-    gboolean complex;
     /* automatic sorting */
     gint auto_sort;
 };
diff --git a/src/main.c b/src/main.c
index 42723fb..6927ffe 100644
--- a/src/main.c
+++ b/src/main.c
@@ -357,10 +357,9 @@ gboolean gsb_grisbi_change_state_window ( GtkWidget *window,
                         GdkEventWindowState *event,
                         gpointer null )
 {
-
-    if (event -> changed_mask == GDK_WINDOW_STATE_FULLSCREEN)
+    if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED)
     {
-	if (event -> new_window_state)
+	if (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED)
 	    conf.full_screen = TRUE;
 	else
 	    conf.full_screen = FALSE;


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list