The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Add signal GsweMoment::planet-added

timestamp-validity
Gergely Polonkai 8 years ago
parent 2dd4ea1ca7
commit bf4fad5388
  1. 24
      src/gswe-moment.c

@ -88,6 +88,7 @@ struct _GsweMomentPrivate {
enum {
SIGNAL_CHANGED,
SIGNAL_PLANET_ADDED,
SIGNAL_LAST
};
@ -157,6 +158,27 @@ gswe_moment_class_init(GsweMomentClass *klass)
0
);
/**
* GsweMoment::planet-added:
* @moment: the GsweMoment object that received the signal
* @planet: the planet that was just added to @moment
*
* The ::planet-added signal is emitted each time a planet is
* added to @moment.
*/
gswe_moment_signals[SIGNAL_PLANET_ADDED] = g_signal_new(
"planet-added",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_FIRST,
0,
NULL,
NULL,
g_cclosure_marshal_generic,
G_TYPE_NONE,
1,
GSWE_TYPE_PLANET
);
/**
* GsweMoment:timestamp:
*
@ -856,6 +878,8 @@ gswe_moment_add_planet(GsweMoment *moment, GswePlanet planet, GError **err)
moment->priv->planet_list,
planet_data
);
g_signal_emit(moment, gswe_moment_signals[SIGNAL_PLANET_ADDED], 0, planet);
}
static void

Loading…
Cancel
Save