AUDIT: r15347 - gnucash/trunk/src/import-export - Use double-clicks in general import dialogs.

Derek Atkins warlord at MIT.EDU
Sat Jan 27 23:19:10 EST 2007


Can someone else look at this?  I don't understand the code
well enough to know if this might have other side effects.

Thanks,

-derek

Andreas Köhler <andi5 at cvs.gnucash.org> writes:

> Author: andi5
> Date: 2007-01-12 18:02:47 -0500 (Fri, 12 Jan 2007)
> New Revision: 15347
> Trac: http://svn.gnucash.org/trac/changeset/15347
>
> Modified:
>    gnucash/trunk/src/import-export/import-account-matcher.c
>    gnucash/trunk/src/import-export/import-match-picker.c
> Log:
> Use double-clicks in general import dialogs.
>
> In the import account matcher and import transaction match picker tree
> views, let double-clicks on rows close the corresponding dialogs.
>
> BP
>
>
> Modified: gnucash/trunk/src/import-export/import-account-matcher.c
> ===================================================================
> --- gnucash/trunk/src/import-export/import-account-matcher.c	2007-01-12 16:46:45 UTC (rev 15346)
> +++ gnucash/trunk/src/import-export/import-account-matcher.c	2007-01-12 23:02:47 UTC (rev 15347)
> @@ -113,6 +113,17 @@
>    gnc_tree_view_account_set_selected_account(picker->account_tree, new_account);
>  }
>  
> +/* When user double-clicks an account */
> +static void
> +account_tree_row_activated_cb(GtkTreeView *view, GtkTreePath *path,
> +			      GtkTreeViewColumn *column,
> +			      struct _accountpickerdialog *picker)
> +{
> +  g_return_if_fail(picker && picker->dialog);
> +
> +  gtk_dialog_response(GTK_DIALOG(picker->dialog), GTK_RESPONSE_OK);
> +}
> +
>  static gpointer test_acct_online_id_match(Account *acct, gpointer param_online_id)
>  {
>    const gchar * current_online_id = gnc_import_get_acc_online_id(acct);
> @@ -207,6 +218,8 @@
>        gnc_tree_view_account_set_selected_account(picker->account_tree, default_selection);
>  
>        gtk_window_set_modal(GTK_WINDOW(picker->dialog), TRUE);
> +      g_signal_connect(picker->account_tree, "row-activated",
> +		       G_CALLBACK(account_tree_row_activated_cb), picker);
>        do {
>  	response = gtk_dialog_run(GTK_DIALOG(picker->dialog));
>  	switch (response) {
>
> Modified: gnucash/trunk/src/import-export/import-match-picker.c
> ===================================================================
> --- gnucash/trunk/src/import-export/import-match-picker.c	2007-01-12 16:46:45 UTC (rev 15346)
> +++ gnucash/trunk/src/import-export/import-match-picker.c	2007-01-12 23:02:47 UTC (rev 15347)
> @@ -287,6 +287,17 @@
>  }
>  
>  static void
> +match_transaction_row_activated_cb (GtkTreeView *view, GtkTreePath *path,
> +				    GtkTreeViewColumn *column,
> +				    GNCImportMatchPicker *matcher)
> +{
> +  g_return_if_fail (matcher && matcher->transaction_matcher);
> +
> +  gtk_dialog_response (GTK_DIALOG (matcher->transaction_matcher),
> +		       GTK_RESPONSE_OK);
> +}
> +
> +static void
>  add_column(GtkTreeView *view, const gchar *title, int col_num)
>  {
>    GtkCellRenderer *renderer;
> @@ -367,6 +378,8 @@
>    selection = gtk_tree_view_get_selection(view);
>    g_signal_connect(selection, "changed",
>  		   G_CALLBACK(match_transaction_changed_cb), matcher);
> +  g_signal_connect(view, "row-activated",
> +		   G_CALLBACK(match_transaction_row_activated_cb), matcher);
>  }
>  
>  /********************************************************************\
>
> _______________________________________________
> gnucash-changes mailing list
> gnucash-changes at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-changes
>
>

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-devel mailing list