Add help button to properties dialog
parent
876dfd10a7
commit
bd012459a5
|
@ -940,6 +940,16 @@ static void change_color_out(GtkWidget *button, t_global_monitor *global)
|
|||
static void
|
||||
monitor_dialog_response (GtkWidget *dlg, int response, t_global_monitor *global)
|
||||
{
|
||||
if (response == GTK_RESPONSE_HELP) {
|
||||
xfce_dialog_show_help (GTK_WINDOW (dlg), PACKAGE_VERSION, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
monitor_apply_options (global);
|
||||
gtk_widget_destroy (dlg);
|
||||
xfce_panel_plugin_unblock_menu (global->plugin);
|
||||
monitor_write_config (global->plugin, global);
|
||||
}
|
||||
}
|
||||
|
||||
monitor_apply_options (global);
|
||||
gtk_widget_destroy (dlg);
|
||||
|
@ -1014,12 +1024,13 @@ static void monitor_create_options(XfcePanelPlugin *plugin, t_global_monitor *gl
|
|||
|
||||
xfce_panel_plugin_block_menu (plugin);
|
||||
|
||||
dlg = xfce_titled_dialog_new_with_buttons (_("Network Monitor"), NULL,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
"gtk-close", GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
dlg = xfce_titled_dialog_new_with_mixed_buttons (_("Network Monitor"), NULL,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
"window-close-symbolic", _("_Close"), GTK_RESPONSE_OK,
|
||||
"help-browser", _("_Help"), GTK_RESPONSE_HELP,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_icon_name (GTK_WINDOW (dlg), "xfce4-settings");
|
||||
gtk_window_set_icon_name (GTK_WINDOW (dlg), "org.xfce.panel.netload");
|
||||
g_signal_connect (dlg, "response", G_CALLBACK (monitor_dialog_response),
|
||||
global);
|
||||
|
||||
|
|
Loading…
Reference in New Issue