static void panel_menu_button_mateconf_notify (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, PanelMenuButton *button) { MateConfValue *value; const char *key; key = panel_mateconf_basename (mateconf_entry_get_key (entry)); value = entry->value; if (!strcmp (key, "menu_path")) { if (value && value->type == MATECONF_VALUE_STRING) panel_menu_button_set_menu_path (button, mateconf_value_get_string (value)); } else if (!strcmp (key, "custom_icon")) { if (value && value->type == MATECONF_VALUE_STRING) panel_menu_button_set_custom_icon (button, mateconf_value_get_string (value)); } else if (!strcmp (key, "tooltip")) { if (value && value->type == MATECONF_VALUE_STRING) panel_menu_button_set_tooltip (button, mateconf_value_get_string (value)); } else if (!strcmp (key, "use_menu_path")) { if (value && value->type == MATECONF_VALUE_BOOL) panel_menu_button_set_use_menu_path (button, mateconf_value_get_bool (value)); } else if (!strcmp (key, "use_custom_icon")) { if (value && value->type == MATECONF_VALUE_BOOL) panel_menu_button_set_use_custom_icon (button, mateconf_value_get_bool (value)); } }
static void panel_addto_name_notify (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, PanelAddtoDialog *dialog) { MateConfValue *value; const char *key; const char *text = NULL; key = panel_mateconf_basename (mateconf_entry_get_key (entry)); if (strcmp (key, "name")) return; value = mateconf_entry_get_value (entry); if (value && value->type == MATECONF_VALUE_STRING) text = mateconf_value_get_string (value); if (text) panel_addto_name_change (dialog, text); }