diff options
-rw-r--r-- | includes/shell.h | 4 | ||||
-rw-r--r-- | modules/benchmark.c | 2 | ||||
-rw-r--r-- | shell/shell.c | 6 | ||||
-rw-r--r-- | shell/syncmanager.c | 2 |
4 files changed, 13 insertions, 1 deletions
diff --git a/includes/shell.h b/includes/shell.h index 3f0ef47e..522c1223 100644 --- a/includes/shell.h +++ b/includes/shell.h @@ -83,6 +83,8 @@ struct _Shell { GtkWidget *notebook; GtkWidget *hbox, *vpaned; + GtkWindow *transient_dialog; + ShellTree *tree; ShellInfoTree *info_tree; ShellModule *selected_module; @@ -194,6 +196,8 @@ void shell_action_set_property(const gchar *action_name, const gchar *property, gboolean setting); +void shell_set_transient_dialog(GtkWindow *dialog); + void shell_set_side_pane_visible(gboolean setting); void shell_set_note_from_entry(ShellModuleEntry *entry); void shell_ui_manager_set_visible(const gchar *path, diff --git a/modules/benchmark.c b/modules/benchmark.c index c8963a4f..c19295b2 100644 --- a/modules/benchmark.c +++ b/modules/benchmark.c @@ -694,7 +694,7 @@ static void do_benchmark(void (*benchmark_function)(void), int entry) _("Benchmarking. Please do not move your mouse " "or press any keys.")); gtk_window_set_transient_for(GTK_WINDOW(bench_dialog), - GTK_WINDOW(shell_get_main_shell()->window)); + GTK_WINDOW(shell_get_main_shell()->transient_dialog)); gtk_dialog_add_buttons(GTK_DIALOG(bench_dialog), _("Cancel"), GTK_RESPONSE_ACCEPT, NULL); diff --git a/shell/shell.c b/shell/shell.c index 06e2f936..338e68f3 100644 --- a/shell/shell.c +++ b/shell/shell.c @@ -737,6 +737,11 @@ gboolean hardinfo_link(const gchar *uri) { return FALSE; /* didn't handle it */ } +void shell_set_transient_dialog(GtkWindow *dialog) +{ + shell->transient_dialog = dialog ? dialog : shell->window; +} + void shell_init(GSList * modules) { if (shell) { @@ -761,6 +766,7 @@ void shell_init(GSList * modules) shell->info_tree = info_tree_new(); shell->loadgraph = load_graph_new(75); shell->detail_view = detail_view_new(); + shell->transient_dialog = shell->window; update_tbl = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, destroy_update_tbl_value); diff --git a/shell/syncmanager.c b/shell/syncmanager.c index e2dabd7a..afe1930a 100644 --- a/shell/syncmanager.c +++ b/shell/syncmanager.c @@ -135,9 +135,11 @@ void sync_manager_show(GtkWidget *parent) if (gtk_dialog_run(GTK_DIALOG(sd->dialog)) == GTK_RESPONSE_ACCEPT) { shell_view_set_enabled(FALSE); shell_status_set_enabled(TRUE); + shell_set_transient_dialog(sd->dialog); sync_dialog_start_sync(sd); + shell_set_transient_dialog(NULL); shell_status_set_enabled(FALSE); shell_view_set_enabled(TRUE); } |