Commit c0183e6c authored by Jesse van den Kieboom's avatar Jesse van den Kieboom

Present and focus file chooser when shown

parent 6c438cf8
......@@ -201,7 +201,8 @@ chooser_set_do_overwrite_confirmation (GeditFileChooserDialog *dialog,
static void
chooser_show (GeditFileChooserDialog *dialog)
{
gtk_widget_show (GTK_WIDGET (dialog));
gtk_window_present (GTK_WINDOW (dialog));
gtk_widget_grab_focus (GTK_WIDGET (dialog));
}
static void
......
......@@ -42,6 +42,7 @@ struct _GeditFileChooserDialogOSXPrivate
gboolean is_open;
gboolean is_modal;
gboolean is_running;
GtkResponseType cancel_response;
GtkResponseType accept_response;
......@@ -715,6 +716,14 @@ chooser_show (GeditFileChooserDialog *dialog)
// Keep alive for the handler
g_object_ref (dialog);
if (priv->is_running)
{
// Just show it again
[priv->panel makeKeyAndOrderFront:nil];
return;
}
priv->is_running = TRUE;
void (^handler)(NSInteger ret) = ^(NSInteger result) {
GtkResponseType response;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment