Esempio n. 1
0
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);
}
Esempio n. 2
0
gboolean
gimp_controller_info_get_enabled (GimpControllerInfo *info)
{
  g_return_val_if_fail (GIMP_IS_CONTROLLER_INFO (info), FALSE);

  return info->enabled;
}
Esempio n. 3
0
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);
}
Esempio n. 4
0
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;
}