projects
/
psensor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
set parent of the about dialog
[psensor.git]
/
src
/
ui.c
diff --git
a/src/ui.c
b/src/ui.c
index
61641f8
..
4ab4e5a
100644
(file)
--- a/
src/ui.c
+++ b/
src/ui.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2010-201
4
jeanfi@gmail.com
+ * Copyright (C) 2010-201
6
jeanfi@gmail.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@
-198,18
+198,20
@@
on_delete_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
return TRUE;
}
return TRUE;
}
-void ui_show_about_dialog(
void
)
+void ui_show_about_dialog(
GtkWidget *parent
)
{
static const char *const authors[] = { "jeanfi@gmail.com", NULL };
{
static const char *const authors[] = { "jeanfi@gmail.com", NULL };
+ log_fct("parent=%p", parent);
+
gtk_show_about_dialog
gtk_show_about_dialog
- (
NULL
,
+ (
parent
,
"authors", authors,
"comments",
_("Psensor is a GTK+ application for monitoring hardware "
"sensors"),
"copyright",
"authors", authors,
"comments",
_("Psensor is a GTK+ application for monitoring hardware "
"sensors"),
"copyright",
- _("Copyright(c) 2010-201
4
jeanfi@gmail.com"),
+ _("Copyright(c) 2010-201
6
jeanfi@gmail.com"),
#if GTK_CHECK_VERSION(3, 12, 0)
"license-type", GTK_LICENSE_GPL_2_0,
#endif
#if GTK_CHECK_VERSION(3, 12, 0)
"license-type", GTK_LICENSE_GPL_2_0,
#endif
@@
-223,9
+225,21
@@
void ui_show_about_dialog(void)
NULL);
}
NULL);
}
-void ui_cb_about(Gtk
MenuItem *mi
, gpointer data)
+void ui_cb_about(Gtk
Action *a
, gpointer data)
{
{
- ui_show_about_dialog();
+ struct ui_psensor *ui;
+ GtkWidget *parent;
+
+ ui = (struct ui_psensor *)data;
+
+ log_fct("ui=%p", ui);
+
+ if (ui)
+ parent = ui->main_window;
+ else
+ parent = NULL;
+
+ ui_show_about_dialog(parent);
}
void ui_cb_menu_quit(GtkMenuItem *mi, gpointer data)
}
void ui_cb_menu_quit(GtkMenuItem *mi, gpointer data)
@@
-309,6
+323,8
@@
void ui_window_create(struct ui_psensor *ui)
GtkBuilder *builder;
GError *error;
GtkBuilder *builder;
GError *error;
+ log_fct("ui=%p", ui);
+
builder = gtk_builder_new();
error = NULL;
builder = gtk_builder_new();
error = NULL;