[ghex] Set the parent window for help menu commands
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ghex] Set the parent window for help menu commands
- Date: Tue, 21 Feb 2012 04:50:22 +0000 (UTC)
commit 34abf509fbd7ac03ecb9f5c1395c07987f8dd538
Author: Kalev Lember <kalevlember gmail com>
Date: Mon Feb 20 21:52:20 2012 +0200
Set the parent window for help menu commands
src/ui.c | 15 +++++++++------
src/ui.h | 4 ++--
2 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/src/ui.c b/src/ui.c
index 4a18366..41928ea 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -127,8 +127,8 @@ create_dialog_title(GtkWidget *window, gchar *title)
* callbacks for global menus
*/
void
-about_cb (GtkAction *action,
- gpointer user_data)
+about_cb (GtkAction *action,
+ GHexWindow *window)
{
gchar *copyright;
gchar *license_translated;
@@ -169,7 +169,7 @@ about_cb (GtkAction *action,
e.g. 1998-2012. */
copyright = g_strdup_printf (_("Copyright  %Idâ%Id The GHex authors"), 1998, 2012);
- gtk_show_about_dialog (NULL,
+ gtk_show_about_dialog (GTK_WINDOW (window),
"authors", authors,
"comments", _("A binary file editor"),
"copyright", copyright,
@@ -190,12 +190,15 @@ about_cb (GtkAction *action,
}
void
-help_cb (GtkAction *action,
- gpointer user_data)
+help_cb (GtkAction *action,
+ GHexWindow *window)
{
GError *error = NULL;
- gtk_show_uri (NULL, "ghelp:ghex", gtk_get_current_event_time (), &error);
+ gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (window)),
+ "ghelp:ghex",
+ gtk_get_current_event_time (),
+ &error);
if (error != NULL) {
GtkWidget *dialog;
diff --git a/src/ui.h b/src/ui.h
index 138b644..b3bf14c 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -83,8 +83,8 @@ void converter_cb (GtkAction *action, gpointer user_data);
void type_dialog_cb (GtkAction *action, gpointer user_data);
/* Help menu */
-void help_cb (GtkAction *action, gpointer user_data);
-void about_cb (GtkAction *action, gpointer user_data);
+void help_cb (GtkAction *action, GHexWindow *window);
+void about_cb (GtkAction *action, GHexWindow *window);
void file_list_activated_cb (GtkAction *action, gpointer user_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]