mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
BUG 336843 (Attach images/files/urls to transactions):
- Added conditional to grey-out/disable 'Open File/Link' when association is unset - Converted 'Open Location' dialog to gtk_dialog_new_with_buttons - fixed invalid options from last submitted patch - made dialog modal git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23563 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
d2bfbf0c0d
commit
0ecc6caa63
@ -906,6 +906,7 @@ gnc_plugin_page_register_ui_update (gpointer various, GncPluginPageRegister *pag
|
||||
GtkAction *action;
|
||||
gboolean expanded, voided;
|
||||
Transaction *trans;
|
||||
const char *uri;
|
||||
|
||||
/* Set 'Split Transaction' */
|
||||
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(page);
|
||||
@ -931,6 +932,12 @@ gnc_plugin_page_register_ui_update (gpointer various, GncPluginPageRegister *pag
|
||||
"UnvoidTransactionAction");
|
||||
gtk_action_set_sensitive (GTK_ACTION(action), voided);
|
||||
|
||||
/* Set 'ExecAssociated' */
|
||||
uri = xaccTransGetAssociation(trans);
|
||||
action = gnc_plugin_page_get_action (GNC_PLUGIN_PAGE(page),
|
||||
"ExecAssociatedTransactionAction");
|
||||
gtk_action_set_sensitive (GTK_ACTION(action), uri ? TRUE:FALSE);
|
||||
|
||||
/* If we are in a readonly book, make any modifying action inactive */
|
||||
if (qof_book_is_readonly(gnc_get_current_book()))
|
||||
{
|
||||
@ -3456,6 +3463,7 @@ gnc_plugin_page_register_cmd_associate_file_transaction (GtkAction *action,
|
||||
|
||||
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
|
||||
gsr_default_associate_handler_file(priv->gsr, NULL);
|
||||
gnc_plugin_page_register_ui_update (NULL, plugin_page);
|
||||
LEAVE(" ");
|
||||
|
||||
}
|
||||
@ -3472,6 +3480,7 @@ gnc_plugin_page_register_cmd_associate_location_transaction (GtkAction *action,
|
||||
|
||||
priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
|
||||
gsr_default_associate_handler_location(priv->gsr, NULL);
|
||||
gnc_plugin_page_register_ui_update (NULL, plugin_page);
|
||||
LEAVE(" ");
|
||||
|
||||
}
|
||||
|
@ -1096,9 +1096,9 @@ gsr_default_associate_handler_location( GNCSplitReg *gsr, gpointer data )
|
||||
if (is_trans_readonly_and_warn(trans))
|
||||
return;
|
||||
|
||||
dialog = gtk_file_chooser_dialog_new ("Associate Location with Transaction",
|
||||
dialog = gtk_dialog_new_with_buttons ("Associate Location with Transaction",
|
||||
GTK_WINDOW(gsr->window),
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
GTK_DIALOG_MODAL,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user