mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge branch 'maint'
This commit is contained in:
commit
415f625bee
@ -279,7 +279,7 @@ string(REGEX MATCH "^[0-9]+[.]" SWIG_MAJOR ${SWIG_VERSION})
|
||||
|
||||
# guile library and include dir
|
||||
pkg_check_modules (GUILE3 guile-3.0 QUIET)
|
||||
pkg_check_modules (GUILE22 guile-2.2 QUIET)
|
||||
pkg_check_modules (GUILE22 guile-2.2)
|
||||
pkg_check_modules (GUILE2 guile-2.0>=2.0.9 QUIET)
|
||||
|
||||
if (GUILE3_FOUND) # found guile-3.0
|
||||
|
@ -743,6 +743,7 @@ tax_table_window_close_handler (gpointer data)
|
||||
TaxTableWindow *ttw = data;
|
||||
g_return_if_fail (ttw);
|
||||
|
||||
gnc_save_window_size (GNC_PREFS_GROUP, GTK_WINDOW(ttw->dialog));
|
||||
gtk_widget_destroy (ttw->dialog);
|
||||
}
|
||||
|
||||
@ -750,9 +751,19 @@ void
|
||||
tax_table_window_close (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
TaxTableWindow *ttw = data;
|
||||
gnc_close_gui_component (ttw->component_id);
|
||||
}
|
||||
|
||||
gnc_save_window_size (GNC_PREFS_GROUP, GTK_WINDOW(ttw->dialog));
|
||||
gnc_ui_tax_table_window_destroy (ttw);
|
||||
static gboolean
|
||||
tax_table_window_delete_event_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
TaxTableWindow *ttw = user_data;
|
||||
// this cb allows the window size to be saved on closing with the X
|
||||
gnc_save_window_size (GNC_PREFS_GROUP,
|
||||
GTK_WINDOW(ttw->dialog));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
@ -764,13 +775,33 @@ tax_table_window_destroy_cb (GtkWidget *widget, gpointer data)
|
||||
|
||||
gnc_unregister_gui_component (ttw->component_id);
|
||||
|
||||
if (ttw->dialog)
|
||||
{
|
||||
gtk_widget_destroy (ttw->dialog);
|
||||
ttw->dialog = NULL;
|
||||
}
|
||||
g_free (ttw);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
find_handler (gpointer find_data, gpointer user_data)
|
||||
tax_table_window_key_press_cb (GtkWidget *widget, GdkEventKey *event,
|
||||
gpointer data)
|
||||
{
|
||||
TaxTableWindow *ttw = user_data;
|
||||
TaxTableWindow *ttw = data;
|
||||
|
||||
if (event->keyval == GDK_KEY_Escape)
|
||||
{
|
||||
tax_table_window_close_handler (ttw);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
find_handler (gpointer find_data, gpointer data)
|
||||
{
|
||||
TaxTableWindow *ttw = data;
|
||||
QofBook *book = find_data;
|
||||
|
||||
return (ttw != NULL && ttw->book == book);
|
||||
@ -819,6 +850,12 @@ gnc_ui_tax_table_window_new (GtkWindow *parent, QofBook *book)
|
||||
gtk_widget_set_name (GTK_WIDGET(ttw->dialog), "gnc-id-new-tax-table");
|
||||
gnc_widget_style_context_add_class (GTK_WIDGET(ttw->dialog), "gnc-class-taxes");
|
||||
|
||||
g_signal_connect (ttw->dialog, "delete-event",
|
||||
G_CALLBACK(tax_table_window_delete_event_cb), ttw);
|
||||
|
||||
g_signal_connect (ttw->dialog, "key_press_event",
|
||||
G_CALLBACK (tax_table_window_key_press_cb), ttw);
|
||||
|
||||
/* Create the tax tables view */
|
||||
view = GTK_TREE_VIEW(ttw->names_view);
|
||||
store = gtk_list_store_new (NUM_TAX_TABLE_COLS, G_TYPE_STRING,
|
||||
@ -890,16 +927,6 @@ gnc_ui_tax_table_window_new (GtkWindow *parent, QofBook *book)
|
||||
return ttw;
|
||||
}
|
||||
|
||||
/* Destroy a tax-table window */
|
||||
void
|
||||
gnc_ui_tax_table_window_destroy (TaxTableWindow *ttw)
|
||||
{
|
||||
if (!ttw)
|
||||
return;
|
||||
|
||||
gnc_close_gui_component (ttw->component_id);
|
||||
}
|
||||
|
||||
/* Create a new tax-table by name */
|
||||
GncTaxTable *
|
||||
gnc_ui_tax_table_new_from_name (GtkWindow *parent, QofBook *book, const char *name)
|
||||
|
@ -718,8 +718,7 @@ void
|
||||
billterms_window_close (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
BillTermsWindow *btw = data;
|
||||
|
||||
gnc_ui_billterms_window_destroy (btw);
|
||||
gnc_close_gui_component (btw->component_id);
|
||||
}
|
||||
|
||||
void
|
||||
@ -731,13 +730,33 @@ billterms_window_destroy_cb (GtkWidget *widget, gpointer data)
|
||||
|
||||
gnc_unregister_gui_component (btw->component_id);
|
||||
|
||||
if (btw->window)
|
||||
{
|
||||
gtk_widget_destroy (btw->window);
|
||||
btw->window = NULL;
|
||||
}
|
||||
g_free (btw);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
find_handler (gpointer find_data, gpointer user_data)
|
||||
billterms_window_key_press_cb (GtkWidget *widget, GdkEventKey *event,
|
||||
gpointer data)
|
||||
{
|
||||
BillTermsWindow *btw = user_data;
|
||||
BillTermsWindow *btw = data;
|
||||
|
||||
if (event->keyval == GDK_KEY_Escape)
|
||||
{
|
||||
billterms_window_close_handler (btw);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
find_handler (gpointer find_data, gpointer data)
|
||||
{
|
||||
BillTermsWindow *btw = data;
|
||||
QofBook *book = find_data;
|
||||
|
||||
return (btw != NULL && btw->book == book);
|
||||
@ -789,6 +808,9 @@ gnc_ui_billterms_window_new (GtkWindow *parent, QofBook *book)
|
||||
gtk_widget_set_name (GTK_WIDGET(btw->window), "gnc-id-bill-terms");
|
||||
gnc_widget_style_context_add_class (GTK_WIDGET(btw->window), "gnc-class-bill-terms");
|
||||
|
||||
g_signal_connect (btw->window, "key_press_event",
|
||||
G_CALLBACK (billterms_window_key_press_cb), btw);
|
||||
|
||||
/* Initialize the view */
|
||||
view = GTK_TREE_VIEW(btw->terms_view);
|
||||
store = gtk_list_store_new (NUM_BILL_TERM_COLS, G_TYPE_STRING, G_TYPE_POINTER);
|
||||
@ -836,16 +858,6 @@ gnc_ui_billterms_window_new (GtkWindow *parent, QofBook *book)
|
||||
return btw;
|
||||
}
|
||||
|
||||
/* Destroy a billterms window */
|
||||
void
|
||||
gnc_ui_billterms_window_destroy (BillTermsWindow *btw)
|
||||
{
|
||||
if (!btw)
|
||||
return;
|
||||
|
||||
gnc_close_gui_component (btw->component_id);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Create a new billterms by name */
|
||||
GncBillTerm *
|
||||
|
@ -70,6 +70,9 @@ void gnc_commodities_dialog_edit_clicked (GtkWidget *widget, gpointer data);
|
||||
void gnc_commodities_dialog_remove_clicked (GtkWidget *widget, gpointer data);
|
||||
void gnc_commodities_dialog_close_clicked (GtkWidget *widget, gpointer data);
|
||||
void gnc_commodities_show_currencies_toggled (GtkToggleButton *toggle, CommoditiesDialog *cd);
|
||||
gboolean gnc_commodities_window_key_press_cb (GtkWidget *widget,
|
||||
GdkEventKey *event,
|
||||
gpointer data);
|
||||
|
||||
|
||||
void
|
||||
@ -85,6 +88,18 @@ gnc_commodities_window_destroy_cb (GtkWidget *object, CommoditiesDialog *cd)
|
||||
g_free (cd);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gnc_commodities_window_delete_event_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
CommoditiesDialog *cd = data;
|
||||
// this cb allows the window size to be saved on closing with the X
|
||||
gnc_save_window_size (GNC_PREFS_GROUP,
|
||||
GTK_WINDOW(cd->window));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gnc_commodities_dialog_edit_clicked (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
@ -247,6 +262,7 @@ void
|
||||
gnc_commodities_dialog_close_clicked (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
CommoditiesDialog *cd = data;
|
||||
|
||||
gnc_close_gui_component_by_data (DIALOG_COMMODITIES_CM_CLASS, cd);
|
||||
}
|
||||
|
||||
@ -361,6 +377,12 @@ gnc_commodities_dialog_create (GtkWidget * parent, CommoditiesDialog *cd)
|
||||
g_signal_connect (cd->window, "destroy",
|
||||
G_CALLBACK(gnc_commodities_window_destroy_cb), cd);
|
||||
|
||||
g_signal_connect (cd->window, "delete-event",
|
||||
G_CALLBACK(gnc_commodities_window_delete_event_cb), cd);
|
||||
|
||||
g_signal_connect (cd->window, "key_press_event",
|
||||
G_CALLBACK (gnc_commodities_window_key_press_cb), cd);
|
||||
|
||||
gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, cd);
|
||||
g_object_unref (G_OBJECT(builder));
|
||||
|
||||
@ -401,6 +423,21 @@ show_handler (const char *klass, gint component_id,
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gnc_commodities_window_key_press_cb (GtkWidget *widget, GdkEventKey *event,
|
||||
gpointer data)
|
||||
{
|
||||
CommoditiesDialog *cd = data;
|
||||
|
||||
if (event->keyval == GDK_KEY_Escape)
|
||||
{
|
||||
close_handler (cd);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_commodities_dialog *
|
||||
* opens up a window to edit price information *
|
||||
|
@ -229,6 +229,19 @@ setup_file_dialog (GtkBuilder *builder, GtkFileChooserButton *fcb,
|
||||
g_free (display_uri);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gnc_doclink_get_uri_event_cb (GtkWidget *widget, GdkEventKey *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (event->keyval == GDK_KEY_Escape)
|
||||
{
|
||||
gtk_dialog_response (GTK_DIALOG(widget),
|
||||
GTK_RESPONSE_CANCEL);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gchar *
|
||||
gnc_doclink_get_uri_dialog (GtkWindow *parent, const gchar *title,
|
||||
const gchar *uri)
|
||||
@ -258,6 +271,10 @@ gnc_doclink_get_uri_dialog (GtkWindow *parent, const gchar *title,
|
||||
gtk_widget_set_name (GTK_WIDGET(dialog), "gnc-id-doclink");
|
||||
gnc_widget_style_context_add_class (GTK_WIDGET(dialog), "gnc-class-doclink");
|
||||
|
||||
// Use this event to capture the escape key being pressed
|
||||
g_signal_connect (dialog, "key_press_event",
|
||||
G_CALLBACK(gnc_doclink_get_uri_event_cb), dialog);
|
||||
|
||||
head_label = GTK_WIDGET(gtk_builder_get_object (builder, "path_head_label"));
|
||||
ok_button = GTK_WIDGET(gtk_builder_get_object (builder, "ok_button"));
|
||||
|
||||
@ -361,6 +378,22 @@ gnc_doclink_get_uri_dialog (GtkWindow *parent, const gchar *title,
|
||||
|
||||
static void close_handler (gpointer user_data);
|
||||
|
||||
static gboolean
|
||||
gnc_doclink_dialog_window_delete_event_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
DoclinkDialog *doclink_dialog = user_data;
|
||||
// this cb allows the window size to be saved on closing with the X
|
||||
if (doclink_dialog->is_list_trans)
|
||||
gnc_save_window_size (GNC_PREFS_GROUP_TRANS,
|
||||
GTK_WINDOW(doclink_dialog->window));
|
||||
else
|
||||
gnc_save_window_size (GNC_PREFS_GROUP_BUS,
|
||||
GTK_WINDOW(doclink_dialog->window));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_doclink_dialog_window_destroy_cb (GtkWidget *object, gpointer user_data)
|
||||
{
|
||||
@ -959,6 +992,9 @@ gnc_doclink_dialog_create (GtkWindow *parent, DoclinkDialog *doclink_dialog)
|
||||
G_CALLBACK (gnc_doclink_dialog_window_destroy_cb),
|
||||
doclink_dialog);
|
||||
|
||||
g_signal_connect (doclink_dialog->window, "delete-event",
|
||||
G_CALLBACK(gnc_doclink_dialog_window_delete_event_cb), doclink_dialog);
|
||||
|
||||
g_signal_connect (doclink_dialog->window, "key_press_event",
|
||||
G_CALLBACK (gnc_doclink_dialog_window_key_press_cb),
|
||||
doclink_dialog);
|
||||
@ -979,8 +1015,6 @@ gnc_doclink_dialog_create (GtkWindow *parent, DoclinkDialog *doclink_dialog)
|
||||
g_signal_connect (doclink_dialog->view, "row-activated",
|
||||
G_CALLBACK (row_selected_trans_cb),
|
||||
(gpointer)doclink_dialog);
|
||||
gnc_restore_window_size (GNC_PREFS_GROUP_TRANS,
|
||||
GTK_WINDOW (doclink_dialog->window), parent);
|
||||
get_trans_info (doclink_dialog);
|
||||
}
|
||||
else
|
||||
@ -1002,8 +1036,6 @@ gnc_doclink_dialog_create (GtkWindow *parent, DoclinkDialog *doclink_dialog)
|
||||
g_signal_connect (doclink_dialog->view, "row-activated",
|
||||
G_CALLBACK (row_selected_bus_cb),
|
||||
(gpointer)doclink_dialog);
|
||||
gnc_restore_window_size (GNC_PREFS_GROUP_BUS,
|
||||
GTK_WINDOW (doclink_dialog->window), parent);
|
||||
get_bus_info (doclink_dialog);
|
||||
}
|
||||
|
||||
@ -1012,8 +1044,6 @@ gnc_doclink_dialog_create (GtkWindow *parent, DoclinkDialog *doclink_dialog)
|
||||
|
||||
g_object_unref (G_OBJECT(builder));
|
||||
|
||||
gtk_widget_show_all (GTK_WIDGET(window));
|
||||
|
||||
gtk_tree_view_column_set_expand (expanding_column, TRUE);
|
||||
gtk_tree_view_columns_autosize (GTK_TREE_VIEW(doclink_dialog->view));
|
||||
LEAVE(" ");
|
||||
@ -1091,6 +1121,9 @@ gnc_doclink_business_dialog (GtkWindow *parent)
|
||||
gnc_gui_component_set_session (doclink_dialog->component_id,
|
||||
doclink_dialog->session);
|
||||
|
||||
gnc_restore_window_size (GNC_PREFS_GROUP_BUS,
|
||||
GTK_WINDOW(doclink_dialog->window), parent);
|
||||
gtk_widget_show_all (GTK_WIDGET(doclink_dialog->window));
|
||||
LEAVE(" ");
|
||||
}
|
||||
|
||||
@ -1119,5 +1152,8 @@ gnc_doclink_trans_dialog (GtkWindow *parent)
|
||||
gnc_gui_component_set_session (doclink_dialog->component_id,
|
||||
doclink_dialog->session);
|
||||
|
||||
gnc_restore_window_size (GNC_PREFS_GROUP_TRANS,
|
||||
GTK_WINDOW(doclink_dialog->window), parent);
|
||||
gtk_widget_show_all (GTK_WIDGET(doclink_dialog->window));
|
||||
LEAVE(" ");
|
||||
}
|
||||
|
@ -59,13 +59,16 @@
|
||||
static QofLogModule log_module = GNC_MOD_GUI;
|
||||
|
||||
|
||||
void gnc_prices_dialog_window_destroy_cb (GtkWidget *object, gpointer data);
|
||||
void gnc_prices_dialog_destroy_cb (GtkWidget *object, gpointer data);
|
||||
void gnc_prices_dialog_close_cb (GtkDialog *dialog, gpointer data);
|
||||
void gnc_prices_dialog_edit_clicked (GtkWidget *widget, gpointer data);
|
||||
void gnc_prices_dialog_remove_clicked (GtkWidget *widget, gpointer data);
|
||||
void gnc_prices_dialog_remove_old_clicked (GtkWidget *widget, gpointer data);
|
||||
void gnc_prices_dialog_add_clicked (GtkWidget *widget, gpointer data);
|
||||
void gnc_prices_dialog_get_quotes_clicked (GtkWidget *widget, gpointer data);
|
||||
static gboolean gnc_prices_dialog_key_press_cb (GtkWidget *widget,
|
||||
GdkEventKey *event,
|
||||
gpointer data);
|
||||
|
||||
|
||||
typedef struct
|
||||
@ -88,7 +91,7 @@ typedef struct
|
||||
|
||||
|
||||
void
|
||||
gnc_prices_dialog_window_destroy_cb (GtkWidget *object, gpointer data)
|
||||
gnc_prices_dialog_destroy_cb (GtkWidget *object, gpointer data)
|
||||
{
|
||||
PricesDialog *pdb_dialog = data;
|
||||
|
||||
@ -106,6 +109,19 @@ gnc_prices_dialog_window_destroy_cb (GtkWidget *object, gpointer data)
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
gnc_prices_dialog_delete_event_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
PricesDialog *pdb_dialog = data;
|
||||
// this cb allows the window size to be saved on closing with the X
|
||||
gnc_save_window_size (GNC_PREFS_GROUP,
|
||||
GTK_WINDOW(pdb_dialog->window));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gnc_prices_dialog_close_cb (GtkDialog *dialog, gpointer data)
|
||||
{
|
||||
@ -713,6 +729,12 @@ gnc_prices_dialog_create (GtkWidget * parent, PricesDialog *pdb_dialog)
|
||||
pdb_dialog->book = qof_session_get_book(pdb_dialog->session);
|
||||
pdb_dialog->price_db = gnc_pricedb_get_db(pdb_dialog->book);
|
||||
|
||||
g_signal_connect (pdb_dialog->window, "delete-event",
|
||||
G_CALLBACK(gnc_prices_dialog_delete_event_cb), pdb_dialog);
|
||||
|
||||
g_signal_connect (pdb_dialog->window, "key_press_event",
|
||||
G_CALLBACK (gnc_prices_dialog_key_press_cb), pdb_dialog);
|
||||
|
||||
/* price tree */
|
||||
scrolled_window = GTK_WIDGET(gtk_builder_get_object (builder, "price_list_window"));
|
||||
view = gnc_tree_view_price_new(pdb_dialog->book,
|
||||
@ -761,7 +783,7 @@ gnc_prices_dialog_create (GtkWidget * parent, PricesDialog *pdb_dialog)
|
||||
}
|
||||
|
||||
g_signal_connect (pdb_dialog->window, "destroy",
|
||||
G_CALLBACK(gnc_prices_dialog_window_destroy_cb), pdb_dialog);
|
||||
G_CALLBACK(gnc_prices_dialog_destroy_cb), pdb_dialog);
|
||||
|
||||
gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, pdb_dialog);
|
||||
g_object_unref(G_OBJECT(builder));
|
||||
@ -811,6 +833,22 @@ show_handler (const char *klass, gint component_id,
|
||||
}
|
||||
|
||||
|
||||
gboolean
|
||||
gnc_prices_dialog_key_press_cb (GtkWidget *widget, GdkEventKey *event,
|
||||
gpointer data)
|
||||
{
|
||||
PricesDialog *pdb_dialog = data;
|
||||
|
||||
if (event->keyval == GDK_KEY_Escape)
|
||||
{
|
||||
close_handler (pdb_dialog);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* gnc_prices_dialog *
|
||||
* opens up a window showing all price information *
|
||||
|
@ -30,11 +30,16 @@
|
||||
#include "dialog-report-style-sheet.h"
|
||||
#include "dialog-options.h"
|
||||
#include "dialog-utils.h"
|
||||
#include "gnc-component-manager.h"
|
||||
#include "gnc-session.h"
|
||||
#include "gnc-gtk-utils.h"
|
||||
#include "gnc-guile-utils.h"
|
||||
#include "gnc-report.h"
|
||||
#include "gnc-ui.h"
|
||||
|
||||
#define DIALOG_STYLE_SHEETS_CM_CLASS "style-sheets-dialog"
|
||||
#define GNC_PREFS_GROUP "dialogs.style-sheet"
|
||||
|
||||
StyleSheetDialog * gnc_style_sheet_dialog = NULL;
|
||||
|
||||
struct _stylesheetdialog
|
||||
@ -43,6 +48,8 @@ struct _stylesheetdialog
|
||||
GtkTreeView * list_view;
|
||||
GtkListStore * list_store;
|
||||
GtkWidget * options_frame;
|
||||
gint component_id;
|
||||
QofSession * session;
|
||||
};
|
||||
|
||||
typedef struct ss_info
|
||||
@ -61,6 +68,11 @@ enum
|
||||
N_COLUMNS
|
||||
};
|
||||
|
||||
void gnc_style_sheet_select_dialog_new_cb (GtkWidget *widget, gpointer user_data);
|
||||
void gnc_style_sheet_select_dialog_edit_cb (GtkWidget *widget, gpointer user_data);
|
||||
void gnc_style_sheet_select_dialog_delete_cb (GtkWidget *widget, gpointer user_data);
|
||||
void gnc_style_sheet_select_dialog_close_cb (GtkWidget *widget, gpointer user_data);
|
||||
void gnc_style_sheet_select_dialog_destroy_cb (GtkWidget *widget, gpointer user_data);
|
||||
|
||||
/************************************************************
|
||||
* Style Sheet Edit Dialog (I.E. an options dialog) *
|
||||
@ -116,10 +128,8 @@ gnc_style_sheet_options_apply_cb(GNCOptionWin * propertybox,
|
||||
g_free (iter->data);
|
||||
}
|
||||
g_list_free (results);
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gnc_style_sheet_options_close_cb (GNCOptionWin * propertybox,
|
||||
gpointer user_data)
|
||||
@ -144,7 +154,6 @@ gnc_style_sheet_options_close_cb(GNCOptionWin * propertybox,
|
||||
g_free (ssi);
|
||||
}
|
||||
|
||||
|
||||
static ss_info *
|
||||
gnc_style_sheet_dialog_create (StyleSheetDialog * ss,
|
||||
gchar *name,
|
||||
@ -182,11 +191,9 @@ gnc_style_sheet_dialog_create(StyleSheetDialog * ss,
|
||||
GTK_WINDOW(gnc_style_sheet_dialog->toplevel));
|
||||
gtk_window_set_destroy_with_parent (GTK_WINDOW(window), TRUE);
|
||||
gtk_window_present (GTK_WINDOW(window));
|
||||
|
||||
return (ssinfo);
|
||||
}
|
||||
|
||||
|
||||
static SCM
|
||||
gnc_style_sheet_new (StyleSheetDialog * ssd)
|
||||
{
|
||||
@ -274,7 +281,6 @@ gnc_style_sheet_new (StyleSheetDialog * ssd)
|
||||
return (new_ss);
|
||||
}
|
||||
|
||||
|
||||
/************************************************************
|
||||
* Style Sheet Selection Dialog *
|
||||
************************************************************/
|
||||
@ -285,7 +291,6 @@ gnc_style_sheet_select_dialog_add_one(StyleSheetDialog * ss,
|
||||
{
|
||||
SCM get_name;
|
||||
gchar *c_name;
|
||||
GtkTreeSelection *selection;
|
||||
GtkTreeIter iter;
|
||||
|
||||
get_name = scm_c_eval_string ("gnc:html-style-sheet-name");
|
||||
@ -307,7 +312,7 @@ gnc_style_sheet_select_dialog_add_one(StyleSheetDialog * ss,
|
||||
|
||||
if (select)
|
||||
{
|
||||
selection = gtk_tree_view_get_selection (ss->list_view);
|
||||
GtkTreeSelection * selection = gtk_tree_view_get_selection (ss->list_view);
|
||||
gtk_tree_selection_select_iter (selection, &iter);
|
||||
}
|
||||
}
|
||||
@ -327,35 +332,55 @@ gnc_style_sheet_select_dialog_fill(StyleSheetDialog * ss)
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_style_sheet_select_dialog_response_cb (GtkDialog *unused,
|
||||
gint response,
|
||||
gnc_style_sheet_select_dialog_event_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
StyleSheetDialog * ss;
|
||||
GtkTreeSelection * selection;
|
||||
GtkTreeRowReference * row_ref;
|
||||
GtkTreeModel * model;
|
||||
GtkTreePath * path;
|
||||
GtkTreeIter iter;
|
||||
ss_info * ssinfo;
|
||||
SCM remover;
|
||||
SCM sheet_info;
|
||||
gchar *name;
|
||||
StyleSheetDialog * ss = (StyleSheetDialog *)user_data;
|
||||
|
||||
ss = (StyleSheetDialog *)user_data;
|
||||
switch (response)
|
||||
g_return_if_fail (event != NULL);
|
||||
g_return_if_fail (ss != NULL);
|
||||
|
||||
if (event->type != GDK_2BUTTON_PRESS)
|
||||
return;
|
||||
|
||||
/* Synthesize a click of the edit button */
|
||||
gnc_style_sheet_select_dialog_edit_cb (NULL, ss);
|
||||
}
|
||||
|
||||
void
|
||||
gnc_style_sheet_select_dialog_new_cb (GtkWidget *widget, gpointer user_data)
|
||||
{
|
||||
case GNC_RESPONSE_NEW:
|
||||
StyleSheetDialog * ss = (StyleSheetDialog *)user_data;
|
||||
SCM sheet_info;
|
||||
|
||||
sheet_info = gnc_style_sheet_new (ss);
|
||||
if (sheet_info == SCM_BOOL_F)
|
||||
break;
|
||||
gnc_style_sheet_select_dialog_add_one(ss, sheet_info, TRUE);
|
||||
/* Fall through */
|
||||
return;
|
||||
|
||||
gnc_style_sheet_select_dialog_add_one (ss, sheet_info, TRUE);
|
||||
|
||||
// now start the edit dialog
|
||||
gnc_style_sheet_select_dialog_edit_cb (NULL, ss);
|
||||
}
|
||||
|
||||
void
|
||||
gnc_style_sheet_select_dialog_edit_cb (GtkWidget *widget, gpointer user_data)
|
||||
{
|
||||
StyleSheetDialog * ss = (StyleSheetDialog *)user_data;
|
||||
GtkTreeSelection * selection = gtk_tree_view_get_selection (ss->list_view);
|
||||
GtkTreeModel * model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
case GNC_RESPONSE_EDIT:
|
||||
selection = gtk_tree_view_get_selection (ss->list_view);
|
||||
if (gtk_tree_selection_get_selected (selection, &model, &iter))
|
||||
{
|
||||
GtkTreeRowReference * row_ref;
|
||||
GtkTreePath * path;
|
||||
ss_info * ssinfo;
|
||||
gchar * name;
|
||||
|
||||
SCM sheet_info = NULL;
|
||||
|
||||
gtk_tree_model_get (model, &iter,
|
||||
COLUMN_NAME, &name,
|
||||
COLUMN_STYLESHEET, &sheet_info,
|
||||
@ -367,14 +392,26 @@ gnc_style_sheet_select_dialog_response_cb (GtkDialog *unused,
|
||||
gtk_list_store_set (ss->list_store, &iter,
|
||||
COLUMN_DIALOG, ssinfo,
|
||||
-1);
|
||||
gtk_tree_path_free (path);
|
||||
g_free (name);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
void
|
||||
gnc_style_sheet_select_dialog_delete_cb (GtkWidget *widget, gpointer user_data)
|
||||
{
|
||||
StyleSheetDialog * ss = (StyleSheetDialog *)user_data;
|
||||
GtkTreeSelection * selection = gtk_tree_view_get_selection (ss->list_view);
|
||||
GtkTreeModel * model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
case GNC_RESPONSE_DELETE:
|
||||
selection = gtk_tree_view_get_selection (ss->list_view);
|
||||
if (gtk_tree_selection_get_selected (selection, &model, &iter))
|
||||
{
|
||||
ss_info * ssinfo;
|
||||
|
||||
SCM sheet_info = NULL;
|
||||
SCM remover;
|
||||
|
||||
gtk_tree_model_get (model, &iter,
|
||||
COLUMN_STYLESHEET, &sheet_info,
|
||||
COLUMN_DIALOG, &ssinfo,
|
||||
@ -387,35 +424,68 @@ gnc_style_sheet_select_dialog_response_cb (GtkDialog *unused,
|
||||
scm_call_1 (remover, sheet_info);
|
||||
scm_gc_unprotect_object (sheet_info);
|
||||
}
|
||||
break;
|
||||
|
||||
case GTK_RESPONSE_CLOSE:
|
||||
default:
|
||||
gtk_widget_destroy(ss->toplevel);
|
||||
gnc_style_sheet_dialog = NULL;
|
||||
g_free(ss);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gnc_style_sheet_select_dialog_close_cb (GtkWidget *widget, gpointer user_data)
|
||||
{
|
||||
StyleSheetDialog * ss = (StyleSheetDialog *)user_data;
|
||||
gnc_close_gui_component (ss->component_id);
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_style_sheet_select_dialog_event_cb (GtkWidget *widget,
|
||||
static gboolean
|
||||
gnc_style_sheet_select_dialog_delete_event_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
StyleSheetDialog * ss = user_data;
|
||||
|
||||
g_return_if_fail(event != NULL);
|
||||
g_return_if_fail(ss != NULL);
|
||||
|
||||
if (event->type != GDK_2BUTTON_PRESS)
|
||||
return;
|
||||
|
||||
/* Synthesize a click of the edit button */
|
||||
gnc_style_sheet_select_dialog_response_cb (NULL, GNC_RESPONSE_EDIT, ss);
|
||||
StyleSheetDialog *ss = (StyleSheetDialog *)user_data;
|
||||
// this cb allows the window size to be saved on closing with the X
|
||||
gnc_save_window_size (GNC_PREFS_GROUP, GTK_WINDOW(ss->toplevel));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gnc_style_sheet_select_dialog_destroy_cb (GtkWidget *widget, gpointer user_data)
|
||||
{
|
||||
StyleSheetDialog *ss = (StyleSheetDialog *)user_data;
|
||||
|
||||
if (!ss)
|
||||
return;
|
||||
|
||||
gnc_unregister_gui_component (ss->component_id);
|
||||
|
||||
if (ss->toplevel)
|
||||
{
|
||||
gtk_widget_destroy (ss->toplevel);
|
||||
ss->toplevel = NULL;
|
||||
}
|
||||
gnc_style_sheet_dialog = NULL;
|
||||
g_free (ss);
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_style_sheet_window_close_handler (gpointer user_data)
|
||||
{
|
||||
StyleSheetDialog *ss = (StyleSheetDialog *)user_data;
|
||||
g_return_if_fail (ss);
|
||||
|
||||
gnc_save_window_size (GNC_PREFS_GROUP, GTK_WINDOW(ss->toplevel));
|
||||
gtk_widget_destroy (ss->toplevel);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gnc_style_sheet_select_dialog_check_escape_cb (GtkWidget *widget,
|
||||
GdkEventKey *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (event->keyval == GDK_KEY_Escape)
|
||||
{
|
||||
StyleSheetDialog * ss = (StyleSheetDialog *)user_data;
|
||||
gnc_close_gui_component (ss->component_id);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static StyleSheetDialog *
|
||||
gnc_style_sheet_select_dialog_create (GtkWindow *parent)
|
||||
@ -426,11 +496,11 @@ gnc_style_sheet_select_dialog_create(GtkWindow *parent)
|
||||
GtkTreeSelection * selection;
|
||||
|
||||
builder = gtk_builder_new ();
|
||||
gnc_builder_add_from_file (builder, "dialog-report.glade", "select_style_sheet_dialog");
|
||||
gnc_builder_add_from_file (builder, "dialog-report.glade", "select_style_sheet_window");
|
||||
|
||||
ss->toplevel = GTK_WIDGET(gtk_builder_get_object (builder, "select_style_sheet_dialog"));
|
||||
ss->toplevel = GTK_WIDGET(gtk_builder_get_object (builder, "select_style_sheet_window"));
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (ss->toplevel), GTK_WINDOW(parent));
|
||||
ss->session = gnc_get_current_session ();
|
||||
|
||||
// Set the name for this dialog so it can be easily manipulated with css
|
||||
gtk_widget_set_name (GTK_WIDGET(ss->toplevel), "gnc-id-style-sheet-select");
|
||||
@ -440,6 +510,7 @@ gnc_style_sheet_select_dialog_create(GtkWindow *parent)
|
||||
ss->list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_POINTER);
|
||||
gtk_tree_view_set_model (ss->list_view, GTK_TREE_MODEL(ss->list_store));
|
||||
g_object_unref (ss->list_store);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
gtk_tree_view_insert_column_with_attributes (ss->list_view, -1,
|
||||
_("Style Sheet Name"), renderer,
|
||||
@ -449,32 +520,48 @@ gnc_style_sheet_select_dialog_create(GtkWindow *parent)
|
||||
selection = gtk_tree_view_get_selection (ss->list_view);
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||
|
||||
g_signal_connect(ss->toplevel, "response",
|
||||
G_CALLBACK(gnc_style_sheet_select_dialog_response_cb), ss);
|
||||
g_signal_connect (ss->list_view, "event-after",
|
||||
G_CALLBACK(gnc_style_sheet_select_dialog_event_cb), ss);
|
||||
|
||||
g_signal_connect (ss->toplevel, "destroy",
|
||||
G_CALLBACK(gnc_style_sheet_select_dialog_destroy_cb), ss);
|
||||
|
||||
g_signal_connect (ss->toplevel, "delete-event",
|
||||
G_CALLBACK(gnc_style_sheet_select_dialog_delete_event_cb), ss);
|
||||
|
||||
g_signal_connect (ss->toplevel, "key-press-event",
|
||||
G_CALLBACK(gnc_style_sheet_select_dialog_check_escape_cb), ss);
|
||||
|
||||
gnc_style_sheet_select_dialog_fill (ss);
|
||||
|
||||
gtk_widget_show_all(ss->toplevel);
|
||||
|
||||
gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, ss);
|
||||
g_object_unref (G_OBJECT(builder));
|
||||
|
||||
return ss;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gnc_style_sheet_dialog_open (GtkWindow *parent)
|
||||
{
|
||||
if (gnc_style_sheet_dialog)
|
||||
{
|
||||
gtk_window_present (GTK_WINDOW(gnc_style_sheet_dialog->toplevel));
|
||||
}
|
||||
else
|
||||
{
|
||||
gnc_style_sheet_dialog =
|
||||
gnc_style_sheet_select_dialog_create (parent);
|
||||
}
|
||||
}
|
||||
|
||||
/* register with component manager */
|
||||
gnc_style_sheet_dialog->component_id =
|
||||
gnc_register_gui_component (DIALOG_STYLE_SHEETS_CM_CLASS,
|
||||
NULL, //no refresh handler
|
||||
gnc_style_sheet_window_close_handler,
|
||||
gnc_style_sheet_dialog);
|
||||
|
||||
gnc_gui_component_set_session (gnc_style_sheet_dialog->component_id,
|
||||
gnc_style_sheet_dialog->session);
|
||||
|
||||
gnc_restore_window_size (GNC_PREFS_GROUP,
|
||||
GTK_WINDOW(gnc_style_sheet_dialog->toplevel),
|
||||
GTK_WINDOW(parent));
|
||||
gtk_widget_show_all (gnc_style_sheet_dialog->toplevel);
|
||||
}
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ static GtkActionEntry gnc_plugin_actions [] =
|
||||
|
||||
/* Other menu items */
|
||||
{
|
||||
"BusinessLinkOpenAction", NULL, N_("Business Links"), NULL,
|
||||
"BusinessLinkedDocsAction", NULL, N_("Business Linked Documents"), NULL,
|
||||
N_("View all Linked Business Documents"),
|
||||
G_CALLBACK (gnc_plugin_business_cmd_doclink)
|
||||
},
|
||||
|
@ -442,7 +442,7 @@ static action_toolbar_labels creditnote_action_tooltips[] = {
|
||||
{"BlankEntryAction", N_("Move to the blank entry at the bottom of the credit note")},
|
||||
{"ToolsProcessPaymentAction", N_("Enter a payment for the owner of this credit note") },
|
||||
{"ReportsCompanyReportAction", N_("Open a company report window for the owner of this credit note") },
|
||||
{"BusinessLinkAction", N_("_Manage Document Link...")},
|
||||
{"BusinessLinkAction", N_("Manage Document Link...")},
|
||||
{"BusinessLinkOpenAction", N_("Open Linked Document")},
|
||||
{NULL, NULL},
|
||||
};
|
||||
@ -1360,16 +1360,23 @@ gnc_plugin_page_invoice_cmd_link (GtkAction *action,
|
||||
|
||||
ret_uri = gnc_doclink_get_uri_dialog (parent, _("Manage Document Link"), uri);
|
||||
|
||||
if (ret_uri)
|
||||
has_uri = TRUE;
|
||||
|
||||
if (ret_uri && g_strcmp0 (uri, ret_uri) != 0)
|
||||
{
|
||||
GtkWidget *doclink_button =
|
||||
gnc_invoice_window_get_doclink_button (priv->iw);
|
||||
|
||||
if (doclink_button)
|
||||
{
|
||||
if (g_strcmp0 (ret_uri, "") == 0)
|
||||
{
|
||||
has_uri = FALSE;
|
||||
if (doclink_button)
|
||||
gtk_widget_hide (GTK_WIDGET(doclink_button));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (doclink_button)
|
||||
{
|
||||
gchar *display_uri =
|
||||
gnc_doclink_get_unescaped_just_uri (ret_uri);
|
||||
@ -1380,9 +1387,7 @@ gnc_plugin_page_invoice_cmd_link (GtkAction *action,
|
||||
}
|
||||
}
|
||||
gncInvoiceSetDocLink (invoice, ret_uri);
|
||||
has_uri = TRUE;
|
||||
}
|
||||
|
||||
// update the menu actions
|
||||
update_doclink_actions (GNC_PLUGIN_PAGE(plugin_page), has_uri);
|
||||
|
||||
|
@ -498,7 +498,7 @@ static GtkActionEntry gnc_plugin_page_register_actions [] =
|
||||
},
|
||||
{
|
||||
"GotoDateAction", "x-office-calendar", N_ ("_Go to Date"), "<primary>G",
|
||||
N_ ("Move to the split at specified date"),
|
||||
N_ ("Move to the split at the specified date"),
|
||||
G_CALLBACK (gnc_plugin_page_register_cmd_goto_date)
|
||||
},
|
||||
{
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "gnc-engine.h"
|
||||
#include "gnc-file.h"
|
||||
#include "gnc-hooks.h"
|
||||
#include "gncInvoice.h"
|
||||
#include "gfec.h"
|
||||
#include "gnc-main-window.h"
|
||||
#include "gnc-menu-extensions.h"
|
||||
@ -120,6 +121,7 @@ gnc_html_register_url_cb (const char *location, const char *label,
|
||||
Split * split = NULL;
|
||||
Account * account = NULL;
|
||||
Transaction * trans;
|
||||
GncInvoice * invoice;
|
||||
GList * node;
|
||||
GncGUID guid;
|
||||
QofInstance * entity = NULL;
|
||||
@ -180,6 +182,19 @@ gnc_html_register_url_cb (const char *location, const char *label,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
else if (strncmp ("invoice-doclink-guid=", location,
|
||||
strlen ("invoice-doclink-guid=")) == 0)
|
||||
{
|
||||
if (!validate_type("invoice-doclink-guid=", location, GNC_ID_INVOICE,
|
||||
result, &guid, &entity))
|
||||
return FALSE;
|
||||
|
||||
invoice = (GncInvoice *) entity;
|
||||
gnc_doclink_open_uri (gnc_ui_get_gtk_window (GTK_WIDGET (result->parent)),
|
||||
gncInvoiceGetDocLink (invoice));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
else if (strncmp ("split-guid=", location, strlen ("split-guid=")) == 0)
|
||||
{
|
||||
if (!validate_type("split-guid=", location, GNC_ID_SPLIT, result, &guid, &entity))
|
||||
|
@ -107,7 +107,7 @@ ght_gnc_numeric_hash(gconstpointer v1)
|
||||
{
|
||||
gnc_numeric n1 = *(gnc_numeric *)v1;
|
||||
gdouble d1 = gnc_numeric_to_double(n1);
|
||||
return g_str_hash(&d1);
|
||||
return g_double_hash (&d1);
|
||||
}
|
||||
|
||||
typedef struct _sack_foreach_data_t
|
||||
@ -122,7 +122,8 @@ static void sack_foreach_func(gpointer key, gpointer value, gpointer user_data)
|
||||
gnc_numeric thisvalue = *(gnc_numeric *)key;
|
||||
|
||||
gnc_numeric reachable_value = gnc_numeric_add_fixed(thisvalue, data->split_value);
|
||||
data->reachable_list = g_list_append(data->reachable_list, g_memdup(&reachable_value, sizeof(gnc_numeric)));
|
||||
data->reachable_list = g_list_prepend
|
||||
(data->reachable_list, g_memdup (&reachable_value, sizeof (gnc_numeric)));
|
||||
PINFO(" Sack: found %s, added %s\n", gnc_numeric_to_string(thisvalue), gnc_numeric_to_string(reachable_value));
|
||||
}
|
||||
|
||||
@ -138,6 +139,8 @@ gnc_autoclear_window_ok_cb (GtkWidget *widget,
|
||||
|
||||
/* Value we have to reach */
|
||||
toclear_value = gnc_amount_edit_get_amount(data->end_value);
|
||||
if (gnc_reverse_balance(data->account))
|
||||
toclear_value = gnc_numeric_neg(toclear_value);
|
||||
toclear_value = gnc_numeric_convert(toclear_value, xaccAccountGetCommoditySCU(data->account), GNC_HOW_RND_NEVER);
|
||||
|
||||
/* Extract which splits are not cleared and compute the amount we have to clear */
|
||||
@ -151,7 +154,7 @@ gnc_autoclear_window_ok_cb (GtkWidget *widget,
|
||||
value = xaccSplitGetAmount (split);
|
||||
|
||||
if (recn == NREC)
|
||||
nc_list = g_list_append(nc_list, split);
|
||||
nc_list = g_list_prepend (nc_list, split);
|
||||
else
|
||||
toclear_value = gnc_numeric_sub_fixed(toclear_value, value);
|
||||
}
|
||||
@ -189,7 +192,8 @@ gnc_autoclear_window_ok_cb (GtkWidget *widget,
|
||||
g_hash_table_foreach (sack, sack_foreach_func, data);
|
||||
|
||||
/* Add the value of the split itself to the reachable_list */
|
||||
data->reachable_list = g_list_append(data->reachable_list, g_memdup(&split_value, sizeof(gnc_numeric)));
|
||||
data->reachable_list = g_list_prepend
|
||||
(data->reachable_list, g_memdup (&split_value, sizeof (gnc_numeric)));
|
||||
|
||||
/* Add everything to the sack, looking out for duplicates */
|
||||
for (node = data->reachable_list; node; node = node->next)
|
||||
@ -237,6 +241,7 @@ gnc_autoclear_window_ok_cb (GtkWidget *widget,
|
||||
/* We couldn't reconstruct the solution */
|
||||
PINFO(" Solution not unique.\n");
|
||||
gtk_label_set_text(data->status_label, _("Cannot uniquely clear splits. Found multiple possibilities."));
|
||||
gtk_editable_select_region (GTK_EDITABLE (data->end_value), 0, -1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -244,6 +249,7 @@ gnc_autoclear_window_ok_cb (GtkWidget *widget,
|
||||
{
|
||||
PINFO(" No solution found.\n");
|
||||
gtk_label_set_text(data->status_label, _("The selected amount cannot be cleared."));
|
||||
gtk_editable_select_region (GTK_EDITABLE (data->end_value), 0, -1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -301,6 +307,7 @@ autoClearWindow (GtkWidget *parent, Account *account)
|
||||
GtkBuilder *builder;
|
||||
AutoClearWindow *data;
|
||||
char *title;
|
||||
gnc_numeric after;
|
||||
|
||||
data = g_new0 (AutoClearWindow, 1);
|
||||
data->account = account;
|
||||
@ -326,7 +333,14 @@ autoClearWindow (GtkWidget *parent, Account *account)
|
||||
|
||||
label = GTK_LABEL(gtk_builder_get_object (builder, "end_label"));
|
||||
gtk_label_set_mnemonic_widget(label, GTK_WIDGET(data->end_value));
|
||||
|
||||
/* pre-fill with current balance */
|
||||
after = xaccAccountGetClearedBalance (data->account);
|
||||
if (gnc_reverse_balance(data->account))
|
||||
after = gnc_numeric_neg(after);
|
||||
gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (data->end_value), after);
|
||||
gtk_widget_grab_focus(GTK_WIDGET(data->end_value));
|
||||
gtk_editable_select_region (GTK_EDITABLE (data->end_value), 0, -1);
|
||||
|
||||
data->status_label = GTK_LABEL(gtk_builder_get_object (builder, "status_label"));
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
<child name="transfer" schema="org.gnucash.dialogs.transfer"/>
|
||||
<child name="business-doclink" schema="org.gnucash.dialogs.business-doclink"/>
|
||||
<child name="trans-doclink" schema="org.gnucash.dialogs.trans-doclink"/>
|
||||
<child name="style-sheet" schema="org.gnucash.dialogs.style-sheet"/>
|
||||
<child name="options" schema="org.gnucash.dialogs.options"/>
|
||||
</schema>
|
||||
|
||||
@ -258,6 +259,16 @@
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gnucash.dialogs.style-sheet" path="/org/gnucash/dialogs/style-sheet/">
|
||||
<key type="(iiii)" name="last-geometry">
|
||||
<default>(-1,-1,-1,-1)</default>
|
||||
<summary>Last window position and size</summary>
|
||||
<description>This setting describes the size and position of the window when it was last closed.
|
||||
The numbers are the X and Y coordinates of the top left corner of the window
|
||||
followed by the width and height of the window.</description>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gnucash.dialogs.options" path="/org/gnucash/dialogs/options/">
|
||||
<key name="last-geometry" type="(iiii)">
|
||||
<default>(-1,-1,-1,-1)</default>
|
||||
|
@ -313,7 +313,7 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="text" translatable="yes">Cash In Lieu</property>
|
||||
<property name="text" translatable="yes" comments="Default memo text for the remains of a stock split">Cash in lieu</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@ -406,7 +406,7 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="title" translatable="yes">Cash in Lieu</property>
|
||||
<property name="title" translatable="yes" comments="Dialog title for the remains of a stock split">Cash In Lieu</property>
|
||||
<property name="has_padding">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
@ -589,19 +589,40 @@
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkDialog" id="select_style_sheet_dialog">
|
||||
<object class="GtkWindow" id="select_style_sheet_window">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">Select HTML Style Sheet</property>
|
||||
<property name="default_width">300</property>
|
||||
<property name="default_height">200</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox9">
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox" id="dialog-action_area9">
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="style_sheet_list_view">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="headers_visible">False</property>
|
||||
<property name="enable_search">False</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButtonBox" id="dialog-action_area">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
@ -613,6 +634,7 @@
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="clicked" handler="gnc_style_sheet_select_dialog_edit_cb" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -628,6 +650,7 @@
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="clicked" handler="gnc_style_sheet_select_dialog_new_cb" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -643,6 +666,7 @@
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="clicked" handler="gnc_style_sheet_select_dialog_delete_cb" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -658,6 +682,7 @@
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="clicked" handler="gnc_style_sheet_select_dialog_close_cb" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -670,41 +695,11 @@
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow28">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">always</property>
|
||||
<property name="vscrollbar_policy">always</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="style_sheet_list_view">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="headers_visible">False</property>
|
||||
<property name="enable_search">False</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection3"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="3">edit_button</action-widget>
|
||||
<action-widget response="1">add_button</action-widget>
|
||||
<action-widget response="2">delete_button</action-widget>
|
||||
<action-widget response="-7">close_button</action-widget>
|
||||
</action-widgets>
|
||||
<child type="titlebar">
|
||||
<placeholder/>
|
||||
</child>
|
||||
|
@ -1,11 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.36.0 -->
|
||||
<!-- Generated with glade 3.22.2 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.22"/>
|
||||
<object class="GtkDialog" id="auto_clear_start_dialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child type="titlebar">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox6">
|
||||
<property name="visible">True</property>
|
||||
@ -68,8 +71,11 @@
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes"><b>Auto-Clear Information</b></property>
|
||||
<property name="label" translatable="yes"><b>Auto-Clear Information</b>
|
||||
Use this dialog if you want GnuCash to automatically find which transactions are cleared, given an ending balance. For example, said ending balance can be the current balance given by your online bank.</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="max_width_chars">80</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -143,8 +149,5 @@
|
||||
<action-widget response="-6">cancel_button</action-widget>
|
||||
<action-widget response="-5">ok_button</action-widget>
|
||||
</action-widgets>
|
||||
<child type="titlebar">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
@ -51,8 +51,13 @@ add_library (gnc-html
|
||||
${html_HEADERS}
|
||||
)
|
||||
|
||||
target_link_libraries(gnc-html gnc-engine gnc-gnome-utils
|
||||
PkgConfig::GTK3 PkgConfig::WEBKIT ${GUILE_LDFLAGS})
|
||||
target_link_libraries(gnc-html
|
||||
PRIVATE
|
||||
gnc-engine
|
||||
gnc-gnome-utils
|
||||
PkgConfig::GTK3
|
||||
PkgConfig::WEBKIT
|
||||
${GUILE_LDFLAGS})
|
||||
|
||||
target_compile_definitions(gnc-html PRIVATE -DG_LOG_DOMAIN=\"gnc.html\")
|
||||
|
||||
|
@ -107,23 +107,6 @@ gnc_price_cell_modify_verify (BasicCell *_cell,
|
||||
return;
|
||||
}
|
||||
|
||||
// gnc_basic_cell_set_value_internal doesn't like misplaced thousands separators
|
||||
// that can result from deletes, so remove them.
|
||||
for (const char *c = g_utf8_strchr (new_newval, -1, thousands_sep); c;
|
||||
c = g_utf8_strchr (c, -1, thousands_sep))
|
||||
{
|
||||
long len = g_utf8_strlen (new_newval, -1);
|
||||
long pos = g_utf8_pointer_to_offset (new_newval, c);
|
||||
char *start = g_utf8_substring (new_newval, 0, pos);
|
||||
char *end = g_utf8_substring (new_newval, ++pos, len);
|
||||
g_free (new_newval);
|
||||
if (cursor_position && *cursor_position >= pos)
|
||||
--*cursor_position;
|
||||
new_newval = g_strdup_printf ("%s%s", start, end);
|
||||
g_free (start);
|
||||
g_free (end);
|
||||
}
|
||||
|
||||
gnc_basic_cell_set_value_internal (_cell, new_newval);
|
||||
g_free (new_newval);
|
||||
*end_selection = *start_selection = *cursor_position;
|
||||
|
@ -155,6 +155,8 @@
|
||||
(cons 'datasets #())))
|
||||
(cons 'options (list
|
||||
(cons 'maintainAspectRatio #f)
|
||||
(cons 'animation (list
|
||||
(cons 'duration 0)))
|
||||
(cons 'chartArea (list
|
||||
(cons 'backgroundColor "#fffdf6")))
|
||||
(cons 'legend (list
|
||||
@ -265,12 +267,12 @@
|
||||
(cons 'backgroundColor (list-to-vec color))
|
||||
(cons 'borderColor (list-to-vec color)))))
|
||||
(match rest
|
||||
(() (gnc:html-chart-set!
|
||||
chart '(data datasets)
|
||||
(list->vector
|
||||
(append (vector->list
|
||||
(or (gnc:html-chart-get chart '(data datasets)) #()))
|
||||
(list newseries)))))
|
||||
(() (let* ((old-vec (gnc:html-chart-get chart '(data datasets)))
|
||||
(old-len (vector-length old-vec))
|
||||
(new-vec (make-vector (1+ old-len))))
|
||||
(vector-move-left! old-vec 0 old-len new-vec 0)
|
||||
(vector-set! new-vec old-len newseries)
|
||||
(gnc:html-chart-set! chart '(data datasets) new-vec)))
|
||||
((key val . rest) (loop rest (assq-set! newseries key (list-to-vec val)))))))
|
||||
|
||||
(define-public (gnc:html-chart-clear-data-series! chart)
|
||||
|
@ -48,6 +48,9 @@
|
||||
(define (gnc:transaction-doclink-anchor-text trans)
|
||||
(gnc:register-guid "trans-doclink-guid=" (gncTransGetGUID trans)))
|
||||
|
||||
(define (gnc:invoice-doclink-anchor-text invoice)
|
||||
(gnc:register-guid "invoice-doclink-guid=" (gncInvoiceReturnGUID invoice)))
|
||||
|
||||
(define (gnc:report-anchor-text report-id)
|
||||
(gnc-build-url URL-TYPE-REPORT
|
||||
(string-append "id=" (number->string report-id))
|
||||
@ -159,6 +162,11 @@
|
||||
(gnc:transaction-doclink-anchor-text trans)
|
||||
text)))
|
||||
|
||||
(define (gnc:html-invoice-doclink-anchor invoice text)
|
||||
(gnc:make-html-text (gnc:html-markup-anchor
|
||||
(gnc:invoice-doclink-anchor-text invoice)
|
||||
text)))
|
||||
|
||||
(define (gnc:html-price-anchor price value)
|
||||
(gnc:make-html-text (if price
|
||||
(gnc:html-markup-anchor
|
||||
|
@ -93,6 +93,7 @@
|
||||
(export gnc:html-split-anchor)
|
||||
(export gnc:html-transaction-anchor)
|
||||
(export gnc:html-transaction-doclink-anchor)
|
||||
(export gnc:html-invoice-doclink-anchor)
|
||||
(export gnc:html-price-anchor)
|
||||
(export gnc:customer-anchor-text)
|
||||
(export gnc:job-anchor-text)
|
||||
|
@ -749,6 +749,9 @@ also show overall period profit & loss."))
|
||||
((eq? report-type 'pnl) (list startdate enddate))
|
||||
(else (list enddate))))
|
||||
|
||||
(report-dates-vec (list->vector report-dates))
|
||||
(num-report-dates (vector-length report-dates-vec))
|
||||
|
||||
;; an alist of (cons account account-cols-data) whereby
|
||||
;; account-cols-data is a list of col-datum records
|
||||
(accounts-cols-data
|
||||
@ -810,9 +813,9 @@ also show overall period profit & loss."))
|
||||
monetary common-currency
|
||||
(cond
|
||||
((eq? price-source 'pricedb-latest) (current-time))
|
||||
((eq? col-idx 'overall-period) (last report-dates))
|
||||
((eq? report-type 'balsheet) (list-ref report-dates col-idx))
|
||||
((eq? report-type 'pnl) (list-ref report-dates (1+ col-idx))))))))
|
||||
((eq? col-idx 'overall-period) enddate)
|
||||
((eq? report-type 'balsheet) (vector-ref report-dates-vec col-idx))
|
||||
((eq? report-type 'pnl) (vector-ref report-dates-vec (1+ col-idx))))))))
|
||||
|
||||
;; the following function generates an gnc:html-text object
|
||||
;; to dump exchange rate for a particular column. From the
|
||||
@ -894,10 +897,9 @@ also show overall period profit & loss."))
|
||||
(let ((balances
|
||||
(fold (lambda (a b) (if (member (car a) accts) (cons (cdr a) b) b))
|
||||
'() alist)))
|
||||
(list->vector
|
||||
(if (null? balances)
|
||||
(map (const (adder)) report-dates)
|
||||
(apply map adder balances)))))
|
||||
(make-vector num-report-dates (adder))
|
||||
(list->vector (apply map adder balances)))))
|
||||
|
||||
(gnc:html-document-set-title!
|
||||
doc (with-output-to-string
|
||||
@ -992,7 +994,7 @@ also show overall period profit & loss."))
|
||||
(and-let* (common-currency
|
||||
(date (case price-source
|
||||
((pricedb-latest) (current-time))
|
||||
(else (list-ref report-dates col-idx))))
|
||||
(else (vector-ref report-dates-vec col-idx))))
|
||||
(asset-liability-balance
|
||||
(vector-ref asset-liability-balances col-idx))
|
||||
(asset-liability-basis
|
||||
@ -1009,7 +1011,7 @@ also show overall period profit & loss."))
|
||||
(lambda (col-idx)
|
||||
(let* ((date (case price-source
|
||||
((pricedb-latest) (current-time))
|
||||
(else (list-ref report-dates col-idx))))
|
||||
(else (vector-ref report-dates-vec col-idx))))
|
||||
(income-expense-balance
|
||||
(vector-ref income-expense-balances-with-closing col-idx)))
|
||||
(if (and common-currency
|
||||
@ -1034,7 +1036,7 @@ also show overall period profit & loss."))
|
||||
|
||||
(get-col-header-fn
|
||||
(lambda (accounts col-idx)
|
||||
(let* ((date (list-ref report-dates col-idx))
|
||||
(let* ((date (vector-ref report-dates-vec col-idx))
|
||||
(header (qof-print-date date))
|
||||
(cell (gnc:make-html-table-cell/markup
|
||||
"total-label-cell" header)))
|
||||
@ -1054,7 +1056,7 @@ also show overall period profit & loss."))
|
||||
(add-multicolumn-acct-table
|
||||
table title accounts
|
||||
maxindent get-cell-monetary-fn
|
||||
(iota (length report-dates))
|
||||
(iota num-report-dates)
|
||||
#:omit-zb-bals? omit-zb-bals?
|
||||
#:show-zb-accts? show-zb-accts?
|
||||
#:disable-account-indent? disable-account-indent?
|
||||
@ -1145,12 +1147,12 @@ also show overall period profit & loss."))
|
||||
(lambda (idx)
|
||||
(cond
|
||||
((eq? idx 'overall-period)
|
||||
(cons (car report-dates) (last report-dates)))
|
||||
((= idx (- (length report-dates) 2))
|
||||
(cons (list-ref report-dates idx) (last report-dates)))
|
||||
(cons startdate enddate))
|
||||
((= idx (- num-report-dates 2))
|
||||
(cons (vector-ref report-dates-vec idx) enddate))
|
||||
(else
|
||||
(cons (list-ref report-dates idx)
|
||||
(decdate (list-ref report-dates (1+ idx)) DayDelta))))))
|
||||
(cons (vector-ref report-dates-vec idx)
|
||||
(decdate (vector-ref report-dates-vec (1+ idx)) DayDelta))))))
|
||||
|
||||
(col-idx->monetarypair (lambda (balancelist idx)
|
||||
(if (eq? idx 'overall-period)
|
||||
@ -1224,9 +1226,9 @@ also show overall period profit & loss."))
|
||||
table title accounts
|
||||
maxindent get-cell-monetary-fn
|
||||
(append
|
||||
(iota (1- (length report-dates)))
|
||||
(iota (1- num-report-dates))
|
||||
(if (and include-overall-period?
|
||||
(> (length report-dates) 2))
|
||||
(> num-report-dates 2))
|
||||
'(overall-period)
|
||||
'()))
|
||||
#:omit-zb-bals? omit-zb-bals?
|
||||
|
@ -204,8 +204,8 @@
|
||||
(gnc:html-chart-set-y-axis-label! chart (gnc-commodity-get-mnemonic curr))
|
||||
|
||||
;; disable animation; with multiple accounts selected this report
|
||||
;; will create several charts, all will want to animate
|
||||
(gnc:html-chart-set! chart '(options animation duration) 0)
|
||||
;; will create several charts, all will want to animate. Initial
|
||||
;; animation is already disabled globally.
|
||||
(gnc:html-chart-set! chart '(options hover animationDuration) 0)
|
||||
(gnc:html-chart-set! chart '(options responsiveAnimationDuration) 0)
|
||||
(gnc:html-chart-set-title!
|
||||
|
@ -43,8 +43,7 @@
|
||||
(define (general-journal-options-generator)
|
||||
|
||||
(let* ((options (gnc:report-template-new-options/report-guid regrptguid regrptname))
|
||||
(query (qof-query-create-for-splits))
|
||||
)
|
||||
(query (qof-query-create-for-splits)))
|
||||
|
||||
(define (set-option! section name value)
|
||||
(gnc:option-set-default-value
|
||||
@ -81,9 +80,7 @@
|
||||
(list "journal" #t)
|
||||
(list "double" #t)
|
||||
(list "debit-string" (G_ "Debit"))
|
||||
(list "credit-string" (G_ "Credit"))
|
||||
)
|
||||
)
|
||||
(list "credit-string" (G_ "Credit"))))
|
||||
;; we'll leave query malloc'd in case this is required by the C side...
|
||||
|
||||
;; set options in the display tab...
|
||||
@ -103,21 +100,17 @@
|
||||
;; note the "Amount" multichoice option here
|
||||
(list (N_ "Amount") 'double)
|
||||
(list (N_ "Running Balance") #f)
|
||||
(list (N_ "Totals") #f)
|
||||
)
|
||||
)
|
||||
(list (N_ "Totals") #f)))
|
||||
|
||||
options)
|
||||
)
|
||||
(set-option! gnc:pagename-general "Title" (G_ reportname))
|
||||
options))
|
||||
|
||||
;; report renderer
|
||||
|
||||
(define (general-journal-renderer report-obj)
|
||||
;; just delegate rendering to the Register Report renderer...
|
||||
(let* ((renderer (gnc:report-template-renderer/report-guid regrptguid #f))
|
||||
(doc (renderer report-obj)))
|
||||
(gnc:html-document-set-title! doc (G_ reportname))
|
||||
doc))
|
||||
(let ((renderer (gnc:report-template-renderer/report-guid regrptguid #f)))
|
||||
(renderer report-obj)))
|
||||
|
||||
(gnc:define-report
|
||||
'version 1
|
||||
@ -129,4 +122,3 @@
|
||||
)
|
||||
|
||||
;; END
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
(use-modules (gnucash app-utils))
|
||||
(use-modules (gnucash report))
|
||||
(use-modules (srfi srfi-1))
|
||||
(use-modules (srfi srfi-26))
|
||||
|
||||
(define optname-from-date (N_ "Start Date"))
|
||||
(define optname-to-date (N_ "End Date"))
|
||||
|
@ -56,7 +56,8 @@
|
||||
(define credit-header (N_ "Credits"))
|
||||
(define debit-header (N_ "Debits"))
|
||||
(define balance-header (N_ "Balance"))
|
||||
(define linked-txns-header (N_ "Links"))
|
||||
(define doclink-header (N_ "Document Links"))
|
||||
(define linked-txns-header (N_ "Transaction Links"))
|
||||
|
||||
(define javascript "
|
||||
<script>
|
||||
@ -162,6 +163,8 @@
|
||||
(vector-ref columns-used 8))
|
||||
(define (bal-col columns-used)
|
||||
(vector-ref columns-used 9))
|
||||
(define (doclink-col columns-used)
|
||||
(vector-ref columns-used 10))
|
||||
|
||||
(define (num-cols columns-used section)
|
||||
(let* ((date? (date-col columns-used))
|
||||
@ -174,12 +177,14 @@
|
||||
(credit? (credit-col columns-used))
|
||||
(debit? (debit-col columns-used))
|
||||
(bal? (bal-col columns-used))
|
||||
(doclink? (doclink-col columns-used))
|
||||
(spacer? (or date? type? ref? desc? debit? credit?))
|
||||
(amt? (or credit? debit?))
|
||||
(cols-alist
|
||||
(list
|
||||
(list 'lhs-cols date? due? ref? type? desc? sale? tax? credit? debit? bal?)
|
||||
(list 'ptt-span date? due? ref? type? desc?)
|
||||
(list 'lhs-cols date? due? ref? type? desc? sale? tax? credit? debit? bal?
|
||||
doclink?)
|
||||
(list 'ptt-span date? due? ref? type? desc? doclink?)
|
||||
(list 'mid-spac spacer?)
|
||||
(list 'rhs-cols date? ref? type? desc? amt? amt?)
|
||||
(list 'rhs-span date? ref? type? desc?)))
|
||||
@ -194,7 +199,7 @@
|
||||
(map opt-val
|
||||
(list date-header due-date-header reference-header type-header
|
||||
desc-header sale-header tax-header debit-header credit-header
|
||||
balance-header))))
|
||||
balance-header doclink-header))))
|
||||
|
||||
(define (make-heading-list column-vector link-option acct-type)
|
||||
(let ((heading-list '())
|
||||
@ -210,6 +215,8 @@
|
||||
(addto! heading-list (G_ type-header)))
|
||||
(if (desc-col column-vector)
|
||||
(addto! heading-list (G_ desc-header)))
|
||||
(if (doclink-col column-vector)
|
||||
(addto! heading-list (C_ "Column header for 'Document Link'" "L")))
|
||||
(if (sale-col column-vector)
|
||||
(addto! heading-list (G_ sale-header)))
|
||||
(if (tax-col column-vector)
|
||||
@ -340,7 +347,7 @@
|
||||
;; Make a row list based on the visible columns
|
||||
;;
|
||||
(define (add-row table odd-row? column-vector date due-date ref type-str
|
||||
desc currency amt debit credit sale tax lhs-class
|
||||
desc doclink-invoice currency amt debit credit sale tax lhs-class
|
||||
link-option link-rows)
|
||||
(define nrows (if link-rows (length link-rows) 1))
|
||||
(define (link-data->cols link-data)
|
||||
@ -431,7 +438,12 @@
|
||||
(and due-date (qof-print-date due-date)))
|
||||
(addif (ref-col column-vector) ref)
|
||||
(addif (type-col column-vector) type-str)
|
||||
(addif (desc-col column-vector) desc)))
|
||||
(addif (desc-col column-vector) desc)
|
||||
(addif (doclink-col column-vector)
|
||||
(and doclink-invoice
|
||||
(gnc:html-invoice-doclink-anchor
|
||||
doclink-invoice
|
||||
(C_ "Column header for 'Document Link'" "L"))))))
|
||||
(map
|
||||
(lambda (str)
|
||||
(let ((cell (gnc:make-html-table-cell/size/markup
|
||||
@ -543,7 +555,7 @@
|
||||
payable? date-type currency)))))
|
||||
|
||||
(define (add-balance-row odd-row? total)
|
||||
(add-row table odd-row? used-columns start-date #f "" (G_ "Balance") ""
|
||||
(add-row table odd-row? used-columns start-date #f "" (G_ "Balance") "" #f
|
||||
currency total #f #f #f #f #f
|
||||
link-option (case link-option
|
||||
((none) '(()))
|
||||
@ -796,6 +808,7 @@
|
||||
(split->reference split)
|
||||
(split->type-str split payable?)
|
||||
(splits->desc (list split))
|
||||
(and (not (string-null? (gncInvoiceGetDocLink invoice))) invoice)
|
||||
currency (+ total value)
|
||||
(and (>= orig-value 0) (amount->anchor split orig-value))
|
||||
(and (< orig-value 0) (amount->anchor split (- orig-value)))
|
||||
@ -825,7 +838,7 @@
|
||||
(split->reference split)
|
||||
(split->type-str split payable?)
|
||||
(splits->desc (xaccTransGetAPARAcctSplitList txn #t))
|
||||
currency (+ total value)
|
||||
#f currency (+ total value)
|
||||
(and (>= orig-value 0) (amount->anchor split orig-value))
|
||||
(and (< orig-value 0) (amount->anchor split (- orig-value)))
|
||||
#f #f
|
||||
@ -929,6 +942,11 @@
|
||||
(N_ "Invoices show list of payments, payments show list of \
|
||||
invoices and amounts.")))))
|
||||
|
||||
(gnc:register-inv-option
|
||||
(gnc:make-simple-boolean-option
|
||||
(N_ "Display Columns") doclink-header
|
||||
"hd" (N_ "Display document link?") #f))
|
||||
|
||||
(gnc:register-inv-option
|
||||
(gnc:make-multichoice-option
|
||||
gnc:pagename-general optname-date-driver "k"
|
||||
|
@ -42,7 +42,7 @@
|
||||
<menuitem name="EmployeeProcessPayment" action="EmployeeProcessPaymentAction"/>
|
||||
</menu>
|
||||
|
||||
<menuitem name="BusinessLinkOpen" action="BusinessLinkOpenAction"/>
|
||||
<menuitem name="BusinessLinkOpen" action="BusinessLinkedDocsAction"/>
|
||||
|
||||
<placeholder name="BusinessPlaceholderTop"/>
|
||||
<separator name="Sep1"/>
|
||||
|
@ -10,7 +10,6 @@
|
||||
<separator name="EditSep2"/>
|
||||
<menuitem name="FileOpenAccount" action="FileOpenAccountAction"/>
|
||||
<menuitem name="FileOpenSubaccounts" action="FileOpenSubaccountsAction"/>
|
||||
<menuitem name="EditTaxOptions" action="EditTaxOptionsAction"/>
|
||||
</placeholder>
|
||||
</menu>
|
||||
<menu name="Actions" action="ActionsAction">
|
||||
|
@ -1681,6 +1681,9 @@ the option '~a'."))
|
||||
("Void Transactions" "Filter" "Void Transactions")
|
||||
("Account Substring" "Filter" "Account Name Filter")
|
||||
("Enable links" #f "Enable Links")
|
||||
;; new-owner-report.scm, renamed Oct 2020 to differentiate with
|
||||
;; Document Links:
|
||||
("Links" #f "Transaction Links")
|
||||
;; invoice.scm, renamed November 2018
|
||||
("Individual Taxes" #f "Use Detailed Tax Summary")
|
||||
;; income-gst-statement.scm
|
||||
|
@ -133,9 +133,11 @@ gulong gnc_prefs_register_cb (const char *group,
|
||||
if (prefsbackend && prefsbackend->register_cb)
|
||||
return (prefsbackend->register_cb) (group, pref_name, func, user_data);
|
||||
else
|
||||
{
|
||||
g_warning ("no preferences backend loaded, or the backend doesn't define register_cb, returning 0");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void gnc_prefs_remove_cb_by_func (const gchar *group,
|
||||
|
@ -17,12 +17,11 @@ add_library (gnc-module
|
||||
${gnc_module_HEADERS}
|
||||
)
|
||||
|
||||
target_link_libraries(gnc-module ${GUILE_LDFLAGS} ${GMODULE_LDFLAGS} ${GLIB2_LDFLAGS})
|
||||
target_link_libraries(gnc-module ${GMODULE_LDFLAGS} ${GLIB2_LDFLAGS})
|
||||
|
||||
target_compile_definitions (gnc-module PRIVATE -DG_LOG_DOMAIN=\"gnc.module\")
|
||||
|
||||
target_include_directories (gnc-module
|
||||
PRIVATE ${GUILE_INCLUDE_DIRS}
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/common
|
||||
${CMAKE_BINARY_DIR}/common # for config.h
|
||||
|
9236
po/en_GB.po
9236
po/en_GB.po
File diff suppressed because it is too large
Load Diff
9227
po/es_NI.po
9227
po/es_NI.po
File diff suppressed because it is too large
Load Diff
9322
po/kok@latin.po
9322
po/kok@latin.po
File diff suppressed because it is too large
Load Diff
9351
po/mni@bengali.po
9351
po/mni@bengali.po
File diff suppressed because it is too large
Load Diff
9278
po/pt_BR.po
9278
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
9192
po/zh_CN.po
9192
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
9216
po/zh_TW.po
9216
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user