/*! \brief Set a gobject property */ static void set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec) { GschemOptionsWidget *widget = GSCHEM_OPTIONS_WIDGET (object); switch (param_id) { case PROP_GSCHEM_TOPLEVEL: widget->w_current = GSCHEM_TOPLEVEL (g_value_get_pointer (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); } }
/*! \brief GObject property setter function * * \par Function Description * Setter function for GschemDialog's GObject properties, * "settings-name" and "toplevel". * * \param [in] object The GObject whose properties we are setting * \param [in] property_id The numeric id. under which the property was * registered with g_object_class_install_property() * \param [in] value The GValue the property is being set from * \param [in] pspec A GParamSpec describing the property being set */ static void gschem_dialog_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { GschemDialog *dialog = GSCHEM_DIALOG (object); switch(property_id) { case PROP_SETTINGS_NAME: g_free (dialog->settings_name); dialog->settings_name = g_strdup (g_value_get_string (value)); break; case PROP_GSCHEM_TOPLEVEL: dialog->w_current = GSCHEM_TOPLEVEL (g_value_get_pointer (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } }
/*! \brief Callback for page manager response. * \par Function Description * Handles response <B>arg1</B> of the page manager dialog <B>dialog</B>. * * \param [in] dialog GtkDialog that issues callback. * \param [in] arg1 Response argument of page manager dialog. * \param [in] user_data Pointer to relevant GschemToplevel structure. */ static void x_pagesel_callback_response (GtkDialog *dialog, gint arg1, gpointer user_data) { GschemToplevel *w_current = GSCHEM_TOPLEVEL (user_data); switch (arg1) { case PAGESEL_RESPONSE_UPDATE: pagesel_update (PAGESEL (dialog)); break; case GTK_RESPONSE_DELETE_EVENT: case PAGESEL_RESPONSE_CLOSE: g_assert (GTK_WIDGET (dialog) == w_current->pswindow); gtk_widget_destroy (GTK_WIDGET (dialog)); w_current->pswindow = NULL; break; default: g_assert_not_reached (); } }