/*
- * Copyright (C) 2010-2014 jeanfi@gmail.com
+ * Copyright (C) 2010-2016 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
return TRUE;
}
-void ui_show_about_dialog(void)
+void ui_show_about_dialog(GtkWidget *parent)
{
static const char *const authors[] = { "jeanfi@gmail.com", NULL };
+ log_fct("parent=%p", parent);
+
gtk_show_about_dialog
- (NULL,
+ (parent,
"authors", authors,
"comments",
_("Psensor is a GTK+ application for monitoring hardware "
"sensors"),
"copyright",
- _("Copyright(c) 2010-2014 jeanfi@gmail.com"),
+ _("Copyright(c) 2010-2016 jeanfi@gmail.com"),
#if GTK_CHECK_VERSION(3, 12, 0)
"license-type", GTK_LICENSE_GPL_2_0,
#endif
NULL);
}
-void ui_cb_about(GtkMenuItem *mi, gpointer data)
+void ui_cb_about(GtkAction *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)
GtkBuilder *builder;
GError *error;
+ log_fct("ui=%p", ui);
+
builder = gtk_builder_new();
error = NULL;
void ui_menu_bar_show(unsigned int show, struct ui_psensor *ui);
-void ui_show_about_dialog(void);
-
void ui_enable_alpha_channel(struct ui_psensor *ui);
void ui_cb_preferences(GtkMenuItem *mi, gpointer data);
-void ui_cb_about(GtkMenuItem *mi, gpointer data);
void ui_cb_menu_quit(GtkMenuItem *mi, gpointer data);
void ui_cb_sensor_preferences(GtkMenuItem *mi, gpointer data);