gnucash maint: Multiple changes pushed

git repository hosting gjanssens at code.gnucash.org
Sat Jan 28 12:16:00 EST 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/0a782dd0 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c87fa9ea (commit)
	from  https://github.com/Gnucash/gnucash/commit/33f39627 (commit)



commit 0a782dd0c06cf4a49df0f4e93455c859f3b69abf
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Jan 28 15:01:38 2017 +0100

    Travis - fix failure to load some libraries while running scm tests
    
    In the travis environment (guile 1.8 in combination with other unidentified,
    particular package versions) the scm based tests are looking for
    backend modules (xml and dbi) in the installation prefix instead of
    in the build directory. Explicitly setting the environment variables
    GNC_BUILDDIR and GNC_UNINSTALLED fix this. I haven't figured out why this
    is not needed on all platforms/tool version combinations. But the fix
    works in all (autotools based) cases. CMake builds may need a similar
    fix, but I don't know that environment sufficiently to implement it.

diff --git a/src/engine/test/Makefile.am b/src/engine/test/Makefile.am
index d8516cc..46f5734 100644
--- a/src/engine/test/Makefile.am
+++ b/src/engine/test/Makefile.am
@@ -80,7 +80,9 @@ GNC_TEST_DEPS = \
   --library-dir    ${top_builddir}/src/engine/test
 
 $(SCM_TESTS): %: $(srcdir)/%.scm Makefile .scm-links
-	echo '${GUILE} --debug -l $(srcdir)/$*.scm -c "(exit (run-test))"' > $@
+	echo 'export GNC_BUILDDIR="${abs_top_builddir}";' > $@
+	echo 'export GNC_UNINSTALLED=yes;' >> $@
+	echo '${GUILE} --debug -l $(srcdir)/$*.scm -c "(exit (run-test))"' >> $@
 	chmod a+x $@
 
 TESTS_ENVIRONMENT = \
diff --git a/src/report/report-system/test/Makefile.am b/src/report/report-system/test/Makefile.am
index c4bc2d6..e93c2c3 100644
--- a/src/report/report-system/test/Makefile.am
+++ b/src/report/report-system/test/Makefile.am
@@ -58,7 +58,9 @@ GNC_TEST_DEPS = --gnc-module-dir ${top_builddir}/src/engine \
   --library-dir    ${top_builddir}/src/gnc-module
 
 $(SCM_TESTS): %: $(srcdir)/%.scm Makefile .scm-links
-	echo '${GUILE} --debug -l $(srcdir)/$*.scm -c "(exit (run-test))"' > $@
+	echo 'export GNC_BUILDDIR="${abs_top_builddir}";' > $@
+	echo 'export GNC_UNINSTALLED=yes;' >> $@
+	echo '${GUILE} --debug -l $(srcdir)/$*.scm -c "(exit (run-test))"' >> $@
 	chmod a+x $@
 
 TESTS_ENVIRONMENT = \
diff --git a/src/report/standard-reports/test/Makefile.am b/src/report/standard-reports/test/Makefile.am
index 80c78d5..3b2ca5c 100644
--- a/src/report/standard-reports/test/Makefile.am
+++ b/src/report/standard-reports/test/Makefile.am
@@ -46,7 +46,9 @@ GNC_TEST_DEPS = \
   --library-dir    ${top_builddir}/src/gnc-module
 
 $(SCM_TESTS): %: $(srcdir)/%.scm Makefile .scm-links
-	echo '${GUILE} --debug -l $(srcdir)/$*.scm -c "(exit (run-test))"' > $@
+	echo 'export GNC_BUILDDIR="${abs_top_builddir}";' > $@
+	echo 'export GNC_UNINSTALLED=yes;' >> $@
+	echo '${GUILE} --debug -l $(srcdir)/$*.scm -c "(exit (run-test))"' >> $@
 	chmod a+x $@
 
 TESTS_ENVIRONMENT = \

commit c87fa9eac1ab7b79c50c6ca48e1f5f658a4be662
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Jan 28 17:08:34 2017 +0100

    Bug 759934 - Tiny reports in HiDPI
    
    While a proper solution is only possible with a more recent
    version of webkit, this commit will allow users to work around
    the issue by manually setting a default zoom level for reports.
    This setting can be found under
    Edit->Preferences->Reports

diff --git a/src/gnome-utils/dialog-preferences.c b/src/gnome-utils/dialog-preferences.c
index 4ae4473..324fc53 100644
--- a/src/gnome-utils/dialog-preferences.c
+++ b/src/gnome-utils/dialog-preferences.c
@@ -1075,6 +1075,7 @@ gnc_preferences_dialog_create(void)
     gnc_builder_add_from_file (builder, "dialog-preferences.glade", "autosave_interval_minutes_adj");
     gnc_builder_add_from_file (builder, "dialog-preferences.glade", "save_on_close_adj");
     gnc_builder_add_from_file (builder, "dialog-preferences.glade", "date_backmonth_adj");
+    gnc_builder_add_from_file (builder, "dialog-preferences.glade", "default_zoom_adj");
     gnc_builder_add_from_file (builder, "dialog-preferences.glade", "max_transactions_adj");
     gnc_builder_add_from_file (builder, "dialog-preferences.glade", "key_length_adj");
     gnc_builder_add_from_file (builder, "dialog-preferences.glade", "new_search_limit_adj");
diff --git a/src/gnome-utils/gtkbuilder/dialog-preferences.glade b/src/gnome-utils/gtkbuilder/dialog-preferences.glade
index 5f723d8..775e588c 100644
--- a/src/gnome-utils/gtkbuilder/dialog-preferences.glade
+++ b/src/gnome-utils/gtkbuilder/dialog-preferences.glade
@@ -2,6 +2,101 @@
 <interface>
   <requires lib="gtk+" version="2.24"/>
   <!-- interface-naming-policy project-wide -->
+  <object class="GtkAdjustment" id="auto_decimal_places_adj">
+    <property name="lower">1</property>
+    <property name="upper">8</property>
+    <property name="value">2</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">4</property>
+  </object>
+  <object class="GtkAdjustment" id="autosave_interval_minutes_adj">
+    <property name="upper">99999</property>
+    <property name="value">3</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="date_backmonth_adj">
+    <property name="upper">11</property>
+    <property name="value">6</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">4</property>
+  </object>
+  <object class="GtkListStore" id="date_formats">
+    <columns>
+      <!-- column-name name -->
+      <column type="gchararray"/>
+      <!-- column-name example -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">US</col>
+        <col id="1" translatable="yes">07/31/2013</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">UK</col>
+        <col id="1" translatable="yes">31/07/2013</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Europe</col>
+        <col id="1" translatable="yes">31.07.2013</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">ISO</col>
+        <col id="1" translatable="yes">2013-07-31</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Locale</col>
+        <col id="1" translatable="yes">(dummy)</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkAdjustment" id="default_zoom_adj">
+    <property name="lower">1</property>
+    <property name="upper">10</property>
+    <property name="value">1</property>
+    <property name="step_increment">0.10000000000000001</property>
+    <property name="page_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="key_length_adj">
+    <property name="lower">1</property>
+    <property name="upper">999</property>
+    <property name="value">2</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="max_transactions_adj">
+    <property name="upper">999999</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="new_search_limit_adj">
+    <property name="lower">1</property>
+    <property name="upper">100</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="retain_days_adj">
+    <property name="lower">1</property>
+    <property name="upper">99999</property>
+    <property name="value">30</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="save_on_close_adj">
+    <property name="upper">300</property>
+    <property name="value">20</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="tab_width_adj">
+    <property name="lower">1</property>
+    <property name="upper">100</property>
+    <property name="value">30</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
   <object class="GtkDialog" id="GnuCash Preferences">
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">GnuCash Preferences</property>
@@ -1312,6 +1407,57 @@ many months before the current month:</property>
                   <placeholder/>
                 </child>
                 <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
                   <object class="GtkLabel" id="label50">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -1783,15 +1929,6 @@ many months before the current month:</property>
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
                   <object class="GtkLabel" id="label84">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -1859,48 +1996,6 @@ many months before the current month:</property>
                   </packing>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
                   <object class="GtkCheckButton" id="pref/general/save-on-close-expires">
                     <property name="label" translatable="yes">Enable timeout on "Save changes on closing" question</property>
                     <property name="visible">True</property>
@@ -1920,6 +2015,12 @@ many months before the current month:</property>
                   </packing>
                 </child>
                 <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
                   <object class="GtkLabel" id="label15">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -1988,12 +2089,6 @@ many months before the current month:</property>
                   <placeholder/>
                 </child>
                 <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
                   <object class="GtkLabel" id="label19">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -2966,7 +3061,7 @@ many months before the current month:</property>
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="border_width">6</property>
-                <property name="n_rows">6</property>
+                <property name="n_rows">10</property>
                 <property name="n_columns">4</property>
                 <child>
                   <placeholder/>
@@ -2981,6 +3076,33 @@ many months before the current month:</property>
                   <placeholder/>
                 </child>
                 <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
                   <object class="GtkLabel" id="locale_currency2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -3134,6 +3256,84 @@ many months before the current month:</property>
                 <child>
                   <placeholder/>
                 </child>
+                <child>
+                  <object class="GtkLabel" id="label20">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes"><b>Default zoom level</b></property>
+                    <property name="use_markup">True</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">7</property>
+                    <property name="bottom_attach">8</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"/>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkHBox" id="hbox5">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkSpinButton" id="pref/general.report/default-zoom">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="tooltip_text" translatable="yes">On high resolution screens reports tend to be hard to read.
+This option allows you to scale reports up by the set factor.
+For example setting this to 2.0 will display reports at twice their typical size.</property>
+                        <property name="max_length">4</property>
+                        <property name="invisible_char">●</property>
+                        <property name="primary_icon_activatable">False</property>
+                        <property name="secondary_icon_activatable">False</property>
+                        <property name="primary_icon_sensitive">True</property>
+                        <property name="secondary_icon_sensitive">True</property>
+                        <property name="adjustment">default_zoom_adj</property>
+                        <property name="digits">1</property>
+                        <property name="snap_to_ticks">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="top_attach">8</property>
+                    <property name="bottom_attach">9</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options">GTK_FILL</property>
+                    <property name="x_padding">12</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label21">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">6</property>
+                    <property name="bottom_attach">7</property>
+                    <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"/>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
               </object>
               <packing>
                 <property name="position">7</property>
@@ -3593,92 +3793,4 @@ many months before the current month:</property>
       <action-widget response="-7">closebutton2</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkAdjustment" id="auto_decimal_places_adj">
-    <property name="lower">1</property>
-    <property name="upper">8</property>
-    <property name="value">2</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">4</property>
-  </object>
-  <object class="GtkAdjustment" id="autosave_interval_minutes_adj">
-    <property name="upper">99999</property>
-    <property name="value">3</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="date_backmonth_adj">
-    <property name="upper">11</property>
-    <property name="value">6</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">4</property>
-  </object>
-  <object class="GtkListStore" id="date_formats">
-    <columns>
-      <!-- column-name name -->
-      <column type="gchararray"/>
-      <!-- column-name example -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">US</col>
-        <col id="1" translatable="yes">07/31/2013</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">UK</col>
-        <col id="1" translatable="yes">31/07/2013</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Europe</col>
-        <col id="1" translatable="yes">31.07.2013</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">ISO</col>
-        <col id="1" translatable="yes">2013-07-31</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Locale</col>
-        <col id="1" translatable="yes">(dummy)</col>
-      </row>
-    </data>
-  </object>
-  <object class="GtkAdjustment" id="key_length_adj">
-    <property name="lower">1</property>
-    <property name="upper">999</property>
-    <property name="value">2</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="max_transactions_adj">
-    <property name="upper">999999</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="new_search_limit_adj">
-    <property name="lower">1</property>
-    <property name="upper">100</property>
-    <property name="value">1</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="retain_days_adj">
-    <property name="lower">1</property>
-    <property name="upper">99999</property>
-    <property name="value">30</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="save_on_close_adj">
-    <property name="upper">300</property>
-    <property name="value">20</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="tab_width_adj">
-    <property name="lower">1</property>
-    <property name="upper">100</property>
-    <property name="value">30</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
 </interface>
diff --git a/src/gnome/gschemas/org.gnucash.gschema.xml.in.in b/src/gnome/gschemas/org.gnucash.gschema.xml.in.in
index 543843a..01c28be 100644
--- a/src/gnome/gschemas/org.gnucash.gschema.xml.in.in
+++ b/src/gnome/gschemas/org.gnucash.gschema.xml.in.in
@@ -328,6 +328,11 @@
       <summary>Default currency for new reports</summary>
       <description>This setting controls the default currency used for reports. If set to "locale" then GnuCash will retrieve the default currency from the user's locale setting. If set to "other", GnuCash will use the setting specified by the currency-other key.</description>
     </key>
+    <key name="default-zoom" type="d">
+      <default>1.0</default>
+      <summary>Zoom factor to use by default for reports.</summary>
+      <description>On high-resolution displays the reports will be unreadable by default. Setting a zoom factor to a number bigger than 1.0 can help improve this situation.</description>
+    </key>
     <child name="pdf-export" schema="org.gnucash.general.report.pdf-export"/>
   </schema>
   <schema id="org.gnucash.general.report.pdf-export" path="/org/gnucash/general/report/pdf-export/">
diff --git a/src/html/gnc-html-webkit.c b/src/html/gnc-html-webkit.c
index be9eb37..56bfd3b 100644
--- a/src/html/gnc-html-webkit.c
+++ b/src/html/gnc-html-webkit.c
@@ -42,6 +42,7 @@
 #include <webkit/webkit.h>
 
 #include "Account.h"
+#include "gnc-prefs.h"
 #include "gnc-gui-query.h"
 #include "gnc-engine.h"
 #include "gnc-html.h"
@@ -81,6 +82,7 @@ static char error_404_title[] = N_("Not found");
 static char error_404_body[] = N_("The specified URL could not be loaded.");
 
 #define BASE_URI_NAME "base-uri"
+#define GNC_PREF_RPT_DFLT_ZOOM "default-zoom"
 
 static WebKitNavigationResponse webkit_navigation_requested_cb(
     WebKitWebView* web_view,
@@ -110,6 +112,7 @@ static gboolean impl_webkit_export_to_file( GncHtml* self, const gchar* filepath
 static void impl_webkit_print( GncHtml* self, const gchar* jobname, gboolean export_pdf );
 static void impl_webkit_cancel( GncHtml* self );
 static void impl_webkit_set_parent( GncHtml* self, GtkWindow* parent );
+static void impl_webkit_default_zoom_changed(gpointer prefs, gchar *pref, gpointer user_data);
 
 static void
 gnc_html_webkit_init( GncHtmlWebkit* self )
@@ -119,6 +122,7 @@ gnc_html_webkit_init( GncHtmlWebkit* self )
 
     WebKitWebSettings* webkit_settings = NULL;
     const char* default_font_family = NULL;
+    gdouble zoom = 1.0;
 
     new_priv = g_realloc( GNC_HTML(self)->priv, sizeof(GncHtmlWebkitPrivate) );
     priv = self->priv = new_priv;
@@ -127,6 +131,7 @@ gnc_html_webkit_init( GncHtmlWebkit* self )
     priv->html_string = NULL;
     priv->web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
 
+
     /* Get the default font family from GtkStyle of a GtkWidget(priv-web_view). */
     default_font_family = pango_font_description_get_family( gtk_rc_get_style(GTK_WIDGET(priv->web_view))->font_desc );
 
@@ -144,6 +149,11 @@ gnc_html_webkit_init( GncHtmlWebkit* self )
                       NULL);
         PINFO("webkit_settings: Set default font to [%s]", default_font_family);
     }
+    /* Scale everything up */
+    zoom = gnc_prefs_get_float (GNC_PREFS_GROUP_GENERAL_REPORT, GNC_PREF_RPT_DFLT_ZOOM);
+    webkit_web_view_set_full_content_zoom (priv->web_view, TRUE);
+    webkit_web_view_set_zoom_level (priv->web_view, zoom);
+
 
     gtk_container_add( GTK_CONTAINER(priv->base.container),
                        GTK_WIDGET(priv->web_view) );
@@ -181,6 +191,11 @@ gnc_html_webkit_init( GncHtmlWebkit* self )
                       self);
 #endif
 
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL_REPORT,
+            GNC_PREF_RPT_DFLT_ZOOM,
+            impl_webkit_default_zoom_changed,
+                           self);
+
     LEAVE("retval %p", self);
 }
 
@@ -222,6 +237,11 @@ gnc_html_webkit_dispose( GObject* obj )
         priv->html_string = NULL;
     }
 
+    gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL_REPORT,
+            GNC_PREF_RPT_DFLT_ZOOM,
+            impl_webkit_default_zoom_changed,
+                                 obj);
+
     G_OBJECT_CLASS(gnc_html_webkit_parent_class)->dispose( obj );
 }
 
@@ -1284,3 +1304,17 @@ impl_webkit_set_parent( GncHtml* self, GtkWindow* parent )
     priv = GNC_HTML_WEBKIT_GET_PRIVATE(self);
     priv->base.parent = GTK_WIDGET(parent);
 }
+
+static void
+impl_webkit_default_zoom_changed(gpointer prefs, gchar *pref, gpointer user_data)
+{
+    gdouble zoom = 1.0;
+    GncHtmlWebkit* self = GNC_HTML_WEBKIT(user_data);
+    GncHtmlWebkitPrivate* priv = GNC_HTML_WEBKIT_GET_PRIVATE(self);
+
+    g_return_if_fail(user_data != NULL);
+
+    zoom = gnc_prefs_get_float (GNC_PREFS_GROUP_GENERAL_REPORT, GNC_PREF_RPT_DFLT_ZOOM);
+    webkit_web_view_set_zoom_level (priv->web_view, zoom);
+
+}



Summary of changes:
 src/engine/test/Makefile.am                        |   4 +-
 src/gnome-utils/dialog-preferences.c               |   1 +
 .../gtkbuilder/dialog-preferences.glade            | 404 +++++++++++++--------
 src/gnome/gschemas/org.gnucash.gschema.xml.in.in   |   5 +
 src/html/gnc-html-webkit.c                         |  34 ++
 src/report/report-system/test/Makefile.am          |   4 +-
 src/report/standard-reports/test/Makefile.am       |   4 +-
 7 files changed, 307 insertions(+), 149 deletions(-)



More information about the gnucash-changes mailing list