mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 06:40:08 +00:00
inspector: Add ActionHolder::changed
We will use this signal to communicate action changes to the action list widgetry.
This commit is contained in:
parent
8648ecf889
commit
7664048779
@ -8,6 +8,8 @@ struct _ActionHolder {
|
||||
char *name;
|
||||
};
|
||||
|
||||
static guint changed_signal;
|
||||
|
||||
G_DEFINE_TYPE (ActionHolder, action_holder, G_TYPE_OBJECT)
|
||||
|
||||
static void
|
||||
@ -32,6 +34,15 @@ action_holder_class_init (ActionHolderClass *class)
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
object_class->finalize = action_holder_finalize;
|
||||
|
||||
changed_signal =
|
||||
g_signal_new ("changed",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
ActionHolder *
|
||||
@ -59,3 +70,9 @@ action_holder_get_name (ActionHolder *holder)
|
||||
{
|
||||
return holder->name;
|
||||
}
|
||||
|
||||
void
|
||||
action_holder_changed (ActionHolder *holder)
|
||||
{
|
||||
g_signal_emit (holder, changed_signal, 0);
|
||||
}
|
||||
|
@ -12,4 +12,4 @@ ActionHolder * action_holder_new (GObject *owner,
|
||||
|
||||
GObject *action_holder_get_owner (ActionHolder *holder);
|
||||
const char *action_holder_get_name (ActionHolder *holder);
|
||||
|
||||
void action_holder_changed (ActionHolder *holder);
|
||||
|
Loading…
Reference in New Issue
Block a user