aboutsummaryrefslogtreecommitdiff
path: root/shell/callbacks.c
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2017-07-29 09:28:09 -0700
committerLeandro Pereira <leandro@hardinfo.org>2017-07-29 09:28:09 -0700
commit03022404151a503aa7f6ded745c809cbaed8c34f (patch)
tree28c3c24e25324b52e42a2e09100bbfa3a0c9e668 /shell/callbacks.c
parent7220c0fa4baf889992fd7b69c1012562f8a0adcc (diff)
Make about dialogs transient
On compliant window managers, they will be modal dialogs, shown in the middle of the screen. Similar to the report dialog and the sync manager.
Diffstat (limited to 'shell/callbacks.c')
-rw-r--r--shell/callbacks.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shell/callbacks.c b/shell/callbacks.c
index d5ac34da..25640232 100644
--- a/shell/callbacks.c
+++ b/shell/callbacks.c
@@ -148,6 +148,8 @@ void cb_about_module(GtkAction * action)
about = gtk_about_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(about), GTK_WINDOW(shell->window));
+
text = g_strdup_printf(_("%s Module"), sm->name);
gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), text);
g_free(text);
@@ -181,6 +183,7 @@ void cb_about_module(GtkAction * action)
void cb_about()
{
+ Shell *shell = shell_get_main_shell();
GtkWidget *about;
const gchar *authors[] = {
_("Author:"),
@@ -211,6 +214,7 @@ void cb_about()
};
about = gtk_about_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(about), GTK_WINDOW(shell->window));
gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), "HardInfo");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), VERSION);
gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about),