static void panel_action_button_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { PanelActionButton *button; g_return_if_fail (PANEL_IS_ACTION_BUTTON (object)); button = PANEL_ACTION_BUTTON (object); switch (prop_id) { case PROP_ACTION_TYPE: panel_action_button_set_type (button, g_value_get_enum (value)); break; case PROP_DND_ENABLED: panel_action_button_set_dnd_enabled (button, g_value_get_boolean (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void panel_action_button_type_changed (GSettings *settings, gchar *key, PanelActionButton *button) { int type; g_return_if_fail (PANEL_IS_ACTION_BUTTON (button)); type = g_settings_get_enum (settings, key); panel_action_button_set_type (button, type); }
static void panel_action_button_type_changed (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, PanelActionButton *button) { int type; const char *action_type; g_return_if_fail (PANEL_IS_ACTION_BUTTON (button)); if (!entry->value || entry->value->type != MATECONF_VALUE_STRING) return; action_type = mateconf_value_get_string (entry->value); if (!mateconf_string_to_enum (panel_action_type_map, action_type, &type)) return; panel_action_button_set_type (button, type); }