gnucash stable: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Wed Jun 7 23:42:21 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/3307b802 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/6cc6ac86 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0f2c6a00 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/98b43768 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/3bff7c92 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/4bbcde72 (commit)
	from  https://github.com/Gnucash/gnucash/commit/3ccb5c48 (commit)



commit 3307b802feb360b2c9f90114730512e453f02b45
Merge: 3ccb5c4896 6cc6ac8681
Author: John Ralls <jralls at ceridwen.us>
Date:   Wed Jun 7 19:51:33 2023 -0700

    Merge Richard Cohen's 'remove-unused-remnants-of-register2' into stable.
    message to explain why this merge is necessary, # especially if it merges
    an updated upstream into a topic branch. # # Lines starting with '#' will
    be ignored, and an empty message aborts # the commit.


commit 6cc6ac86817b3cdbb77c2766f79192bad301d978
Author: Richard Cohen <richard at daijobu.co.uk>
Date:   Wed May 31 10:58:14 2023 +0100

    Refactor: remove unused GncCellRendererPopupEntry

diff --git a/gnucash/gnome-utils/CMakeLists.txt b/gnucash/gnome-utils/CMakeLists.txt
index c73c4aadcd..e02b68795e 100644
--- a/gnucash/gnome-utils/CMakeLists.txt
+++ b/gnucash/gnome-utils/CMakeLists.txt
@@ -50,7 +50,6 @@ set (gnome_utils_SOURCES
   gnc-amount-edit.c
   gnc-autoclear.c
   gnc-autosave.c
-  gnc-cell-renderer-popup-entry.c
   gnc-cell-renderer-text-flag.c
   gnc-cell-renderer-text-view.c
   gnc-cell-view.c
@@ -137,7 +136,6 @@ set (gnome_utils_HEADERS
   gnc-account-sel.h
   gnc-amount-edit.h
   gnc-autoclear.h
-  gnc-cell-renderer-popup-entry.h
   gnc-cell-renderer-text-flag.h
   gnc-cell-renderer-text-view.h
   gnc-cell-view.h
diff --git a/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.c b/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.c
deleted file mode 100644
index 30723b13c4..0000000000
--- a/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.c
+++ /dev/null
@@ -1,356 +0,0 @@
-/*************************************************************************
- * The following code has come from Planner. This code implements a
- * GtkCalendar in a custom GtkCellEditable popup from GtkCellRenderer.
- *
- * These files have been renamed and changed to remove code not required
- * and to remove a dependency on libplanner.
- *
- * Copyright (C) 2012 Robert Fewell
- *
- * Copyright (C) 2001-2002 CodeFactory AB
- * Copyright (C) 2001-2002 Richard Hult <richard at imendio.com>
- * Copyright (C) 2001-2002 Mikael Hallendal <micke at imendio.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *************************************************************************/
-#include <config.h>
-
-#include <gtk/gtk.h>
-#include <glib/gi18n.h>
-#include <gdk/gdkkeysyms.h>
-#include <string.h>
-
-#include "gnc-cell-renderer-popup-entry.h"
-#include "dialog-utils.h"
-#include "gnc-date.h"
-
-static void     gpw_cell_editable_init     (GtkCellEditableIface *iface);
-static gboolean gpw_key_press_event        (GtkWidget            *box,
-                                            GdkEventKey          *key_event);
-
-static void     gpw_set_property           (GObject             *object,
-                                            guint                param_id,
-                                            const GValue        *value,
-                                            GParamSpec          *pspec);
-
-static void     gpw_get_property           (GObject             *object,
-                                            guint                param_id,
-                                            GValue              *value,
-                                            GParamSpec          *pspec);
-
-enum
-{
-    ARROW_CLICKED,
-    LAST_SIGNAL
-};
-
-enum
-{
-    PROP_0,
-    PROP_EDITING_CANCELED,
-};
-
-static guint signals[LAST_SIGNAL];
-
-G_DEFINE_TYPE_WITH_CODE (GncPopupEntry, gnc_popup_entry, GTK_TYPE_EVENT_BOX,
-    G_IMPLEMENT_INTERFACE (GTK_TYPE_EDITABLE, gpw_cell_editable_init))
-
-static void
-gnc_popup_entry_init (GncPopupEntry *widget)
-{
-    GtkWidget *arrow;
-    GtkStyleContext *context;
-
-    widget->editing_canceled = FALSE;
-
-    widget->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-    gtk_box_set_homogeneous (GTK_BOX(widget->hbox), FALSE);
-    gtk_widget_show (widget->hbox);
-
-    widget->entry = g_object_new (GTK_TYPE_ENTRY, "has_frame", FALSE, NULL);
-    gtk_entry_set_visibility (GTK_ENTRY(widget->entry), TRUE);
-    gtk_widget_show (widget->entry);
-
-    context = gtk_widget_get_style_context (widget->entry);
-    gtk_style_context_add_class (context, "combo");
-
-    widget->button = gtk_button_new ();
-    gtk_widget_show (widget->button);
-
-    context = gtk_widget_get_style_context (widget->button);
-    gtk_style_context_add_class (context, "combo");
-
-    arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
-    gtk_widget_show (arrow);
-
-    gtk_container_add (GTK_CONTAINER(widget->button), arrow);
-
-    gtk_box_pack_start (GTK_BOX(widget->hbox), widget->entry, TRUE, TRUE, 0);
-    gtk_box_pack_start (GTK_BOX(widget->hbox), widget->button, FALSE, TRUE, 0);
-
-    gtk_container_add (GTK_CONTAINER(widget), widget->hbox);
-
-    gtk_widget_set_can_focus (GTK_WIDGET(widget), TRUE);
-    gtk_widget_add_events (GTK_WIDGET(widget), GDK_KEY_PRESS_MASK);
-    gtk_widget_add_events (GTK_WIDGET(widget), GDK_KEY_RELEASE_MASK);
-}
-
-static void
-gpw_grab_focus (GtkWidget *box)
-{
-    GncPopupEntry *widget = GNC_POPUP_ENTRY(box);
-    gtk_widget_grab_focus (widget->entry);
-}
-
-static void
-gnc_popup_entry_class_init (GncPopupEntryClass *klass)
-{
-    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
-    GObjectClass   *gobject_class = G_OBJECT_CLASS(klass);
-
-    widget_class->key_press_event = gpw_key_press_event;
-    widget_class->grab_focus = gpw_grab_focus;
-
-    gobject_class->set_property = gpw_set_property;
-    gobject_class->get_property = gpw_get_property;
-
-    g_object_class_override_property (gobject_class,
-                                      PROP_EDITING_CANCELED,
-                                      "editing-canceled");
-
-    signals[ARROW_CLICKED] = g_signal_new
-                             ("arrow-clicked",
-                              G_TYPE_FROM_CLASS (klass),
-                              G_SIGNAL_RUN_LAST,
-                              0,
-                              NULL, NULL,
-                              g_cclosure_marshal_VOID__VOID,
-                              G_TYPE_NONE, 0);
-
-}
-
-static void
-gpw_set_property (GObject *object, guint param_id,
-                  const GValue *value, GParamSpec *pspec)
-{
-    GncPopupEntry *pe = GNC_POPUP_ENTRY(object);
-
-    switch (param_id)
-    {
-        case PROP_EDITING_CANCELED:
-            pe->editing_canceled = g_value_get_boolean (value);
-            break;
-
-        default:
-            G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
-            break;
-    }
-}
-
-static void
-gpw_get_property (GObject *object, guint param_id,
-                  GValue *value, GParamSpec *pspec)
-{
-    GncPopupEntry *pe = GNC_POPUP_ENTRY(object);
-
-    switch (param_id)
-    {
-        case PROP_EDITING_CANCELED:
-            g_value_set_boolean (value, pe->editing_canceled);
-            break;
-
-        default:
-            G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
-            break;
-    }
-}
-
-static void
-gpw_arrow_clicked (GtkWidget *button, GncPopupEntry *widget)
-{
-    g_signal_emit (widget, signals[ARROW_CLICKED], 0);
-}
-
-/* GtkCellEditable method implementations
- */
-static void
-gtk_cell_editable_entry_activated (GtkEntry *entry, GncPopupEntry *widget)
-{
-    gtk_cell_editable_editing_done (GTK_CELL_EDITABLE(widget));
-    gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE(widget));
-}
-
-static gboolean
-gtk_cell_editable_key_press_event (GtkEntry      *entry,
-                                   GdkEventKey   *key_event,
-                                   GncPopupEntry *widget)
-{
-    const char *date_string;
-    gint year = 0, month = 0, day = 0;
-    struct tm when;
-
-    if (key_event->keyval == GDK_KEY_Escape)
-    {
-        widget->editing_canceled = TRUE;
-
-        gtk_cell_editable_editing_done (GTK_CELL_EDITABLE(widget));
-        gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE(widget));
-
-        return TRUE;
-    }
-
-    date_string = gtk_entry_get_text (entry);
-
-    memset (&when, 0, sizeof (when));
-
-    if (qof_scan_date (date_string, &day, &month, &year))
-    {
-        gchar *datestr;
-        when.tm_year = year - 1900;
-        when.tm_mon = month - 1;
-        when.tm_mday = day;
-
-        if (!gnc_handle_date_accelerator (key_event, &when, date_string))
-            return FALSE;
-
-        datestr = qof_print_date (gnc_mktime (&when));
-        gtk_entry_set_text (entry, datestr);
-        g_free (datestr);
-
-        gtk_widget_grab_focus (GTK_WIDGET(entry));
-        return TRUE;
-    }
-    return FALSE;
-}
-
-static gboolean
-gpw_key_press_event (GtkWidget   *box,
-                     GdkEventKey *key_event)
-{
-    GncPopupEntry *widget = GNC_POPUP_ENTRY(box);
-    GdkEvent       tmp_event;
-
-    gtk_widget_grab_focus (widget->entry);
-
-    if (key_event->keyval == GDK_KEY_Escape)
-    {
-        widget->editing_canceled = TRUE;
-
-        gtk_cell_editable_editing_done (GTK_CELL_EDITABLE(widget));
-        gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE(widget));
-
-        return TRUE;
-    }
-
-    if (key_event->keyval == GDK_KEY_Left)
-    {
-        gtk_editable_set_position (GTK_EDITABLE(widget->entry), 0);
-        return TRUE;
-    }
-
-    if (key_event->keyval == GDK_KEY_Right)
-    {
-        gtk_editable_set_position (GTK_EDITABLE(widget->entry), -1);
-        return TRUE;
-    }
-
-    /* Hackish :/ Synthesize a key press event for the entry. */
-    memcpy (&tmp_event, key_event, sizeof (GdkEventKey));
-
-    tmp_event.key.window = gtk_widget_get_window (widget->entry);
-    tmp_event.key.send_event = TRUE;
-
-    gtk_widget_event (widget->entry, &tmp_event);
-
-    return GTK_WIDGET_CLASS (gnc_popup_entry_parent_class)->key_press_event (GTK_WIDGET(widget),
-                                                             key_event);
-}
-
-static void
-gpw_start_editing (GtkCellEditable *cell_editable,
-                   GdkEvent        *event)
-{
-    GncPopupEntry *widget = GNC_POPUP_ENTRY(cell_editable);
-
-    gtk_editable_select_region (GTK_EDITABLE(widget->entry), 0, -1);
-
-    g_signal_connect (G_OBJECT(widget->entry),
-                      "activate",
-                      G_CALLBACK(gtk_cell_editable_entry_activated),
-                      widget);
-    g_signal_connect (G_OBJECT(widget->entry),
-                      "key_press_event",
-                      G_CALLBACK(gtk_cell_editable_key_press_event),
-                      widget);
-    g_signal_connect (G_OBJECT(widget->button),
-                      "clicked",
-                      (GCallback)gpw_arrow_clicked,
-                      widget);
-}
-
-static void
-gpw_cell_editable_init (GtkCellEditableIface *iface)
-{
-    iface->start_editing = gpw_start_editing;
-}
-
-void
-gnc_popup_entry_set_text (GncPopupEntry *popup, const gchar *text)
-{
-    g_return_if_fail (GNC_IS_POPUP_ENTRY(popup));
-
-    gtk_entry_set_text (GTK_ENTRY(popup->entry), text ? text : "");
-}
-
-const gchar *
-gnc_popup_entry_get_text (GncPopupEntry *popup)
-{
-    g_return_val_if_fail (GNC_IS_POPUP_ENTRY(popup), NULL);
-
-    return gtk_entry_get_text (GTK_ENTRY(popup->entry));
-}
-
-gint
-gnc_popup_get_button_width (void)
-{
-    GtkWidget *window, *button, *arrow;
-    gint       width;
-
-    GtkRequisition req;
-
-    window = gtk_window_new (GTK_WINDOW_POPUP);
-
-    button = gtk_button_new ();
-    gtk_widget_show (button);
-    gtk_container_add (GTK_CONTAINER(window), button);
-
-    arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
-    gtk_widget_show (arrow);
-
-    gtk_container_add (GTK_CONTAINER(button), arrow);
-
-    gtk_window_move (GTK_WINDOW(window), -500, -500);
-    gtk_widget_show (window);
-
-    gtk_widget_get_preferred_size (window, &req, NULL);
-
-    width = req.width;
-
-    gtk_widget_destroy (window);
-
-    return width;
-}
-
diff --git a/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.h b/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.h
deleted file mode 100644
index 4d3b8f639f..0000000000
--- a/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*************************************************************************
- * The following code has come from Planner. This code implements a
- * GtkCalendar in a custom GtkCellEditable popup from GtkCellRenderer.
- *
- * These files have been renamed and changed to remove code not required
- * and to remove a dependency on libplanner.
- *
- * Copyright (C) 2012 Robert Fewell
- *
- * Copyright (C) 2001-2002 CodeFactory AB
- * Copyright (C) 2001-2002 Richard Hult <richard at imendio.com>
- * Copyright (C) 2001-2002 Mikael Hallendal <micke at imendio.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *************************************************************************/
-
-#ifndef __GNC_POPUP_ENTRY_H__
-#define __GNC_POPUP_ENTRY_H__
-
-#include <pango/pango.h>
-#include <gtk/gtk.h>
-
-#define GNC_TYPE_POPUP_ENTRY            (gnc_popup_entry_get_type ())
-#define GNC_POPUP_ENTRY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_POPUP_ENTRY, GncPopupEntry))
-#define GNC_POPUP_ENTRY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_POPUP_ENTRY, GncPopupEntryClass))
-#define GNC_IS_POPUP_ENTRY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_POPUP_ENTRY))
-#define GNC_IS_POPUP_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GNC_TYPE_POPUP_ENTRY))
-#define GNC_POPUP_ENTRY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_POPUP_ENTRY, GncPopupEntryClass))
-
-typedef struct _GncPopupEntry      GncPopupEntry;
-typedef struct _GncPopupEntryClass GncPopupEntryClass;
-
-struct _GncPopupEntry
-{
-    GtkEventBox  parent;
-
-    GtkWidget   *hbox;
-    GtkWidget   *button;
-    GtkWidget   *entry;
-
-    gboolean     editing_canceled;
-};
-
-struct _GncPopupEntryClass
-{
-    GtkEventBoxClass parent_class;
-};
-
-GType        gnc_popup_entry_get_type   (void) G_GNUC_CONST;
-
-GtkWidget   *gnc_popup_entry_new        (void);
-
-void         gnc_popup_entry_set_text   (GncPopupEntry *popup,
-                                         const gchar  *text);
-
-const gchar *gnc_popup_entry_get_text   (GncPopupEntry *popup);
-
-gint         gnc_popup_get_button_width (void);
-
-
-#endif /* __GNC_POPUP_ENTRY_H__ */
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 7db7bcd2fe..424659f4cd 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -149,7 +149,6 @@ gnucash/gnome-utils/gnc-account-sel.c
 gnucash/gnome-utils/gnc-amount-edit.c
 gnucash/gnome-utils/gnc-autoclear.c
 gnucash/gnome-utils/gnc-autosave.c
-gnucash/gnome-utils/gnc-cell-renderer-popup-entry.c
 gnucash/gnome-utils/gnc-cell-renderer-text-flag.c
 gnucash/gnome-utils/gnc-cell-renderer-text-view.c
 gnucash/gnome-utils/gnc-cell-view.c

commit 0f2c6a002f04cc8a8bb166faa7f12ea6b69d2377
Author: Richard Cohen <richard at daijobu.co.uk>
Date:   Wed May 31 10:52:59 2023 +0100

    Refactor: remove unused GncCellRendererPopup

diff --git a/gnucash/gnome-utils/CMakeLists.txt b/gnucash/gnome-utils/CMakeLists.txt
index 79995db600..c73c4aadcd 100644
--- a/gnucash/gnome-utils/CMakeLists.txt
+++ b/gnucash/gnome-utils/CMakeLists.txt
@@ -50,7 +50,6 @@ set (gnome_utils_SOURCES
   gnc-amount-edit.c
   gnc-autoclear.c
   gnc-autosave.c
-  gnc-cell-renderer-popup.c
   gnc-cell-renderer-popup-entry.c
   gnc-cell-renderer-text-flag.c
   gnc-cell-renderer-text-view.c
@@ -138,7 +137,6 @@ set (gnome_utils_HEADERS
   gnc-account-sel.h
   gnc-amount-edit.h
   gnc-autoclear.h
-  gnc-cell-renderer-popup.h
   gnc-cell-renderer-popup-entry.h
   gnc-cell-renderer-text-flag.h
   gnc-cell-renderer-text-view.h
diff --git a/gnucash/gnome-utils/gnc-cell-renderer-popup.c b/gnucash/gnome-utils/gnc-cell-renderer-popup.c
deleted file mode 100644
index 78da8c1986..0000000000
--- a/gnucash/gnome-utils/gnc-cell-renderer-popup.c
+++ /dev/null
@@ -1,554 +0,0 @@
-/*************************************************************************
- * The following code has come from Planner. This code implements a
- * GtkCalendar in a custom GtkCellEditable popup from GtkCellRenderer.
- *
- * These files have been renamed and changed to remove code not required
- * and to remove a dependency on libplanner.
- *
- * Copyright (C) 2012 Robert Fewell
- *
- * Copyright (C) 2001-2002 CodeFactory AB
- * Copyright (C) 2001-2002 Richard Hult <richard at imendio.com>
- * Copyright (C) 2001-2002 Mikael Hallendal <micke at imendio.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *************************************************************************/
-#include <config.h>
-
-#include <gtk/gtk.h>
-#include <glib/gi18n.h>
-#include <gdk/gdkkeysyms.h>
-
-#include "gnc-cell-renderer-popup.h"
-#include "gnc-cell-renderer-popup-entry.h"
-
-enum {
-    SHOW_POPUP,
-    HIDE_POPUP,
-    LAST_SIGNAL
-};
-
-static GtkCellEditable *gcrp_start_editing (GtkCellRenderer          *cell,
-                                            GdkEvent                 *event,
-                                            GtkWidget                *widget,
-                                            const gchar              *path,
-                                            const GdkRectangle       *background_area,
-                                            const GdkRectangle       *cell_area,
-                                            GtkCellRendererState      flags);
-
-static void      gcrp_show_popup           (GncCellRendererPopup     *cell,
-                                            const gchar              *path,
-                                            gint                      x1,
-                                            gint                      y1,
-                                            gint                      x2,
-                                            gint                      y2);
-
-static void      gcrp_hide_popup           (GncCellRendererPopup     *cell);
-
-static void      gcrp_get_size             (GtkCellRenderer          *cell,
-                                            GtkWidget                *widget,
-                                            const GdkRectangle       *cell_area,
-                                            gint                     *x_offset,
-                                            gint                     *y_offset,
-                                            gint                     *width,
-                                            gint                     *height);
-
-static void      gcrp_style_set            (GtkWidget                *widget,
-                                            GtkStyle                 *old_style,
-                                            GncCellRendererPopup     *popup);
-
-static gboolean  gcrp_key_press_event      (GtkWidget                *popup_window,
-                                            GdkEventKey              *event,
-                                            GncCellRendererPopup     *cell);
-
-static gboolean  gcrp_button_press_event   (GtkWidget                *widget,
-                                            GdkEventButton           *event,
-                                            GncCellRendererPopup     *popup);
-
-void gnc_marshal_VOID__STRING_INT_INT_INT_INT (GClosure              *closure,
-                                               GValue                *return_value,
-                                               guint                  n_param_values,
-                                               const GValue          *param_values,
-                                               gpointer               invocation_hint,
-                                               gpointer               marshal_data);
-
-
-static guint signals[LAST_SIGNAL];
-
-#define GNC_CELL_RENDERER_POPUP_PATH "gnc-cell-renderer-popup-path"
-
-G_DEFINE_TYPE (GncCellRendererPopup, gnc_cell_renderer_popup, GTK_TYPE_CELL_RENDERER_TEXT);
-
-static void
-gnc_cell_renderer_popup_init (GncCellRendererPopup *popup)
-{
-    popup->popup_window = gtk_window_new (GTK_WINDOW_POPUP);
-
-    popup->button_width = -1;
-
-    g_signal_connect (popup->popup_window,
-              "button-press-event",
-              G_CALLBACK(gcrp_button_press_event),
-              popup);
-
-    g_signal_connect (popup->popup_window,
-              "key-press-event",
-              G_CALLBACK(gcrp_key_press_event),
-              popup);
-
-    g_signal_connect (popup->popup_window,
-              "style-set",
-              G_CALLBACK(gcrp_style_set),
-              popup);
-}
-
-static void
-gnc_cell_renderer_popup_class_init (GncCellRendererPopupClass *klass)
-{
-    GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(klass);
-
-    cell_class->start_editing = gcrp_start_editing;
-    cell_class->get_size      = gcrp_get_size;
-
-    klass->show_popup = gcrp_show_popup;
-    klass->hide_popup = gcrp_hide_popup;
-
-    signals[SHOW_POPUP] = g_signal_new (
-        "show-popup",
-        G_TYPE_FROM_CLASS (klass),
-        G_SIGNAL_RUN_LAST,
-        G_STRUCT_OFFSET (GncCellRendererPopupClass, show_popup),
-        NULL, NULL,
-        gnc_marshal_VOID__STRING_INT_INT_INT_INT,
-        G_TYPE_NONE, 5,
-        G_TYPE_STRING,
-        G_TYPE_INT,
-        G_TYPE_INT,
-        G_TYPE_INT,
-        G_TYPE_INT);
-
-    signals[HIDE_POPUP] = g_signal_new (
-        "hide-popup",
-        G_TYPE_FROM_CLASS (klass),
-        G_SIGNAL_RUN_LAST,
-        G_STRUCT_OFFSET (GncCellRendererPopupClass, hide_popup),
-        NULL, NULL,
-        g_cclosure_marshal_VOID__VOID,
-        G_TYPE_NONE, 0);
-}
-
-static void
-gcrp_editing_done (GtkCellEditable      *editable,
-                   GncCellRendererPopup *cell)
-{
-    gchar       *path;
-    const gchar *new_text;
-
-    if (GNC_POPUP_ENTRY(editable)->editing_canceled ||
-        cell->editing_canceled) {
-                gtk_cell_renderer_stop_editing (GTK_CELL_RENDERER(cell), TRUE);
-        return;
-    }
-
-    path = g_object_get_data (G_OBJECT(editable),
-                  GNC_CELL_RENDERER_POPUP_PATH);
-
-    new_text = gnc_popup_entry_get_text (GNC_POPUP_ENTRY(editable));
-
-    gtk_cell_renderer_stop_editing (GTK_CELL_RENDERER(cell), FALSE);
-
-    g_signal_emit_by_name (cell, "edited", path, new_text);
-}
-
-static void
-gcrp_style_set (GtkWidget            *widget,
-                GtkStyle             *old_style,
-                GncCellRendererPopup *popup)
-{
-    /* Invalidate the cache. */
-    popup->button_width = -1;
-}
-
-static gboolean
-gcrp_grab_on_window (GdkWindow *window,
-                     guint32    activate_time)
-{
-    GdkDisplay *display = gdk_window_get_display (window);
-    GdkSeat *seat;
-    GdkEvent *event = gtk_get_current_event ();
-
-    seat = gdk_display_get_default_seat (display);
-
-    if ((gdk_seat_grab (seat, window, GDK_SEAT_CAPABILITY_POINTER, TRUE, NULL,
-                        event, NULL, NULL) == GDK_GRAB_SUCCESS))
-    {
-        if (gdk_seat_grab (seat, window, GDK_SEAT_CAPABILITY_KEYBOARD, TRUE, NULL,
-                        event, NULL, NULL) == GDK_GRAB_SUCCESS)
-            return TRUE;
-        else
-        {
-            gdk_seat_ungrab (seat);
-            return FALSE;
-        }
-    }
-    return FALSE;
-}
-
-static void
-gcrp_show_popup (GncCellRendererPopup *cell,
-                 const gchar          *path,
-                 gint                  x1,
-                 gint                  y1,
-                 gint                  x2,
-                 gint                  y2)
-{
-    GdkWindow *win;
-    GdkMonitor *mon;
-    GdkRectangle monitor_size;
-    GtkAllocation alloc;
-    gint          x, y;
-    gint          screen_height, screen_width;
-    gint          button_height;
-
-    cell->shown = TRUE;
-
-    gtk_widget_realize (cell->popup_window);
-
-    /* I'm not sure this is ok to do, but we need to show the window to be
-     * able to get the allocation right.
-     */
-    gtk_window_move (GTK_WINDOW (cell->popup_window), -500, -500);
-    gtk_widget_show (cell->popup_window);
-
-    gtk_widget_get_allocation (cell->popup_window, &alloc);
-
-    x = x2;
-    y = y2;
-
-    button_height = y2 - y1;
-
-    win = gdk_screen_get_root_window (gtk_window_get_screen (GTK_WINDOW(cell->popup_window)));
-    mon = gdk_display_get_monitor_at_window (gtk_widget_get_display (GTK_WIDGET(cell->popup_window)), win);
-    gdk_monitor_get_geometry (mon, &monitor_size);
-
-    screen_width = monitor_size.width;
-    screen_height = monitor_size.height - y;
-
-    /* Check if it fits in the available height. */
-    if (alloc.height > screen_height)
-    {
-        /* It doesn't fit, so we see if we have the minimum space needed. */
-        if (alloc.height > screen_height && y - button_height > screen_height)
-        {
-            /* We don't, so we show the popup above the cell
-               instead of below it. */
-            y -= (alloc.height + button_height);
-            if (y < 0) {
-                y = 0;
-            }
-        }
-    }
-
-    /* We try to line it up with the right edge of the column, but we don't
-     * want it to go off the edges of the screen.
-     */
-    if (x > screen_width)
-        x = screen_width;
-
-    x -= alloc.width;
-
-    if (x < 0)
-        x = 0;
-
-    gtk_grab_add (cell->popup_window);
-
-    gtk_window_move (GTK_WINDOW(cell->popup_window), x, y);
-    gtk_widget_show (cell->popup_window);
-
-    gtk_widget_grab_focus (cell->focus_window);
-
-    gcrp_grab_on_window (gtk_widget_get_window (cell->popup_window),
-                 gtk_get_current_event_time ());
-}
-
-static void
-gcrp_hide_popup (GncCellRendererPopup *cell)
-{
-    gtk_grab_remove (cell->popup_window);
-    gtk_widget_hide (cell->popup_window);
-
-    if (cell->editable)
-        gtk_cell_editable_editing_done (GTK_CELL_EDITABLE(cell->editable));
-
-    /* This may look weird (the test), but the weak pointer will actually be
-     * nulled out for some cells, like the date cell.
-     */
-    if (cell->editable)
-        gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE(cell->editable));
-
-    cell->shown = FALSE;
-    cell->editing_canceled = FALSE;
-}
-
-static void
-gcrp_arrow_clicked (GtkCellEditable      *entry,
-                    GncCellRendererPopup *cell)
-{
-    GtkAllocation  alloc;
-    gint           x, y;
-    const gchar   *path;
-
-    if (cell->shown)
-    {
-        cell->editing_canceled = TRUE;
-        gnc_cell_renderer_popup_hide (cell);
-        return;
-    }
-
-    path = g_object_get_data (G_OBJECT(entry),
-                  GNC_CELL_RENDERER_POPUP_PATH);
-
-    /* Temporarily grab pointer and keyboard on a window we know exists; we
-     * do this so that the grab (with owner events == TRUE) affects
-     * events generated when the window is mapped, such as enter
-     * notify events on subwidgets. If the grab fails, bail out.
-     */
-    if (!gcrp_grab_on_window (gtk_widget_get_window (GTK_WIDGET(entry)),
-                  gtk_get_current_event_time ())) {
-        return;
-    }
-
-    gtk_editable_select_region (GTK_EDITABLE(GNC_POPUP_ENTRY(entry)->entry), 0, 0);
-
-    gdk_window_get_origin (gtk_widget_get_window (GTK_WIDGET(entry)), &x, &y);
-
-    gtk_widget_get_allocation (GTK_WIDGET(entry), &alloc);
-
-    g_signal_emit (cell, signals[SHOW_POPUP], 0,
-                   path,
-                   x,
-                   y,
-                   x + alloc.width,
-                   y + alloc.height);
-}
-
-static GtkCellEditable *
-gcrp_start_editing (GtkCellRenderer      *cell,
-                    GdkEvent             *event,
-                    GtkWidget            *widget,
-                    const gchar          *path,
-                    const GdkRectangle   *background_area,
-                    const GdkRectangle   *cell_area,
-                    GtkCellRendererState  flags)
-{
-    GncCellRendererPopup *popup = GNC_CELL_RENDERER_POPUP(cell);
-    GtkWidget            *editable;
-    gchar                *text;
-    gboolean              iseditable;
-
-    g_object_get (G_OBJECT (popup), "editable", &iseditable, NULL);
-
-    /* If the cell isn't editable we return NULL. */
-    if (iseditable == FALSE)
-        return NULL;
-
-    editable = g_object_new (GNC_TYPE_POPUP_ENTRY, NULL);
-
-    g_object_get (G_OBJECT(cell), "text", &text, NULL);
-                  popup->cell_text = text;
-
-    gnc_popup_entry_set_text (GNC_POPUP_ENTRY(editable), text ? text : "");
-
-    g_object_set_data_full (G_OBJECT(editable),
-                            GNC_CELL_RENDERER_POPUP_PATH,
-                            g_strdup (path),
-                            g_free);
-
-    gtk_widget_show (editable);
-
-    g_signal_connect (editable,
-                      "editing-done",
-                      G_CALLBACK(gcrp_editing_done),
-                      popup);
-
-    g_signal_connect (editable,
-                      "arrow-clicked",
-                      G_CALLBACK(gcrp_arrow_clicked),
-                      popup);
-
-    popup->editable = editable;
-
-    g_object_add_weak_pointer (G_OBJECT(popup->editable),
-                               (gpointer) &popup->editable);
-
-    return GTK_CELL_EDITABLE(editable);
-}
-
-GtkCellRenderer *
-gnc_cell_renderer_popup_new (void)
-{
-    return GTK_CELL_RENDERER(
-        g_object_new (gnc_cell_renderer_popup_get_type (), NULL));
-}
-
-void
-gnc_cell_renderer_popup_hide (GncCellRendererPopup *cell)
-{
-    g_return_if_fail (GNC_IS_CELL_RENDERER_POPUP(cell));
-
-    g_signal_emit (cell, signals[HIDE_POPUP], 0);
-}
-
-static void
-gcrp_get_size (GtkCellRenderer    *cell,
-               GtkWidget          *widget,
-               const GdkRectangle *cell_area,
-               gint               *x_offset,
-               gint               *y_offset,
-               gint               *width,
-               gint               *height)
-{
-    GncCellRendererPopup *popup = GNC_CELL_RENDERER_POPUP (cell);
-
-    if (GTK_CELL_RENDERER_CLASS(gnc_cell_renderer_popup_parent_class)->get_size) {
-        (* GTK_CELL_RENDERER_CLASS(gnc_cell_renderer_popup_parent_class)->get_size) (cell,
-                                      widget,
-                                      cell_area,
-                                      x_offset,
-                                      y_offset,
-                                      width,
-                                      height);
-    }
-
-    /* We cache this because it takes really long to get the width. */
-    if (popup->button_width == -1)
-        popup->button_width = gnc_popup_get_button_width ();
-
-    *width += popup->button_width;
-}
-
-static gboolean
-gcrp_key_press_event (GtkWidget            *popup_window,
-                      GdkEventKey          *event,
-                      GncCellRendererPopup *cell)
-{
-    if (event->keyval != GDK_KEY_Escape &&
-        event->keyval != GDK_KEY_Return &&
-        event->keyval != GDK_KEY_KP_Enter &&
-        event->keyval != GDK_KEY_ISO_Enter &&
-        event->keyval != GDK_KEY_3270_Enter) {
-        return FALSE;
-    }
-    if (event->keyval == GDK_KEY_Escape) {
-        cell->editing_canceled = TRUE;
-    } else {
-        cell->editing_canceled = FALSE;
-    }
-    gnc_cell_renderer_popup_hide (cell);
-
-    return TRUE;
-}
-
-static gboolean
-gcrp_button_press_event (GtkWidget            *widget,
-                         GdkEventButton       *event,
-                         GncCellRendererPopup *popup)
-{
-    GtkAllocation alloc;
-    gdouble       x, y;
-    gint          xoffset, yoffset;
-    gint          x1, y1;
-    gint          x2, y2;
-
-    if (event->button != 1)
-        return FALSE;
-
-    /* If the event happened outside the popup, cancel editing.
-     */
-
-    /*gdk_event_get_root_coords ((GdkEvent *) event, &x, &y);*/
-    x = event->x_root;
-    y = event->y_root;
-
-    gdk_window_get_root_origin (gtk_widget_get_window (widget),
-                                &xoffset,
-                                &yoffset);
-
-    gtk_widget_get_allocation (widget, &alloc);
-    xoffset += alloc.x;
-    yoffset += alloc.y;
-
-    gtk_widget_get_allocation (popup->popup_window, &alloc);
-    x1 = alloc.x + xoffset;
-    y1 = alloc.y + yoffset;
-    x2 = x1 + alloc.width;
-    y2 = y1 + alloc.height;
-
-    if (x > x1 && x < x2 && y > y1 && y < y2)
-        return FALSE;
-
-    popup->editing_canceled = TRUE;
-    gnc_cell_renderer_popup_hide (popup);
-
-    return FALSE;
-}
-
-
-#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
-#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
-
-void
-gnc_marshal_VOID__STRING_INT_INT_INT_INT (GClosure     *closure,
-                                          GValue       *return_value G_GNUC_UNUSED,
-                                          guint         n_param_values,
-                                          const GValue *param_values,
-                                          gpointer      invocation_hint G_GNUC_UNUSED,
-                                          gpointer      marshal_data)
-{
-    typedef void (*GMarshalFunc_VOID__STRING_INT_INT_INT_INT) (gpointer     data1,
-                                                               gpointer     arg_1,
-                                                               gint         arg_2,
-                                                               gint         arg_3,
-                                                               gint         arg_4,
-                                                               gint         arg_5,
-                                                               gpointer     data2);
-
-    register GMarshalFunc_VOID__STRING_INT_INT_INT_INT callback;
-    register GCClosure *cc = (GCClosure*) closure;
-    register gpointer data1, data2;
-
-    g_return_if_fail (n_param_values == 6);
-
-    if (G_CCLOSURE_SWAP_DATA (closure))
-    {
-        data1 = closure->data;
-        data2 = g_value_peek_pointer (param_values + 0);
-    }
-    else
-    {
-        data1 = g_value_peek_pointer (param_values + 0);
-        data2 = closure->data;
-    }
-    callback = (GMarshalFunc_VOID__STRING_INT_INT_INT_INT) (marshal_data ? marshal_data : cc->callback);
-
-    callback (data1,
-              g_marshal_value_peek_string (param_values + 1),
-              g_marshal_value_peek_int (param_values + 2),
-              g_marshal_value_peek_int (param_values + 3),
-              g_marshal_value_peek_int (param_values + 4),
-              g_marshal_value_peek_int (param_values + 5),
-              data2);
-}
diff --git a/gnucash/gnome-utils/gnc-cell-renderer-popup.h b/gnucash/gnome-utils/gnc-cell-renderer-popup.h
deleted file mode 100644
index 5576795244..0000000000
--- a/gnucash/gnome-utils/gnc-cell-renderer-popup.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*************************************************************************
- * The following code has come from Planner. This code implements a
- * GtkCalendar in a custom GtkCellEditable popup from GtkCellRenderer.
- *
- * These files have been renamed and changed to remove code not required
- * and to remove a dependency on libplanner.
- *
- * Copyright (C) 2012 Robert Fewell
- *
- * Copyright (C) 2001-2002 CodeFactory AB
- * Copyright (C) 2001-2002 Richard Hult <richard at imendio.com>
- * Copyright (C) 2001-2002 Mikael Hallendal <micke at imendio.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *************************************************************************/
-
-#ifndef __GNC_CELL_RENDERER_POPUP_H__
-#define __GNC_CELL_RENDERER_POPUP_H__
-
-#include <pango/pango.h>
-#include <gtk/gtk.h>
-
-#define GNC_TYPE_CELL_RENDERER_POPUP            (gnc_cell_renderer_popup_get_type ())
-#define GNC_CELL_RENDERER_POPUP(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_CELL_RENDERER_POPUP, GncCellRendererPopup))
-#define GNC_CELL_RENDERER_POPUP_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_CELL_RENDERER_POPUP, GncCellRendererPopupClass))
-#define GNC_IS_CELL_RENDERER_POPUP(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_CELL_RENDERER_POPUP))
-#define GNC_IS_CELL_RENDERER_POPUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GNC_TYPE_CELL_RENDERER_POPUP))
-#define GNC_CELL_RENDERER_POPUP_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_CELL_RENDERER_POPUP, GncCellRendererPopupClass))
-
-typedef struct _GncCellRendererPopup      GncCellRendererPopup;
-typedef struct _GncCellRendererPopupClass GncCellRendererPopupClass;
-
-struct _GncCellRendererPopup
-{
-    GtkCellRendererText  parent;
-
-    /* Cached width of the popup button. */
-    gint                 button_width;
-
-    /* The popup window. */
-    GtkWidget           *popup_window;
-
-    /* The widget that should grab focus on popup. */
-    GtkWidget           *focus_window;
-
-    /* The editable entry. */
-    GtkWidget           *editable;
-
-    gboolean             shown;
-    gboolean             editing_canceled;
-    gchar               *cell_text;
-};
-
-struct _GncCellRendererPopupClass
-{
-    GtkCellRendererTextClass parent_class;
-
-    void   (* show_popup) (GncCellRendererPopup *cell,
-                           const gchar          *path,
-                           gint                  x1,
-                           gint                  y1,
-                           gint                  x2,
-                           gint                  y2);
-
-    void   (* hide_popup) (GncCellRendererPopup *cell);
-};
-
-GType gnc_cell_renderer_popup_get_type (void) G_GNUC_CONST;
-
-GtkCellRenderer *gnc_cell_renderer_popup_new (void);
-
-void gnc_cell_renderer_popup_show (GncCellRendererPopup *cell,
-                                   const gchar          *path,
-                                   gint                  x1,
-                                   gint                  y1,
-                                   gint                  x2,
-                                   gint                  y2);
-
-void gnc_cell_renderer_popup_hide (GncCellRendererPopup *cell);
-
-#endif /* __GNC_CELL_RENDERER_POPUP_H__ */
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c0f425223a..7db7bcd2fe 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -149,7 +149,6 @@ gnucash/gnome-utils/gnc-account-sel.c
 gnucash/gnome-utils/gnc-amount-edit.c
 gnucash/gnome-utils/gnc-autoclear.c
 gnucash/gnome-utils/gnc-autosave.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-cell-renderer-text-view.c

commit 98b43768ddea370e10b6edb0b169e2cabc792341
Author: Richard Cohen <richard at daijobu.co.uk>
Date:   Wed May 31 10:50:39 2023 +0100

    Refactor: remove unused GncCellRendererDate

diff --git a/gnucash/gnome-utils/CMakeLists.txt b/gnucash/gnome-utils/CMakeLists.txt
index 9cf7b12266..79995db600 100644
--- a/gnucash/gnome-utils/CMakeLists.txt
+++ b/gnucash/gnome-utils/CMakeLists.txt
@@ -50,7 +50,6 @@ set (gnome_utils_SOURCES
   gnc-amount-edit.c
   gnc-autoclear.c
   gnc-autosave.c
-  gnc-cell-renderer-date.c
   gnc-cell-renderer-popup.c
   gnc-cell-renderer-popup-entry.c
   gnc-cell-renderer-text-flag.c
@@ -139,7 +138,6 @@ set (gnome_utils_HEADERS
   gnc-account-sel.h
   gnc-amount-edit.h
   gnc-autoclear.h
-  gnc-cell-renderer-date.h
   gnc-cell-renderer-popup.h
   gnc-cell-renderer-popup-entry.h
   gnc-cell-renderer-text-flag.h
diff --git a/gnucash/gnome-utils/gnc-cell-renderer-date.c b/gnucash/gnome-utils/gnc-cell-renderer-date.c
deleted file mode 100644
index b1cdc5f5a9..0000000000
--- a/gnucash/gnome-utils/gnc-cell-renderer-date.c
+++ /dev/null
@@ -1,450 +0,0 @@
-/*************************************************************************
- * The following code has come from Planner. This code implements a
- * GtkCalendar in a custom GtkCellEditable popup from GtkCellRenderer.
- *
- * These files have been renamed and changed to remove code not required
- * and to remove a dependency on libplanner.
- *
- * Copyright (C) 2012 Robert Fewell
- *
- * Copyright (C) 2005 Imendio AB
- * Copyright (C) 2001-2002 CodeFactory AB
- * Copyright (C) 2001-2002 Richard Hult <richard at imendio.com>
- * Copyright (C) 2001-2002 Mikael Hallendal <micke at imendio.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- **************************************************************************/
-#include <config.h>
-
-#include <gtk/gtk.h>
-#include <glib/gi18n.h>
-#include <gdk/gdkkeysyms.h>
-#include <string.h>
-#include <time.h>
-
-#include "gnc-cell-renderer-date.h"
-#include "gnc-cell-renderer-popup-entry.h"
-#include "gnc-date.h"
-
-enum {
-    PROP_0,
-    PROP_USE_BUTTONS,
-};
-
-
-
-static void     gcrd_set_property          (GObject                  *object,
-                                            guint                     param_id,
-                                            const GValue             *value,
-                                            GParamSpec               *pspec);
-
-static void     gcrd_get_property          (GObject                  *object,
-                                            guint                     param_id,
-                                            GValue                   *value,
-                                            GParamSpec               *pspec);
-
-static void     gcrd_today_clicked         (GtkWidget                *button,
-                                            GncCellRendererDate      *cell);
-
-static void     gcrd_selected_double_click (GtkWidget                *calendar,
-                                            GncCellRendererDate      *cell);
-
-static void     gcrd_cancel_clicked        (GtkWidget               *popup_window,
-                                            GncCellRendererDate     *cell);
-
-static void     gcrd_ok_clicked            (GtkWidget               *popup_window,
-                                            GncCellRendererDate     *cell);
-
-static void     gcrd_day_selected          (GtkWidget               *popup_window,
-                                            GncCellRendererDate     *cell);
-
-GtkCellEditable *gcrd_start_editing        (GtkCellRenderer         *cell,
-                                            GdkEvent                *event,
-                                            GtkWidget               *widget,
-                                            const gchar             *path,
-                                            const GdkRectangle      *background_area,
-                                            const GdkRectangle      *cell_area,
-                                            GtkCellRendererState     flags);
-
-static void     gcrd_show                  (GncCellRendererPopup    *cell,
-                                            const gchar             *path,
-                                            gint                     x1,
-                                            gint                     y1,
-                                            gint                     x2,
-                                            gint                     y2);
-
-static void     gcrd_hide                  (GncCellRendererPopup    *cell);
-
-
-/* These two functions are used internally */
-gboolean gcrd_time2dmy (time64 raw_time, gint *day, gint *month, gint *year);
-static time64 gcrd_dmy2time (gint day, gint month, gint year);
-
-/* These two functions convert string to date to string */
-static gchar * gcrd_time2dmy_string (time64 raw_time);
-static time64 gcrd_string_dmy2time (const gchar *date_string);
-
-G_DEFINE_TYPE (GncCellRendererDate, gnc_cell_renderer_date, GNC_TYPE_CELL_RENDERER_POPUP);
-
-static void
-gnc_cell_renderer_date_init (GncCellRendererDate *date)
-{
-    GncCellRendererPopup     *popup;
-    GtkWidget                *frame;
-    GtkWidget                *vbox;
-    GtkWidget                *button;
-
-    popup = GNC_CELL_RENDERER_POPUP(date);
-
-    frame = gtk_frame_new (NULL);
-    gtk_container_add (GTK_CONTAINER(popup->popup_window), frame);
-    gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_OUT);
-
-    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
-    gtk_box_set_homogeneous (GTK_BOX(vbox), FALSE);
-
-    gtk_container_add (GTK_CONTAINER(frame), vbox);
-    gtk_container_set_border_width (GTK_CONTAINER(vbox), 6);
-
-    date->calendar = gtk_calendar_new ();
-    popup->focus_window = date->calendar;
-    gtk_box_pack_start (GTK_BOX(vbox), date->calendar, TRUE, TRUE, 0);
-
-    date->button_box = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
-    gtk_box_set_spacing (GTK_BOX(date->button_box), 6);
-    gtk_box_pack_start (GTK_BOX(vbox), date->button_box, FALSE, FALSE, 0);
-
-    button = gtk_button_new_with_label (_("Cancel"));
-    gtk_container_add (GTK_CONTAINER(date->button_box), button);
-    g_signal_connect (button, "clicked",
-                      G_CALLBACK(gcrd_cancel_clicked),
-                      date);
-
-    date->today_button = gtk_button_new_with_label (_("Today"));
-    gtk_container_add (GTK_CONTAINER(date->button_box), date->today_button);
-    g_signal_connect (date->today_button, "clicked",
-                      G_CALLBACK(gcrd_today_clicked),
-                      date);
-
-    button = gtk_button_new_with_label (_("Select"));
-    gtk_container_add (GTK_CONTAINER(date->button_box), button);
-    g_signal_connect (button, "clicked",
-                      G_CALLBACK(gcrd_ok_clicked),
-                      date);
-
-    g_signal_connect (date->calendar, "day-selected",
-                      G_CALLBACK(gcrd_day_selected),
-                      date);
-    g_signal_connect (date->calendar, "day-selected-double-click",
-                      G_CALLBACK(gcrd_selected_double_click),
-                      date);
-
-    //Set calendar to show current date when displayed
-    date->time = gnc_time (NULL);
-
-    gtk_widget_show_all (frame);
-}
-
-static void
-gnc_cell_renderer_date_class_init (GncCellRendererDateClass *klass)
-{
-    GncCellRendererPopupClass     *popup_class;
-    GtkCellRendererClass          *cell_class;
-    GObjectClass                  *gobject_class;
-
-    popup_class = GNC_CELL_RENDERER_POPUP_CLASS(klass);
-    cell_class = GTK_CELL_RENDERER_CLASS(klass);
-    gobject_class = G_OBJECT_CLASS(klass);
-
-    gobject_class->set_property = gcrd_set_property;
-    gobject_class->get_property = gcrd_get_property;
-
-    cell_class->start_editing = gcrd_start_editing;
-
-    popup_class->show_popup = gcrd_show;
-    popup_class->hide_popup = gcrd_hide;
-
-    g_object_class_install_property (
-                 gobject_class,
-                 PROP_USE_BUTTONS,
-                 g_param_spec_boolean ("use-buttons",
-                 NULL,
-                 NULL,
-                 TRUE,
-                 G_PARAM_READWRITE));
-}
-
-static void
-gcrd_set_property (GObject      *object,
-                   guint         param_id,
-                   const GValue *value,
-                   GParamSpec   *pspec)
-{
-    GncCellRendererDate *date = GNC_CELL_RENDERER_DATE(object);
-
-    switch (param_id)
-    {
-    case PROP_USE_BUTTONS:
-        date->use_buttons = g_value_get_boolean (value);
-
-        if (date->use_buttons)
-            gtk_widget_show (date->button_box);
-        else
-            gtk_widget_hide (date->button_box);
-        break;
-
-    default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
-        break;
-    }
-}
-
-static void
-gcrd_get_property (GObject    *object,
-                   guint       param_id,
-                   GValue     *value,
-                   GParamSpec *pspec)
-{
-    GncCellRendererDate *date = GNC_CELL_RENDERER_DATE (object);
-
-    switch (param_id)
-    {
-    case PROP_USE_BUTTONS:
-        g_value_set_boolean (value, date->use_buttons);
-        break;
-
-    default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
-        break;
-    }
-}
-
-GtkCellEditable *
-gcrd_start_editing (GtkCellRenderer      *cell,
-                    GdkEvent             *event,
-                    GtkWidget            *widget,
-                    const gchar          *path,
-                    const GdkRectangle   *background_area,
-                    const GdkRectangle   *cell_area,
-                    GtkCellRendererState  flags)
-{
-    GNC_CELL_RENDERER_POPUP(cell)->editing_canceled = FALSE;
-
-    if (GTK_CELL_RENDERER_CLASS(gnc_cell_renderer_date_parent_class)->start_editing) {
-        return GTK_CELL_RENDERER_CLASS(gnc_cell_renderer_date_parent_class)->start_editing (
-                            cell,
-                            event,
-                            widget,
-                            path,
-                            background_area,
-                            cell_area,
-                            flags);
-    }
-
-    return NULL;
-}
-
-
-static void
-gcrd_hide (GncCellRendererPopup *cell)
-{
-    if (GNC_CELL_RENDERER_POPUP_CLASS (gnc_cell_renderer_date_parent_class)->hide_popup) {
-        GNC_CELL_RENDERER_POPUP_CLASS (gnc_cell_renderer_date_parent_class)->hide_popup (cell);
-    }
-}
-
-static void
-gcrd_show (GncCellRendererPopup *cell,
-           const gchar          *path,
-           gint                  x1,
-           gint                  y1,
-           gint                  x2,
-           gint                  y2)
-{
-    GncCellRendererDate     *date = GNC_CELL_RENDERER_DATE (cell);
-    gint                     year = 0;
-    gint                     month = 0;
-    gint                     day = 0;
-    const gchar             *text;
-
-    if (GNC_CELL_RENDERER_POPUP_CLASS (gnc_cell_renderer_date_parent_class)->show_popup) {
-        GNC_CELL_RENDERER_POPUP_CLASS (gnc_cell_renderer_date_parent_class)->show_popup (cell,
-                      path,
-                      x1, y1,
-                      x2, y2);
-    }
-
-    text = gnc_popup_entry_get_text (GNC_POPUP_ENTRY (GNC_CELL_RENDERER_POPUP (cell)->editable));
-
-    if (!(g_strcmp0(text, "")))
-    {
-        date->time = gnc_time (NULL);
-        gcrd_time2dmy (date->time, &day, &month, &year);
-    }
-    else
-    {
-        date->time = gcrd_string_dmy2time (text);
-        gcrd_time2dmy (date->time, &day, &month, &year);
-    }
-
-    gtk_calendar_clear_marks (GTK_CALENDAR(date->calendar));
-    gtk_calendar_select_month (GTK_CALENDAR(date->calendar), month - 1, year);
-
-    gtk_calendar_select_day (GTK_CALENDAR(date->calendar), day);
-    gtk_calendar_mark_day (GTK_CALENDAR(date->calendar), day);
-}
-
-GtkCellRenderer *
-gnc_cell_renderer_date_new (gboolean use_buttons)
-{
-    GObject *cell;
-
-    cell = g_object_new (GNC_TYPE_CELL_RENDERER_DATE,
-                         "use-buttons", use_buttons,
-                          NULL);
-
-    return GTK_CELL_RENDERER(cell);
-}
-
-static void
-gcrd_today_clicked (GtkWidget *button, GncCellRendererDate *cell)
-{
-    time64  today;
-    gint    year = 0, month = 0, day = 0;
-
-    today = gnc_time (NULL);
-
-    gcrd_time2dmy (today, &day, &month, &year);
-
-    gtk_calendar_clear_marks (GTK_CALENDAR(cell->calendar));
-    gtk_calendar_select_month (GTK_CALENDAR(cell->calendar), month - 1, year);
-    gtk_calendar_select_day (GTK_CALENDAR(cell->calendar), day);
-    gtk_calendar_mark_day (GTK_CALENDAR(cell->calendar), day);
-}
-
-static void
-gcrd_selected_double_click (GtkWidget *calendar, GncCellRendererDate *cell)
-{
-    GncCellRendererPopup *popup = GNC_CELL_RENDERER_POPUP(cell);
-
-    gcrd_ok_clicked (popup->popup_window, cell);
-}
-
-static void
-gcrd_cancel_clicked (GtkWidget *popup_window, GncCellRendererDate *cell)
-{
-    GncCellRendererPopup *popup = GNC_CELL_RENDERER_POPUP(cell);
-
-    popup->editing_canceled = TRUE;
-    gnc_cell_renderer_popup_hide (popup);
-}
-
-static void
-gcrd_ok_clicked (GtkWidget *popup_window, GncCellRendererDate *cell)
-{
-    GncCellRendererPopup *popup = GNC_CELL_RENDERER_POPUP(cell);
-
-    gcrd_day_selected (popup_window, cell);
-
-    popup->editing_canceled = FALSE;
-    gnc_cell_renderer_popup_hide (popup);
-}
-
-static void
-gcrd_day_selected (GtkWidget *popup_window, GncCellRendererDate *cell)
-{
-    guint    year;
-    guint    month;
-    guint    day;
-    time64   t;
-    gchar   *str;
-
-    gtk_calendar_get_date (GTK_CALENDAR(cell->calendar),
-                           &year,
-                           &month,
-                           &day);
-
-    t = gcrd_dmy2time (day, month + 1, year);
-
-    cell->time = t;
-
-    str = gcrd_time2dmy_string (t);
-
-    gnc_popup_entry_set_text (
-        GNC_POPUP_ENTRY(GNC_CELL_RENDERER_POPUP(cell)->editable), str);
-    g_free (str);
-
-}
-
-/* This function converts a time64 value date to separate entities */
-gboolean
-gcrd_time2dmy (time64 raw_time, gint *day, gint *month, gint *year)
-{
-    struct tm * timeinfo;
-
-    timeinfo = gnc_localtime (&raw_time);
-    if (timeinfo == NULL)
-        return FALSE;
-    *day = timeinfo->tm_mday;
-    *month = timeinfo->tm_mon + 1;
-    *year = timeinfo->tm_year + 1900;
-    gnc_tm_free (timeinfo);
-    return TRUE;
-}
-
-/* This function converts separate entities to a time64 value */
-static time64
-gcrd_dmy2time (gint day, gint month, gint year)
-{
-    struct tm when;
-
-    memset (&when, 0, sizeof (when));
-    when.tm_year = year - 1900;
-    when.tm_mon = month - 1 ;
-    when.tm_mday = day;
-
-    return gnc_mktime (&when);
-}
-
-/* This function converts a time64 value date to a string */
-static gchar *
-gcrd_time2dmy_string (time64 raw_time)
-{
-    return qof_print_date (raw_time);
-}
-
-/* This function converts a string date to a time64 value */
-static time64
-gcrd_string_dmy2time (const gchar *date_string)
-{
-    gint year = 0, month = 0, day = 0;
-
-    if(qof_scan_date (date_string, &day, &month, &year))
-    {
-    struct tm when;
-    memset (&when, 0, sizeof (when));
-        when.tm_year = year - 1900;
-        when.tm_mon = month - 1 ;
-        when.tm_mday = day;
-
-        return gnc_mktime (&when);
-    }
-    else
-    {
-        return gnc_time (NULL);
-    }
-}
-
diff --git a/gnucash/gnome-utils/gnc-cell-renderer-date.h b/gnucash/gnome-utils/gnc-cell-renderer-date.h
deleted file mode 100644
index 578ae6cfb5..0000000000
--- a/gnucash/gnome-utils/gnc-cell-renderer-date.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*************************************************************************
- * The following code has come from Planner. This code implements a
- * GtkCalendar in a custom GtkCellEditable popup from GtkCellRenderer.
- *
- * These files have been renamed and changed to remove code not required
- * and to remove a dependency on libplanner.
- *
- * Copyright (C) 2012 Robert Fewell
- *
- * Copyright (C) 2005 Imendio AB
- * Copyright (C) 2001-2002 CodeFactory AB
- * Copyright (C) 2001-2002 Richard Hult <richard at imendio.com>
- * Copyright (C) 2001-2002 Mikael Hallendal <micke at imendio.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- **************************************************************************/
-
-#ifndef __GNC_CELL_RENDERER_DATE_H__
-#define __GNC_CELL_RENDERER_DATE_H__
-
-#include <glib-object.h>
-#include <gtk/gtk.h>
-#include <gnc-date.h>
-#include "gnc-cell-renderer-popup.h"
-#include "gnc-cell-renderer-popup-entry.h"
-
-#define GNC_TYPE_CELL_RENDERER_DATE            (gnc_cell_renderer_date_get_type ())
-#define GNC_CELL_RENDERER_DATE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_CELL_RENDERER_DATE, GncCellRendererDate))
-#define GNC_CELL_RENDERER_DATE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_CELL_RENDERER_DATE, GncCellRendererDateClass))
-#define GNC_IS_CELL_RENDERER_DATE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_CELL_RENDERER_DATE))
-#define GNC_IS_CELL_RENDERER_DATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GNC_TYPE_CELL_RENDERER_DATE))
-#define GNC_CELL_RENDERER_DATE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_CELL_RENDERER_DATE, GncCellRendererDateClass))
-
-typedef struct _GncCellRendererDate      GncCellRendererDate;
-typedef struct _GncCellRendererDateClass GncCellRendererDateClass;
-
-struct _GncCellRendererDate
-{
-    GncCellRendererPopup      parent;
-    GtkWidget                *calendar;
-    GtkWidget                *today_button;
-
-    time64                    time;
-    gboolean                  use_buttons;
-    GtkWidget                *button_box;
-
-};
-
-struct _GncCellRendererDateClass
-{
-    GncCellRendererPopupClass parent_class;
-};
-
-GType            gnc_cell_renderer_date_get_type (void) G_GNUC_CONST;
-GtkCellRenderer *gnc_cell_renderer_date_new      (gboolean use_buttons);
-
-
-#endif /* __GNC_CELL_RENDERER_DATE_H__ */
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6f34e5f9a5..c0f425223a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -149,7 +149,6 @@ gnucash/gnome-utils/gnc-account-sel.c
 gnucash/gnome-utils/gnc-amount-edit.c
 gnucash/gnome-utils/gnc-autoclear.c
 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

commit 3bff7c926eeffc0325420e9740fa3332b9172859
Author: Richard Cohen <richard at daijobu.co.uk>
Date:   Wed Jun 7 17:42:28 2023 +0100

    Refactor: remove unused gnc_tree_view_add_date_column()

diff --git a/gnucash/gnome-utils/gnc-tree-view.c b/gnucash/gnome-utils/gnc-tree-view.c
index 0cb5ee8f89..be9d4d1139 100644
--- a/gnucash/gnome-utils/gnc-tree-view.c
+++ b/gnucash/gnome-utils/gnc-tree-view.c
@@ -43,7 +43,6 @@
 #include "gnc-glib-utils.h"
 #include "gnc-gnome-utils.h"
 #include "gnc-gobject-utils.h"
-#include "gnc-cell-renderer-date.h"
 #include "gnc-cell-renderer-text-view.h"
 #include "gnc-state.h"
 #include "gnc-prefs.h"
@@ -2018,73 +2017,6 @@ gnc_tree_view_add_pix_column (GncTreeView *view,
     return column;
 }
 
-
-/** This function adds a new date column to a GncTreeView base view.
- *  It takes all the parameters necessary to hook a GtkTreeModel
- *  column to a GtkTreeViewColumn.  If the tree has a state section
- *  associated with it, this function also wires up the column so that
- *  its visibility and width are remembered.
- *
- *  Parameters are defined in gnc-tree-view.h
- */
-GtkTreeViewColumn *
-gnc_tree_view_add_date_column (GncTreeView *view,
-                               const gchar *column_title,
-                               const gchar *pref_name,
-                               const gchar *icon_name,
-                               const gchar *sizing_text,
-                               gint model_data_column,
-                               gint model_visibility_column,
-                               GtkTreeIterCompareFunc column_sort_fn)
-{
-    GtkTreeViewColumn *column;
-    GtkCellRenderer *renderer;
-    PangoLayout* layout;
-    int default_width, title_width;
-
-    g_return_val_if_fail (GNC_IS_TREE_VIEW(view), NULL);
-
-    column = gtk_tree_view_column_new ();
-    gtk_tree_view_column_set_title (column, column_title);
-
-    /* Set up an icon renderer if requested */
-    if (icon_name)
-    {
-        renderer = gtk_cell_renderer_pixbuf_new ();
-        g_object_set (renderer, "icon-name", icon_name, NULL);
-        gtk_tree_view_column_pack_start (column, renderer, FALSE);
-    }
-
-    /* Set up a text renderer and attributes */
-    renderer = gnc_cell_renderer_date_new (TRUE);
-    gtk_tree_view_column_pack_start (column, renderer, TRUE);
-
-    /* Set renderer attributes controlled by the model */
-    if (model_data_column != GNC_TREE_VIEW_COLUMN_DATA_NONE)
-        gtk_tree_view_column_add_attribute (column, renderer,
-                                            "text", model_data_column);
-    if (model_visibility_column != GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS)
-        gtk_tree_view_column_add_attribute (column, renderer,
-                                            "visible", model_visibility_column);
-
-    /* Default size is the larger of the column title and the sizing text */
-    layout = gtk_widget_create_pango_layout (GTK_WIDGET(view), column_title);
-    pango_layout_get_pixel_size (layout, &title_width, NULL);
-    g_object_unref (layout);
-    layout = gtk_widget_create_pango_layout (GTK_WIDGET(view), sizing_text);
-    pango_layout_get_pixel_size (layout, &default_width, NULL);
-    g_object_unref (layout);
-    default_width = MAX(default_width, title_width);
-    if (default_width)
-        default_width += 10; /* padding on either side */
-    gnc_tree_view_column_properties (view, column, pref_name, model_data_column,
-                                     default_width, TRUE, column_sort_fn);
-
-    gnc_tree_view_append_column (view, column);
-    return column;
-}
-
-
 GtkCellRenderer *
 gnc_tree_view_column_get_renderer (GtkTreeViewColumn *column)
 {
diff --git a/gnucash/gnome-utils/gnc-tree-view.h b/gnucash/gnome-utils/gnc-tree-view.h
index 124093d56c..16040bc447 100644
--- a/gnucash/gnome-utils/gnc-tree-view.h
+++ b/gnucash/gnome-utils/gnc-tree-view.h
@@ -33,7 +33,6 @@
 #define __GNC_TREE_VIEW_H
 
 #include <gtk/gtk.h>
-#include "gnc-cell-renderer-date.h"
 
 G_BEGIN_DECLS
 
@@ -287,21 +286,6 @@ gnc_tree_view_add_pix_column (GncTreeView *view,
                               gint model_visibility_column,
                               GtkTreeIterCompareFunc column_sort_fn);
 
-/** This function adds a new date column to a GncTreeView base
- *  view.  The parameters it takes in common with
- *  gnc_tree_view_add_text_column() behave the same as there.
- */
-GtkTreeViewColumn *
-gnc_tree_view_add_date_column (GncTreeView *view,
-                               const gchar *column_title,
-                               const gchar *pref_name,
-                               const gchar *icon_name,
-                               const gchar *sizing_text,
-                               gint model_data_column,
-                               gint model_visibility_column,
-                               GtkTreeIterCompareFunc column_sort_fn);
-
-
 /** This function adds a new numeric column to a GncTreeView base
  *  view.  It takes all the parameters necessary to hook a
  *  GtkTreeModel column to a GtkTreeViewColumn.  A numeric

commit 4bbcde7296b67fb233f9f7ba6a68ec9925ed7ab2
Author: Richard Cohen <richard at daijobu.co.uk>
Date:   Thu Jun 1 10:13:37 2023 +0100

    Refactor: remove unused gnc_tree_view_add_combo_column()

diff --git a/gnucash/gnome-utils/gnc-tree-view.c b/gnucash/gnome-utils/gnc-tree-view.c
index 3a0a22ed22..0cb5ee8f89 100644
--- a/gnucash/gnome-utils/gnc-tree-view.c
+++ b/gnucash/gnome-utils/gnc-tree-view.c
@@ -2085,65 +2085,6 @@ gnc_tree_view_add_date_column (GncTreeView *view,
 }
 
 
-GtkTreeViewColumn *
-gnc_tree_view_add_combo_column (GncTreeView *view,
-                                const gchar *column_title,
-                                const gchar *pref_name,
-                                const gchar *sizing_text,
-                                gint model_data_column,
-                                gint model_visibility_column,
-                                GtkTreeModel *combo_tree_model,
-                                gint combo_model_text_column,
-                                GtkTreeIterCompareFunc column_sort_fn)
-{
-    GtkTreeViewColumn *column;
-    GtkCellRenderer *renderer;
-    PangoLayout* layout;
-    int default_width, title_width;
-
-    g_return_val_if_fail (GNC_IS_TREE_VIEW(view), NULL);
-
-    column = gtk_tree_view_column_new ();
-    gtk_tree_view_column_set_title (column, gettext(column_title));
-
-    /* Set up a renderer and attributes */
-    renderer = gtk_cell_renderer_combo_new ();
-    gtk_tree_view_column_pack_start (column, renderer, TRUE);
-
-    /* Set renderer attributes controlled by the model */
-    if (model_data_column != GNC_TREE_VIEW_COLUMN_DATA_NONE)
-        gtk_tree_view_column_add_attribute (column, renderer,
-                                            "text", model_data_column);
-    if (model_visibility_column != GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS)
-        gtk_tree_view_column_add_attribute (column, renderer,
-                                            "visible", model_visibility_column);
-
-    /* Default size is the larger of the column title and the sizing text */
-    layout = gtk_widget_create_pango_layout (GTK_WIDGET(view), column_title);
-    pango_layout_get_pixel_size (layout, &title_width, NULL);
-    g_object_unref (layout);
-    layout = gtk_widget_create_pango_layout (GTK_WIDGET(view), sizing_text);
-    pango_layout_get_pixel_size (layout, &default_width, NULL);
-    g_object_unref (layout);
-    default_width = MAX(default_width, title_width);
-    if (default_width)
-        default_width += 10; /* padding on either side */
-
-    gnc_tree_view_column_properties (view, column, pref_name, model_data_column,
-                                     default_width, TRUE, column_sort_fn);
-
-    /* Stuff specific to combo */
-    if (combo_tree_model)
-    {
-        g_object_set (G_OBJECT(renderer), "model", combo_tree_model,
-                      "text-column", combo_model_text_column, NULL);
-    }
-    /* TODO: has-entry? */
-
-    gnc_tree_view_append_column (view, column);
-    return column;
-}
-
 GtkCellRenderer *
 gnc_tree_view_column_get_renderer (GtkTreeViewColumn *column)
 {
diff --git a/gnucash/gnome-utils/gnc-tree-view.h b/gnucash/gnome-utils/gnc-tree-view.h
index 9c89280648..124093d56c 100644
--- a/gnucash/gnome-utils/gnc-tree-view.h
+++ b/gnucash/gnome-utils/gnc-tree-view.h
@@ -287,25 +287,6 @@ gnc_tree_view_add_pix_column (GncTreeView *view,
                               gint model_visibility_column,
                               GtkTreeIterCompareFunc column_sort_fn);
 
-/** This function adds a new combobox column to a GncTreeView base
- *  view.  The parameters it takes in common with
- *  gnc_tree_view_add_text_column() behave the same as there.  In
- *  addition, it will use combo_tree_model as the GtkTreeModel for the
- *  combobox, and combo_model_text_column will be the column in the
- *  model used for displaying the text in the combobox.
- */
-GtkTreeViewColumn *
-gnc_tree_view_add_combo_column (GncTreeView *view,
-                                const gchar *column_title,
-                                const gchar *pref_name,
-                                const gchar *sizing_text,
-                                gint model_data_column,
-                                gint model_visibility_column,
-                                GtkTreeModel *combo_tree_model,
-                                gint combo_model_text_column,
-                                GtkTreeIterCompareFunc column_sort_fn);
-
-
 /** This function adds a new date column to a GncTreeView base
  *  view.  The parameters it takes in common with
  *  gnc_tree_view_add_text_column() behave the same as there.



Summary of changes:
 gnucash/gnome-utils/CMakeLists.txt                 |   6 -
 gnucash/gnome-utils/gnc-cell-renderer-date.c       | 450 -----------------
 gnucash/gnome-utils/gnc-cell-renderer-date.h       |  71 ---
 .../gnome-utils/gnc-cell-renderer-popup-entry.c    | 356 -------------
 .../gnome-utils/gnc-cell-renderer-popup-entry.h    |  74 ---
 gnucash/gnome-utils/gnc-cell-renderer-popup.c      | 554 ---------------------
 gnucash/gnome-utils/gnc-cell-renderer-popup.h      |  94 ----
 gnucash/gnome-utils/gnc-tree-view.c                | 127 -----
 gnucash/gnome-utils/gnc-tree-view.h                |  35 --
 po/POTFILES.in                                     |   3 -
 10 files changed, 1770 deletions(-)
 delete mode 100644 gnucash/gnome-utils/gnc-cell-renderer-date.c
 delete mode 100644 gnucash/gnome-utils/gnc-cell-renderer-date.h
 delete mode 100644 gnucash/gnome-utils/gnc-cell-renderer-popup-entry.c
 delete mode 100644 gnucash/gnome-utils/gnc-cell-renderer-popup-entry.h
 delete mode 100644 gnucash/gnome-utils/gnc-cell-renderer-popup.c
 delete mode 100644 gnucash/gnome-utils/gnc-cell-renderer-popup.h



More information about the gnucash-changes mailing list