gnucash master: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Sun Oct 6 12:49:49 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/1eb22c09 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/945a3349 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/3dfb90b3 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/71e73007 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/adb75f79 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/4b1ac6fa (commit)
	 via  https://github.com/Gnucash/gnucash/commit/b9bc1986 (commit)
	from  https://github.com/Gnucash/gnucash/commit/fa66f0fa (commit)



commit 1eb22c098f671424e5f25976632715b93aee6534
Author: Adrian Panella <ianchi74 at outlook.com>
Date:   Sat Sep 28 20:17:58 2019 -0500

    move logic out budget_col_source for performance

diff --git a/gnucash/gnome/gnc-budget-view.c b/gnucash/gnome/gnc-budget-view.c
index fc08ce891..599b28a35 100644
--- a/gnucash/gnome/gnc-budget-view.c
+++ b/gnucash/gnome/gnc-budget-view.c
@@ -1033,23 +1033,6 @@ budget_col_source(Account *account, GtkTreeViewColumn *col,
 
     note = gnc_budget_get_account_period_note(budget, account, period_num);
     g_object_set(cell, "flagged", note != NULL, NULL);
-    if (note != NULL) 
-    {
-        GdkRGBA *c;
-        GtkStateFlags state;
-        GtkStyleContext *stylectxt =
-            gtk_widget_get_style_context(GTK_WIDGET(bview));
-
-        GList *sel = gnc_tree_view_account_get_selected_accounts(GNC_TREE_VIEW_ACCOUNT(bview));
-
-        state = g_list_find(sel, account) == NULL ? GTK_STATE_FLAG_SELECTED
-                                                  : GTK_STATE_FLAG_NORMAL;
-
-        gtk_style_context_get(stylectxt, state, "background-color", &c, NULL);
-        g_object_set(cell, "flag-color-rgba", c, NULL);
-        gdk_rgba_free (c);
-        g_list_free(sel);
-    }
 
     return g_strdup(amtbuff);
 }
@@ -1406,11 +1389,18 @@ gnc_budget_view_refresh(GncBudgetView *view)
     GtkTreeViewColumn *col;
     GList *col_list;
     GList *totals_col_list;
+    GdkRGBA *note_color, *note_color_selected;
+    GtkStyleContext *stylectxt;
+
     ENTER("view %p", view);
 
     g_return_if_fail(view != NULL);
     priv = GNC_BUDGET_VIEW_GET_PRIVATE(view);
 
+    stylectxt = gtk_widget_get_style_context(GTK_WIDGET(priv->tree_view));
+    gtk_style_context_get(stylectxt, GTK_STATE_FLAG_SELECTED, "background-color", &note_color, NULL);
+    gtk_style_context_get(stylectxt, GTK_STATE_FLAG_NORMAL, "background-color", &note_color_selected, NULL);
+
     num_periods = gnc_budget_get_num_periods(priv->budget);
     col_list = priv->period_col_list;
     totals_col_list = priv->totals_col_list;
@@ -1448,6 +1438,9 @@ gnc_budget_view_refresh(GncBudgetView *view)
     while (num_periods_visible < num_periods)
     {
         GtkCellRenderer *renderer = gnc_cell_renderer_text_flag_new ();
+        g_object_set(renderer, "flag-color-rgba", note_color, NULL);
+        g_object_set(renderer, "flag-color-rgba-selected", note_color_selected, NULL);
+
         col = gnc_tree_view_account_add_custom_column_renderer(
                   GNC_TREE_VIEW_ACCOUNT(priv->tree_view), "",
                   budget_col_source, budget_col_edited, renderer);
@@ -1474,6 +1467,10 @@ gnc_budget_view_refresh(GncBudgetView *view)
 
         num_periods_visible = g_list_length(col_list);
     }
+    
+    gdk_rgba_free (note_color);
+    gdk_rgba_free (note_color_selected);
+
     priv->period_col_list = col_list;
     priv->totals_col_list = totals_col_list;
 

commit 945a3349c07af755362ea6c5998ad4101c32d6a9
Author: Adrian Panella <ianchi74 at outlook.com>
Date:   Sat Sep 28 20:17:11 2019 -0500

    add "selected" color to flag renderer

diff --git a/gnucash/gnome-utils/gnc-cell-renderer-text-flag.c b/gnucash/gnome-utils/gnc-cell-renderer-text-flag.c
index e8cda922e..a9d0a2633 100644
--- a/gnucash/gnome-utils/gnc-cell-renderer-text-flag.c
+++ b/gnucash/gnome-utils/gnc-cell-renderer-text-flag.c
@@ -59,6 +59,8 @@ enum
     PROP_FLAG_COLOR,
     PROP_FLAG_COLOR_RGBA,
     PROP_FLAGGED,
+    PROP_FLAG_COLOR_SELECTED,
+    PROP_FLAG_COLOR_RGBA_SELECTED,
 
     LAST_PROP
 };
@@ -110,6 +112,18 @@ gnc_cell_renderer_text_flag_class_init(GncCellRendererTextFlagClass *class)
                            "Flag color as a GdkRGBA", GDK_TYPE_RGBA,
                            G_PARAM_READWRITE));
 
+    g_object_class_install_property(
+        object_class, PROP_FLAG_COLOR_SELECTED,
+        g_param_spec_string("flag-color-selected", "Flag color name for selected rows",
+                            "Flag color as a string, to use in selected rows", "white",
+                            G_PARAM_WRITABLE));
+
+    g_object_class_install_property(
+        object_class, PROP_FLAG_COLOR_RGBA_SELECTED,
+        g_param_spec_boxed("flag-color-rgba-selected", "Flag color as RGBA for selected rows",
+                           "Flag color as a GdkRGBA, to use in selected rows", GDK_TYPE_RGBA,
+                           G_PARAM_READWRITE));                           
+
     g_object_class_install_property(
         object_class, PROP_FLAGGED,
         g_param_spec_boolean("flagged", "Flag set",
@@ -138,6 +152,10 @@ gnc_cell_renderer_text_flag_get_property(GObject *object, guint param_id,
       g_value_set_boxed (value, &priv->color);
       break;
 
+    case PROP_FLAG_COLOR_RGBA_SELECTED:
+      g_value_set_boxed (value, &priv->color_selected);
+      break;
+
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
         break;
@@ -154,13 +172,19 @@ gnc_cell_renderer_text_flag_set_property(GObject *object, guint param_id,
     switch (param_id)
     {
     case PROP_FLAG_COLOR:
+    case PROP_FLAG_COLOR_SELECTED:
     {
         GdkRGBA rgba;
 
         if (!g_value_get_string(value))
             break;
-        else if (gdk_rgba_parse(&rgba, g_value_get_string(value)))
-            priv->color = rgba;
+        else if (gdk_rgba_parse(&rgba, g_value_get_string(value))) 
+        {
+            if (param_id == PROP_FLAG_COLOR_SELECTED)
+                priv->color = rgba;
+            else
+                priv->color_selected = rgba;
+        }
         else
             g_warning("Don't know color '%s'", g_value_get_string(value));
     }
@@ -176,6 +200,16 @@ gnc_cell_renderer_text_flag_set_property(GObject *object, guint param_id,
     }
     break;
 
+    case PROP_FLAG_COLOR_RGBA_SELECTED:
+    {
+        GdkRGBA *rgba;
+
+        rgba = g_value_get_boxed(value);
+        if (rgba) 
+            priv->color_selected = *rgba;
+    }
+    break;
+
     case PROP_FLAGGED:
         priv->flagged = g_value_get_boolean(value);
         break;
@@ -232,7 +266,9 @@ gnc_cell_renderer_text_flag_render(GtkCellRenderer *cell, cairo_t *cr,
         cairo_rel_line_to(cr, size, 0);
         cairo_rel_line_to(cr, 0, size);
         cairo_close_path(cr);
-        gdk_cairo_set_source_rgba(cr, &priv->color);
+        gdk_cairo_set_source_rgba(cr, (flags & GTK_CELL_RENDERER_SELECTED)
+                                          ? &priv->color_selected
+                                          : &priv->color);
         cairo_fill(cr);
     }
 }
diff --git a/gnucash/gnome-utils/gnc-cell-renderer-text-flag.h b/gnucash/gnome-utils/gnc-cell-renderer-text-flag.h
index 7097dc39f..2a33464b7 100644
--- a/gnucash/gnome-utils/gnc-cell-renderer-text-flag.h
+++ b/gnucash/gnome-utils/gnc-cell-renderer-text-flag.h
@@ -42,6 +42,7 @@ typedef struct _GtkCellRendererTextPrivate
 {
     guint size;
     GdkRGBA color;
+    GdkRGBA color_selected;
     gboolean flagged;
 } GncCellRendererTextFlagPrivate;
 

commit 3dfb90b332b4e2b40fe085c43cac8766010b5897
Author: Adrian Panella <ianchi74 at outlook.com>
Date:   Sat Jun 1 20:17:30 2019 -0500

    [budget] Add tooltips to cells with notes

diff --git a/gnucash/gnome/gnc-budget-view.c b/gnucash/gnome/gnc-budget-view.c
index 81d942d68..fc08ce891 100644
--- a/gnucash/gnome/gnc-budget-view.c
+++ b/gnucash/gnome/gnc-budget-view.c
@@ -124,6 +124,9 @@ static gboolean gbv_key_press_cb(GtkWidget *treeview, GdkEventKey *event,
 static void gbv_row_activated_cb(
     GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *col,
     GncBudgetView *view);
+static gboolean query_tooltip_tree_view_cb(GtkWidget *widget, gint x, gint y,
+    gboolean keyboard_tip,
+    GtkTooltip *tooltip, GncBudgetView* view);
 #if 0
 static void gbv_selection_changed_cb(
     GtkTreeSelection *selection, GncBudgetView *view);
@@ -385,6 +388,9 @@ gbv_create_widget(GncBudgetView *view)
     // Add accounts tree view to scroll window
     gtk_container_add(GTK_CONTAINER(scrolled_window), GTK_WIDGET(tree_view));
 
+    g_object_set(tree_view, "has-tooltip", TRUE, NULL);
+    g_signal_connect(G_OBJECT(tree_view), "query-tooltip",
+                     G_CALLBACK(query_tooltip_tree_view_cb), view);
     g_signal_connect(G_OBJECT(tree_view), "row-activated",
                      G_CALLBACK(gbv_row_activated_cb), view);
 
@@ -796,6 +802,44 @@ gbv_row_activated_cb(GtkTreeView *treeview, GtkTreePath *path,
     g_signal_emit_by_name(view, "account-activated", account);
 }
 
+static gboolean
+query_tooltip_tree_view_cb(GtkWidget *widget, gint x, gint y,
+                           gboolean keyboard_tip, GtkTooltip *tooltip,
+                           GncBudgetView* view)
+{
+    GtkTreeView *tree_view = GTK_TREE_VIEW(widget);
+    GncBudgetViewPrivate *priv = GNC_BUDGET_VIEW_GET_PRIVATE(view);
+    GtkTreePath *path      = NULL;
+    GtkTreeViewColumn *column = NULL;
+    const gchar *note;
+    guint period_num;
+    Account *account;
+
+    gtk_tree_view_convert_widget_to_bin_window_coords(tree_view, x, y, &x, &y);
+
+    if (keyboard_tip || !gtk_tree_view_get_path_at_pos(tree_view, x, y, &path,
+                                                       &column, NULL, NULL))
+        return FALSE;
+
+    if (!column)
+        return FALSE;
+
+    period_num = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(column), "period_num"));
+    if (!period_num && priv->period_col_list->data != column)
+        return FALSE;
+    account = gnc_tree_view_account_get_account_from_path(
+        GNC_TREE_VIEW_ACCOUNT(widget), path);
+    note = gnc_budget_get_account_period_note(priv->budget, account, period_num);
+    if (!note)
+        return FALSE;
+
+    gtk_tooltip_set_text(tooltip, note);
+    gtk_tree_view_set_tooltip_cell(tree_view, tooltip, path, column, NULL);
+    gtk_tree_path_free(path);
+
+    return TRUE;
+}
+
 /** \brief Action for when a selection in a gnc budget view is changed
 */
 #if 0

commit 71e73007fcce7df0100019e300ca1e058f0b89e8
Author: Adrian Panella <ianchi74 at outlook.com>
Date:   Thu May 30 21:57:17 2019 -0500

    Bug 693180 - Add notes to budgeting values
    
    Adds functionality to budget register to enter notes on each
    budget
    + dialog to enter/edit/view note for cell
    + paint a flag in the cell to mark
    when it has a note attached

diff --git a/gnucash/gnome-utils/gnc-tree-view-account.c b/gnucash/gnome-utils/gnc-tree-view-account.c
index 44f9dac18..35fd96e0c 100644
--- a/gnucash/gnome-utils/gnc-tree-view-account.c
+++ b/gnucash/gnome-utils/gnc-tree-view-account.c
@@ -1882,11 +1882,28 @@ gnc_tree_view_account_add_custom_column(GncTreeViewAccount *account_view,
                                         col_edited_cb)
 {
     GtkCellRenderer *renderer;
+
+    g_return_val_if_fail(GNC_IS_TREE_VIEW_ACCOUNT(account_view), NULL);
+
+    renderer = gtk_cell_renderer_text_new();
+
+    return gnc_tree_view_account_add_custom_column_renderer(
+        account_view, column_title, col_source_cb, col_edited_cb, renderer);
+}
+
+GtkTreeViewColumn *
+gnc_tree_view_account_add_custom_column_renderer(GncTreeViewAccount *account_view,
+                                        const gchar *column_title,
+                                        GncTreeViewAccountColumnSource
+                                        col_source_cb,
+                                        GncTreeViewAccountColumnTextEdited
+                                        col_edited_cb,
+                                        GtkCellRenderer *renderer)
+{
     GtkTreeViewColumn *column;
 
     g_return_val_if_fail (GNC_IS_TREE_VIEW_ACCOUNT (account_view), NULL);
 
-    renderer = gtk_cell_renderer_text_new ();
     g_object_set (G_OBJECT (renderer), "xalign", 1.0, NULL);
 
     column = gtk_tree_view_column_new_with_attributes (column_title,
diff --git a/gnucash/gnome-utils/gnc-tree-view-account.h b/gnucash/gnome-utils/gnc-tree-view-account.h
index 9da2769cd..418a0ebda 100644
--- a/gnucash/gnome-utils/gnc-tree-view-account.h
+++ b/gnucash/gnome-utils/gnc-tree-view-account.h
@@ -198,7 +198,11 @@ GtkTreeViewColumn * gnc_tree_view_account_add_custom_column(
     GncTreeViewAccount *view, const gchar *column_title,
     GncTreeViewAccountColumnSource source_cb,
     GncTreeViewAccountColumnTextEdited edited_cb);
-
+GtkTreeViewColumn *gnc_tree_view_account_add_custom_column_renderer(
+    GncTreeViewAccount *account_view, const gchar *column_title,
+    GncTreeViewAccountColumnSource col_source_cb,
+    GncTreeViewAccountColumnTextEdited col_edited_cb,
+    GtkCellRenderer *renderer);
 void gnc_tree_view_account_set_name_edited(GncTreeViewAccount *view,
         GncTreeViewAccountColumnTextEdited edited_cb);
 void gnc_tree_view_account_name_edited_cb(Account *account, GtkTreeViewColumn *col, const gchar *new_name);
diff --git a/gnucash/gnome/gnc-budget-view.c b/gnucash/gnome/gnc-budget-view.c
index 381afac43..81d942d68 100644
--- a/gnucash/gnome/gnc-budget-view.c
+++ b/gnucash/gnome/gnc-budget-view.c
@@ -64,6 +64,7 @@
 #include "gnc-main-window.h"
 #include "gnc-component-manager.h"
 #include "gnc-state.h"
+#include "gnc-cell-renderer-text-flag.h"
 
 #include "qof.h"
 
@@ -929,6 +930,7 @@ budget_col_source(Account *account, GtkTreeViewColumn *col,
     guint period_num;
     gnc_numeric numeric;
     gchar amtbuff[100]; //FIXME: overkill, where's the #define?
+    const gchar *note;
     gboolean red = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_NEGATIVE_IN_RED);
 
     budget = GNC_BUDGET(g_object_get_data(G_OBJECT(col), "budget"));
@@ -984,6 +986,27 @@ budget_col_source(Account *account, GtkTreeViewColumn *col,
                          NULL);
         }
     }
+
+    note = gnc_budget_get_account_period_note(budget, account, period_num);
+    g_object_set(cell, "flagged", note != NULL, NULL);
+    if (note != NULL) 
+    {
+        GdkRGBA *c;
+        GtkStateFlags state;
+        GtkStyleContext *stylectxt =
+            gtk_widget_get_style_context(GTK_WIDGET(bview));
+
+        GList *sel = gnc_tree_view_account_get_selected_accounts(GNC_TREE_VIEW_ACCOUNT(bview));
+
+        state = g_list_find(sel, account) == NULL ? GTK_STATE_FLAG_SELECTED
+                                                  : GTK_STATE_FLAG_NORMAL;
+
+        gtk_style_context_get(stylectxt, state, "background-color", &c, NULL);
+        g_object_set(cell, "flag-color-rgba", c, NULL);
+        gdk_rgba_free (c);
+        g_list_free(sel);
+    }
+
     return g_strdup(amtbuff);
 }
 
@@ -1380,20 +1403,16 @@ gnc_budget_view_refresh(GncBudgetView *view)
     /* Create any needed columns */
     while (num_periods_visible < num_periods)
     {
-        GtkCellRenderer* renderer;
-
-        col = gnc_tree_view_account_add_custom_column(
+        GtkCellRenderer *renderer = gnc_cell_renderer_text_flag_new ();
+        col = gnc_tree_view_account_add_custom_column_renderer(
                   GNC_TREE_VIEW_ACCOUNT(priv->tree_view), "",
-                  budget_col_source, budget_col_edited);
+                  budget_col_source, budget_col_edited, renderer);
         g_object_set_data(G_OBJECT(col), "budget", priv->budget);
         g_object_set_data(G_OBJECT(col), "budget_view", priv->tree_view);
         g_object_set_data(G_OBJECT(col), "period_num",
                           GUINT_TO_POINTER(num_periods_visible));
         col_list = g_list_append(col_list, col);
 
-        // as we only have one renderer/column, use this function to get it
-        renderer = gnc_tree_view_column_get_renderer (col);
-
         // add some padding to the right of the numbers
         gbv_renderer_add_padding (renderer);
 
diff --git a/gnucash/gnome/gnc-plugin-page-budget.c b/gnucash/gnome/gnc-plugin-page-budget.c
index 3dba5d39b..b10ac2807 100644
--- a/gnucash/gnome/gnc-plugin-page-budget.c
+++ b/gnucash/gnome/gnc-plugin-page-budget.c
@@ -48,6 +48,7 @@
 #include "dialog-options.h"
 #include "dialog-utils.h"
 #include "gnc-gnome-utils.h"
+#include "misc-gnome-utils.h"
 #include "gnc-gobject-utils.h"
 #include "gnc-icons.h"
 #include "gnc-plugin-page-budget.h"
@@ -119,6 +120,10 @@ static void gnc_plugin_page_budget_cmd_allperiods_budget(
     GtkAction *action, GncPluginPageBudget *page);
 static void gnc_plugin_page_budget_cmd_refresh (
     GtkAction *action, GncPluginPageBudget *page);
+static void gnc_plugin_page_budget_cmd_budget_note(
+    GtkAction *action, GncPluginPageBudget *page);
+static void allperiods_budget_helper(GtkTreeModel *model, GtkTreePath *path,
+    GtkTreeIter *iter, gpointer data);
 
 static GtkActionEntry gnc_plugin_page_budget_actions [] =
 {
@@ -161,7 +166,12 @@ static GtkActionEntry gnc_plugin_page_budget_actions [] =
         N_("Edit budget for all periods for the selected accounts"),
         G_CALLBACK (gnc_plugin_page_budget_cmd_allperiods_budget)
     },
-
+    {
+        "BudgetNoteAction", "system-run", N_("Edit Note"),
+        NULL,
+        N_("Edit note for the selected account and period"),
+        G_CALLBACK (gnc_plugin_page_budget_cmd_budget_note)
+    },
     /* View menu */
     {
         "ViewFilterByAction", NULL, N_("_Filter By..."), NULL, NULL,
@@ -195,6 +205,7 @@ static action_toolbar_labels toolbar_labels[] =
     { "OptionsBudgetAction",        N_("Options") },
     { "EstimateBudgetAction",       N_("Estimate") },
     { "AllPeriodsBudgetAction",     N_("All Periods") },
+    { "BudgetNoteAction",           N_("Note") },
     { NULL, NULL },
 };
 
@@ -1138,6 +1149,82 @@ gnc_plugin_page_budget_cmd_allperiods_budget(GtkAction *action,
     g_object_unref(G_OBJECT(builder));
 }
 
+static void
+gnc_plugin_page_budget_cmd_budget_note(GtkAction *action,
+                                       GncPluginPageBudget *page)
+{
+    GncPluginPageBudgetPrivate *priv;
+    GtkTreeSelection *sel;
+    GtkWidget *dialog, *note;
+    gint result;
+    GtkBuilder *builder;
+    const gchar *txt;
+    GtkTreeViewColumn *col = NULL;
+    GtkTreePath *path = NULL;
+    guint period_num = 0;
+    Account *acc = NULL;
+
+    g_return_if_fail(GNC_IS_PLUGIN_PAGE_BUDGET(page));
+    priv = GNC_PLUGIN_PAGE_BUDGET_GET_PRIVATE(page);
+    sel  = gnc_budget_view_get_selection(priv->budget_view);
+
+    gtk_tree_view_get_cursor(
+        GTK_TREE_VIEW(gnc_budget_view_get_account_tree_view(priv->budget_view)),
+        &path, &col);
+
+    if (path)
+    {
+        period_num = col ? GPOINTER_TO_UINT(
+                               g_object_get_data(G_OBJECT(col), "period_num"))
+                         : 0;
+
+        acc = gnc_budget_view_get_account_from_path(priv->budget_view, path);
+        gtk_tree_path_free(path);
+    }
+
+    if (!acc)
+    {
+        dialog = gtk_message_dialog_new(
+            GTK_WINDOW(gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page))),
+            GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
+            GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, "%s",
+            _("You must select one budget cell to edit."));
+        gtk_dialog_run(GTK_DIALOG(dialog));
+        gtk_widget_destroy(dialog);
+        return;
+    }
+
+    builder = gtk_builder_new();
+    gnc_builder_add_from_file(builder, "gnc-plugin-page-budget.glade",
+                              "budget_note_dialog");
+
+    dialog = GTK_WIDGET(gtk_builder_get_object(builder, "budget_note_dialog"));
+
+    gtk_window_set_transient_for(
+        GTK_WINDOW(dialog),
+        GTK_WINDOW(gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page))));
+
+    note = GTK_WIDGET(gtk_builder_get_object(builder, "BudgetNote"));
+    txt  = gnc_budget_get_account_period_note(priv->budget, acc, period_num);
+    xxxgtk_textview_set_text(GTK_TEXT_VIEW(note), txt);
+
+    gtk_widget_show_all(dialog);
+    result = gtk_dialog_run(GTK_DIALOG(dialog));
+    switch (result)
+    {
+    case GTK_RESPONSE_OK:
+        txt = xxxgtk_textview_get_text(GTK_TEXT_VIEW(note));
+        if (!strlen(txt))
+            txt = NULL;
+        gnc_budget_set_account_period_note(priv->budget, acc, period_num, txt);
+        break;
+    default:
+        break;
+    }
+    gtk_widget_destroy(dialog);
+    g_object_unref(G_OBJECT(builder));
+}
+
 static void
 gnc_plugin_page_budget_cmd_view_filter_by (GtkAction *action,
         GncPluginPageBudget *page)
diff --git a/gnucash/gnucash-fallback-310.css b/gnucash/gnucash-fallback-310.css
index e87b84a39..dafc900fe 100644
--- a/gnucash/gnucash-fallback-310.css
+++ b/gnucash/gnucash-fallback-310.css
@@ -75,4 +75,3 @@
 *.markers-dark {
   background-color: shade (@marker_bg_color, 0.8);
 }
-
diff --git a/gnucash/gtkbuilder/gnc-plugin-page-budget.glade b/gnucash/gtkbuilder/gnc-plugin-page-budget.glade
index fcf780407..99a3c5569 100644
--- a/gnucash/gtkbuilder/gnc-plugin-page-budget.glade
+++ b/gnucash/gtkbuilder/gnc-plugin-page-budget.glade
@@ -808,4 +808,119 @@
       <action-widget response="-7">close_button</action-widget>
     </action-widgets>
   </object>
+  <object class="GtkDialog" id="budget_note_dialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Budget Notes</property>
+    <property name="modal">True</property>
+    <property name="type_hint">dialog</property>
+    <child>
+      <placeholder/>
+    </child>
+    <child internal-child="vbox">
+      <object class="GtkBox">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="cancelbutton4">
+                <property name="label" translatable="yes">_Cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="okbutton4">
+                <property name="label" translatable="yes">_OK</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="vbox2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkLabel" id="NoteLabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">start</property>
+                <property name="valign">start</property>
+                <property name="label" translatable="yes">
+Enter Note:
+</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkScrolledWindow">
+            <property name="width_request">450</property>
+            <property name="height_request">100</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="margin_bottom">5</property>
+            <property name="shadow_type">in</property>
+            <child>
+              <object class="GtkTextView" id="BudgetNote">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="wrap_mode">word</property>
+                <property name="accepts_tab">False</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="-6">cancelbutton4</action-widget>
+      <action-widget response="-5">okbutton4</action-widget>
+    </action-widgets>
+  </object>
 </interface>
diff --git a/gnucash/ui/gnc-plugin-page-budget-ui.xml b/gnucash/ui/gnc-plugin-page-budget-ui.xml
index 9f45fe45a..cc76a31cf 100644
--- a/gnucash/ui/gnc-plugin-page-budget-ui.xml
+++ b/gnucash/ui/gnc-plugin-page-budget-ui.xml
@@ -5,6 +5,7 @@
         <menuitem name="Estimate" action="EstimateBudgetAction"/>
         <menuitem name="AllPeriods" action="AllPeriodsBudgetAction"/>
         <menuitem name="Delete" action="DeleteBudgetAction"/>
+        <menuitem name="Note" action="BudgetNoteAction"/>
       </placeholder>
       <menuitem name="Options" action="OptionsBudgetAction"/>
     </menu>
@@ -14,6 +15,9 @@
     <placeholder name="PopupPlaceholder1">
       <menuitem name="Options" action="OptionsBudgetAction"/>
     </placeholder>
+    <placeholder name="PopupPlaceholder2">
+      <menuitem name="Note" action="BudgetNoteAction"/>
+    </placeholder>
   </popup>
 
   <toolbar name="DefaultToolbar">
@@ -25,6 +29,7 @@
       <toolitem name="Estimate" action="EstimateBudgetAction"/>
       <toolitem name="AllPeriods" action="AllPeriodsBudgetAction"/>
       <toolitem name="Delete" action="DeleteBudgetAction"/>
+      <toolitem name="Note" action="BudgetNoteAction"/>
     </placeholder>
   </toolbar>
 </ui>

commit adb75f791c66a34ec8ec6d58306d58f1689b2576
Author: Adrian Panella <ianchi74 at outlook.com>
Date:   Sat Jun 1 19:19:44 2019 -0500

    Create a cellrenderer with flag
    
    Add utility CellRendererTextFlag which extends the
    std renderer to allow to flag a cell with a color triangle
    in the top right corner.

diff --git a/gnucash/gnome-utils/CMakeLists.txt b/gnucash/gnome-utils/CMakeLists.txt
index 45cc0de36..7f6caf2a8 100644
--- a/gnucash/gnome-utils/CMakeLists.txt
+++ b/gnucash/gnome-utils/CMakeLists.txt
@@ -50,6 +50,7 @@ set (gnome_utils_SOURCES
   gnc-cell-renderer-date.c
   gnc-cell-renderer-popup.c
   gnc-cell-renderer-popup-entry.c
+  gnc-cell-renderer-text-flag.c
   gnc-combott.c
   gnc-commodity-edit.c
   gnc-currency-edit.c
@@ -137,6 +138,7 @@ set (gnome_utils_HEADERS
   gnc-cell-renderer-date.h
   gnc-cell-renderer-popup.h
   gnc-cell-renderer-popup-entry.h
+  gnc-cell-renderer-text-flag.h
   gnc-combott.h
   gnc-commodity-edit.h
   gnc-currency-edit.h
diff --git a/gnucash/gnome-utils/gnc-cell-renderer-text-flag.c b/gnucash/gnome-utils/gnc-cell-renderer-text-flag.c
new file mode 100644
index 000000000..e8cda922e
--- /dev/null
+++ b/gnucash/gnome-utils/gnc-cell-renderer-text-flag.c
@@ -0,0 +1,238 @@
+/**
+ * gnc-cell-renderer-text-flag.c -- text cell renderer with flag.
+ *
+ * Copyright (C) 2019 Adrian Panella <ianchi74 at outlook.com>
+ * All rights reserved.
+ **/
+
+/* GnuCash is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * Gnucash is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, contact:
+ *
+ * Free Software Foundation           Voice:  +1-617-542-5942
+ * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652
+ * Boston, MA  02110-1301,  USA       gnu at gnu.org
+ */
+
+#include <config.h>
+#include <gtk/gtk.h>
+
+#include "gnc-cell-renderer-text-flag.h"
+
+/**
+ * @Title: GncCellRendererTextFlag
+ *
+ * A #GncCellRendererTextFlag extends the GtkCellRendererText
+ * adding the avility to show a color triangle on the top right corner
+ * to flag the cell.
+ */
+
+
+static void gnc_cell_renderer_text_flag_get_property(GObject *object,
+                                                     guint param_id,
+                                                     GValue *value,
+                                                     GParamSpec *pspec);
+static void gnc_cell_renderer_text_flag_set_property(GObject *object,
+                                                     guint param_id,
+                                                     const GValue *value,
+                                                     GParamSpec *pspec);
+
+static void gnc_cell_renderer_text_flag_render(
+    GtkCellRenderer *cell, cairo_t *cr, GtkWidget *widget,
+    const GdkRectangle *background_area, const GdkRectangle *cell_area,
+    GtkCellRendererState flags);
+
+enum
+{
+    PROP_0,
+
+    PROP_FLAG_SIZE,
+    PROP_FLAG_COLOR,
+    PROP_FLAG_COLOR_RGBA,
+    PROP_FLAGGED,
+
+    LAST_PROP
+};
+
+G_DEFINE_TYPE_WITH_PRIVATE(GncCellRendererTextFlag,
+                           gnc_cell_renderer_text_flag,
+                           GTK_TYPE_CELL_RENDERER_TEXT)
+
+static void
+gnc_cell_renderer_text_flag_init(GncCellRendererTextFlag *celltext)
+{
+    GncCellRendererTextFlagPrivate *priv;
+    GtkCellRendererText *cell = GTK_CELL_RENDERER_TEXT(celltext);
+
+    celltext->priv =
+        gnc_cell_renderer_text_flag_get_instance_private(celltext);
+    priv = celltext->priv;
+
+    priv->size = 8;
+    gdk_rgba_parse(&priv->color, "red");
+    priv->flagged = FALSE;
+}
+
+static void
+gnc_cell_renderer_text_flag_class_init(GncCellRendererTextFlagClass *class)
+{
+    GObjectClass *object_class       = G_OBJECT_CLASS(class);
+    GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(class);
+
+    object_class->get_property = gnc_cell_renderer_text_flag_get_property;
+    object_class->set_property = gnc_cell_renderer_text_flag_set_property;
+
+    cell_class->render = gnc_cell_renderer_text_flag_render;
+
+    g_object_class_install_property(
+        object_class, PROP_FLAG_SIZE,
+        g_param_spec_int("flag-size", "Flag size", "Flag size", 0, 50,
+                         8, G_PARAM_READWRITE));
+
+    g_object_class_install_property(
+        object_class, PROP_FLAG_COLOR,
+        g_param_spec_string("flag-color", "Flag color name",
+                            "Flag color as a string", "red",
+                            G_PARAM_WRITABLE));
+
+    g_object_class_install_property(
+        object_class, PROP_FLAG_COLOR_RGBA,
+        g_param_spec_boxed("flag-color-rgba", "Flag color as RGBA",
+                           "Flag color as a GdkRGBA", GDK_TYPE_RGBA,
+                           G_PARAM_READWRITE));
+
+    g_object_class_install_property(
+        object_class, PROP_FLAGGED,
+        g_param_spec_boolean("flagged", "Flag set",
+                             "Flag indicator is set", FALSE,
+                             G_PARAM_READWRITE));
+}
+
+static void
+gnc_cell_renderer_text_flag_get_property(GObject *object, guint param_id,
+                                         GValue *value, GParamSpec *pspec)
+{
+    GncCellRendererTextFlag *celltext    = GNC_CELL_RENDERER_TEXT_FLAG(object);
+    GncCellRendererTextFlagPrivate *priv = celltext->priv;
+
+    switch (param_id)
+    {
+    case PROP_FLAGGED:
+        g_value_set_boolean(value, priv->flagged);
+        break;
+
+    case PROP_FLAG_SIZE:
+        g_value_set_int(value, priv->size);
+        break;
+
+    case PROP_FLAG_COLOR_RGBA:
+      g_value_set_boxed (value, &priv->color);
+      break;
+
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
+        break;
+    }
+}
+
+static void
+gnc_cell_renderer_text_flag_set_property(GObject *object, guint param_id,
+                                         const GValue *value,
+                                         GParamSpec *pspec)
+{
+    GncCellRendererTextFlag *celltext    = GNC_CELL_RENDERER_TEXT_FLAG(object);
+    GncCellRendererTextFlagPrivate *priv = celltext->priv;
+    switch (param_id)
+    {
+    case PROP_FLAG_COLOR:
+    {
+        GdkRGBA rgba;
+
+        if (!g_value_get_string(value))
+            break;
+        else if (gdk_rgba_parse(&rgba, g_value_get_string(value)))
+            priv->color = rgba;
+        else
+            g_warning("Don't know color '%s'", g_value_get_string(value));
+    }
+    break;
+
+    case PROP_FLAG_COLOR_RGBA:
+    {
+        GdkRGBA *rgba;
+
+        rgba = g_value_get_boxed(value);
+        if (rgba) 
+            priv->color = *rgba;
+    }
+    break;
+
+    case PROP_FLAGGED:
+        priv->flagged = g_value_get_boolean(value);
+        break;
+
+    case PROP_FLAG_SIZE:
+        priv->size = g_value_get_int(value);
+        break;
+
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
+        break;
+    }
+}
+
+/**
+ * gnc_cell_renderer_text_flag_new:
+ *
+ * Creates a new #GtkCellRendererTextFlag. 
+ * It is a standard GtkCellRendererText extended to optionally show a
+ * coloured triangle as a flag in the top right corner
+ *
+ * Returns: the new cell renderer
+ **/
+GtkCellRenderer *
+gnc_cell_renderer_text_flag_new(void)
+{
+    return g_object_new(GNC_TYPE_CELL_RENDERER_TEXT_FLAG, NULL);
+}
+
+static void
+gnc_cell_renderer_text_flag_render(GtkCellRenderer *cell, cairo_t *cr,
+                                   GtkWidget *widget,
+                                   const GdkRectangle *background_area,
+                                   const GdkRectangle *cell_area,
+                                   GtkCellRendererState flags)
+
+{
+    GncCellRendererTextFlag *celltext    = GNC_CELL_RENDERER_TEXT_FLAG(cell);
+    GncCellRendererTextFlagPrivate *priv = celltext->priv;
+
+    // call the parent renderer to do the standard drawing
+    GTK_CELL_RENDERER_CLASS(gnc_cell_renderer_text_flag_parent_class)
+        ->render(cell, cr, widget, background_area, cell_area, flags);
+
+    // add the flag (triangle in the top right corner)
+    if (priv->flagged) 
+    {
+        guint size = MIN(MIN(background_area->height, priv->size),
+                         background_area->width);
+        double x   = background_area->x + background_area->width - size;
+        double y   = background_area->y;
+
+        cairo_move_to(cr, x, y);
+        cairo_rel_line_to(cr, size, 0);
+        cairo_rel_line_to(cr, 0, size);
+        cairo_close_path(cr);
+        gdk_cairo_set_source_rgba(cr, &priv->color);
+        cairo_fill(cr);
+    }
+}
diff --git a/gnucash/gnome-utils/gnc-cell-renderer-text-flag.h b/gnucash/gnome-utils/gnc-cell-renderer-text-flag.h
new file mode 100644
index 000000000..7097dc39f
--- /dev/null
+++ b/gnucash/gnome-utils/gnc-cell-renderer-text-flag.h
@@ -0,0 +1,64 @@
+/**
+ * gnc-cell-renderer-text-flag.h -- text cell renderer with flag.
+ * 
+ * Copyright (C) 2019 Adrian Panella <ianchi74 at outlook.com>
+ * All rights reserved.
+ **/
+
+/* GnuCash is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * Gnucash is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, contact:
+ *
+ * Free Software Foundation           Voice:  +1-617-542-5942
+ * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652
+ * Boston, MA  02110-1301,  USA       gnu at gnu.org
+ */
+
+#ifndef __GNC_CELL_RENDERER_TEXT_FLAG_H__
+#define __GNC_CELL_RENDERER_TEXT_FLAG_H__
+
+#include <gtk/gtkcellrenderertext.h>
+
+
+#define GNC_TYPE_CELL_RENDERER_TEXT_FLAG		(gnc_cell_renderer_text_flag_get_type ())
+#define GNC_CELL_RENDERER_TEXT_FLAG(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_CELL_RENDERER_TEXT_FLAG, GncCellRendererTextFlag))
+#define GNC_CELL_RENDERER_TEXT_FLAG_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_CELL_RENDERER_TEXT_FLAG, GncCellRendererTextFlagClass))
+#define GNC_IS_CELL_RENDERER_TEXT_FLAG(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_CELL_RENDERER_TEXT_FLAG))
+#define GNC_IS_CELL_RENDERER_TEXT_FLAG_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_CELL_RENDERER_TEXT_FLAG))
+#define GNC_CELL_RENDERER_TEXT_FLAG_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_CELL_RENDERER_TEXT_FLAG, GncCellRendererTextFlagClass))
+
+typedef struct _GncCellRendererTextFlag              GncCellRendererTextFlag;
+typedef struct _GncCellRendererTextFlagClass         GncCellRendererTextFlagClass;
+typedef struct _GtkCellRendererTextPrivate
+{
+    guint size;
+    GdkRGBA color;
+    gboolean flagged;
+} GncCellRendererTextFlagPrivate;
+
+struct _GncCellRendererTextFlag
+{
+  GtkCellRendererText parent;
+
+  /*< private >*/
+  GncCellRendererTextFlagPrivate *priv;
+};
+
+struct _GncCellRendererTextFlagClass
+{
+  GtkCellRendererTextClass parent_class;
+};
+
+GType gnc_cell_renderer_text_flag_get_type(void) G_GNUC_CONST;
+GtkCellRenderer *gnc_cell_renderer_text_flag_new(void);
+
+#endif /* __GNC_CELL_RENDERER_TEXT_FLAG_H__ */
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3c01c283d..75ba04f1f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -141,6 +141,7 @@ gnucash/gnome-utils/gnc-autosave.c
 gnucash/gnome-utils/gnc-cell-renderer-date.c
 gnucash/gnome-utils/gnc-cell-renderer-popup.c
 gnucash/gnome-utils/gnc-cell-renderer-popup-entry.c
+gnucash/gnome-utils/gnc-cell-renderer-text-flag.c
 gnucash/gnome-utils/gnc-combott.c
 gnucash/gnome-utils/gnc-commodity-edit.c
 gnucash/gnome-utils/gnc-currency-edit.c

commit 4b1ac6fa136e4354ca9bf68605ce99b6a0f98cab
Author: Adrian Panella <ianchi74 at outlook.com>
Date:   Thu May 30 21:56:35 2019 -0500

    [budget] Add 'notes' functionality to engine
    
    Add ability to save notes on each budget value (account/period).

diff --git a/libgnucash/engine/gnc-budget.c b/libgnucash/engine/gnc-budget.c
index 7b435dd54..15df47596 100644
--- a/libgnucash/engine/gnc-budget.c
+++ b/libgnucash/engine/gnc-budget.c
@@ -589,6 +589,60 @@ gnc_budget_get_account_period_value(const GncBudget *budget,
 }
 
 
+void
+gnc_budget_set_account_period_note(GncBudget *budget, const Account *account,
+                                    guint period_num, const gchar *note)
+{
+    gchar path_part_one [GUID_ENCODING_LENGTH + 1];
+    gchar path_part_two [GNC_BUDGET_MAX_NUM_PERIODS_DIGITS];
+
+    /* Watch out for an off-by-one error here:
+     * period_num starts from 0 while num_periods starts from 1 */
+    if (period_num >= GET_PRIVATE(budget)->num_periods)
+    {
+        PWARN("Period %i does not exist", period_num);
+        return;
+    }
+
+    g_return_if_fail (budget != NULL);
+    g_return_if_fail (account != NULL);
+
+    make_period_path (account, period_num, path_part_one, path_part_two);
+
+    gnc_budget_begin_edit(budget);
+    if (note == NULL)
+        qof_instance_set_kvp (QOF_INSTANCE (budget), NULL, 3, GNC_BUDGET_NOTES_PATH, path_part_one, path_part_two);
+    else
+    {
+        GValue v = G_VALUE_INIT;
+        g_value_init (&v, G_TYPE_STRING);
+        g_value_set_string (&v, note);
+
+        qof_instance_set_kvp (QOF_INSTANCE (budget), &v, 3, GNC_BUDGET_NOTES_PATH, path_part_one, path_part_two);
+    }
+    qof_instance_set_dirty(&budget->inst);
+    gnc_budget_commit_edit(budget);
+
+    qof_event_gen( &budget->inst, QOF_EVENT_MODIFY, NULL);
+
+}
+
+const gchar *
+gnc_budget_get_account_period_note(const GncBudget *budget,
+                                   const Account *account, guint period_num)
+{
+    gchar path_part_one [GUID_ENCODING_LENGTH + 1];
+    gchar path_part_two [GNC_BUDGET_MAX_NUM_PERIODS_DIGITS];
+    GValue v = G_VALUE_INIT;
+
+    g_return_val_if_fail(GNC_IS_BUDGET(budget), NULL);
+    g_return_val_if_fail(account, NULL);
+
+    make_period_path (account, period_num, path_part_one, path_part_two);
+    qof_instance_get_kvp (QOF_INSTANCE (budget), &v, 3, GNC_BUDGET_NOTES_PATH, path_part_one, path_part_two);
+    return (G_VALUE_HOLDS_STRING(&v)) ? g_value_get_string(&v) : NULL;
+}
+
 time64
 gnc_budget_get_period_start_date(const GncBudget *budget, guint period_num)
 {
diff --git a/libgnucash/engine/gnc-budget.h b/libgnucash/engine/gnc-budget.h
index 548275833..e788de751 100644
--- a/libgnucash/engine/gnc-budget.h
+++ b/libgnucash/engine/gnc-budget.h
@@ -90,6 +90,8 @@ GType gnc_budget_get_type(void);
 
 #define GNC_BUDGET_MAX_NUM_PERIODS_DIGITS 3 // max num periods == 999
 
+#define GNC_BUDGET_NOTES_PATH "notes"
+
 gboolean gnc_budget_register(void);
 
 /**
@@ -150,6 +152,11 @@ gnc_numeric gnc_budget_get_account_period_value(
 gnc_numeric gnc_budget_get_account_period_actual_value(
     const GncBudget *budget, Account *account, guint period_num);
 
+void gnc_budget_set_account_period_note(GncBudget *budget,
+    const Account *account, guint period_num, const gchar *note);
+const gchar *gnc_budget_get_account_period_note(const GncBudget *budget,
+    const Account *account, guint period_num);
+
 /* Returns some budget in the book, or NULL. */
 GncBudget* gnc_budget_get_default(QofBook *book);
 

commit b9bc1986f3775e8d7ca5f9a8aadd688dd1a7167e
Author: Adrian Panella <ianchi74 at outlook.com>
Date:   Fri May 31 19:15:12 2019 -0500

    [budget] remove unused code/variables

diff --git a/gnucash/gnome/gnc-budget-view.c b/gnucash/gnome/gnc-budget-view.c
index 9846e5e3f..381afac43 100644
--- a/gnucash/gnome/gnc-budget-view.c
+++ b/gnucash/gnome/gnc-budget-view.c
@@ -215,7 +215,6 @@ static void
 gnc_budget_view_init(GncBudgetView *budget_view)
 {
     GncBudgetViewPrivate *priv;
-    Account* root;
     gint num_top_accounts;
     gint i;
 
@@ -225,11 +224,8 @@ gnc_budget_view_init(GncBudgetView *budget_view)
 
     priv = GNC_BUDGET_VIEW_GET_PRIVATE(budget_view);
 
-    /* Keep track of the root and top level asset, liability, income and expense accounts */
-    root = gnc_book_get_root_account(gnc_get_current_book());
-    num_top_accounts = gnc_account_n_children(root);
-
-    priv->rootAcct = root;
+    /* Keep track of the root account */
+    priv->rootAcct = gnc_book_get_root_account(gnc_get_current_book());
 
     LEAVE("");
 }



Summary of changes:
 gnucash/gnome-utils/CMakeLists.txt                |   2 +
 gnucash/gnome-utils/gnc-cell-renderer-text-flag.c | 274 ++++++++++++++++++++++
 gnucash/gnome-utils/gnc-cell-renderer-text-flag.h |  65 +++++
 gnucash/gnome-utils/gnc-tree-view-account.c       |  19 +-
 gnucash/gnome-utils/gnc-tree-view-account.h       |   6 +-
 gnucash/gnome/gnc-budget-view.c                   |  80 ++++++-
 gnucash/gnome/gnc-plugin-page-budget.c            |  89 ++++++-
 gnucash/gnucash-fallback-310.css                  |   1 -
 gnucash/gtkbuilder/gnc-plugin-page-budget.glade   | 115 +++++++++
 gnucash/ui/gnc-plugin-page-budget-ui.xml          |   5 +
 libgnucash/engine/gnc-budget.c                    |  54 +++++
 libgnucash/engine/gnc-budget.h                    |   7 +
 po/POTFILES.in                                    |   1 +
 13 files changed, 702 insertions(+), 16 deletions(-)
 create mode 100644 gnucash/gnome-utils/gnc-cell-renderer-text-flag.c
 create mode 100644 gnucash/gnome-utils/gnc-cell-renderer-text-flag.h



More information about the gnucash-changes mailing list