aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2')
-rw-r--r--hardinfo2/callbacks.c8
-rw-r--r--hardinfo2/remote.c12
-rw-r--r--hardinfo2/syncmanager.c9
-rw-r--r--hardinfo2/syncmanager.h2
4 files changed, 17 insertions, 14 deletions
diff --git a/hardinfo2/callbacks.c b/hardinfo2/callbacks.c
index bc261b4e..c56d9a76 100644
--- a/hardinfo2/callbacks.c
+++ b/hardinfo2/callbacks.c
@@ -31,12 +31,16 @@
void cb_sync_manager()
{
- sync_manager_show();
+ Shell *shell = shell_get_main_shell();
+
+ sync_manager_show(shell->window);
}
void cb_connect_to()
{
- remote_dialog_show();
+ Shell *shell = shell_get_main_shell();
+
+ remote_dialog_show(shell->window);
}
void cb_save_graphic()
diff --git a/hardinfo2/remote.c b/hardinfo2/remote.c
index 028fcd66..a8cda9b6 100644
--- a/hardinfo2/remote.c
+++ b/hardinfo2/remote.c
@@ -65,13 +65,12 @@ struct _RemoteDialog {
GtkWidget *btn_connect, *btn_cancel;
};
-static RemoteDialog
- * remote_dialog_new(GtkTreeModel * model, GtkWidget * parent);
+static RemoteDialog *remote_dialog_new(GtkWidget *parent);
-void remote_dialog_show(GtkTreeModel * model, GtkWidget * parent)
+void remote_dialog_show(GtkWidget *parent)
{
gboolean success;
- RemoteDialog *rd = remote_dialog_new(model, parent);
+ RemoteDialog *rd = remote_dialog_new(parent);
if (gtk_dialog_run(GTK_DIALOG(rd->dialog)) == GTK_RESPONSE_ACCEPT) {
shell_status_update("Generating remote...");
@@ -93,8 +92,7 @@ void remote_dialog_show(GtkTreeModel * model, GtkWidget * parent)
g_free(rd);
}
-static RemoteDialog
- * remote_dialog_new(GtkTreeModel * model, GtkWidget * parent)
+static RemoteDialog *remote_dialog_new(GtkWidget *parent)
{
RemoteDialog *rd;
GtkWidget *dialog;
@@ -161,7 +159,7 @@ static RemoteDialog
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW
(scrolledwindow2), GTK_SHADOW_IN);
- treeview2 = gtk_tree_view_new_with_model(model);
+ treeview2 = gtk_tree_view_new();
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview2), FALSE);
gtk_widget_show(treeview2);
gtk_container_add(GTK_CONTAINER(scrolledwindow2), treeview2);
diff --git a/hardinfo2/syncmanager.c b/hardinfo2/syncmanager.c
index 37788a7b..df2e1e7c 100644
--- a/hardinfo2/syncmanager.c
+++ b/hardinfo2/syncmanager.c
@@ -72,7 +72,7 @@ static GQuark err_quark;
#define LABEL_SYNC_SYNCING "<big><b>Synchronizing</b></big>\n" \
"This may take some time."
-static SyncDialog *sync_dialog_new(void);
+static SyncDialog *sync_dialog_new(GtkWidget *parent);
static void sync_dialog_destroy(SyncDialog * sd);
static void sync_dialog_start_sync(SyncDialog * sd);
@@ -113,13 +113,13 @@ void sync_manager_add_entry(SyncEntry * entry)
#endif /* HAS_LIBSOUP */
}
-void sync_manager_show(void)
+void sync_manager_show(GtkWidget *parent)
{
#ifndef HAS_LIBSOUP
g_warning
("HardInfo was compiled without libsoup support. (Network Updater requires it.)");
#else /* !HAS_LIBSOUP */
- SyncDialog *sd = sync_dialog_new();
+ SyncDialog *sd = sync_dialog_new(parent);
err_quark = g_quark_from_static_string("syncmanager");
@@ -612,7 +612,7 @@ static void close_clicked(void)
g_main_quit(loop);
}
-static SyncDialog *sync_dialog_new(void)
+static SyncDialog *sync_dialog_new(GtkWidget *parent)
{
SyncDialog *sd;
GtkWidget *dialog;
@@ -635,6 +635,7 @@ static SyncDialog *sync_dialog_new(void)
sd->sna = sync_dialog_netarea_new();
dialog = gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(parent));
gtk_window_set_title(GTK_WINDOW(dialog), "Network Updater");
gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
gtk_window_set_icon(GTK_WINDOW(dialog),
diff --git a/hardinfo2/syncmanager.h b/hardinfo2/syncmanager.h
index 360c012a..d5385451 100644
--- a/hardinfo2/syncmanager.h
+++ b/hardinfo2/syncmanager.h
@@ -35,7 +35,7 @@ struct _SyncEntry {
};
void sync_manager_add_entry(SyncEntry *entry);
-void sync_manager_show(void);
+void sync_manager_show(GtkWidget *parent);
gint sync_manager_count_entries(void);
#endif /* __SYNCMANAGER_H__ */