Commit cb8c2d18 authored by Michael Natterer's avatar Michael Natterer
Browse files

Rest of previous commit which was aborted by the server.

parent 1bcd3e18
......@@ -42,7 +42,6 @@
#include "drawable.h"
#include "gdisplay.h"
#include "gimprc.h"
#include "libgimp/gimpintl.h"
......
......@@ -42,7 +42,6 @@
#include "drawable.h"
#include "gdisplay.h"
#include "gimprc.h"
#include "libgimp/gimpintl.h"
......
......@@ -47,7 +47,6 @@
#include "gui/file-open-dialog.h"
#include "app_procs.h"
#include "gimprc.h"
#include "gimpdnd.h"
#include "gimppreview.h"
......
......@@ -35,9 +35,6 @@
#include "core/gimplayer.h"
#include "core/gimpmarshal.h"
#include "gdisplay.h"
#include "gimprc.h"
#include "gimpchannellistview.h"
#include "gimpdnd.h"
#include "gimpdrawablelistview.h"
......@@ -45,6 +42,8 @@
#include "gimplistitem.h"
#include "gimppreview.h"
#include "gdisplay.h"
#include "libgimp/gimpintl.h"
#include "pixmaps/delete.xpm"
......@@ -349,7 +348,8 @@ gimp_drawable_list_view_destroy (GtkObject *object)
}
GtkWidget *
gimp_drawable_list_view_new (GimpImage *gimage,
gimp_drawable_list_view_new (gint preview_size,
GimpImage *gimage,
GtkType drawable_type,
const gchar *signal_name,
GimpGetContainerFunc get_container_func,
......@@ -366,6 +366,7 @@ gimp_drawable_list_view_new (GimpImage *gimage,
GimpDrawableListView *list_view;
GimpContainerView *view;
g_return_val_if_fail (preview_size > 0 && preview_size <= 64, NULL);
g_return_val_if_fail (! gimage || GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (signal_name != NULL, NULL);
g_return_val_if_fail (get_container_func != NULL, NULL);
......@@ -394,7 +395,7 @@ gimp_drawable_list_view_new (GimpImage *gimage,
view = GIMP_CONTAINER_VIEW (list_view);
view->preview_size = gimprc.preview_size;
view->preview_size = preview_size;
list_view->drawable_type = drawable_type;
list_view->signal_name = g_strdup (signal_name);
......
......@@ -98,7 +98,8 @@ struct _GimpDrawableListViewClass
GtkType gimp_drawable_list_view_get_type (void);
GtkWidget * gimp_drawable_list_view_new (GimpImage *gimage,
GtkWidget * gimp_drawable_list_view_new (gint preview_size,
GimpImage *gimage,
GtkType drawable_type,
const gchar *signal_name,
GimpGetContainerFunc get_container_func,
......
......@@ -35,9 +35,6 @@
#include "core/gimplayer.h"
#include "core/gimpmarshal.h"
#include "gdisplay.h"
#include "gimprc.h"
#include "gimpchannellistview.h"
#include "gimpdnd.h"
#include "gimpdrawablelistview.h"
......@@ -45,6 +42,8 @@
#include "gimplistitem.h"
#include "gimppreview.h"
#include "gdisplay.h"
#include "libgimp/gimpintl.h"
#include "pixmaps/delete.xpm"
......@@ -349,7 +348,8 @@ gimp_drawable_list_view_destroy (GtkObject *object)
}
GtkWidget *
gimp_drawable_list_view_new (GimpImage *gimage,
gimp_drawable_list_view_new (gint preview_size,
GimpImage *gimage,
GtkType drawable_type,
const gchar *signal_name,
GimpGetContainerFunc get_container_func,
......@@ -366,6 +366,7 @@ gimp_drawable_list_view_new (GimpImage *gimage,
GimpDrawableListView *list_view;
GimpContainerView *view;
g_return_val_if_fail (preview_size > 0 && preview_size <= 64, NULL);
g_return_val_if_fail (! gimage || GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (signal_name != NULL, NULL);
g_return_val_if_fail (get_container_func != NULL, NULL);
......@@ -394,7 +395,7 @@ gimp_drawable_list_view_new (GimpImage *gimage,
view = GIMP_CONTAINER_VIEW (list_view);
view->preview_size = gimprc.preview_size;
view->preview_size = preview_size;
list_view->drawable_type = drawable_type;
list_view->signal_name = g_strdup (signal_name);
......
......@@ -98,7 +98,8 @@ struct _GimpDrawableListViewClass
GtkType gimp_drawable_list_view_get_type (void);
GtkWidget * gimp_drawable_list_view_new (GimpImage *gimage,
GtkWidget * gimp_drawable_list_view_new (gint preview_size,
GimpImage *gimage,
GtkType drawable_type,
const gchar *signal_name,
GimpGetContainerFunc get_container_func,
......
......@@ -27,6 +27,7 @@
#include "widgets-types.h"
#include "core/gimp.h"
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
......@@ -42,10 +43,10 @@
#include "libgimp/gimpintl.h"
static void gimp_image_dock_class_init (GimpImageDockClass *klass);
static void gimp_image_dock_init (GimpImageDock *dock);
static void gimp_image_dock_class_init (GimpImageDockClass *klass);
static void gimp_image_dock_init (GimpImageDock *dock);
static void gimp_image_dock_destroy (GtkObject *object);
static void gimp_image_dock_destroy (GtkObject *object);
static void gimp_image_dock_factory_image_changed (GimpContext *context,
GimpImage *gimage,
......@@ -165,8 +166,8 @@ gimp_image_dock_new (GimpDialogFactory *factory,
dock->factory = factory;
dock->context = gimp_context_new (factory->context->gimp,
"Dock Context", NULL);
dock->context = gimp_create_context (factory->context->gimp,
"Dock Context", NULL);
gimp_context_define_args (dock->context,
GIMP_CONTEXT_ALL_ARGS_MASK &
~(GIMP_CONTEXT_IMAGE_MASK |
......
......@@ -35,9 +35,6 @@
#include "core/gimplayer.h"
#include "core/gimpmarshal.h"
#include "gdisplay.h"
#include "gimprc.h"
#include "gimpchannellistview.h"
#include "gimpdnd.h"
#include "gimpdrawablelistview.h"
......@@ -45,6 +42,8 @@
#include "gimplistitem.h"
#include "gimppreview.h"
#include "gdisplay.h"
#include "libgimp/gimpintl.h"
#include "pixmaps/delete.xpm"
......@@ -349,7 +348,8 @@ gimp_drawable_list_view_destroy (GtkObject *object)
}
GtkWidget *
gimp_drawable_list_view_new (GimpImage *gimage,
gimp_drawable_list_view_new (gint preview_size,
GimpImage *gimage,
GtkType drawable_type,
const gchar *signal_name,
GimpGetContainerFunc get_container_func,
......@@ -366,6 +366,7 @@ gimp_drawable_list_view_new (GimpImage *gimage,
GimpDrawableListView *list_view;
GimpContainerView *view;
g_return_val_if_fail (preview_size > 0 && preview_size <= 64, NULL);
g_return_val_if_fail (! gimage || GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (signal_name != NULL, NULL);
g_return_val_if_fail (get_container_func != NULL, NULL);
......@@ -394,7 +395,7 @@ gimp_drawable_list_view_new (GimpImage *gimage,
view = GIMP_CONTAINER_VIEW (list_view);
view->preview_size = gimprc.preview_size;
view->preview_size = preview_size;
list_view->drawable_type = drawable_type;
list_view->signal_name = g_strdup (signal_name);
......
......@@ -98,7 +98,8 @@ struct _GimpDrawableListViewClass
GtkType gimp_drawable_list_view_get_type (void);
GtkWidget * gimp_drawable_list_view_new (GimpImage *gimage,
GtkWidget * gimp_drawable_list_view_new (gint preview_size,
GimpImage *gimage,
GtkType drawable_type,
const gchar *signal_name,
GimpGetContainerFunc get_container_func,
......
......@@ -35,9 +35,6 @@
#include "core/gimplayer.h"
#include "core/gimpmarshal.h"
#include "gdisplay.h"
#include "gimprc.h"
#include "gimpchannellistview.h"
#include "gimpdnd.h"
#include "gimpdrawablelistview.h"
......@@ -45,6 +42,8 @@
#include "gimplistitem.h"
#include "gimppreview.h"
#include "gdisplay.h"
#include "libgimp/gimpintl.h"
#include "pixmaps/delete.xpm"
......@@ -349,7 +348,8 @@ gimp_drawable_list_view_destroy (GtkObject *object)
}
GtkWidget *
gimp_drawable_list_view_new (GimpImage *gimage,
gimp_drawable_list_view_new (gint preview_size,
GimpImage *gimage,
GtkType drawable_type,
const gchar *signal_name,
GimpGetContainerFunc get_container_func,
......@@ -366,6 +366,7 @@ gimp_drawable_list_view_new (GimpImage *gimage,
GimpDrawableListView *list_view;
GimpContainerView *view;
g_return_val_if_fail (preview_size > 0 && preview_size <= 64, NULL);
g_return_val_if_fail (! gimage || GIMP_IS_IMAGE (gimage), NULL);
g_return_val_if_fail (signal_name != NULL, NULL);
g_return_val_if_fail (get_container_func != NULL, NULL);
......@@ -394,7 +395,7 @@ gimp_drawable_list_view_new (GimpImage *gimage,
view = GIMP_CONTAINER_VIEW (list_view);
view->preview_size = gimprc.preview_size;
view->preview_size = preview_size;
list_view->drawable_type = drawable_type;
list_view->signal_name = g_strdup (signal_name);
......
......@@ -98,7 +98,8 @@ struct _GimpDrawableListViewClass
GtkType gimp_drawable_list_view_get_type (void);
GtkWidget * gimp_drawable_list_view_new (GimpImage *gimage,
GtkWidget * gimp_drawable_list_view_new (gint preview_size,
GimpImage *gimage,
GtkType drawable_type,
const gchar *signal_name,
GimpGetContainerFunc get_container_func,
......
......@@ -40,7 +40,6 @@
#include "drawable.h"
#include "gdisplay.h"
#include "gimprc.h"
#include "libgimp/gimpintl.h"
......
......@@ -40,7 +40,6 @@
#include "drawable.h"
#include "gdisplay.h"
#include "gimprc.h"
#include "libgimp/gimpintl.h"
......
......@@ -27,6 +27,7 @@
#include "widgets-types.h"
#include "core/gimp.h"
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
......@@ -42,10 +43,10 @@
#include "libgimp/gimpintl.h"
static void gimp_image_dock_class_init (GimpImageDockClass *klass);
static void gimp_image_dock_init (GimpImageDock *dock);
static void gimp_image_dock_class_init (GimpImageDockClass *klass);
static void gimp_image_dock_init (GimpImageDock *dock);
static void gimp_image_dock_destroy (GtkObject *object);
static void gimp_image_dock_destroy (GtkObject *object);
static void gimp_image_dock_factory_image_changed (GimpContext *context,
GimpImage *gimage,
......@@ -165,8 +166,8 @@ gimp_image_dock_new (GimpDialogFactory *factory,
dock->factory = factory;
dock->context = gimp_context_new (factory->context->gimp,
"Dock Context", NULL);
dock->context = gimp_create_context (factory->context->gimp,
"Dock Context", NULL);
gimp_context_define_args (dock->context,
GIMP_CONTEXT_ALL_ARGS_MASK &
~(GIMP_CONTEXT_IMAGE_MASK |
......
......@@ -35,6 +35,7 @@
#include "core/gimp.h"
#include "core/gimpchannel.h"
#include "core/gimpcontainer.h"
#include "core/gimpcoreconfig.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "core/gimplayer.h"
......@@ -46,7 +47,6 @@
#include "xcf-seek.h"
#include "floating_sel.h"
#include "gimprc.h"
#include "parasitelist.h"
#include "path.h"
#include "pathP.h"
......@@ -474,8 +474,8 @@ xcf_load_image_props (XcfInfo *info,
yres < GIMP_MIN_RESOLUTION || yres > GIMP_MAX_RESOLUTION)
{
g_message ("Warning, resolution out of range in XCF file");
xres = gimprc.default_xresolution;
yres = gimprc.default_yresolution;
xres = core_config->default_xresolution;
yres = core_config->default_yresolution;
}
gimage->xresolution = xres;
gimage->yresolution = yres;
......
......@@ -46,7 +46,6 @@
#include "xcf-write.h"
#include "floating_sel.h"
#include "gimprc.h"
#include "parasitelist.h"
#include "path.h"
#include "pathP.h"
......
......@@ -113,7 +113,7 @@ HELP
%invoke = (
vars => [ 'GimpBrush *brush' ],
code => 'success = (brush = gimp_context_get_brush (NULL)) != NULL;'
code => 'success = (brush = gimp_context_get_brush (gimp_get_current_context (gimp))) != NULL;'
);
}
......@@ -140,7 +140,8 @@ HELP
name);
if (object)
gimp_context_set_brush (NULL, GIMP_BRUSH (object));
gimp_context_set_brush (gimp_get_current_context (gimp),
GIMP_BRUSH (object));
else
success = FALSE;
}
......@@ -160,7 +161,7 @@ HELP
&std_pdb_misc;
@outargs = ( &opacity_arg );
$outargs[0]->{alias} = 'gimp_context_get_opacity (NULL) * 100.0';
$outargs[0]->{alias} = 'gimp_context_get_opacity (gimp_get_current_context (gimp)) * 100.0';
$outargs[0]->{no_declare} = 1;
}
......@@ -177,7 +178,7 @@ HELP
@inargs = ( &opacity_arg );
%invoke = ( code => 'gimp_context_set_opacity (NULL, opacity / 100.0);' );
%invoke = ( code => 'gimp_context_set_opacity (gimp_get_current_context (gimp), opacity / 100.0);' );
}
sub brushes_get_spacing {
......@@ -193,7 +194,7 @@ HELP
&std_pdb_misc;
@outargs = ( &spacing_arg );
$outargs[0]->{alias} = 'gimp_brush_get_spacing (gimp_context_get_brush (NULL))';
$outargs[0]->{alias} = 'gimp_brush_get_spacing (gimp_context_get_brush (gimp_get_current_context (gimp)))';
$outargs[0]->{no_declare} = 1;
}
......@@ -211,7 +212,7 @@ HELP
@inargs = ( &spacing_arg );
%invoke = (
code => 'gimp_brush_set_spacing (gimp_context_get_brush (NULL), spacing);'
code => 'gimp_brush_set_spacing (gimp_context_get_brush (gimp_get_current_context (gimp)), spacing);'
);
}
......@@ -228,7 +229,7 @@ HELP
&std_pdb_misc;
@outargs = ( &paint_mode_arg );
$outargs[0]->{alias} = 'gimp_context_get_paint_mode (NULL)';
$outargs[0]->{alias} = 'gimp_context_get_paint_mode (gimp_get_current_context (gimp))';
$outargs[0]->{no_declare} = 1;
}
......@@ -245,7 +246,7 @@ HELP
@inargs = ( &paint_mode_arg );
%invoke = ( code => 'gimp_context_set_paint_mode (NULL, paint_mode);' );
%invoke = ( code => 'gimp_context_set_paint_mode (gimp_get_current_context (gimp), paint_mode);' );
}
sub brushes_list {
......@@ -345,7 +346,7 @@ HELP
}
}
else
success = (brush = gimp_context_get_brush (NULL)) != NULL;
success = (brush = gimp_context_get_brush (gimp_get_current_context (gimp))) != NULL;
if (success)
{
......
......@@ -128,7 +128,7 @@ HELP
desc => 'The type of fill: %%desc%%' }
);
%invoke = ( code => 'drawable_fill (drawable, (GimpFillType) fill_type);' );
%invoke = ( code => 'drawable_fill (drawable, gimp_get_current_context (gimp), (GimpFillType) fill_type);' );
}
sub drawable_update {
......@@ -536,7 +536,7 @@ CODE
);
}
@headers = qw("core/gimplayermask.h" "core/gimpchannel.h"
@headers = qw("core/gimp.h" "core/gimplayermask.h" "core/gimpchannel.h"
"core/gimpdrawable.h" "drawable.h"
"pdb_glue.h" "base/tile.h" "base/tile-manager.h"
"base/temp-buf.h");
......
......@@ -195,7 +195,7 @@ HELP
success = TRUE;
}
else
success = (gradient = gimp_context_get_gradient (NULL)) != NULL;
success = (gradient = gimp_context_get_gradient (gimp_get_current_context (gimp))) != NULL;
if (success)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment