app/Makefile.am app/apptypes.h new subclass of GimpDrawableListView (the
2001-03-11 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/apptypes.h * app/gimplayerlistview.[ch]: new subclass of GimpDrawableListView (the upcoming replacement of the layers dialog). Connects to the new GimpLayer signals using the layer container as signal proxy (see below). * app/gimpcontainerview.[ch]: made "set_container" a virtual function. This is needed by the GimpLayerListView to connect/disconnect signals. Subclasses implementing this method MUST obey the following order of instructions: 1. disconnect from signals related to GimpContainerView->container 2. chain up (!!!) 3. connect to signals related to GimpContainerView->container And yes, I will add DocBook files for all those new objects :) * app/gimppreview.[ch]: made "border_color" a GimpRGB instead of guchar[3]. Added gimp_preview_set_border_color(). * app/gimpcontainergridview.c * app/gimplayerlistitem.c: use gimp_preview_set_border_color(). * app/gimpcontainerlistview.c * app/gimpdrawablelistview.c: cleanup. * app/gimpdrawablelistitem.c: we can safely asume that our parent widget is a GimpDrawableListView and use it's "reorder_drawable" function pointer (after checking that it's there). * app/gimplistitem.c: connect the correct DND type when changing the container of a list item with "reorderable" enabled. * app/gimplayer.[ch]: added accessors and "*_changed" signals for layer->mode, layer->opacity and layer->preserve_trans. * app/disp_callbacks.c: fixed a FIXME: use the correct bucket fill tool context again. * app/tools/paint_options.[ch]: paint_mode_menu_new(): added a boolean which toggles the "Behind" item on/off to the same constructor can be used for all paint mode menus. * app/tools/gimptoolinfo.c: rect. select is the standard tool again. * app/brush_select.c * app/floating_sel.c * app/gimpimage.c * app/layers_dialog.c * app/pdb/layer_cmds.c * app/tools/gimpeditselectiontool.c * tools/pdbgen/pdb/layer.pdb: use the new layer accessors and the paint_mode_menu constructor. * app/commands.c * app/gdisplay.c * app/menus.c * app/undo.c * app/tools/gimppainttool.c * app/tools/gimptool.c * app/tools/paint_options.c * app/tools/tool_manager.c: put the #warning's back inside #ifdef __GNUC__
This commit is contained in:
committed by
Michael Natterer
parent
f7cfaa825a
commit
b51d761fcc
@ -31,6 +31,8 @@
|
||||
#include "gimpdrawablelistview.h"
|
||||
#include "gimpdnd.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayerlistview.h"
|
||||
#include "gimplistitem.h"
|
||||
#include "gimpmarshal.h"
|
||||
#include "gimprc.h"
|
||||
@ -67,10 +69,12 @@ static void gimp_drawable_list_view_new_clicked (GtkWidget *w
|
||||
static void gimp_drawable_list_view_new_dropped (GtkWidget *widget,
|
||||
GimpViewable *viewable,
|
||||
gpointer data);
|
||||
|
||||
static void gimp_drawable_list_view_raise_clicked (GtkWidget *widget,
|
||||
GimpDrawableListView *view);
|
||||
static void gimp_drawable_list_view_lower_clicked (GtkWidget *widget,
|
||||
GimpDrawableListView *view);
|
||||
|
||||
static void gimp_drawable_list_view_duplicate_drawable (GimpDrawableListView *view,
|
||||
GimpDrawable *drawable);
|
||||
static void gimp_drawable_list_view_duplicate_clicked (GtkWidget *widget,
|
||||
@ -78,6 +82,7 @@ static void gimp_drawable_list_view_duplicate_clicked (GtkWidget *w
|
||||
static void gimp_drawable_list_view_duplicate_dropped (GtkWidget *widget,
|
||||
GimpViewable *viewable,
|
||||
gpointer drawable);
|
||||
|
||||
static void gimp_drawable_list_view_edit_drawable (GimpDrawableListView *view,
|
||||
GimpDrawable *drawable);
|
||||
static void gimp_drawable_list_view_edit_clicked (GtkWidget *widget,
|
||||
@ -85,6 +90,7 @@ static void gimp_drawable_list_view_edit_clicked (GtkWidget *w
|
||||
static void gimp_drawable_list_view_edit_dropped (GtkWidget *widget,
|
||||
GimpViewable *viewable,
|
||||
gpointer drawable);
|
||||
|
||||
static void gimp_drawable_list_view_delete_drawable (GimpDrawableListView *view,
|
||||
GimpDrawable *drawable);
|
||||
static void gimp_drawable_list_view_delete_clicked (GtkWidget *widget,
|
||||
@ -281,25 +287,6 @@ gimp_drawable_list_view_destroy (GtkObject *object)
|
||||
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
||||
}
|
||||
|
||||
static gpointer
|
||||
gimp_drawable_list_view_insert_item (GimpContainerView *view,
|
||||
GimpViewable *viewable,
|
||||
gint index)
|
||||
{
|
||||
gpointer list_item = NULL;
|
||||
|
||||
if (GIMP_CONTAINER_VIEW_CLASS (parent_class)->insert_item)
|
||||
list_item = GIMP_CONTAINER_VIEW_CLASS (parent_class)->insert_item (view,
|
||||
viewable,
|
||||
index);
|
||||
|
||||
if (list_item)
|
||||
gimp_list_item_set_reorderable (GIMP_LIST_ITEM (list_item),
|
||||
TRUE, view->container);
|
||||
|
||||
return (gpointer) list_item;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gimp_drawable_list_view_new (GimpImage *gimage,
|
||||
GtkType drawable_type,
|
||||
@ -325,7 +312,14 @@ gimp_drawable_list_view_new (GimpImage *gimage,
|
||||
g_return_val_if_fail (remove_drawable_func != NULL, NULL);
|
||||
g_return_val_if_fail (copy_drawable_func != NULL, NULL);
|
||||
|
||||
list_view = gtk_type_new (GIMP_TYPE_DRAWABLE_LIST_VIEW);
|
||||
if (drawable_type == GIMP_TYPE_LAYER)
|
||||
{
|
||||
list_view = gtk_type_new (GIMP_TYPE_LAYER_LIST_VIEW);
|
||||
}
|
||||
else
|
||||
{
|
||||
list_view = gtk_type_new (GIMP_TYPE_DRAWABLE_LIST_VIEW);
|
||||
}
|
||||
|
||||
view = GIMP_CONTAINER_VIEW (list_view);
|
||||
|
||||
@ -420,11 +414,35 @@ gimp_drawable_list_view_set_image (GimpDrawableListView *view,
|
||||
gtk_signal_connect (GTK_OBJECT (view->gimage), view->signal_name,
|
||||
GTK_SIGNAL_FUNC (gimp_drawable_list_view_drawable_changed),
|
||||
view);
|
||||
|
||||
gimp_drawable_list_view_drawable_changed (view->gimage, view);
|
||||
}
|
||||
|
||||
gtk_widget_set_sensitive (view->new_button, (view->gimage != NULL));
|
||||
}
|
||||
|
||||
|
||||
/* GimpContainerView methods */
|
||||
|
||||
static gpointer
|
||||
gimp_drawable_list_view_insert_item (GimpContainerView *view,
|
||||
GimpViewable *viewable,
|
||||
gint index)
|
||||
{
|
||||
gpointer list_item = NULL;
|
||||
|
||||
if (GIMP_CONTAINER_VIEW_CLASS (parent_class)->insert_item)
|
||||
list_item = GIMP_CONTAINER_VIEW_CLASS (parent_class)->insert_item (view,
|
||||
viewable,
|
||||
index);
|
||||
|
||||
if (list_item)
|
||||
gimp_list_item_set_reorderable (GIMP_LIST_ITEM (list_item),
|
||||
TRUE, view->container);
|
||||
|
||||
return list_item;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_drawable_list_view_select_item (GimpContainerView *view,
|
||||
GimpViewable *item,
|
||||
@ -497,6 +515,9 @@ gimp_drawable_list_view_activate_item (GimpContainerView *view,
|
||||
GIMP_DRAWABLE (item));
|
||||
}
|
||||
|
||||
|
||||
/* "New" functions */
|
||||
|
||||
static void
|
||||
gimp_drawable_list_view_new_drawable (GimpDrawableListView *view,
|
||||
GimpDrawable *drawable)
|
||||
@ -530,6 +551,9 @@ gimp_drawable_list_view_new_dropped (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* "Duplicate" functions */
|
||||
|
||||
static void
|
||||
gimp_drawable_list_view_duplicate_drawable (GimpDrawableListView *view,
|
||||
GimpDrawable *drawable)
|
||||
@ -570,6 +594,9 @@ gimp_drawable_list_view_duplicate_dropped (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* "Raise/Lower" functions */
|
||||
|
||||
static void
|
||||
gimp_drawable_list_view_raise_clicked (GtkWidget *widget,
|
||||
GimpDrawableListView *view)
|
||||
@ -612,6 +639,9 @@ gimp_drawable_list_view_lower_clicked (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* "Edit" functions */
|
||||
|
||||
static void
|
||||
gimp_drawable_list_view_edit_drawable (GimpDrawableListView *view,
|
||||
GimpDrawable *drawable)
|
||||
@ -646,6 +676,9 @@ gimp_drawable_list_view_edit_dropped (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* "Delete" functions */
|
||||
|
||||
static void
|
||||
gimp_drawable_list_view_delete_drawable (GimpDrawableListView *view,
|
||||
GimpDrawable *drawable)
|
||||
@ -682,6 +715,9 @@ gimp_drawable_list_view_delete_dropped (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* GimpImage callbacks */
|
||||
|
||||
static void
|
||||
gimp_drawable_list_view_drawable_changed (GimpImage *gimage,
|
||||
GimpDrawableListView *view)
|
||||
|
||||
Reference in New Issue
Block a user