projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MEANS: remove arguments to callbacks which were always unused
[pspp]
/
src
/
ui
/
gui
/
psppire-dialog.c
diff --git
a/src/ui/gui/psppire-dialog.c
b/src/ui/gui/psppire-dialog.c
index e7e0ad042daa1763ce2ff0c5b29242fcad56727d..c5ac30b2767b7fe6c11d0de77993edc96355e4b5 100644
(file)
--- a/
src/ui/gui/psppire-dialog.c
+++ b/
src/ui/gui/psppire-dialog.c
@@
-1,5
+1,5
@@
/* PSPPIRE - a graphical user interface for PSPP.
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2010, 2011 Free Software Foundation
+ Copyright (C) 2007, 2010, 2011
, 2012
Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-23,6
+23,8
@@
#include "psppire-selector.h"
#include "psppire-conf.h"
#include <string.h>
#include "psppire-selector.h"
#include "psppire-conf.h"
#include <string.h>
+#include "builder-wrapper.h"
+#include "help-menu.h"
static void psppire_dialog_class_init (PsppireDialogClass *);
static void psppire_dialog_init (PsppireDialog *);
static void psppire_dialog_class_init (PsppireDialogClass *);
static void psppire_dialog_init (PsppireDialog *);
@@
-30,6
+32,7
@@
static void psppire_dialog_init (PsppireDialog *);
enum {DIALOG_REFRESH,
VALIDITY_CHANGED,
enum {DIALOG_REFRESH,
VALIDITY_CHANGED,
+ DIALOG_HELP,
n_SIGNALS};
static guint signals [n_SIGNALS];
n_SIGNALS};
static guint signals [n_SIGNALS];
@@
-222,8
+225,6
@@
psppire_dialog_class_init (PsppireDialogClass *class)
FALSE,
G_PARAM_CONSTRUCT_ONLY |G_PARAM_READWRITE);
FALSE,
G_PARAM_CONSTRUCT_ONLY |G_PARAM_READWRITE);
-
-
object_class->set_property = psppire_dialog_set_property;
object_class->get_property = psppire_dialog_get_property;
object_class->set_property = psppire_dialog_set_property;
object_class->get_property = psppire_dialog_get_property;
@@
-236,8
+237,6
@@
psppire_dialog_class_init (PsppireDialogClass *class)
PROP_SLIDING,
sliding_spec);
PROP_SLIDING,
sliding_spec);
-
-
signals [DIALOG_REFRESH] =
g_signal_new ("refresh",
G_TYPE_FROM_CLASS (class),
signals [DIALOG_REFRESH] =
g_signal_new ("refresh",
G_TYPE_FROM_CLASS (class),
@@
-261,6
+260,18
@@
psppire_dialog_class_init (PsppireDialogClass *class)
G_TYPE_BOOLEAN);
G_TYPE_BOOLEAN);
+ signals [DIALOG_HELP] =
+ g_signal_new ("help",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL, NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_STRING);
+
+
object_class->finalize = psppire_dialog_finalize;
}
object_class->finalize = psppire_dialog_finalize;
}
@@
-354,7
+365,7
@@
psppire_dialog_init (PsppireDialog *dialog)
gtk_window_set_type_hint (GTK_WINDOW (dialog),
GDK_WINDOW_TYPE_HINT_DIALOG);
gtk_window_set_type_hint (GTK_WINDOW (dialog),
GDK_WINDOW_TYPE_HINT_DIALOG);
- g_object_set (dialog, "icon-name", "pspp
icon
", NULL);
+ g_object_set (dialog, "icon-name", "pspp", NULL);
}
}
@@
-392,8
+403,6
@@
connect_notify_signal (GtkWidget *w, gpointer data)
if ( PSPPIRE_IS_BUTTONBOX (w))
return;
if ( PSPPIRE_IS_BUTTONBOX (w))
return;
-
-
if ( GTK_IS_CONTAINER (w))
{
gtk_container_foreach (GTK_CONTAINER (w),
if ( GTK_IS_CONTAINER (w))
{
gtk_container_foreach (GTK_CONTAINER (w),
@@
-526,6
+535,16
@@
psppire_dialog_reload (PsppireDialog *dialog)
}
}
+void
+psppire_dialog_help (PsppireDialog *dialog)
+{
+ char *name = NULL;
+ g_object_get (dialog, "name", &name, NULL);
+
+ online_help (name);
+
+ g_signal_emit (dialog, signals [DIALOG_HELP], 0, name);
+}
GType
GType