gnucash master: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Mon Mar 10 13:30:07 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/7235751e (commit)
	 via  https://github.com/Gnucash/gnucash/commit/cebe4ed9 (commit)
	from  https://github.com/Gnucash/gnucash/commit/faf05aab (commit)



commit 7235751eb3dea379579878b81e894950d21898a1
Author: Geert Janssens <janssens-geert at telenet.be>
Date:   Mon Mar 10 18:25:57 2014 +0100

    Saved report configuration ui tuning
    
    - Settle for 'Saved report configuration' as name of the beast
      in favour of 'Custom report' (ambiguous with full scheme reports added by the user)
      or 'Saved report' (ambiguous with exported html reports)
      or 'Preconfigured report' (which I personally like better but got criticisms)
    - Group menu items related to saved report configurations together
      in the Report menu

diff --git a/src/gnome-utils/ui/gnc-main-window-ui.xml b/src/gnome-utils/ui/gnc-main-window-ui.xml
index 669ca38..53e8e70 100644
--- a/src/gnome-utils/ui/gnc-main-window-ui.xml
+++ b/src/gnome-utils/ui/gnc-main-window-ui.xml
@@ -89,14 +89,12 @@
     <menu name="Reports" action="ReportsAction">
       <placeholder name="StandardReports"/>
       <separator   name="ReportSep1"/>
-      <placeholder name="CustomReports"/>
+      <placeholder name="SavedReportConfigs"/>
       <separator   name="ReportSep2"/>
-      <placeholder name="CustomReports"/>
-      <separator   name="ReportSep3"/>
       <placeholder name="AccountReports"/>
-      <separator   name="ReportSep4"/>
+      <separator   name="ReportSep3"/>
       <placeholder name="OtherReports"/>
-      <separator   name="ReportSep5"/>
+      <separator   name="ReportSep4"/>
     </menu>
 
     <menu name="Tools" action="ToolsAction">
diff --git a/src/report/report-gnome/dialog-custom-report.c b/src/report/report-gnome/dialog-custom-report.c
index 86ecc63..ac01ee2 100644
--- a/src/report/report-gnome/dialog-custom-report.c
+++ b/src/report/report-gnome/dialog-custom-report.c
@@ -409,7 +409,7 @@ custom_report_list_view_clicked_cb(GtkTreeView *view, GdkEventButton *event, gpo
     {
         if (column == crd->runcol)
         {
-            SCM guid = get_custom_report_selection(crd, _("You must select a report to run."));
+            SCM guid = get_custom_report_selection(crd, _("You must select a report configuration to load."));
             custom_report_run_report (guid, crd);
         }
         else if (column == crd->editcol)
@@ -420,7 +420,7 @@ custom_report_list_view_clicked_cb(GtkTreeView *view, GdkEventButton *event, gpo
         }
         else if (column == crd->delcol)
         {
-            SCM guid = get_custom_report_selection(crd, _("You must select a report to delete."));
+            SCM guid = get_custom_report_selection(crd, _("You must select a report configuration to delete."));
             custom_report_delete (guid, crd);
         }
     }
@@ -429,7 +429,7 @@ custom_report_list_view_clicked_cb(GtkTreeView *view, GdkEventButton *event, gpo
 void custom_report_name_edited_cb(GtkCellRendererText *renderer, gchar *path, gchar *new_text, gpointer data)
 {
     CustomReportDialog *crd = data;
-    SCM guid = get_custom_report_selection(crd, _("Unable to change report name."));
+    SCM guid = get_custom_report_selection(crd, _("Unable to change report configuration name."));
     SCM unique_name_func = scm_c_eval_string("gnc:report-template-has-unique-name?");
     SCM new_name_scm = scm_from_utf8_string(new_text);
 
@@ -441,7 +441,7 @@ void custom_report_name_edited_cb(GtkCellRendererText *renderer, gchar *path, gc
         custom_report_edit_report_name (guid, crd, new_text);
     else
         gnc_error_dialog(crd->dialog, "%s",
-                         _("A custom report with this name already exists, please choose another name.") );
+                         _("A saved report configuration with this name already exists, please choose another name.") );
 
 
 }
@@ -465,11 +465,11 @@ void custom_report_query_tooltip_cb (GtkTreeView  *view,
     {
         gtk_tree_view_set_tooltip_cell (view, tooltip, path, column, NULL);
         if (column == crd->runcol)
-            gtk_tooltip_set_text (tooltip, _("Run saved report"));
+            gtk_tooltip_set_text (tooltip, _("Load report configuration"));
         else if (column == crd->editcol)
-            gtk_tooltip_set_text (tooltip, _("Edit configuration name"));
+            gtk_tooltip_set_text (tooltip, _("Edit report configuration name"));
         else if (column == crd->delcol)
-            gtk_tooltip_set_text (tooltip, _("Delete saved report"));
+            gtk_tooltip_set_text (tooltip, _("Delete report configuration"));
         else
             gtk_tooltip_set_text (tooltip, NULL);
     }
diff --git a/src/report/report-gnome/dialog-custom-report.glade b/src/report/report-gnome/dialog-custom-report.glade
index 79d000a..4247a36 100644
--- a/src/report/report-gnome/dialog-custom-report.glade
+++ b/src/report/report-gnome/dialog-custom-report.glade
@@ -5,7 +5,7 @@
   <object class="GtkDialog" id="custom_report_dialog">
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
-    <property name="title" translatable="yes">Saved Reports</property>
+    <property name="title" translatable="yes">Saved Report Configurations</property>
     <property name="window_position">center-on-parent</property>
     <property name="type_hint">dialog</property>
     <property name="skip_taskbar_hint">True</property>
@@ -28,8 +28,8 @@
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="has_tooltip">True</property>
-                <property name="tooltip_markup">Exit the custom report dialog</property>
-                <property name="tooltip_text" translatable="yes">Exit the custom report dialog</property>
+                <property name="tooltip_markup">Exit the saved report configurations dialog</property>
+                <property name="tooltip_text" translatable="yes">Exit the saved report configurations dialog</property>
                 <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
                 <signal name="clicked" handler="close_custom_report_clicked_cb" swapped="no"/>
@@ -91,9 +91,9 @@ Currently you have no saved reports.
           <object class="GtkLabel" id="label1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="label" translatable="yes">Saved reports are created by first opening a report from the Reports menu,
-altering the report's options to your taste and then choosing "Save Report" from
-the File menu or tool bar.</property>
+            <property name="label" translatable="yes">Saved report configurations are created by first opening a report from the Reports menu,
+altering the report's options to your taste and then choosing "Save Report Configuration" from
+the Reports menu or tool bar.</property>
           </object>
           <packing>
             <property name="expand">True</property>
diff --git a/src/report/report-gnome/gnc-plugin-page-report-ui.xml b/src/report/report-gnome/gnc-plugin-page-report-ui.xml
index 479631e..726426a 100644
--- a/src/report/report-gnome/gnc-plugin-page-report-ui.xml
+++ b/src/report/report-gnome/gnc-plugin-page-report-ui.xml
@@ -1,10 +1,6 @@
 <ui>
   <menubar>
     <menu name="File" action="FileAction">
-      <placeholder name="FileSavePlaceholder">
-        <menuitem name="FileReportSave" action="ReportSaveAction" />
-        <menuitem name="FileReportSaveAs" action="ReportSaveAsAction" />
-      </placeholder>
       <placeholder name="FilePrintPlaceholder">
         <menuitem name="FileExportPDF" action="FilePrintPDFAction"/>
       </placeholder>
@@ -20,6 +16,13 @@
         <menuitem name="EditReportOptions" action="ReportOptionsAction" />
       </placeholder>
     </menu>
+
+    <menu name="Reports" action="ReportsAction">
+      <placeholder name="SavedReportConfigs">
+        <menuitem name="ReportSaveConfig" action="ReportSaveAction" />
+        <menuitem name="ReportSaveConfigAs" action="ReportSaveAsAction" />
+      </placeholder>
+    </menu>
   </menubar>
 
   <popup name="MainPopup" action="FakeToplevel">
diff --git a/src/report/report-gnome/gnc-plugin-page-report.c b/src/report/report-gnome/gnc-plugin-page-report.c
index 9decd37..8ad613f 100644
--- a/src/report/report-gnome/gnc-plugin-page-report.c
+++ b/src/report/report-gnome/gnc-plugin-page-report.c
@@ -1028,14 +1028,14 @@ static GtkActionEntry report_actions[] =
         G_CALLBACK (gnc_plugin_page_report_reload_cb)
     },
     {
-        "ReportSaveAction", GTK_STOCK_SAVE, N_("Save _Report"), "<control><alt>s",
+        "ReportSaveAction", GTK_STOCK_SAVE, N_("Save _Report Configuration"), "<control><alt>s",
         N_("Update the current report's saved configuration. "
         "The report will be saved in the file ~/.gnucash/saved-reports-2.4. "),
         G_CALLBACK(gnc_plugin_page_report_save_cb)
     },
     {
-        "ReportSaveAsAction", GTK_STOCK_SAVE_AS, N_("Save Report As..."), "<control><alt><shift>s",
-        N_("Add the current report's configuration to the `Preconfigured Reports' menu. "
+        "ReportSaveAsAction", GTK_STOCK_SAVE_AS, N_("Save Report Configuration As..."), "<control><alt><shift>s",
+        N_("Add the current report's configuration to the `Saved Report Configurations' menu. "
         "The report will be saved in the file ~/.gnucash/saved-reports-2.4. "),
         G_CALLBACK(gnc_plugin_page_report_save_as_cb)
     },
diff --git a/src/report/report-gnome/report-gnome.scm b/src/report/report-gnome/report-gnome.scm
index 5dab6fc..4a67f92 100644
--- a/src/report/report-gnome/report-gnome.scm
+++ b/src/report/report-gnome/report-gnome.scm
@@ -111,10 +111,10 @@
 
   (gnc-add-scm-extension 
    (gnc:make-menu-item
-   (N_ "Saved Reports")
+   (N_ "Saved Report Configurations")
    "4d3dcdc8890b11df99dd94cddfd72085"
-   (N_ "Manage and run saved reports")
-   (list gnc:menuname-reports)
+   (N_ "Manage and run saved report configurations")
+   (list "Reports/SavedReportConfigs")
    (lambda (window)
      (gnc:spawn-custom-report-dialog window))))
 

commit cebe4ed90aa50cc6d49a7b79c1256094d7e66789
Author: Carsten Rinke <carsten.rinke at gmx.de>
Date:   Fri Feb 28 17:55:30 2014 +0100

    Update Window and Menu item from "Preconfigured-" to "Saved-" Report and add lables to the dialog with help texts

diff --git a/src/report/report-gnome/dialog-custom-report.c b/src/report/report-gnome/dialog-custom-report.c
index 65e4cce..86ecc63 100644
--- a/src/report/report-gnome/dialog-custom-report.c
+++ b/src/report/report-gnome/dialog-custom-report.c
@@ -465,11 +465,11 @@ void custom_report_query_tooltip_cb (GtkTreeView  *view,
     {
         gtk_tree_view_set_tooltip_cell (view, tooltip, path, column, NULL);
         if (column == crd->runcol)
-            gtk_tooltip_set_text (tooltip, _("Run preconfigured report"));
+            gtk_tooltip_set_text (tooltip, _("Run saved report"));
         else if (column == crd->editcol)
             gtk_tooltip_set_text (tooltip, _("Edit configuration name"));
         else if (column == crd->delcol)
-            gtk_tooltip_set_text (tooltip, _("Delete preconfigured report"));
+            gtk_tooltip_set_text (tooltip, _("Delete saved report"));
         else
             gtk_tooltip_set_text (tooltip, NULL);
     }
@@ -482,6 +482,9 @@ static CustomReportDialog *gnc_ui_custom_report_internal(GncMainWindow * window)
 
     GtkBuilder *builder;
     CustomReportDialog *crd;
+    GtkTreeIter iter;
+    GtkTreeModel *model;
+    GtkWidget *no_report_notification;
 
     crd = g_new0(CustomReportDialog, 1);
 
@@ -490,6 +493,7 @@ static CustomReportDialog *gnc_ui_custom_report_internal(GncMainWindow * window)
 
     crd->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "custom_report_dialog"));
     crd->reportview = GTK_WIDGET(gtk_builder_get_object (builder, "custom_report_list_view"));
+    no_report_notification = GTK_WIDGET(gtk_builder_get_object (builder, "label2"));
     set_reports_view_and_model(crd);
     crd->window = window;
 
@@ -498,6 +502,21 @@ static CustomReportDialog *gnc_ui_custom_report_internal(GncMainWindow * window)
 
     gtk_widget_show_all(crd->dialog);
 
+    /* check if there are currently saved reports available
+     * by checking if there is a first element */
+    model = gtk_tree_view_get_model (GTK_TREE_VIEW (crd->reportview));
+    if (gtk_tree_model_get_iter_first (model, &iter))
+    {
+		/* saved reports available
+		   -> hide the "no reports available" notification */
+		gtk_widget_hide(no_report_notification);
+	}
+	else
+	{
+		/* hide the scrolled window of the report list */
+		gtk_widget_hide(crd->reportview);
+	}
+
     g_object_unref(G_OBJECT(builder));
 
     return crd;
diff --git a/src/report/report-gnome/dialog-custom-report.glade b/src/report/report-gnome/dialog-custom-report.glade
index d86ce95..79d000a 100644
--- a/src/report/report-gnome/dialog-custom-report.glade
+++ b/src/report/report-gnome/dialog-custom-report.glade
@@ -1,47 +1,25 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy project-wide -->
   <object class="GtkDialog" id="custom_report_dialog">
+    <property name="can_focus">False</property>
     <property name="border_width">5</property>
-    <property name="title" translatable="yes">Preconfigured Reports</property>
+    <property name="title" translatable="yes">Saved Reports</property>
     <property name="window_position">center-on-parent</property>
     <property name="type_hint">dialog</property>
     <property name="skip_taskbar_hint">True</property>
     <property name="skip_pager_hint">True</property>
-    <signal name="close" handler="custom_report_dialog_close_cb"/>
+    <signal name="close" handler="custom_report_dialog_close_cb" swapped="no"/>
     <child internal-child="vbox">
       <object class="GtkVBox" id="dialog-vbox1">
         <property name="visible">True</property>
-        <property name="orientation">vertical</property>
+        <property name="can_focus">False</property>
         <property name="spacing">2</property>
-        <child>
-          <object class="GtkScrolledWindow" id="scrolledwindow1">
-            <property name="width_request">300</property>
-            <property name="height_request">150</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="hscrollbar_policy">automatic</property>
-            <property name="vscrollbar_policy">automatic</property>
-            <child>
-              <object class="GtkTreeView" id="custom_report_list_view">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="has_tooltip">True</property>
-                <property name="headers_visible">False</property>
-                <signal name="row_activated" handler="custom_report_list_view_row_activated_cb"/>
-                <signal name="button_release_event" handler="custom_report_list_view_clicked_cb"/>
-                <signal name="query_tooltip" handler="custom_report_query_tooltip_cb"/>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
         <child internal-child="action_area">
           <object class="GtkHButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="close_report_button">
@@ -52,8 +30,9 @@
                 <property name="has_tooltip">True</property>
                 <property name="tooltip_markup">Exit the custom report dialog</property>
                 <property name="tooltip_text" translatable="yes">Exit the custom report dialog</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
-                <signal name="clicked" handler="close_custom_report_clicked_cb"/>
+                <signal name="clicked" handler="close_custom_report_clicked_cb" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -64,10 +43,64 @@
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="pack_type">end</property>
             <property name="position">0</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkScrolledWindow" id="scrolledwindow1">
+            <property name="width_request">300</property>
+            <property name="height_request">150</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hscrollbar_policy">automatic</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <child>
+              <object class="GtkTreeView" id="custom_report_list_view">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_tooltip">True</property>
+                <property name="headers_visible">False</property>
+                <signal name="row-activated" handler="custom_report_list_view_row_activated_cb" swapped="no"/>
+                <signal name="button-release-event" handler="custom_report_list_view_clicked_cb" swapped="no"/>
+                <signal name="query-tooltip" handler="custom_report_query_tooltip_cb" swapped="no"/>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label2">
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">
+Currently you have no saved reports.
+</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Saved reports are created by first opening a report from the Reports menu,
+altering the report's options to your taste and then choosing "Save Report" from
+the File menu or tool bar.</property>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
       </object>
     </child>
     <action-widgets>
diff --git a/src/report/report-gnome/report-gnome.scm b/src/report/report-gnome/report-gnome.scm
index 1bed27f..5dab6fc 100644
--- a/src/report/report-gnome/report-gnome.scm
+++ b/src/report/report-gnome/report-gnome.scm
@@ -111,9 +111,9 @@
 
   (gnc-add-scm-extension 
    (gnc:make-menu-item
-   (N_ "Preconfigured Reports")
+   (N_ "Saved Reports")
    "4d3dcdc8890b11df99dd94cddfd72085"
-   (N_ "Manage and run preconfigured reports")
+   (N_ "Manage and run saved reports")
    (list gnc:menuname-reports)
    (lambda (window)
      (gnc:spawn-custom-report-dialog window))))



Summary of changes:
 src/gnome-utils/ui/gnc-main-window-ui.xml          |  8 +-
 src/report/report-gnome/dialog-custom-report.c     | 33 ++++++--
 src/report/report-gnome/dialog-custom-report.glade | 95 +++++++++++++++-------
 .../report-gnome/gnc-plugin-page-report-ui.xml     | 11 ++-
 src/report/report-gnome/gnc-plugin-page-report.c   |  6 +-
 src/report/report-gnome/report-gnome.scm           |  6 +-
 6 files changed, 106 insertions(+), 53 deletions(-)



More information about the gnucash-changes mailing list