static void browser_tabs_finalize (GObject *object) { BrowserTabs *bt = BROWSER_TABS (object); GSList *iter = bt->priv->list; while (iter) { browser_tabs_remove_tab (iter->data); iter = g_slist_next (iter); } G_OBJECT_CLASS (parent_class)->finalize (object); }
static void browser_tabs_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { BrowserTabs *bt = BROWSER_TABS (object); switch (prop_id) { case PROP_NOTEBOOK: g_value_set_object (value, bt->priv->notebook); break; case PROP_HEAD_LINES: g_value_set_object (value, bt->priv->headlines); break; case PROP_TAB_INFO_LIST: g_value_set_boxed (value, bt->priv->list); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }