static void gimp_controller_list_select_item (GimpContainerView *view, GimpViewable *viewable, gpointer insert_data, GimpControllerList *list) { gboolean selected; list->dest_info = GIMP_CONTROLLER_INFO (viewable); selected = GIMP_IS_CONTROLLER_INFO (list->dest_info); if (list->remove_button) { GimpObject *object = GIMP_OBJECT (list->dest_info); gchar *tip = NULL; gtk_widget_set_sensitive (list->remove_button, selected); if (selected) tip = g_strdup_printf (_("Remove '%s' from the list of active controllers"), gimp_object_get_name (object)); gimp_help_set_help_data (list->remove_button, tip, NULL); g_free (tip); } gtk_widget_set_sensitive (list->edit_button, selected); gtk_widget_set_sensitive (list->up_button, selected); gtk_widget_set_sensitive (list->down_button, selected); }
gboolean gimp_controller_info_get_enabled (GimpControllerInfo *info) { g_return_val_if_fail (GIMP_IS_CONTROLLER_INFO (info), FALSE); return info->enabled; }
void gimp_controller_info_set_enabled (GimpControllerInfo *info, gboolean enabled) { g_return_if_fail (GIMP_IS_CONTROLLER_INFO (info)); if (enabled != info->enabled) g_object_set (info, "enabled", enabled, NULL); }
void gimp_controller_info_set_event_snooper (GimpControllerInfo *info, GimpControllerEventSnooper snooper, gpointer snooper_data) { g_return_if_fail (GIMP_IS_CONTROLLER_INFO (info)); info->snooper = snooper; info->snooper_data = snooper_data; }