Try to present right window after dialog is closed
parent
a006678c0d
commit
b4efac9a03
|
@ -539,6 +539,7 @@ moo_text_view_run_find (GtkTextView *view)
|
||||||
regex = moo_find_get_regex (MOO_FIND (find));
|
regex = moo_find_get_regex (MOO_FIND (find));
|
||||||
|
|
||||||
gtk_widget_destroy (find);
|
gtk_widget_destroy (find);
|
||||||
|
|
||||||
buffer = gtk_text_view_get_buffer (view);
|
buffer = gtk_text_view_get_buffer (view);
|
||||||
|
|
||||||
get_search_bounds (buffer, flags, &start, &end);
|
get_search_bounds (buffer, flags, &start, &end);
|
||||||
|
|
|
@ -126,6 +126,18 @@ position_window (GtkWindow *dialog)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __WIN32__
|
||||||
|
static void
|
||||||
|
on_hide (GtkWindow *window)
|
||||||
|
{
|
||||||
|
GtkWindow *parent = gtk_window_get_transient_for (window);
|
||||||
|
|
||||||
|
if (parent && GTK_WIDGET_DRAWABLE (parent))
|
||||||
|
gtk_window_present (parent);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
moo_position_window (GtkWidget *window,
|
moo_position_window (GtkWidget *window,
|
||||||
GtkWidget *parent,
|
GtkWidget *parent,
|
||||||
|
@ -145,7 +157,13 @@ moo_position_window (GtkWidget *window,
|
||||||
toplevel = NULL;
|
toplevel = NULL;
|
||||||
|
|
||||||
if (toplevel)
|
if (toplevel)
|
||||||
|
{
|
||||||
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (toplevel));
|
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (toplevel));
|
||||||
|
#ifdef __WIN32__
|
||||||
|
g_signal_connect (window, "unmap", on_hide, NULL);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (toplevel && GTK_WINDOW(toplevel)->group)
|
if (toplevel && GTK_WINDOW(toplevel)->group)
|
||||||
gtk_window_group_add_window (GTK_WINDOW(toplevel)->group, GTK_WINDOW (window));
|
gtk_window_group_add_window (GTK_WINDOW(toplevel)->group, GTK_WINDOW (window));
|
||||||
|
|
||||||
|
|
|
@ -355,15 +355,6 @@ moo_prefs_dialog_response (GtkDialog *dialog,
|
||||||
gtk_widget_hide (GTK_WIDGET (dialog));
|
gtk_widget_hide (GTK_WIDGET (dialog));
|
||||||
else
|
else
|
||||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||||
|
|
||||||
#ifdef __WIN32__
|
|
||||||
{
|
|
||||||
GtkWindow *parent = gtk_window_get_transient_for (GTK_WINDOW (dialog));
|
|
||||||
|
|
||||||
if (parent)
|
|
||||||
gtk_window_present (parent);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue