mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Have the Post date widget grab the focus by default when opening the post invoice dialog.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18639 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
fb8d635294
commit
625af3b4e7
@ -323,6 +323,9 @@ gnc_dialog_dates_acct_question_parented (GtkWidget *parent, const char *message,
|
||||
|
||||
gtk_widget_show_all (ddc->dialog);
|
||||
|
||||
/* Set the focus on the date widget */
|
||||
gnc_date_grab_focus (GNC_DATE_EDIT (ddc->post_date));
|
||||
|
||||
ddc->retval = FALSE;
|
||||
while (gtk_dialog_run (GTK_DIALOG (ddc->dialog)) == GTK_RESPONSE_OK) {
|
||||
/* If reponse is OK but flag is not set, try again */
|
||||
|
@ -1198,7 +1198,7 @@ gnc_date_edit_get_flags (GNCDateEdit *gde)
|
||||
|
||||
/**
|
||||
* gnc_date_set_activates_default:
|
||||
* @gde: The date editor to modity
|
||||
* @gde: The date editor to modify
|
||||
* @state: The new state for this widget.
|
||||
*
|
||||
* Extracts the editable field from a GNCDateEdit widget, and sets it
|
||||
@ -1214,7 +1214,21 @@ gnc_date_activates_default (GNCDateEdit *gde, gboolean state)
|
||||
gtk_entry_set_activates_default(GTK_ENTRY(gde->date_entry), state);
|
||||
}
|
||||
|
||||
/**
|
||||
* gnc_date_grab_focus:
|
||||
* @gde: The date editor to modify
|
||||
* @state: The new state for this widget.
|
||||
*
|
||||
* Sets the focus to the Editable field.
|
||||
**/
|
||||
void
|
||||
gnc_date_grab_focus (GNCDateEdit *gde)
|
||||
{
|
||||
if (!gde)
|
||||
return;
|
||||
|
||||
gtk_widget_grab_focus (gde->date_entry);
|
||||
}
|
||||
/** Sets the editable field from a GNCDateEdit widget as the target
|
||||
* for the specified label's access key.
|
||||
*
|
||||
|
@ -134,6 +134,7 @@ void gnc_date_edit_set_flags (GNCDateEdit *gde,
|
||||
int gnc_date_edit_get_flags (GNCDateEdit *gde);
|
||||
|
||||
void gnc_date_activates_default (GNCDateEdit *gde, gboolean state);
|
||||
void gnc_date_grab_focus (GNCDateEdit *gde);
|
||||
|
||||
void gnc_date_make_mnemonic_target (GNCDateEdit *gde, GtkWidget *label);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user