static void
font_radio_toggled (GtkToggleButton *toggle_button,
		    FontPair        *pair)
{
  GConfClient *client = gconf_client_get_default ();

  if (!in_change) {
    gconf_client_set_string (client, FONT_ANTIALIASING_KEY,
			     gconf_enum_to_string (antialias_enums, pair->antialiasing),
			     NULL);
    gconf_client_set_string (client, FONT_HINTING_KEY,
			     gconf_enum_to_string (hint_enums, pair->hinting),
			     NULL);
  }

  /* Restore back to the previous state until we get notification */
  font_render_load (client);
  g_object_unref (client);
}
static GConfValue *
action_from_widget (GConfPropertyEditor *peditor, GConfValue *value)
{
	GConfValue *new_value;

	new_value = gconf_value_new (GCONF_VALUE_STRING);
	gconf_value_set_string (new_value, 
			gconf_enum_to_string (actions_lookup_table, 
				gconf_value_get_int (value)));
	return new_value;
}
static GConfValue *
bell_flash_from_widget (GConfPropertyEditor *peditor, const GConfValue *value)
{
	GConfValue *new_value;

	new_value = gconf_value_new (GCONF_VALUE_STRING);
	gconf_value_set_string (new_value,
				gconf_enum_to_string (bell_flash_enums, gconf_value_get_int (value)));

	return new_value;
}
static GConfValue *
toolbar_from_widget (GConfPropertyEditor *peditor, GConfValue *value)
{
  GConfValue *new_value;

  new_value = gconf_value_new (GCONF_VALUE_STRING);
  gconf_value_set_string (new_value,
      gconf_enum_to_string (toolbar_style_enums,
			    gconf_value_get_int (value)));

  return new_value;
}
static void
enum_item_toggled (GtkToggleButton *toggle_button,
		   EnumItem        *item)
{
  EnumGroup *group = item->group;

  if (!in_change) {
    gconf_client_set_string (group->client, group->gconf_key,
			     gconf_enum_to_string (group->enums, item->value),
			     NULL);
  }

  /* Restore back to the previous state until we get notification */
  enum_group_load (group);
}
Esempio n. 6
0
void
panel_action_button_create (PanelToplevel         *toplevel,
			    PanelObjectPackType    pack_type,
			    int                    pack_index,
			    PanelActionButtonType  type)
{
	const char *detail;

	detail = gconf_enum_to_string (panel_action_type_map, type);

	panel_layout_object_create (PANEL_OBJECT_ACTION,
				    detail,
				    panel_toplevel_get_id (toplevel),
				    pack_type, pack_index);
}
Esempio n. 7
0
static void
panel_action_button_drag_data_get (GtkWidget          *widget,
				   GdkDragContext     *context,
				   GtkSelectionData   *selection_data,
				   guint               info,
				   guint               time)
{
	PanelActionButton *button;
	char              *drag_data;

	g_return_if_fail (PANEL_IS_ACTION_BUTTON (widget));

	button = PANEL_ACTION_BUTTON (widget);

	drag_data = g_strdup_printf ("ACTION:%s:%d", 
				     gconf_enum_to_string (panel_action_type_map, button->priv->type),
				     panel_find_applet_index (widget));

	gtk_selection_data_set (
		selection_data, gtk_selection_data_get_target (selection_data),
		8, (guchar *) drag_data, strlen (drag_data));

	g_free (drag_data);
}