app: add view-size and view-border-width props to GimpContainerEditor
and remove them from the various public construct() functions.
This commit is contained in:
@ -36,6 +36,7 @@
|
||||
#include "gimpdnd.h"
|
||||
#include "gimpeditor.h"
|
||||
#include "gimpuimanager.h"
|
||||
#include "gimpviewrenderer.h"
|
||||
#include "gimpwidgets-utils.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
@ -82,15 +83,21 @@ gimp_document_view_new (GimpViewType view_type,
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_CONTAINER (container), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (view_size > 0 &&
|
||||
view_size <= GIMP_VIEWABLE_MAX_PREVIEW_SIZE, FALSE);
|
||||
g_return_val_if_fail (view_border_width >= 0 &&
|
||||
view_border_width <= GIMP_VIEW_MAX_BORDER_WIDTH,
|
||||
FALSE);
|
||||
|
||||
document_view = g_object_new (GIMP_TYPE_DOCUMENT_VIEW,
|
||||
"view-type", view_type,
|
||||
"container", container,
|
||||
"context", context,
|
||||
"view-type", view_type,
|
||||
"container", container,
|
||||
"context", context,
|
||||
"view-size", view_size,
|
||||
"view-border-width", view_border_width,
|
||||
NULL);
|
||||
|
||||
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (document_view),
|
||||
view_size, view_border_width,
|
||||
menu_factory, "<Documents>",
|
||||
"/documents-popup"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user