r23730 - gnucash/trunk/src/gnome-utils - Bug 721913 - Fetch Rate crashes application
John Ralls
jralls at code.gnucash.org
Mon Jan 20 13:52:52 EST 2014
Author: jralls
Date: 2014-01-20 13:52:51 -0500 (Mon, 20 Jan 2014)
New Revision: 23730
Trac: http://svn.gnucash.org/trac/changeset/23730
Modified:
gnucash/trunk/src/gnome-utils/dialog-transfer.c
Log:
Bug 721913 - Fetch Rate crashes application
Enable the "Fetch Rate" button only if Finance::Quote is installed.
Modified: gnucash/trunk/src/gnome-utils/dialog-transfer.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-transfer.c 2014-01-20 16:12:47 UTC (rev 23729)
+++ gnucash/trunk/src/gnome-utils/dialog-transfer.c 2014-01-20 18:52:51 UTC (rev 23730)
@@ -49,6 +49,7 @@
#include "engine-helpers.h"
#include "engine-helpers-guile.h"
#include "app-utils/QuickFill.h"
+#include <gnc-commodity.h>
#define DIALOG_TRANSFER_CM_CLASS "dialog-transfer"
@@ -1238,6 +1239,19 @@
gtk_widget_set_sensitive(gnc_amount_edit_gtk_entry(GNC_AMOUNT_EDIT (xferData->amount_edit)), is_sensitive);
}
+static void
+gnc_xfer_dialog_set_fetch_sensitive (GtkWidget *fetch)
+{
+ if (gnc_quote_source_fq_installed ())
+ {
+ gtk_widget_set_sensitive (fetch, TRUE);
+ gtk_widget_set_tooltip_text (fetch, _("Retrieve the current online quote"));
+ return;
+ }
+ gtk_widget_set_sensitive (fetch, FALSE);
+ gtk_widget_set_tooltip_text (fetch, _("Finance::Quote must be installed to enable this button."));
+ return;
+}
/********************************************************************\
* gnc_xfer_dialog_set_description *
@@ -1786,6 +1800,7 @@
xferData->transferinfo_label = GTK_WIDGET(gtk_builder_get_object (builder, "transferinfo-label"));
xferData->fetch_button = GTK_WIDGET(gtk_builder_get_object (builder, "fetch"));
+ gnc_xfer_dialog_set_fetch_sensitive (xferData->fetch_button);
/* amount & date widgets */
{
More information about the gnucash-changes
mailing list