Commit cddf61a3 authored by David Odin's avatar David Odin

app/widgets/gimppreview.c renamed these two files to...

* app/widgets/gimppreview.c
* app/widgets/gimppreview.h: renamed these two files to...

* app/widgets/gimpview.c
* app/widgets/gimpview.h: ... these files.

Also renamed GimpPreview to GimpView.
This is the first step of the great Preview->View renaming process.

* app/actions/palettes-commands.c

* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpnavigationview.c

* app/gui/palette-import-dialog.c

* app/tools/gimppaintoptions-gui.c

* app/widgets/Makefile.am
* app/widgets/gimpaction.c
* app/widgets/gimpactiongroup.c
* app/widgets/gimpbrusheditor.c
* app/widgets/gimpbufferview.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainergridview.h
* app/widgets/gimpdevicestatus.c
* app/widgets/gimpdnd.c
* app/widgets/gimpdockbook.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimpnavigationpreview.c
* app/widgets/gimpnavigationpreview.h
* app/widgets/gimppaletteeditor.c
* app/widgets/gimppreview-popup.c
* app/widgets/gimppropwidgets.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpthumbbox.c
* app/widgets/gimptoolbox-image-area.c
* app/widgets/gimptoolbox-indicator-area.c
* app/widgets/gimptooloptionseditor.c
* app/widgets/gimpviewabledialog.c
* app/widgets/widgets-types.h: changed accordingly.
parent 578bd328
2004-08-24 DindinX <david@dindinx.org>
* app/widgets/gimppreview.c
* app/widgets/gimppreview.h: renamed these two files to...
* app/widgets/gimpview.c
* app/widgets/gimpview.h: ... these files.
Also renamed GimpPreview to GimpView.
This is the first step of the great Preview->View renaming process.
* app/actions/palettes-commands.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpnavigationview.c
* app/gui/palette-import-dialog.c
* app/tools/gimppaintoptions-gui.c
* app/widgets/Makefile.am
* app/widgets/gimpaction.c
* app/widgets/gimpactiongroup.c
* app/widgets/gimpbrusheditor.c
* app/widgets/gimpbufferview.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainergridview.h
* app/widgets/gimpdevicestatus.c
* app/widgets/gimpdnd.c
* app/widgets/gimpdockbook.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimpgradienteditor.c
* app/widgets/gimpnavigationpreview.c
* app/widgets/gimpnavigationpreview.h
* app/widgets/gimppaletteeditor.c
* app/widgets/gimppreview-popup.c
* app/widgets/gimppropwidgets.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpthumbbox.c
* app/widgets/gimptoolbox-image-area.c
* app/widgets/gimptoolbox-indicator-area.c
* app/widgets/gimptooloptionseditor.c
* app/widgets/gimpviewabledialog.c
* app/widgets/widgets-types.h: changed accordingly.
2004-08-24 Sven Neumann <sven@gimp.org>
* app/widgets/Makefile.am
......
......@@ -32,7 +32,7 @@
#include "widgets/gimpcontainerview.h"
#include "widgets/gimpdatafactoryview.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimppreview.h"
#include "widgets/gimpview.h"
#include "gui/palette-import-dialog.h"
......@@ -126,7 +126,7 @@ palettes_merge_palettes_callback (GtkWidget *widget,
list_item = GIMP_LIST_ITEM (sel_list->data);
palette = (GimpPalette *) GIMP_PREVIEW (list_item->preview)->viewable;
palette = (GimpPalette *) GIMP_VIEW (list_item->preview)->viewable;
if (palette)
{
......
......@@ -40,7 +40,7 @@
#include "widgets/gimpcontainercombobox.h"
#include "widgets/gimpdnd.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimppreview.h"
#include "widgets/gimpview.h"
#include "widgets/gimpviewabledialog.h"
#include "palette-import-dialog.h"
......@@ -367,10 +367,10 @@ palette_import_dialog_new (Gimp *gimp)
gtk_container_add (GTK_CONTAINER (frame), abox);
gtk_widget_show (abox);
import_dialog->preview = gimp_preview_new_full_by_types (GIMP_TYPE_PREVIEW,
GIMP_TYPE_PALETTE,
192, 192, 1,
TRUE, FALSE, FALSE);
import_dialog->preview = gimp_view_new_full_by_types (GIMP_TYPE_VIEW,
GIMP_TYPE_PALETTE,
192, 192, 1,
TRUE, FALSE, FALSE);
gtk_container_add (GTK_CONTAINER (abox), import_dialog->preview);
gtk_widget_show (import_dialog->preview);
......@@ -751,8 +751,8 @@ palette_import_make_palette (ImportDialog *import_dialog)
palette->n_columns = n_columns;
gimp_preview_set_viewable (GIMP_PREVIEW (import_dialog->preview),
GIMP_VIEWABLE (palette));
gimp_view_set_viewable (GIMP_VIEW (import_dialog->preview),
GIMP_VIEWABLE (palette));
import_dialog->palette = palette;
}
......
......@@ -30,7 +30,7 @@
#include "core/gimpimage.h"
#include "core/gimplayer.h"
#include "widgets/gimppreview.h"
#include "widgets/gimpview.h"
#include "widgets/gimppreviewrenderer.h"
#include "gimpdisplay.h"
......@@ -150,11 +150,11 @@ layer_select_new (GimpImage *gimage,
gtk_box_pack_start (GTK_BOX (hbox), alignment, FALSE, FALSE, 0);
gtk_widget_show (alignment);
layer_select->preview = gimp_preview_new_by_types (GIMP_TYPE_PREVIEW,
GIMP_TYPE_LAYER,
preview_size, 1, FALSE);
gimp_preview_set_viewable (GIMP_PREVIEW (layer_select->preview),
GIMP_VIEWABLE (layer));
layer_select->preview = gimp_view_new_by_types (GIMP_TYPE_VIEW,
GIMP_TYPE_LAYER,
preview_size, 1, FALSE);
gimp_view_set_viewable (GIMP_VIEW (layer_select->preview),
GIMP_VIEWABLE (layer));
gtk_container_add (GTK_CONTAINER (alignment), layer_select->preview);
gtk_widget_show (layer_select->preview);
gtk_widget_show (alignment);
......@@ -222,8 +222,8 @@ layer_select_advance (LayerSelect *layer_select,
if (current_layer)
{
gimp_preview_set_viewable (GIMP_PREVIEW (layer_select->preview),
GIMP_VIEWABLE (current_layer));
gimp_view_set_viewable (GIMP_VIEW (layer_select->preview),
GIMP_VIEWABLE (current_layer));
gtk_label_set_text (GTK_LABEL (layer_select->label),
GIMP_OBJECT (current_layer)->name);
}
......
......@@ -171,9 +171,9 @@ gimp_navigation_view_init (GimpNavigationView *view)
gtk_box_pack_start (GTK_BOX (view), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
view->preview = gimp_preview_new_by_types (GIMP_TYPE_NAVIGATION_PREVIEW,
GIMP_TYPE_IMAGE,
GIMP_PREVIEW_SIZE_MEDIUM, 0, TRUE);
view->preview = gimp_view_new_by_types (GIMP_TYPE_NAVIGATION_PREVIEW,
GIMP_TYPE_IMAGE,
GIMP_PREVIEW_SIZE_MEDIUM, 0, TRUE);
gtk_container_add (GTK_CONTAINER (frame), view->preview);
gtk_widget_show (view->preview);
......@@ -293,8 +293,8 @@ gimp_navigation_view_set_shell (GimpNavigationView *view,
if (view->shell)
{
gimp_preview_set_viewable (GIMP_PREVIEW (view->preview),
GIMP_VIEWABLE (shell->gdisp->gimage));
gimp_view_set_viewable (GIMP_VIEW (view->preview),
GIMP_VIEWABLE (shell->gdisp->gimage));
g_signal_connect (view->shell, "scaled",
G_CALLBACK (gimp_navigation_view_shell_scaled),
......@@ -310,7 +310,7 @@ gimp_navigation_view_set_shell (GimpNavigationView *view,
}
else
{
gimp_preview_set_viewable (GIMP_PREVIEW (view->preview), NULL);
gimp_view_set_viewable (GIMP_VIEW (view->preview), NULL);
gtk_widget_set_sensitive (GTK_WIDGET (view), FALSE);
}
}
......@@ -391,10 +391,10 @@ gimp_navigation_view_popup (GimpDisplayShell *shell,
*/
x = CLAMP (x, 0, (gdk_screen_get_width (screen) -
GIMP_PREVIEW (preview)->renderer->width -
GIMP_VIEW (preview)->renderer->width -
4 * widget->style->xthickness));
y = CLAMP (y, 0, (gdk_screen_get_height (screen) -
GIMP_PREVIEW (preview)->renderer->height -
GIMP_VIEW (preview)->renderer->height -
4 * widget->style->ythickness));
gtk_window_move (GTK_WINDOW (shell->nav_popup), x, y);
......@@ -429,7 +429,7 @@ gimp_navigation_view_new_private (GimpDisplayShell *shell,
if (popup)
{
GimpPreview *preview = GIMP_PREVIEW (view->preview);
GimpView *preview = GIMP_VIEW (view->preview);
gimp_preview_renderer_set_size (preview->renderer,
config->nav_preview_size * 3,
......@@ -442,7 +442,7 @@ gimp_navigation_view_new_private (GimpDisplayShell *shell,
gtk_widget_set_size_request (view->preview,
GIMP_PREVIEW_SIZE_HUGE,
GIMP_PREVIEW_SIZE_HUGE);
gimp_preview_set_expand (GIMP_PREVIEW (view->preview), TRUE);
gimp_view_set_expand (GIMP_VIEW (view->preview), TRUE);
/* the editor buttons */
......@@ -530,7 +530,7 @@ gimp_navigation_view_new_private (GimpDisplayShell *shell,
if (shell)
gimp_navigation_view_set_shell (view, shell);
gimp_preview_renderer_set_background (GIMP_PREVIEW (view->preview)->renderer,
gimp_preview_renderer_set_background (GIMP_VIEW (view->preview)->renderer,
GIMP_STOCK_TEXTURE);
return GTK_WIDGET (view);
......@@ -734,8 +734,8 @@ static void
gimp_navigation_view_shell_reconnect (GimpDisplayShell *shell,
GimpNavigationView *view)
{
gimp_preview_set_viewable (GIMP_PREVIEW (view->preview),
GIMP_VIEWABLE (shell->gdisp->gimage));
gimp_view_set_viewable (GIMP_VIEW (view->preview),
GIMP_VIEWABLE (shell->gdisp->gimage));
}
static void
......@@ -745,7 +745,7 @@ gimp_navigation_view_update_marker (GimpNavigationView *view)
gdouble xratio;
gdouble yratio;
renderer = GIMP_PREVIEW (view->preview)->renderer;
renderer = GIMP_VIEW (view->preview)->renderer;
xratio = SCALEFACTOR_X (view->shell);
yratio = SCALEFACTOR_Y (view->shell);
......
......@@ -171,9 +171,9 @@ gimp_navigation_view_init (GimpNavigationView *view)
gtk_box_pack_start (GTK_BOX (view), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
view->preview = gimp_preview_new_by_types (GIMP_TYPE_NAVIGATION_PREVIEW,
GIMP_TYPE_IMAGE,
GIMP_PREVIEW_SIZE_MEDIUM, 0, TRUE);
view->preview = gimp_view_new_by_types (GIMP_TYPE_NAVIGATION_PREVIEW,
GIMP_TYPE_IMAGE,
GIMP_PREVIEW_SIZE_MEDIUM, 0, TRUE);
gtk_container_add (GTK_CONTAINER (frame), view->preview);
gtk_widget_show (view->preview);
......@@ -293,8 +293,8 @@ gimp_navigation_view_set_shell (GimpNavigationView *view,
if (view->shell)
{
gimp_preview_set_viewable (GIMP_PREVIEW (view->preview),
GIMP_VIEWABLE (shell->gdisp->gimage));
gimp_view_set_viewable (GIMP_VIEW (view->preview),
GIMP_VIEWABLE (shell->gdisp->gimage));
g_signal_connect (view->shell, "scaled",
G_CALLBACK (gimp_navigation_view_shell_scaled),
......@@ -310,7 +310,7 @@ gimp_navigation_view_set_shell (GimpNavigationView *view,
}
else
{
gimp_preview_set_viewable (GIMP_PREVIEW (view->preview), NULL);
gimp_view_set_viewable (GIMP_VIEW (view->preview), NULL);
gtk_widget_set_sensitive (GTK_WIDGET (view), FALSE);
}
}
......@@ -391,10 +391,10 @@ gimp_navigation_view_popup (GimpDisplayShell *shell,
*/
x = CLAMP (x, 0, (gdk_screen_get_width (screen) -
GIMP_PREVIEW (preview)->renderer->width -
GIMP_VIEW (preview)->renderer->width -
4 * widget->style->xthickness));
y = CLAMP (y, 0, (gdk_screen_get_height (screen) -
GIMP_PREVIEW (preview)->renderer->height -
GIMP_VIEW (preview)->renderer->height -
4 * widget->style->ythickness));
gtk_window_move (GTK_WINDOW (shell->nav_popup), x, y);
......@@ -429,7 +429,7 @@ gimp_navigation_view_new_private (GimpDisplayShell *shell,
if (popup)
{
GimpPreview *preview = GIMP_PREVIEW (view->preview);
GimpView *preview = GIMP_VIEW (view->preview);
gimp_preview_renderer_set_size (preview->renderer,
config->nav_preview_size * 3,
......@@ -442,7 +442,7 @@ gimp_navigation_view_new_private (GimpDisplayShell *shell,
gtk_widget_set_size_request (view->preview,
GIMP_PREVIEW_SIZE_HUGE,
GIMP_PREVIEW_SIZE_HUGE);
gimp_preview_set_expand (GIMP_PREVIEW (view->preview), TRUE);
gimp_view_set_expand (GIMP_VIEW (view->preview), TRUE);
/* the editor buttons */
......@@ -530,7 +530,7 @@ gimp_navigation_view_new_private (GimpDisplayShell *shell,
if (shell)
gimp_navigation_view_set_shell (view, shell);
gimp_preview_renderer_set_background (GIMP_PREVIEW (view->preview)->renderer,
gimp_preview_renderer_set_background (GIMP_VIEW (view->preview)->renderer,
GIMP_STOCK_TEXTURE);
return GTK_WIDGET (view);
......@@ -734,8 +734,8 @@ static void
gimp_navigation_view_shell_reconnect (GimpDisplayShell *shell,
GimpNavigationView *view)
{
gimp_preview_set_viewable (GIMP_PREVIEW (view->preview),
GIMP_VIEWABLE (shell->gdisp->gimage));
gimp_view_set_viewable (GIMP_VIEW (view->preview),
GIMP_VIEWABLE (shell->gdisp->gimage));
}
static void
......@@ -745,7 +745,7 @@ gimp_navigation_view_update_marker (GimpNavigationView *view)
gdouble xratio;
gdouble yratio;
renderer = GIMP_PREVIEW (view->preview)->renderer;
renderer = GIMP_VIEW (view->preview)->renderer;
xratio = SCALEFACTOR_X (view->shell);
yratio = SCALEFACTOR_Y (view->shell);
......
......@@ -40,7 +40,7 @@
#include "widgets/gimpcontainercombobox.h"
#include "widgets/gimpdnd.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimppreview.h"
#include "widgets/gimpview.h"
#include "widgets/gimpviewabledialog.h"
#include "palette-import-dialog.h"
......@@ -367,10 +367,10 @@ palette_import_dialog_new (Gimp *gimp)
gtk_container_add (GTK_CONTAINER (frame), abox);
gtk_widget_show (abox);
import_dialog->preview = gimp_preview_new_full_by_types (GIMP_TYPE_PREVIEW,
GIMP_TYPE_PALETTE,
192, 192, 1,
TRUE, FALSE, FALSE);
import_dialog->preview = gimp_view_new_full_by_types (GIMP_TYPE_VIEW,
GIMP_TYPE_PALETTE,
192, 192, 1,
TRUE, FALSE, FALSE);
gtk_container_add (GTK_CONTAINER (abox), import_dialog->preview);
gtk_widget_show (import_dialog->preview);
......@@ -751,8 +751,8 @@ palette_import_make_palette (ImportDialog *import_dialog)
palette->n_columns = n_columns;
gimp_preview_set_viewable (GIMP_PREVIEW (import_dialog->preview),
GIMP_VIEWABLE (palette));
gimp_view_set_viewable (GIMP_VIEW (import_dialog->preview),
GIMP_VIEWABLE (palette));
import_dialog->palette = palette;
}
......
......@@ -35,7 +35,7 @@
#include "paint/gimppaintoptions.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimppreview.h"
#include "widgets/gimpview.h"
#include "widgets/gimppreviewrenderergradient.h"
#include "widgets/gimppropwidgets.h"
#include "widgets/gtkhwrapbox.h"
......@@ -72,7 +72,7 @@ static GtkWidget * gradient_options_gui (GimpGradientOptions *gradient,
static void gradient_options_reverse_notify (GimpPaintOptions *paint_options,
GParamSpec *pspec,
GimpPreview *preview);
GimpView *view);
GtkWidget *
......@@ -209,7 +209,7 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
gradient_options_reverse_notify (GIMP_PAINT_OPTIONS (config),
NULL,
GIMP_PREVIEW (preview));
GIMP_VIEW (preview));
}
/* the "incremental" toggle */
......@@ -493,11 +493,11 @@ gradient_options_gui (GimpGradientOptions *gradient,
static void
gradient_options_reverse_notify (GimpPaintOptions *paint_options,
GParamSpec *pspec,
GimpPreview *preview)
GimpView *view)
{
GimpPreviewRendererGradient *rendergrad;
rendergrad = GIMP_PREVIEW_RENDERER_GRADIENT (preview->renderer);
rendergrad = GIMP_PREVIEW_RENDERER_GRADIENT (view->renderer);
gimp_preview_renderer_gradient_set_reverse (rendergrad,
paint_options->gradient_options->gradient_reverse);
......
......@@ -186,8 +186,6 @@ libappwidgets_a_sources = \
gimppdbdialog.h \
gimppluginaction.c \
gimppluginaction.h \
gimppreview.c \
gimppreview.h \
gimppreview-popup.c \
gimppreview-popup.h \
gimppreviewrenderer.c \
......@@ -258,6 +256,8 @@ libappwidgets_a_sources = \
gimpunitstore.h \
gimpvectorstreeview.c \
gimpvectorstreeview.h \
gimpview.c \
gimpview.h \
gimpviewablebutton.c \
gimpviewablebutton.h \
gimpviewabledialog.c \
......
......@@ -36,7 +36,7 @@
#include "core/gimpviewable.h"
#include "gimpaction.h"
#include "gimppreview.h"
#include "gimpview.h"
enum
......@@ -298,17 +298,17 @@ gimp_action_set_proxy (GimpAction *action,
}
else if (action->viewable)
{
GtkWidget *preview;
GtkWidget *view;
preview = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (proxy));
view = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (proxy));
if (preview && ! GIMP_IS_PREVIEW (preview))
if (view && ! GIMP_IS_VIEW (view))
{
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (proxy), NULL);
preview = NULL;
view = NULL;
}
if (! preview)
if (! view)
{
GdkScreen *screen;
gint width, height;
......@@ -318,15 +318,15 @@ gimp_action_set_proxy (GimpAction *action,
GTK_ICON_SIZE_MENU,
&width, &height);
preview = gimp_preview_new_full (action->viewable,
view = gimp_view_new_full (action->viewable,
width - 2, height - 2, 1,
FALSE, FALSE, FALSE);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (proxy), preview);
gtk_widget_show (preview);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (proxy), view);
gtk_widget_show (view);
}
else
{
gimp_preview_set_viewable (GIMP_PREVIEW (preview), action->viewable);
gimp_view_set_viewable (GIMP_VIEW (view), action->viewable);
}
}
else
......@@ -335,7 +335,7 @@ gimp_action_set_proxy (GimpAction *action,
image = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (proxy));
if (image && (GIMP_IS_PREVIEW (image) || GIMP_IS_COLOR_AREA (image)))
if (image && (GIMP_IS_VIEW (image) || GIMP_IS_COLOR_AREA (image)))
{
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (proxy), NULL);
g_object_notify (G_OBJECT (action), "stock-id");
......
......@@ -35,7 +35,6 @@
#include "gimpaction.h"
#include "gimpenumaction.h"
#include "gimppluginaction.h"
#include "gimppreview.h"
#include "gimpstringaction.h"
#include "gimp-intl.h"
......
......@@ -34,13 +34,13 @@
#include "gimpbrusheditor.h"
#include "gimpenumwidgets.h"
#include "gimppreview.h"
#include "gimpview.h"
#include "gimp-intl.h"
#define BRUSH_PREVIEW_WIDTH 128
#define BRUSH_PREVIEW_HEIGHT 96
#define BRUSH_VIEW_WIDTH 128
#define BRUSH_VIEW_HEIGHT 96
/* local function prototypes */
......@@ -111,14 +111,14 @@ gimp_brush_editor_init (GimpBrushEditor *editor)
gtk_box_pack_start (GTK_BOX (editor), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
editor->preview = gimp_preview_new_full_by_types (GIMP_TYPE_PREVIEW,
GIMP_TYPE_BRUSH,
BRUSH_PREVIEW_WIDTH,
BRUSH_PREVIEW_HEIGHT, 0,
FALSE, FALSE, TRUE);
editor->preview = gimp_view_new_full_by_types (GIMP_TYPE_VIEW,
GIMP_TYPE_BRUSH,
BRUSH_VIEW_WIDTH,
BRUSH_VIEW_HEIGHT, 0,
FALSE, FALSE, TRUE);
gtk_widget_set_size_request (editor->preview,
BRUSH_PREVIEW_WIDTH, BRUSH_PREVIEW_HEIGHT);
gimp_preview_set_expand (GIMP_PREVIEW (editor->preview), TRUE);
BRUSH_VIEW_WIDTH, BRUSH_VIEW_HEIGHT);
gimp_view_set_expand (GIMP_VIEW (editor->preview), TRUE);
gtk_container_add (GTK_CONTAINER (frame), editor->preview);
gtk_widget_show (editor->preview);
......@@ -236,8 +236,8 @@ gimp_brush_editor_set_data (GimpDataEditor *editor,
G_CALLBACK (gimp_brush_editor_notify_brush),
editor);
gimp_preview_set_viewable (GIMP_PREVIEW (brush_editor->preview),
(GimpViewable *) data);
gimp_view_set_viewable (GIMP_VIEW (brush_editor->preview),
(GimpViewable *) data);
if (editor->data && GIMP_IS_BRUSH_GENERATED (editor->data))
{
......
......@@ -37,7 +37,7 @@
#include "gimpbufferview.h"
#include "gimpdnd.h"
#include "gimphelp-ids.h"
#include "gimppreview.h"
#include "gimpview.h"
#include "gimppreviewrenderer.h"
#include "gimpuimanager.h"
......@@ -109,11 +109,11 @@ gimp_buffer_view_init (GimpBufferView *view)
GtkWidget *
gimp_buffer_view_new (GimpViewType view_type,
GimpContainer *container,
GimpContext *context,
gint preview_size,
gint preview_border_width,
GimpMenuFactory *menu_factory)
GimpContainer *container,
GimpContext *context,
gint view_size,
gint view_border_width,
GimpMenuFactory *menu_factory)
{
GimpBufferView *buffer_view;
GimpContainerEditor *editor;
......@@ -125,7 +125,7 @@ gimp_buffer_view_new (GimpViewType view_type,
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (buffer_view),
view_type,
container, context,
preview_size, preview_border_width,
view_size, view_border_width,
menu_factory, "<Buffers>",
"/buffers-popup"))
{
......@@ -146,14 +146,14 @@ gimp_buffer_view_new (GimpViewType view_type,
gtk_container_add (GTK_CONTAINER (frame), hbox);
gtk_widget_show (hbox);
buffer_view->global_preview = gimp_preview_new_by_types (GIMP_TYPE_PREVIEW,
GIMP_TYPE_BUFFER,
preview_size,
preview_border_width,
buffer_view->global_preview = gimp_view_new_by_types (GIMP_TYPE_VIEW,
GIMP_TYPE_BUFFER,
view_size,
view_border_width,
FALSE);
gtk_widget_set_size_request (buffer_view->global_preview,
preview_size + 2 * preview_border_width,
preview_size + 2 * preview_border_width);
view_size + 2 * view_border_width,
view_size + 2 * view_border_width);
gtk_box_pack_start (GTK_BOX (hbox), buffer_view->global_preview,
FALSE, FALSE, 0);
gtk_widget_show (buffer_view->global_preview);
......@@ -193,17 +193,17 @@ gimp_buffer_view_new (GimpViewType view_type,
"buffers-delete", NULL);
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (buffer_view->paste_button),
GIMP_TYPE_BUFFER);
GTK_BUTTON (buffer_view->paste_button),
GIMP_TYPE_BUFFER);
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (buffer_view->paste_into_button),
GIMP_TYPE_BUFFER);
GTK_BUTTON (buffer_view->paste_into_button),
GIMP_TYPE_BUFFER);
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (buffer_view->paste_as_new_button),
GIMP_TYPE_BUFFER);
GTK_BUTTON (buffer_view->paste_as_new_button),
GIMP_TYPE_BUFFER);
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (buffer_view->delete_button),
GIMP_TYPE_BUFFER);
GTK_BUTTON (buffer_view->delete_button),
GIMP_TYPE_BUFFER);
gimp_ui_manager_update (GIMP_EDITOR (editor->view)->ui_manager, editor);
......@@ -212,7 +212,7 @@ gimp_buffer_view_new (GimpViewType view_type,
static void
gimp_buffer_view_activate_item (GimpContainerEditor *editor,
GimpViewable *viewable)
GimpViewable *viewable)
{
GimpBufferView *view = GIMP_BUFFER_VIEW (editor);
GimpContainer *container;
......@@ -232,8 +232,8 @@ static void
gimp_buffer_view_buffer_changed (Gimp *gimp,
GimpBufferView *buffer_view)
{
gimp_preview_set_viewable (GIMP_PREVIEW (buffer_view->global_preview),
(GimpViewable *) gimp->global_buffer);
gimp_view_set_viewable (GIMP_VIEW (buffer_view->global_preview),
(GimpViewable *) gimp->global_buffer);
if (gimp->global_buffer)
{
......@@ -251,20 +251,20 @@ gimp_buffer_view_buffer_changed (Gimp *gimp,
}
static void
gimp_buffer_view_preview_notify (GimpContainerView *view,
gimp_buffer_view_preview_notify (GimpContainerView *container_view,
GParamSpec *pspec,
GimpBufferView *buffer_view)
{
GimpPreview *preview = GIMP_PREVIEW (buffer_view->global_preview);
gint preview_size;
gint preview_border_width;
GimpView *view = GIMP_VIEW (buffer_view->global_preview);
gint view_size;
gint view_border_width;
preview_size = gimp_container_view_get_preview_size (view,
&preview_border_width);
view_size = gimp_container_view_get_preview_size (container_view,
&view_border_width);
gimp_preview_renderer_set_size (preview->renderer,
preview_size, preview_border_width);
gimp_preview_renderer_set_size (view->renderer,
view_size, view_border_width);
gtk_widget_set_size_request (buffer_view->global_preview,
preview_size + 2 * preview_border_width,
preview_size + 2 * preview_border_width);
view_size + 2 * view_border_width,
view_size + 2 * view_border_width);
}
......@@ -36,7 +36,7 @@
#include "gimpcontainerview.h"
#include "gimpdnd.h"
#include "gimpdocked.h"
#include "gimppreview.h"
#include "gimpview.h"
#include "gimppreviewrenderer.h"
#include "gimppropwidgets.h"
......@@ -236,8 +236,8 @@ gimp_container_box_get_preview (GimpDocked *docked,
border_width = 0;
preview = gimp_prop_preview_new (G_OBJECT (context), prop_name, height);
GIMP_PREVIEW (preview)->renderer->size = -1;
gimp_preview_renderer_set_size_full (GIMP_PREVIEW (preview)->renderer,
GIMP_VIEW (preview)->renderer->size = -1;
gimp_preview_renderer_set_size_full (GIMP_VIEW (preview)->renderer,
width, height, border_width);
return preview;
......
......@@ -36,7 +36,7 @@
#include "gimpcontainergridview.h"
#include "gimpcontainerview.h"
#include "gimppreview.h"
#include "gimpview.h"
#include "gimppreviewrenderer.h"
#include "gimpwidgets-utils.h"
#include "gtkhwrapbox.h"
......@@ -64,18 +64,18 @@ static gboolean gimp_container_grid_view_focus (GtkWidget *w
static gboolean gimp_container_grid_view_popup_menu (GtkWidget *widget);
static gpointer gimp_container_grid_view_insert_item (GimpContainerView *view,
GimpViewable *viewable,
gint index);
GimpViewable *viewable,
gint index);
static void gimp_container_grid_view_remove_item (GimpContainerView *view,
GimpViewable *viewable,
gpointer insert_data);
GimpViewable *viewable,
gpointer insert_data);
static void gimp_container_grid_view_reorder_item (GimpContainerView *view,
GimpViewable *viewable,
gint new_index,
gpointer insert_data);
GimpViewable *viewable,
gint new_index,
gpointer insert_data);
static void gimp_container_grid_view_rename_item (GimpContainerView *view,
GimpViewable *viewable,
gpointer insert_data);
GimpViewable *viewable,
gpointer insert_data);
static gboolean gimp_container_grid_view_select_item (GimpContainerView *view,
GimpViewable *viewable,
gpointer insert_data);
......@@ -83,14 +83,14 @@ static void gimp_container_grid_view_clear_items (GimpContainerView *v
static void gimp_container_grid_view_set_preview_size (GimpContainerView *view);