GtkAccelGroup * gis_page_get_accel_group (GisPage *page) { if (GIS_PAGE_GET_CLASS (page)->get_accel_group) return GIS_PAGE_GET_CLASS (page)->get_accel_group (page); return NULL; }
void gis_page_apply_begin (GisPage *page, GisPageApplyCallback callback, gpointer user_data) { GisPageClass *klass; GisPagePrivate *priv = gis_page_get_instance_private (page); g_return_if_fail (GIS_IS_PAGE (page)); g_return_if_fail (priv->applying == FALSE); klass = GIS_PAGE_GET_CLASS (page); priv->apply_cb = callback; priv->apply_data = user_data; priv->apply_cancel = g_cancellable_new (); priv->applying = TRUE; if (!klass->apply (page, priv->apply_cancel)) { /* Shortcut case where we don't want apply, to avoid flicker */ gis_page_apply_complete (page, TRUE); } g_object_notify_by_pspec (G_OBJECT (page), obj_props[PROP_APPLYING]); }
static void gis_page_constructed (GObject *object) { GisPage *page = GIS_PAGE (object); GisPageClass *klass = GIS_PAGE_GET_CLASS (page); gis_page_locale_changed (page); G_OBJECT_CLASS (gis_page_parent_class)->constructed (object); }
static void rebuild_pages_cb (GisDriver *driver) { PageData *page_data; GisAssistant *assistant; GisPage *current_page; gchar **skip_pages; gboolean is_new_user; assistant = gis_driver_get_assistant (driver); current_page = gis_assistant_get_current_page (assistant); skip_pages = pages_to_skip_from_file (); page_data = page_table; if (current_page != NULL) { destroy_pages_after (assistant, current_page); for (page_data = page_table; page_data->page_id != NULL; ++page_data) if (g_str_equal (page_data->page_id, GIS_PAGE_GET_CLASS (current_page)->page_id)) break; ++page_data; } is_new_user = (gis_driver_get_mode (driver) == GIS_DRIVER_MODE_NEW_USER); for (; page_data->page_id != NULL; ++page_data) { if (page_data->new_user_only && !is_new_user) continue; if (should_skip_page (driver, page_data->page_id, skip_pages)) continue; page_data->prepare_page_func (driver); } g_strfreev (skip_pages); }
void gis_page_shown (GisPage *page) { if (GIS_PAGE_GET_CLASS (page)->shown) GIS_PAGE_GET_CLASS (page)->shown (page); }
void gis_page_save_data (GisPage *page) { if (GIS_PAGE_GET_CLASS (page)->save_data) GIS_PAGE_GET_CLASS (page)->save_data (page); }
void gis_page_locale_changed (GisPage *page) { if (GIS_PAGE_GET_CLASS (page)->locale_changed) return GIS_PAGE_GET_CLASS (page)->locale_changed (page); }