gnucash unstable: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sat Mar 31 14:16:47 EDT 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/6c619400 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/518519f4 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c9f497cf (commit)
	 via  https://github.com/Gnucash/gnucash/commit/9b120f95 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/3f7d70ac (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f7211edb (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7033b331 (commit)
	from  https://github.com/Gnucash/gnucash/commit/4053f2ca (commit)



commit 6c6194001a4824163c8e40e7b48e5ef4944ccae5
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Mar 31 11:09:34 2018 -0700

    One more glade file with visible=true dialogs.

diff --git a/gnucash/gtkbuilder/gnc-plugin-page-register2.glade b/gnucash/gtkbuilder/gnc-plugin-page-register2.glade
index 2c0cc36..1472d34 100644
--- a/gnucash/gtkbuilder/gnc-plugin-page-register2.glade
+++ b/gnucash/gtkbuilder/gnc-plugin-page-register2.glade
@@ -8,7 +8,7 @@
     <property name="page_increment">10</property>
   </object>
   <object class="GtkDialog" id="duplicate_transaction_dialog">
-    <property name="visible">True</property>
+    <property name="visible">False</property>
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Duplicate Transaction</property>
@@ -164,7 +164,7 @@
     </action-widgets>
   </object>
   <object class="GtkDialog" id="filter_by_dialog">
-    <property name="visible">True</property>
+    <property name="visible">False</property>
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Filter register by...</property>
@@ -677,7 +677,7 @@
     </action-widgets>
   </object>
   <object class="GtkDialog" id="void_transaction_dialog">
-    <property name="visible">True</property>
+    <property name="visible">False</property>
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes">Void Transaction</property>

commit 518519f4cb2a31112b9ce8ec5fd47888d758107f
Merge: 4053f2c c9f497c
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Mar 31 11:11:31 2018 -0700

    Merge Bob Fewell's 'Gwenhywfar fixes' PR328 into unstable.


commit c9f497cf78696d508b02af4787260ef8ed34cefa
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Mar 31 17:13:41 2018 +0100

    Fix transient parent warnings when doing MT940 import

diff --git a/gnucash/import-export/aqb/gnc-ab-utils.c b/gnucash/import-export/aqb/gnc-ab-utils.c
index 161aca6..549fd28 100644
--- a/gnucash/import-export/aqb/gnc-ab-utils.c
+++ b/gnucash/import-export/aqb/gnc-ab-utils.c
@@ -60,9 +60,9 @@ static AB_BANKING *gnc_AB_BANKING = NULL;
 static gint gnc_AB_BANKING_refcount = 0;
 
 static gpointer join_ab_strings_cb(const gchar *str, gpointer user_data);
-static Account *gnc_ab_accinfo_to_gnc_acc(
+static Account *gnc_ab_accinfo_to_gnc_acc(GtkWidget *parent,
     AB_IMEXPORTER_ACCOUNTINFO *account_info);
-static Account *gnc_ab_txn_to_gnc_acc(
+static Account *gnc_ab_txn_to_gnc_acc(GtkWidget *parent,
     const AB_TRANSACTION *transaction);
 static const AB_TRANSACTION *txn_transaction_cb(
     const AB_TRANSACTION *element, gpointer user_data);
@@ -590,11 +590,12 @@ gnc_ab_trans_to_gnc(const AB_TRANSACTION *ab_trans, Account *gnc_acc)
  * Call gnc_import_select_account() on the online id constructed using
  * the information in @a acc_info.
  *
+ * @param parent Parent Widget
  * @param acc_info AB_IMEXPORTER_ACCOUNTINFO
  * @return A GnuCash account, or NULL otherwise
  */
 static Account *
-gnc_ab_accinfo_to_gnc_acc(AB_IMEXPORTER_ACCOUNTINFO *acc_info)
+gnc_ab_accinfo_to_gnc_acc(GtkWidget *parent, AB_IMEXPORTER_ACCOUNTINFO *acc_info)
 {
     const gchar *bankcode, *accountnumber;
     gchar *online_id;
@@ -608,7 +609,7 @@ gnc_ab_accinfo_to_gnc_acc(AB_IMEXPORTER_ACCOUNTINFO *acc_info)
                             accountnumber ? accountnumber : "",
                             (gchar*)NULL);
     gnc_acc = gnc_import_select_account(
-                  NULL, online_id, 1, AB_ImExporterAccountInfo_GetAccountName(acc_info),
+                  parent, online_id, 1, AB_ImExporterAccountInfo_GetAccountName(acc_info),
                   NULL, ACCT_TYPE_NONE, NULL, NULL);
     if (!gnc_acc)
     {
@@ -625,11 +626,12 @@ gnc_ab_accinfo_to_gnc_acc(AB_IMEXPORTER_ACCOUNTINFO *acc_info)
  * Call gnc_import_select_account() on the online id constructed using
  * the local information in @a transaction.
  *
+ * @param parent Parent Widget
  * @param transaction AB_TRANSACTION
  * @return A GnuCash account, or NULL otherwise
  */
 static Account *
-gnc_ab_txn_to_gnc_acc(const AB_TRANSACTION *transaction)
+gnc_ab_txn_to_gnc_acc(GtkWidget *parent, const AB_TRANSACTION *transaction)
 {
     const gchar *bankcode, *accountnumber;
     gchar *online_id;
@@ -648,7 +650,7 @@ gnc_ab_txn_to_gnc_acc(const AB_TRANSACTION *transaction)
                             accountnumber ? accountnumber : "",
                             (gchar*)NULL);
     gnc_acc = gnc_import_select_account(
-                  NULL, online_id, 1, AB_Transaction_GetLocalName(transaction),
+                  parent, online_id, 1, AB_Transaction_GetLocalName(transaction),
                   NULL, ACCT_TYPE_NONE, NULL, NULL);
     if (!gnc_acc)
     {
@@ -671,7 +673,7 @@ txn_transaction_cb(const AB_TRANSACTION *element, gpointer user_data)
     g_return_val_if_fail(element && data, NULL);
 
     /* Create a GnuCash transaction from ab_trans */
-    txnacc = gnc_ab_txn_to_gnc_acc(element);
+    txnacc = gnc_ab_txn_to_gnc_acc(GTK_WIDGET(data->parent), element);
     gnc_trans = gnc_ab_trans_to_gnc(element, txnacc ? txnacc : data->gnc_acc);
 
     if (data->execute_txns && data->ab_acc)
@@ -824,7 +826,7 @@ txn_accountinfo_cb(AB_IMEXPORTER_ACCOUNTINFO *element, gpointer user_data)
     }
 
     /* Lookup the corresponding gnucash account */
-    gnc_acc = gnc_ab_accinfo_to_gnc_acc(element);
+    gnc_acc = gnc_ab_accinfo_to_gnc_acc(GTK_WIDGET(data->parent), element);
     if (!gnc_acc) return NULL;
     data->gnc_acc = gnc_acc;
 
@@ -928,7 +930,7 @@ bal_accountinfo_cb(AB_IMEXPORTER_ACCOUNTINFO *element, gpointer user_data)
     }
 
     /* Lookup the corresponding gnucash account */
-    gnc_acc = gnc_ab_accinfo_to_gnc_acc(element);
+    gnc_acc = gnc_ab_accinfo_to_gnc_acc(GTK_WIDGET (data->parent), element);
     if (!gnc_acc) return NULL;
     data->gnc_acc = gnc_acc;
 
diff --git a/gnucash/import-export/aqb/gnc-file-aqb-import.c b/gnucash/import-export/aqb/gnc-file-aqb-import.c
index b7cbbdd..16cc8d3 100644
--- a/gnucash/import-export/aqb/gnc-file-aqb-import.c
+++ b/gnucash/import-export/aqb/gnc-file-aqb-import.c
@@ -236,7 +236,7 @@ gnc_file_aqbanking_import(GtkWindow *parent,
     ieci = gnc_ab_import_context(context, AWAIT_TRANSACTIONS,
                                  execute_transactions,
                                  execute_transactions ? api : NULL,
-                                 NULL);
+                                 GTK_WIDGET(parent));
 
     if (execute_transactions)
     {

commit 9b120f95a975bd6a977a3f0485c54a9e4f08c597
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Mar 31 17:11:15 2018 +0100

    Missing container add for textbrowser
    
    Needed to add gtk_container_add to add the text_view to the scroll
    window.

diff --git a/borrowed/gwengui-gtk3/w_textbrowser.c b/borrowed/gwengui-gtk3/w_textbrowser.c
index 8d1393f..bd722d0 100644
--- a/borrowed/gwengui-gtk3/w_textbrowser.c
+++ b/borrowed/gwengui-gtk3/w_textbrowser.c
@@ -203,6 +203,7 @@ static int Gtk3Gui_WTextBrowser_Setup(GWEN_WIDGET *w) {
   /* create widget */
   gs=gtk_scrolled_window_new(NULL, NULL);
   g=gtk_text_view_new();
+  gtk_container_add(GTK_CONTAINER(gs), GTK_WIDGET(g));
 
   if (s && *s) {
     GWEN_BUFFER *tbuf;

commit 3f7d70ace3f35ce71e94eaf1707cd538a7a28f79
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Mar 31 17:08:53 2018 +0100

    Error for lineedit when setting text
    
    Critical errors were logged when trying to set the gtkentry text when
    value is null, test for this before setting entry text.

diff --git a/borrowed/gwengui-gtk3/w_lineedit.c b/borrowed/gwengui-gtk3/w_lineedit.c
index 2fe7062..90aa126 100644
--- a/borrowed/gwengui-gtk3/w_lineedit.c
+++ b/borrowed/gwengui-gtk3/w_lineedit.c
@@ -97,7 +97,8 @@ int Gtk3Gui_WLineEdit_SetCharProperty(GWEN_WIDGET *w,
 
   switch(prop) {
   case GWEN_DialogProperty_Value:
-    gtk_entry_set_text(GTK_ENTRY(g), value);
+    if (value && *value)
+        gtk_entry_set_text(GTK_ENTRY(g), value);
     return 0;
   default:
     break;

commit f7211edbabdc8c802168b93973a1164067fed264
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Mar 31 17:05:05 2018 +0100

    Couple of missing properties for groupbox
    
    When fixing related combo error a couple of critical errors were logged
    for 'Function is not appropriate for this type of widget' which turned
    out to be visibility properties so added them to stop error.

diff --git a/borrowed/gwengui-gtk3/w_groupbox.c b/borrowed/gwengui-gtk3/w_groupbox.c
index 65fde56..be41b5d 100644
--- a/borrowed/gwengui-gtk3/w_groupbox.c
+++ b/borrowed/gwengui-gtk3/w_groupbox.c
@@ -36,6 +36,10 @@ int Gtk3Gui_WGroupBox_SetIntProperty(GWEN_WIDGET *w,
     /* just ignore these for now */
     return 0;
 
+  case GWEN_DialogProperty_Visibility:
+    gtk_widget_set_visible (GTK_WIDGET(g), (value==0)?FALSE:TRUE);
+    return 0;
+
   default:
     break;
   }
@@ -72,6 +76,9 @@ int Gtk3Gui_WGroupBox_GetIntProperty(GWEN_WIDGET *w,
     /* just ignore these for now */
     return 0;
 
+  case  GWEN_DialogProperty_Visibility:
+    return (gtk_widget_get_visible(GTK_WIDGET(g))==TRUE)?1:0;
+
   default:
     break;
   }

commit 7033b331ee47b601279e68464323fe76b7ceebe5
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Mar 31 17:01:56 2018 +0100

    Bug794707 - Aqbanking combo boxes missing selection.
    
    Modified w_combobox.c setup procedure was had an error when modified
    for gtk3 use.

diff --git a/borrowed/gwengui-gtk3/w_combobox.c b/borrowed/gwengui-gtk3/w_combobox.c
index f82dbf8..50dc1dc 100644
--- a/borrowed/gwengui-gtk3/w_combobox.c
+++ b/borrowed/gwengui-gtk3/w_combobox.c
@@ -258,10 +258,13 @@ int Gtk3Gui_WComboBox_Setup(GWEN_WIDGET *w) {
   /* create widget */
   store=gtk_list_store_new(1, G_TYPE_STRING);
   if (flags & GWEN_WIDGET_FLAGS_READONLY)
-    g=gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(store));
+    g=gtk_combo_box_new_with_model(GTK_TREE_MODEL(store));
   else
+  {
     /* TODO: why the heck does *this* combo box have two columns in the list?? */
     g=gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(store));
+    gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX(g), 0);
+  }
   g_object_unref(store);
 
   cr=gtk_cell_renderer_text_new();



Summary of changes:
 borrowed/gwengui-gtk3/w_combobox.c                 |  5 ++++-
 borrowed/gwengui-gtk3/w_groupbox.c                 |  7 +++++++
 borrowed/gwengui-gtk3/w_lineedit.c                 |  3 ++-
 borrowed/gwengui-gtk3/w_textbrowser.c              |  1 +
 gnucash/gtkbuilder/gnc-plugin-page-register2.glade |  6 +++---
 gnucash/import-export/aqb/gnc-ab-utils.c           | 20 +++++++++++---------
 gnucash/import-export/aqb/gnc-file-aqb-import.c    |  2 +-
 7 files changed, 29 insertions(+), 15 deletions(-)



More information about the gnucash-changes mailing list