gnucash master: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Tue May 20 10:22:03 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/cac3b5c2 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/e76ba2a0 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/1a967e46 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/733e6e91 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/1992e5fb (commit)
	 via  https://github.com/Gnucash/gnucash/commit/e1a5889b (commit)
	 via  https://github.com/Gnucash/gnucash/commit/5af8d231 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c742110c (commit)
	 via  https://github.com/Gnucash/gnucash/commit/3cd2fc56 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/25d9b420 (commit)
	from  https://github.com/Gnucash/gnucash/commit/eabaee8e (commit)



commit cac3b5c2159684c3e579aab73653106c4f5f6c80
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Tue May 20 12:26:32 2014 +0200

    Rename xaccAccountGetNrSplits to xaccAccountCountSplits for api consistency

diff --git a/src/engine/Account.c b/src/engine/Account.c
index 01bf612..c92b0b5 100644
--- a/src/engine/Account.c
+++ b/src/engine/Account.c
@@ -3721,19 +3721,19 @@ xaccAccountGetSplitList (const Account *acc)
 }
 
 gint64
-xaccAccountGetNrSplits (const Account *acc, gboolean include_children)
+xaccAccountCountSplits (const Account *acc, gboolean include_children)
 {
     gint64 nr, i;
 
     nr = 0;
-    g_return_val_if_fail(GNC_IS_ACCOUNT(acc), NULL);
+    g_return_val_if_fail(GNC_IS_ACCOUNT(acc), 0);
 
     nr = g_list_length(xaccAccountGetSplitList(acc));
     if (include_children && (gnc_account_n_children(acc) != 0))
     {
 	for (i=0; i < gnc_account_n_children(acc); i++)
         {
-            nr += xaccAccountGetNrSplits(gnc_account_nth_child(acc, i), TRUE);
+            nr += xaccAccountCountSplits(gnc_account_nth_child(acc, i), TRUE);
         }
     }
     return nr;
diff --git a/src/engine/Account.h b/src/engine/Account.h
index 1fe47f3..6bb25a7 100644
--- a/src/engine/Account.h
+++ b/src/engine/Account.h
@@ -971,13 +971,14 @@ guint32 xaccAccountTypesValid(void);
 SplitList* xaccAccountGetSplitList (const Account *account);
 
 
-/** The xaccAccountGetNrSplits() routine returns the number of all
+/** The xaccAccountCountSplits() routine returns the number of all
  *    the splits in the account.
- * @note The first argument is the account, and the second one defines
- * if the number returned should include the number of splits in descendants
- * (TRUE) or this account only (FALSE).
+ * @param acc the account for which to count the splits
+ *
+ * @param include_children also count splits in descendants (TRUE) or
+ *        for this account only (FALSE).
  */
-gint64 xaccAccountGetNrSplits (const Account *acc, gboolean include_children);
+gint64 xaccAccountCountSplits (const Account *acc, gboolean include_children);
 
 /** The xaccAccountMoveAllSplits() routine reassigns each of the splits
  *  in accfrom to accto. */
diff --git a/src/gnome-utils/gnc-tree-view-account.c b/src/gnome-utils/gnc-tree-view-account.c
index d535e8b..f3c53bb 100644
--- a/src/gnome-utils/gnc-tree-view-account.c
+++ b/src/gnome-utils/gnc-tree-view-account.c
@@ -1925,7 +1925,7 @@ gnc_plugin_page_account_tree_filter_accounts (Account *account,
 
     if (!fd->show_unused)
     {
-        if (xaccAccountGetNrSplits(account, TRUE) == 0)
+        if (xaccAccountCountSplits(account, TRUE) == 0)
         {
             LEAVE(" hide: unused");
             return FALSE;

commit e76ba2a0f0a59450ae3e595c7e603aade463d053
Author: Michalis Kamprianis <michalis at linuxmail.org>
Date:   Sat May 3 17:53:17 2014 +0200

    Bug 541541 - RFE: auto-hide unused accounts
    
    Add a checkbox on Filter by -> Others to show (default)
    or hide accounts that don't have any transactions.
    If an account does not have any transactions, but it's children do
    it will still be shown (unlike the zero total amount).

diff --git a/src/engine/Account.c b/src/engine/Account.c
index 9bc7dda..01bf612 100644
--- a/src/engine/Account.c
+++ b/src/engine/Account.c
@@ -3720,6 +3720,25 @@ xaccAccountGetSplitList (const Account *acc)
     return GET_PRIVATE(acc)->splits;
 }
 
+gint64
+xaccAccountGetNrSplits (const Account *acc, gboolean include_children)
+{
+    gint64 nr, i;
+
+    nr = 0;
+    g_return_val_if_fail(GNC_IS_ACCOUNT(acc), NULL);
+
+    nr = g_list_length(xaccAccountGetSplitList(acc));
+    if (include_children && (gnc_account_n_children(acc) != 0))
+    {
+	for (i=0; i < gnc_account_n_children(acc); i++)
+        {
+            nr += xaccAccountGetNrSplits(gnc_account_nth_child(acc, i), TRUE);
+        }
+    }
+    return nr;
+}
+
 LotList *
 xaccAccountGetLotList (const Account *acc)
 {
diff --git a/src/engine/Account.h b/src/engine/Account.h
index 0e57ac7..1fe47f3 100644
--- a/src/engine/Account.h
+++ b/src/engine/Account.h
@@ -970,6 +970,15 @@ guint32 xaccAccountTypesValid(void);
  */
 SplitList* xaccAccountGetSplitList (const Account *account);
 
+
+/** The xaccAccountGetNrSplits() routine returns the number of all
+ *    the splits in the account.
+ * @note The first argument is the account, and the second one defines
+ * if the number returned should include the number of splits in descendants
+ * (TRUE) or this account only (FALSE).
+ */
+gint64 xaccAccountGetNrSplits (const Account *acc, gboolean include_children);
+
 /** The xaccAccountMoveAllSplits() routine reassigns each of the splits
  *  in accfrom to accto. */
 void xaccAccountMoveAllSplits (Account *accfrom, Account *accto);
diff --git a/src/gnome-utils/gnc-tree-view-account.c b/src/gnome-utils/gnc-tree-view-account.c
index bde9de5..d535e8b 100644
--- a/src/gnome-utils/gnc-tree-view-account.c
+++ b/src/gnome-utils/gnc-tree-view-account.c
@@ -1923,6 +1923,15 @@ gnc_plugin_page_account_tree_filter_accounts (Account *account,
         }
     }
 
+    if (!fd->show_unused)
+    {
+        if (xaccAccountGetNrSplits(account, TRUE) == 0)
+        {
+            LEAVE(" hide: unused");
+            return FALSE;
+        }
+    }
+
     acct_type = xaccAccountGetType(account);
     result = (fd->visible_types & (1 << acct_type)) ? TRUE : FALSE;
     LEAVE(" %s", result ? "show" : "hide");
@@ -1967,6 +1976,25 @@ gppat_filter_show_zero_toggled_cb (GtkToggleButton *button,
     LEAVE("show_zero %d", fd->show_zero_total);
 }
 
+/** The "show unused" button in the Filter dialog changed state.
+ *  Update the page to reflect these changes.
+ *
+ *  @param button The GtkCheckButton that was toggled.
+ *
+ *  @param fd A pointer to the account filter dialog struct.
+ */
+void
+gppat_filter_show_unused_toggled_cb (GtkToggleButton *button,
+                                   AccountFilterDialog *fd)
+{
+    g_return_if_fail(GTK_IS_TOGGLE_BUTTON(button));
+
+    ENTER("button %p", button);
+    fd->show_unused = gtk_toggle_button_get_active(button);
+    gnc_tree_view_account_refilter(fd->tree_view);
+    LEAVE("show_unused %d", fd->show_unused);
+}
+
 /** The "clear all account types" button in the Filter dialog was
  *  clicked.  Clear all account types shown, and update the visible
  *  page.
@@ -2105,6 +2133,7 @@ gppat_filter_response_cb (GtkWidget *dialog,
         fd->visible_types = fd->original_visible_types;
         fd->show_hidden = fd->original_show_hidden;
         fd->show_zero_total = fd->original_show_zero_total;
+        fd->show_unused = fd->original_show_unused;
         gnc_tree_view_account_refilter(fd->tree_view);
     }
 
@@ -2152,6 +2181,7 @@ account_filter_dialog_create(AccountFilterDialog *fd, GncPluginPage *page)
     fd->original_visible_types = fd->visible_types;
     fd->original_show_hidden = fd->show_hidden;
     fd->original_show_zero_total = fd->show_zero_total;
+    fd->original_show_unused = fd->show_unused;
 
     /* Update the dialog widgets for the current state */
     button = GTK_WIDGET(gtk_builder_get_object (builder, "show_hidden"));
@@ -2160,6 +2190,9 @@ account_filter_dialog_create(AccountFilterDialog *fd, GncPluginPage *page)
     button = GTK_WIDGET(gtk_builder_get_object (builder, "show_zero"));
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button),
                                  fd->show_zero_total);
+    button = GTK_WIDGET(gtk_builder_get_object (builder, "show_unused"));
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button),
+                                 fd->show_unused);
 
     /* Set up the tree view and model */
     view = GTK_TREE_VIEW(gtk_builder_get_object (builder, FILTER_TREE_VIEW));
@@ -2198,6 +2231,7 @@ account_filter_dialog_create(AccountFilterDialog *fd, GncPluginPage *page)
 #define ACCT_SELECTED "SelectedAccount"
 #define SHOW_HIDDEN   "ShowHidden"
 #define SHOW_ZERO     "ShowZeroTotal"
+#define SHOW_UNUSED   "ShowUnused"
 #define ACCT_TYPES    "AccountTypes"
 
 typedef struct foo
@@ -2293,6 +2327,8 @@ gnc_tree_view_account_save(GncTreeViewAccount *view,
                            fd->show_hidden);
     g_key_file_set_boolean(key_file, group_name, SHOW_ZERO,
                            fd->show_zero_total);
+    g_key_file_set_boolean(key_file, group_name, SHOW_UNUSED,
+                           fd->show_unused);
 
     bar.key_file = key_file;
     bar.group_name = group_name;
@@ -2382,6 +2418,17 @@ gnc_tree_view_account_restore(GncTreeViewAccount *view,
     }
     fd->show_zero_total = show;
 
+    show = g_key_file_get_boolean(key_file, group_name, SHOW_UNUSED, &error);
+    if (error)
+    {
+        g_warning("error reading group %s key %s: %s",
+                  group_name, SHOW_UNUSED, error->message);
+        g_error_free(error);
+        error = NULL;
+        show = TRUE;
+    }
+    fd->show_unused = show;
+
     i = g_key_file_get_integer(key_file, group_name, ACCT_TYPES, &error);
     if (error)
     {
diff --git a/src/gnome-utils/gnc-tree-view-account.h b/src/gnome-utils/gnc-tree-view-account.h
index 5088b75..4aaffa9 100644
--- a/src/gnome-utils/gnc-tree-view-account.h
+++ b/src/gnome-utils/gnc-tree-view-account.h
@@ -84,6 +84,8 @@ typedef	struct
     gboolean             original_show_hidden;
     gboolean             show_zero_total;
     gboolean             original_show_zero_total;
+    gboolean             show_unused;
+    gboolean             original_show_unused;
 } AccountFilterDialog;
 
 void account_filter_dialog_create(AccountFilterDialog *fd,
@@ -97,6 +99,8 @@ void gppat_filter_show_hidden_toggled_cb (GtkToggleButton *togglebutton,
         AccountFilterDialog *fd);
 void gppat_filter_show_zero_toggled_cb (GtkToggleButton *togglebutton,
                                         AccountFilterDialog *fd);
+void gppat_filter_show_unused_toggled_cb (GtkToggleButton *togglebutton,
+                                        AccountFilterDialog *fd);
 void gppat_filter_clear_all_cb (GtkWidget *button, AccountFilterDialog *fd);
 void gppat_filter_select_all_cb (GtkWidget *button, AccountFilterDialog *fd);
 void gppat_filter_select_default_cb (GtkWidget *button,
diff --git a/src/gnome-utils/gtkbuilder/dialog-account.glade b/src/gnome-utils/gtkbuilder/dialog-account.glade
index e8faf8e..900044e 100644
--- a/src/gnome-utils/gtkbuilder/dialog-account.glade
+++ b/src/gnome-utils/gtkbuilder/dialog-account.glade
@@ -1426,6 +1426,23 @@
                   </packing>
                 </child>
                 <child>
+                  <object class="GtkCheckButton" id="show_unused">
+                    <property name="label" translatable="yes">Show _unused accounts</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="tooltip_text" translatable="yes">Show accounts which do not have any transactions.</property>
+                    <property name="use_underline">True</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="gppat_filter_show_unused_toggled_cb"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
                   <placeholder/>
                 </child>
               </object>

commit 1a967e46db184b5f487e5c50dd6c9301302a0cbe
Merge: eabaee8 733e6e9
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Tue May 20 16:20:16 2014 +0200

    Merge branch 'maint'
    
    * Bug 610202 - gnucash silently closes when no X11/$DISPLAY is present
    * added context to ambigous i18n keys for scheduled transaction add/edit dialog
    * Bug 509263 Since Last Run dialog won't allow resizing of Status column
    * Bug 728103 - Invoice opened does not contain the Job under circumstances
    * Bug 723145 - Currency display does not respect locale

diff --cc src/engine/gnc-commodity.c
index 851bba5,54b52a2..d5f6eb0
--- a/src/engine/gnc-commodity.c
+++ b/src/engine/gnc-commodity.c
@@@ -33,9 -33,9 +33,10 @@@
  #include <stdio.h>
  #include <stdlib.h>
  #include <regex.h>
 +#include <qofinstance-p.h>
  
  #include "gnc-commodity.h"
+ #include "gnc-locale-utils.h"
  #include "gnc-prefs.h"
  
  static QofLogModule log_module = GNC_MOD_COMMODITY;

commit 733e6e91dad9729b604da8d4e68851819a42fcbe
Author: Frédéric Perrin <frederic.perrin at resel.fr>
Date:   Wed Mar 26 00:07:49 2014 +0000

    Bug 723145 - Currency display does not respect locale
    
    Use the system-provided symbol for the locale currency

diff --git a/src/app-utils/gnc-ui-util.c b/src/app-utils/gnc-ui-util.c
index 09593b0..668e1b4 100644
--- a/src/app-utils/gnc-ui-util.c
+++ b/src/app-utils/gnc-ui-util.c
@@ -1747,19 +1747,6 @@ printable_value (gdouble val, gint denom)
     return xaccPrintAmount (num, info);
 }
 
-const char*
-gnc_commodity_get_nice_symbol(const gnc_commodity *cm)
-{
-    const char *nice_symbol;
-    if (!cm) return NULL;
-
-    nice_symbol = gnc_commodity_get_user_symbol(cm);
-    if (nice_symbol && *nice_symbol)
-        return nice_symbol;
-    else
-        return gnc_commodity_get_mnemonic(cm);
-}
-
 /********************************************************************\
  * xaccParseAmount                                                  *
  *   parses amount strings using locale data                        *
diff --git a/src/app-utils/gnc-ui-util.h b/src/app-utils/gnc-ui-util.h
index 83fa84f..281ffc6 100644
--- a/src/app-utils/gnc-ui-util.h
+++ b/src/app-utils/gnc-ui-util.h
@@ -259,7 +259,6 @@ const char * xaccPrintAmount (gnc_numeric val, GNCPrintAmountInfo info);
 int xaccSPrintAmount (char *buf, gnc_numeric val, GNCPrintAmountInfo info);
 
 const gchar *printable_value(gdouble val, gint denom);
-const char*gnc_commodity_get_nice_symbol(const gnc_commodity *cm);
 gchar *number_to_words(gdouble val, gint64 denom);
 gchar *numeric_to_words(gnc_numeric val);
 
diff --git a/src/engine/gnc-commodity.c b/src/engine/gnc-commodity.c
index 77c643b..54b52a2 100644
--- a/src/engine/gnc-commodity.c
+++ b/src/engine/gnc-commodity.c
@@ -35,6 +35,7 @@
 #include <regex.h>
 
 #include "gnc-commodity.h"
+#include "gnc-locale-utils.h"
 #include "gnc-prefs.h"
 
 static QofLogModule log_module = GNC_MOD_COMMODITY;
@@ -1140,19 +1141,52 @@ gnc_commodity_get_quote_tz(const gnc_commodity *cm)
 /********************************************************************
  * gnc_commodity_get_user_symbol
  ********************************************************************/
-
 const char*
 gnc_commodity_get_user_symbol(const gnc_commodity *cm)
 {
     const char *str;
     if (!cm) return NULL;
-    str = kvp_frame_get_string(cm->inst.kvp_data, "user_symbol");
-    if (str && *str)
-	return str;
+    return kvp_frame_get_string(cm->inst.kvp_data, "user_symbol");
+}
+
+/********************************************************************
+ * gnc_commodity_get_default_symbol
+ *******************************************************************/
+const char*
+gnc_commodity_get_default_symbol(const gnc_commodity *cm)
+{
+    const char *str;
+    if (!cm) return NULL;
     return GET_PRIVATE(cm)->default_symbol;
 }
 
 /********************************************************************
+ * gnc_commodity_get_nice_symbol
+ *******************************************************************/
+const char*
+gnc_commodity_get_nice_symbol (const gnc_commodity *cm)
+{
+    const char *nice_symbol;
+    struct lconv *lc;
+    if (!cm) return NULL;
+
+    nice_symbol = gnc_commodity_get_user_symbol(cm);
+    if (nice_symbol && *nice_symbol)
+        return nice_symbol;
+
+    lc = gnc_localeconv();
+    nice_symbol = lc->currency_symbol;
+    if (!g_strcmp0(gnc_commodity_get_mnemonic(cm), lc->int_curr_symbol))
+        return nice_symbol;
+
+    nice_symbol = gnc_commodity_get_default_symbol(cm);
+    if (nice_symbol && *nice_symbol)
+        return nice_symbol;
+
+    return gnc_commodity_get_mnemonic(cm);
+}
+
+/********************************************************************
  * gnc_commodity_set_mnemonic
  ********************************************************************/
 
@@ -1393,11 +1427,25 @@ gnc_commodity_set_quote_tz(gnc_commodity *cm, const char *tz)
 void
 gnc_commodity_set_user_symbol(gnc_commodity * cm, const char * user_symbol)
 {
+    struct lconv *lc;
+
     if (!cm) return;
 
     ENTER ("(cm=%p, symbol=%s)", cm, user_symbol ? user_symbol : "(null)");
 
     gnc_commodity_begin_edit(cm);
+
+    lc = gnc_localeconv();
+    if (!user_symbol || !*user_symbol)
+	user_symbol = NULL;
+    else if (!g_strcmp0(lc->int_curr_symbol, gnc_commodity_get_mnemonic(cm)) &&
+	     !g_strcmp0(lc->currency_symbol, user_symbol))
+	/* if the user gives the ISO symbol for the locale currency or the
+	 * default symbol, actually remove the user symbol */
+	user_symbol = NULL;
+    else if (!g_strcmp0(user_symbol, gnc_commodity_get_default_symbol(cm)))
+	user_symbol = NULL;
+
     kvp_frame_set_string(cm->inst.kvp_data, "user_symbol", user_symbol);
     mark_commodity_dirty(cm);
     gnc_commodity_commit_edit(cm);
diff --git a/src/engine/gnc-commodity.h b/src/engine/gnc-commodity.h
index bb023b9..f64684c 100644
--- a/src/engine/gnc-commodity.h
+++ b/src/engine/gnc-commodity.h
@@ -470,6 +470,29 @@ const char* gnc_commodity_get_quote_tz(const gnc_commodity *cm);
  *  should not be freed by the caller.
  */
 const char* gnc_commodity_get_user_symbol(const gnc_commodity *cm);
+
+/** Retrieve the default symbol for the specified commodity. This will
+ *  be a pointer to a nul terminated string like "£", "US$", etc. Note
+ *  that for the locale currency, you probably want to look at the
+ *  system-provided symbol first. See gnc_commodity_get_nice_symbol.
+ *
+ * @param cm A pointer to a commodity data structure.
+ *
+ * @return A pointer to the default symbol for this commodity.
+ */
+const char* gnc_commodity_get_default_symbol(const gnc_commodity *cm);
+
+/** Retrieve a symbol for the specified commodity, suitable for
+ *  display to the user. This will be a pointer to a nul terminated
+ *  string like "£", "US$", etc. That function is locale-aware and
+ *  will base its choice of symbol on the user-configured symbol,
+ *  the locale a
+ *
+ * @param cm A pointer to a commodity data structure.
+ *
+ * @return A pointer to the symbol for this commodity.
+ */
+const char*gnc_commodity_get_nice_symbol(const gnc_commodity *cm);
 /** @} */
 
 /** @name Commodity Accessor Routines - Set
diff --git a/src/gnome-utils/dialog-commodity.c b/src/gnome-utils/dialog-commodity.c
index 35507d7..86f01e0 100644
--- a/src/gnome-utils/dialog-commodity.c
+++ b/src/gnome-utils/dialog-commodity.c
@@ -1157,7 +1157,7 @@ gnc_ui_common_commodity_modal(gnc_commodity *commodity,
         namespace = gnc_commodity_get_namespace (commodity);
         fullname = gnc_commodity_get_fullname (commodity);
         mnemonic = gnc_commodity_get_mnemonic (commodity);
-        user_symbol = gnc_commodity_get_user_symbol (commodity);
+        user_symbol = gnc_commodity_get_nice_symbol (commodity);
         cusip = gnc_commodity_get_cusip (commodity);
         fraction = gnc_commodity_get_fraction (commodity);
     }
@@ -1316,10 +1316,7 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow * w)
             else
                 gnc_commodity_set_quote_tz(c, NULL);
 
-            if (user_symbol && *user_symbol)
-                gnc_commodity_set_user_symbol(c, user_symbol);
-            else
-                gnc_commodity_set_user_symbol(c, NULL);
+	    gnc_commodity_set_user_symbol(c, user_symbol);
 
             gnc_commodity_commit_edit(c);
             return TRUE;
diff --git a/src/gnome-utils/gnc-tree-model-commodity.c b/src/gnome-utils/gnc-tree-model-commodity.c
index e52e1dc..a3a8934 100644
--- a/src/gnome-utils/gnc-tree-model-commodity.c
+++ b/src/gnome-utils/gnc-tree-model-commodity.c
@@ -690,7 +690,7 @@ gnc_tree_model_commodity_get_value (GtkTreeModel *tree_model,
     case GNC_TREE_MODEL_COMMODITY_COL_USER_SYMBOL:
         g_value_init (value, G_TYPE_STRING);
 
-        g_value_set_string (value, gnc_commodity_get_user_symbol (commodity));
+        g_value_set_string (value, gnc_commodity_get_nice_symbol (commodity));
         break;
     case GNC_TREE_MODEL_COMMODITY_COL_VISIBILITY:
         g_value_init (value, G_TYPE_BOOLEAN);

commit 1992e5fb1fddca76adcb6eca08423c85dda9c8e0
Author: Michalis Kamprianis <michalis at linuxmail.org>
Date:   Sun May 4 21:25:37 2014 +0200

    Bug 728103 - Invoice opened does not contain the Job under circumstances
    
    corrected the saving of the page, so that it mentions the Job as
    the owner if there is a job, instead of the customer or the vendor.
    
    	modified:   src/business/business-gnome/dialog-invoice.c

diff --git a/src/business/business-gnome/dialog-invoice.c b/src/business/business-gnome/dialog-invoice.c
index 5acee72..28ec1ce 100644
--- a/src/business/business-gnome/dialog-invoice.c
+++ b/src/business/business-gnome/dialog-invoice.c
@@ -2181,10 +2181,20 @@ gnc_invoice_save_page (InvoiceWindow *iw,
     g_key_file_set_string(key_file, group_name, KEY_INVOICE_GUID,
                           guid_to_string(&iw->invoice_guid));
 
-    g_key_file_set_string(key_file, group_name, KEY_OWNER_TYPE,
+    if (gncOwnerGetJob (&(iw->job)))
+    {
+        g_key_file_set_string(key_file, group_name, KEY_OWNER_TYPE,
+                          qofOwnerGetType(&iw->job));
+        g_key_file_set_string(key_file, group_name, KEY_OWNER_GUID,
+                          guid_to_string(gncOwnerGetGUID(&iw->job)));
+    }
+    else
+    {
+        g_key_file_set_string(key_file, group_name, KEY_OWNER_TYPE,
                           qofOwnerGetType(&iw->owner));
-    g_key_file_set_string(key_file, group_name, KEY_OWNER_GUID,
+        g_key_file_set_string(key_file, group_name, KEY_OWNER_GUID,
                           guid_to_string(gncOwnerGetGUID(&iw->owner)));
+    }
 }
 
 GtkWidget *

commit e1a5889b45ecdf3b5cbf7dc1c4cf6ec01fcca2e5
Author: Michalis Kamprianis <michalis at linuxmail.org>
Date:   Wed Apr 30 08:49:38 2014 +0200

    Bug 509263 Since Last Run dialog won't allow resizing of Status column
    
    Added resizable=true in the column definition
    
    	modified:   src/gnome/dialog-sx-since-last-run.c

diff --git a/src/gnome/dialog-sx-since-last-run.c b/src/gnome/dialog-sx-since-last-run.c
index f9bc24f..a230723 100644
--- a/src/gnome/dialog-sx-since-last-run.c
+++ b/src/gnome/dialog-sx-since-last-run.c
@@ -975,6 +975,7 @@ gnc_ui_sx_since_last_run_dialog(GncSxInstanceModel *sx_instances, GList *auto_cr
                 "sensitive", SLR_MODEL_COL_INSTANCE_STATE_SENSITIVITY,
                 NULL);
         gtk_tree_view_append_column(dialog->instance_view, col);
+        gtk_tree_view_column_set_resizable(col, TRUE);
 
         renderer = gtk_cell_renderer_text_new();
         g_object_set(G_OBJECT(renderer),

commit 5af8d2318debccc72cf1ef833d3bb49ffe7da4a7
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Tue May 20 10:31:12 2014 +0200

    Backport John's fix for a truly ancient bug

diff --git a/src/libqof/qof/gnc-date.c b/src/libqof/qof/gnc-date.c
index 2bfbf7d..33c390f 100644
--- a/src/libqof/qof/gnc-date.c
+++ b/src/libqof/qof/gnc-date.c
@@ -1343,7 +1343,7 @@ char dateSeparator (void)
             gnc_localtime_r(&secs, &tm);
             qof_strftime(string, sizeof(string), GNC_D_FMT, &tm);
 
-            for (s = string; s != '\0'; s++)
+            for (s = string; *s != '\0'; s++)
                 if (!isdigit(*s))
                     return (locale_separator = *s);
         }

commit c742110c11a3776c986a32ad31c73cd7945d398d
Merge: 3cd2fc5 25d9b42
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Tue May 20 10:05:29 2014 +0200

    Merge branch 'scheduled_tx_i18n_prefix' of https://github.com/zeldigas/gnucash into maint


commit 3cd2fc56532983624a25652d2ccda340f019169b
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Mon May 19 21:37:10 2014 +0200

    Bug 610202 - gnucash silently closes when no X11/$DISPLAY is present

diff --git a/src/bin/gnucash-bin.c b/src/bin/gnucash-bin.c
index a8ca481..bf041cf 100644
--- a/src/bin/gnucash-bin.c
+++ b/src/bin/gnucash-bin.c
@@ -761,7 +761,8 @@ main(int argc, char ** argv)
     if(!gtk_init_check (&argc, &argv))
     {
         g_printerr(_("%s\nRun '%s --help' to see a full list of available command line options.\n"),
-                   _("Error: could not initialize graphical user interface and option add-price-quotes was not set."),
+                   _("Error: could not initialize graphical user interface and option add-price-quotes was not set.\n"
+                     "       Perhaps you need to set the $DISPLAY environment variable ?"),
                    argv[0]);
         return 1;
     }

commit 25d9b420c665bd72359f471dd002d4f1329c5dbb
Author: Dmitry Pavlov <zeldigas at gmail.com>
Date:   Mon May 19 21:02:19 2014 +0400

    added context to ambigous i18n keys for scheduled transaction add/edit dialog

diff --git a/src/gnome-utils/gtkbuilder/gnc-frequency.glade b/src/gnome-utils/gtkbuilder/gnc-frequency.glade
index 2c22c8b..f3869c5 100644
--- a/src/gnome-utils/gtkbuilder/gnc-frequency.glade
+++ b/src/gnome-utils/gtkbuilder/gnc-frequency.glade
@@ -168,7 +168,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="xalign">1</property>
-                        <property name="label" translatable="yes">Every</property>
+                        <property name="label" translatable="yes" context="Daily">Every</property>
                         <property name="justify">right</property>
                       </object>
                       <packing>
@@ -202,7 +202,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="xalign">0</property>
-                        <property name="label" translatable="yes">days.</property>
+                        <property name="label" translatable="yes" context="Daily">days.</property>
                         <property name="justify">center</property>
                       </object>
                       <packing>
@@ -247,7 +247,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="xalign">1</property>
-                                <property name="label" translatable="yes">Every</property>
+                                <property name="label" translatable="yes" context="Weekly">Every</property>
                                 <property name="justify">right</property>
                               </object>
                               <packing>
@@ -280,7 +280,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
-                                <property name="label" translatable="yes">weeks.</property>
+                                <property name="label" translatable="yes" context="Weekly">weeks.</property>
                                 <property name="justify">fill</property>
                               </object>
                               <packing>
@@ -490,7 +490,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="xalign">1</property>
-                                <property name="label" translatable="yes">Every</property>
+                                <property name="label" translatable="yes" context="Semimonthly">Every</property>
                                 <property name="justify">right</property>
                               </object>
                               <packing>
@@ -523,7 +523,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
-                                <property name="label" translatable="yes">months.</property>
+                                <property name="label" translatable="yes" context="Semimonthly">months.</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -732,7 +732,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="xalign">1</property>
-                                <property name="label" translatable="yes">Every</property>
+                                <property name="label" translatable="yes" context="Monthly">Every</property>
                                 <property name="justify">center</property>
                               </object>
                               <packing>
@@ -767,7 +767,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
-                                <property name="label" translatable="yes">months.</property>
+                                <property name="label" translatable="yes" context="Monthly">months.</property>
                                 <property name="justify">center</property>
                               </object>
                               <packing>



Summary of changes:
 src/app-utils/gnc-ui-util.c                     | 13 ------
 src/app-utils/gnc-ui-util.h                     |  1 -
 src/bin/gnucash-bin.c                           |  3 +-
 src/business/business-gnome/dialog-invoice.c    | 14 ++++++-
 src/engine/Account.c                            | 19 +++++++++
 src/engine/Account.h                            | 10 +++++
 src/engine/gnc-commodity.c                      | 56 +++++++++++++++++++++++--
 src/engine/gnc-commodity.h                      | 23 ++++++++++
 src/gnome-utils/dialog-commodity.c              |  7 +---
 src/gnome-utils/gnc-tree-model-commodity.c      |  2 +-
 src/gnome-utils/gnc-tree-view-account.c         | 47 +++++++++++++++++++++
 src/gnome-utils/gnc-tree-view-account.h         |  4 ++
 src/gnome-utils/gtkbuilder/dialog-account.glade | 17 ++++++++
 src/gnome-utils/gtkbuilder/gnc-frequency.glade  | 16 +++----
 src/gnome/dialog-sx-since-last-run.c            |  1 +
 15 files changed, 198 insertions(+), 35 deletions(-)



More information about the gnucash-changes mailing list