mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Open/Save As...: configure enter/double click to run the default action.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18952 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
4f01227882
commit
c928dc6a26
@ -42,9 +42,6 @@ static QofLogModule log_module = GNC_MOD_GUI;
|
|||||||
#define FILE_ACCESS_OPEN 0
|
#define FILE_ACCESS_OPEN 0
|
||||||
#define FILE_ACCESS_SAVE_AS 1
|
#define FILE_ACCESS_SAVE_AS 1
|
||||||
|
|
||||||
void gnc_ui_file_access_response_cb( GtkDialog *, gint, GtkDialog * );
|
|
||||||
static void cb_uri_type_changed_cb( GtkComboBox* cb );
|
|
||||||
|
|
||||||
typedef struct FileAccessWindow
|
typedef struct FileAccessWindow
|
||||||
{
|
{
|
||||||
/* Parts of the dialog */
|
/* Parts of the dialog */
|
||||||
@ -61,6 +58,11 @@ typedef struct FileAccessWindow
|
|||||||
GtkEntry* tf_password;
|
GtkEntry* tf_password;
|
||||||
} FileAccessWindow;
|
} FileAccessWindow;
|
||||||
|
|
||||||
|
void gnc_ui_file_access_file_activated_cb( GtkFileChooser *chooser,
|
||||||
|
FileAccessWindow *faw );
|
||||||
|
void gnc_ui_file_access_response_cb( GtkDialog *, gint, GtkDialog * );
|
||||||
|
static void cb_uri_type_changed_cb( GtkComboBox* cb );
|
||||||
|
|
||||||
static gchar*
|
static gchar*
|
||||||
geturl( FileAccessWindow* faw )
|
geturl( FileAccessWindow* faw )
|
||||||
{
|
{
|
||||||
@ -95,6 +97,14 @@ geturl( FileAccessWindow* faw )
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gnc_ui_file_access_file_activated_cb( GtkFileChooser *chooser, FileAccessWindow *faw )
|
||||||
|
{
|
||||||
|
g_return_if_fail( chooser != NULL );
|
||||||
|
|
||||||
|
gnc_ui_file_access_response_cb( GTK_DIALOG(faw->dialog), GTK_RESPONSE_OK, NULL );
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gnc_ui_file_access_response_cb(GtkDialog *dialog, gint response, GtkDialog *unused)
|
gnc_ui_file_access_response_cb(GtkDialog *dialog, gint response, GtkDialog *unused)
|
||||||
{
|
{
|
||||||
@ -283,6 +293,8 @@ gnc_ui_file_access( int type )
|
|||||||
fileChooser = GTK_FILE_CHOOSER_WIDGET(gtk_file_chooser_widget_new( fileChooserAction ));
|
fileChooser = GTK_FILE_CHOOSER_WIDGET(gtk_file_chooser_widget_new( fileChooserAction ));
|
||||||
faw->fileChooser = GTK_FILE_CHOOSER(fileChooser);
|
faw->fileChooser = GTK_FILE_CHOOSER(fileChooser);
|
||||||
gtk_container_add( GTK_CONTAINER(align), GTK_WIDGET(fileChooser) );
|
gtk_container_add( GTK_CONTAINER(align), GTK_WIDGET(fileChooser) );
|
||||||
|
g_object_connect( G_OBJECT(faw->fileChooser), "signal::file-activated",
|
||||||
|
gnc_ui_file_access_file_activated_cb, faw, NULL );
|
||||||
|
|
||||||
uri_type_container = glade_xml_get_widget( xml, "vb_uri_type_container" );
|
uri_type_container = glade_xml_get_widget( xml, "vb_uri_type_container" );
|
||||||
faw->cb_uri_type = GTK_COMBO_BOX(gtk_combo_box_new_text());
|
faw->cb_uri_type = GTK_COMBO_BOX(gtk_combo_box_new_text());
|
||||||
|
@ -248,6 +248,8 @@
|
|||||||
<property name="response_id">-5</property>
|
<property name="response_id">-5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="has_default">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
Reference in New Issue
Block a user