Commit fdabe08c authored by Michael Natterer's avatar Michael Natterer

DIE broken pipe, DIE

parent 233f8860
......@@ -44,9 +44,6 @@
#include "libgimp/gimpintl.h"
#define WANT_ADJUSTMENT_BITS
#include "icons.h"
#define CYAN_RED 0x1
#define MAGENTA_GREEN 0x2
......@@ -114,7 +111,7 @@ gimp_color_balance_tool_register (Gimp *gimp)
_("Adjust color balance"),
N_("/Image/Colors/Color Balance..."), NULL,
NULL, "tools/color_balance.html",
(const gchar **) adjustment_bits);
GIMP_STOCK_TOOL_COLOR_BALANCE);
}
GtkType
......
......@@ -49,9 +49,6 @@
#include "libgimp/gimpintl.h"
#define WANT_CURVES_BITS
#include "icons.h"
#define GRAPH 0x1
#define XRANGE_TOP 0x2
......@@ -210,7 +207,7 @@ gimp_curves_tool_register (Gimp *gimp)
_("Adjust color curves"),
N_("/Image/Colors/Curves..."), NULL,
NULL, "tools/curves.html",
(const gchar **) curves_bits);
GIMP_STOCK_TOOL_CURVES);
}
GtkType
......
......@@ -44,9 +44,6 @@
#include "libgimp/gimpintl.h"
#define WANT_ADJUSTMENT_BITS
#include "icons.h"
#define HUE_PARTITION_MASK GDK_EXPOSURE_MASK | GDK_ENTER_NOTIFY_MASK
......@@ -138,7 +135,7 @@ gimp_hue_saturation_tool_register (Gimp *gimp)
_("Adjust hue and saturation"),
N_("/Image/Colors/Hue-Saturation..."), NULL,
NULL, "tools/hue_saturation.html",
(const gchar **) adjustment_bits);
GIMP_STOCK_TOOL_HUE_SATURATION);
}
GtkType
......
......@@ -46,9 +46,6 @@
#include "libgimp/gimpintl.h"
#define WANT_LEVELS_BITS
#include "icons.h"
#define HISTOGRAM_WIDTH 256
#define HISTOGRAM_HEIGHT 150
......@@ -121,7 +118,7 @@ gimp_threshold_tool_register (Gimp *gimp)
_("Reduce image to two colors using a threshold"),
N_("/Image/Colors/Threshold..."), NULL,
NULL, "tools/threshold.html",
(const gchar **) levels_bits);
GIMP_STOCK_TOOL_THRESHOLD);
}
GtkType
......
......@@ -57,9 +57,6 @@
#include "libgimp/gimpintl.h"
#define WANT_BLEND_BITS
#include "icons.h"
/* target size */
#define TARGET_HEIGHT 15
......@@ -282,7 +279,7 @@ gimp_blend_tool_register (Gimp *gimp)
_("Fill with a color gradient"),
N_("/Tools/Paint Tools/Blend"), "L",
NULL, "tools/blend.html",
(const gchar **) blend_bits);
GIMP_STOCK_TOOL_BLEND);
}
GtkType
......
......@@ -41,9 +41,6 @@
#include "libgimp/gimpintl.h"
#define WANT_COLOR_PICKER_BITS
#include "icons.h"
/* maximum information buffer size */
#define MAX_INFO_BUF 8
......@@ -160,7 +157,7 @@ gimp_color_picker_tool_register (Gimp *gimp)
_("Pick colors from the image"),
N_("/Tools/Color Picker"), "<shift>O",
NULL, "tools/color_picker.html",
(const gchar **) color_picker_bits);
GIMP_STOCK_TOOL_COLOR_PICKER);
}
GtkType
......
......@@ -651,7 +651,7 @@ dialogs_layer_list_view_new (GimpDialogFactory *factory,
NULL,
dialogs_set_drawable_context_func);
dialogs_set_drawable_context_func (GIMP_DOCKABLE (dockable), context);
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
return dockable;
}
......@@ -687,7 +687,7 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
NULL,
dialogs_set_drawable_context_func);
dialogs_set_drawable_context_func (GIMP_DOCKABLE (dockable), context);
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
return dockable;
}
......@@ -714,7 +714,7 @@ dialogs_path_list_view_new (GimpDialogFactory *factory,
NULL,
dialogs_set_path_context_func);
dialogs_set_path_context_func (GIMP_DOCKABLE (dockable), context);
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
return dockable;
}
......
......@@ -651,7 +651,7 @@ dialogs_layer_list_view_new (GimpDialogFactory *factory,
NULL,
dialogs_set_drawable_context_func);
dialogs_set_drawable_context_func (GIMP_DOCKABLE (dockable), context);
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
return dockable;
}
......@@ -687,7 +687,7 @@ dialogs_channel_list_view_new (GimpDialogFactory *factory,
NULL,
dialogs_set_drawable_context_func);
dialogs_set_drawable_context_func (GIMP_DOCKABLE (dockable), context);
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
return dockable;
}
......@@ -714,7 +714,7 @@ dialogs_path_list_view_new (GimpDialogFactory *factory,
NULL,
dialogs_set_path_context_func);
dialogs_set_path_context_func (GIMP_DOCKABLE (dockable), context);
gimp_dockable_set_context (GIMP_DOCKABLE (dockable), context);
return dockable;
}
......
......@@ -18,6 +18,7 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -1941,7 +1942,7 @@ menus_reorder_plugins (void)
static void
menus_tools_create (GimpToolInfo *tool_info)
{
GimpItemFactoryEntry entry;
GimpItemFactoryEntry entry;
if (tool_info->menu_path == NULL)
return;
......@@ -1950,12 +1951,16 @@ menus_tools_create (GimpToolInfo *tool_info)
entry.entry.accelerator = tool_info->menu_accel;
entry.entry.callback = tools_select_cmd_callback;
entry.entry.callback_action = tool_info->tool_type;
entry.entry.item_type = NULL;
entry.entry.item_type = "<StockItem>";
entry.entry.extra_data = tool_info->stock_id;
entry.quark_string = NULL;
entry.help_page = tool_info->help_data;
entry.description = NULL;
menus_create_item (image_factory, &entry, (gpointer) tool_info, 2, TRUE, FALSE);
menus_create_item (image_factory,
&entry, tool_info,
2,
TRUE, FALSE);
}
void
......
......@@ -284,30 +284,24 @@ create_tools (GtkWidget *wbox,
list = g_list_next (list))
{
GimpToolInfo *tool_info;
GtkWidget *alignment;
GtkWidget *button;
GtkWidget *preview;
GtkWidget *image;
tool_info = (GimpToolInfo *) list->data;
button = gtk_radio_button_new (group);
g_object_set_data (G_OBJECT (tool_info), "toolbox_button", button);
gtk_container_set_border_width (GTK_CONTAINER (button), 0);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (button), FALSE);
gtk_wrap_box_pack (GTK_WRAP_BOX (wbox), button,
FALSE, FALSE, FALSE, FALSE);
gtk_widget_show (button);
alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (button), alignment);
g_object_set_data (G_OBJECT (tool_info), "toolbox_button", button);
preview = gimp_preview_new (GIMP_VIEWABLE (tool_info), 22, 0, FALSE);
gtk_container_add (GTK_CONTAINER (alignment), preview);
gtk_widget_show (preview);
image = gtk_image_new_from_stock (tool_info->stock_id,
GTK_ICON_SIZE_BUTTON);
gtk_container_add (GTK_CONTAINER (button), image);
gtk_widget_show (image);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (toolbox_tool_button_toggled),
......@@ -321,9 +315,6 @@ create_tools (GtkWidget *wbox,
tool_info->help,
tool_info->help_data);
gtk_widget_show (preview);
gtk_widget_show (alignment);
gtk_widget_show (button);
}
gtk_widget_show (wbox);
......
......@@ -18,6 +18,7 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -1941,7 +1942,7 @@ menus_reorder_plugins (void)
static void
menus_tools_create (GimpToolInfo *tool_info)
{
GimpItemFactoryEntry entry;
GimpItemFactoryEntry entry;
if (tool_info->menu_path == NULL)
return;
......@@ -1950,12 +1951,16 @@ menus_tools_create (GimpToolInfo *tool_info)
entry.entry.accelerator = tool_info->menu_accel;
entry.entry.callback = tools_select_cmd_callback;
entry.entry.callback_action = tool_info->tool_type;
entry.entry.item_type = NULL;
entry.entry.item_type = "<StockItem>";
entry.entry.extra_data = tool_info->stock_id;
entry.quark_string = NULL;
entry.help_page = tool_info->help_data;
entry.description = NULL;
menus_create_item (image_factory, &entry, (gpointer) tool_info, 2, TRUE, FALSE);
menus_create_item (image_factory,
&entry, tool_info,
2,
TRUE, FALSE);
}
void
......
......@@ -45,9 +45,6 @@
#include "libgimp/gimpintl.h"
#define WANT_AIRBRUSH_BITS
#include "icons.h"
/* The maximum amount of pressure that can be exerted */
#define MAX_PRESSURE 0.075
......@@ -134,7 +131,7 @@ gimp_airbrush_tool_register (Gimp *gimp)
_("Airbrush with variable pressure"),
N_("/Tools/Paint Tools/Airbrush"), "A",
NULL, "tools/airbrush.html",
(const gchar **) airbrush_bits);
GIMP_STOCK_TOOL_AIRBRUSH);
}
GtkType
......
......@@ -49,9 +49,6 @@
#include "libgimp/gimpintl.h"
#define WANT_CLONE_BITS
#include "icons.h"
#define TARGET_HEIGHT 15
#define TARGET_WIDTH 15
......@@ -165,7 +162,7 @@ gimp_clone_tool_register (Gimp *gimp)
_("Paint using Patterns or Image Regions"),
N_("/Tools/Paint Tools/Clone"), "C",
NULL, "tools/clone.html",
(const gchar **) clone_bits);
GIMP_STOCK_TOOL_CLONE);
}
GtkType
......
......@@ -45,9 +45,6 @@
#include "libgimp/gimpintl.h"
#define WANT_BLUR_BITS
#include "icons.h"
#define FIELD_COLS 4
#define MIN_BLUR 64 /* (8/9 original pixel) */
......@@ -179,7 +176,7 @@ gimp_convolve_tool_register (Gimp *gimp)
_("Blur or Sharpen"),
N_("/Tools/Paint Tools/Convolve"), "B",
NULL, "tools/convolve.html",
(const gchar **) blur_bits);
GIMP_STOCK_TOOL_BLUR);
}
GtkType
......
......@@ -47,9 +47,6 @@
#include "libgimp/gimpintl.h"
#define WANT_DODGE_BITS
#include "icons.h"
/* Default values */
......@@ -146,7 +143,7 @@ gimp_dodgeburn_tool_register (Gimp *gimp)
_("Dodge or Burn strokes"),
N_("/Tools/Paint Tools/DodgeBurn"), "<shift>D",
NULL, "tools/dodgeburn.html",
(const gchar **) dodge_bits);
GIMP_STOCK_TOOL_DODGE);
}
GtkType
......
......@@ -42,9 +42,6 @@
#include "libgimp/gimpintl.h"
#define WANT_ERASER_BITS
#include "icons.h"
#define ERASER_DEFAULT_HARD FALSE
#define ERASER_DEFAULT_INCREMENTAL FALSE
......@@ -112,7 +109,7 @@ gimp_eraser_tool_register (Gimp *gimp)
_("Paint fuzzy brush strokes"),
N_("/Tools/Paint Tools/Eraser"), "<shift>E",
NULL, "tools/eraser.html",
(const gchar **) eraser_bits);
GIMP_STOCK_TOOL_ERASER);
}
GtkType
......
......@@ -53,9 +53,6 @@
#include "libgimp/gimpintl.h"
#define WANT_INK_BITS
#include "icons.h"
#define SUBSAMPLE 8
......@@ -242,7 +239,7 @@ gimp_ink_tool_register (Gimp *gimp)
_("Draw in ink"),
N_("/Tools/Paint Tools/Ink"), "K",
NULL, "tools/ink.html",
(const gchar **) ink_bits);
GIMP_STOCK_TOOL_INK);
}
GtkType
......
......@@ -46,9 +46,6 @@
#include "libgimp/gimpintl.h"
#define WANT_PAINT_BRUSH_BITS
#include "icons.h"
#define PAINT_LEFT_THRESHOLD 0.05
#define PAINTBRUSH_DEFAULT_INCREMENTAL FALSE
......@@ -92,7 +89,7 @@ gimp_paintbrush_tool_register (Gimp *gimp)
_("Paint fuzzy brush strokes"),
N_("/Tools/Paint Tools/Paintbrush"), "P",
NULL, "tools/paintbrush.html",
(const gchar **) paint_brush_bits);
GIMP_STOCK_TOOL_PAINTBRUSH);
}
GtkType
......
......@@ -21,6 +21,7 @@
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "tools-types.h"
......@@ -45,9 +46,6 @@
#include "libgimp/gimpintl.h"
#define WANT_PENCIL_BITS
#include "icons.h"
#define PENCIL_INCREMENTAL_DEFAULT FALSE
......@@ -85,7 +83,7 @@ gimp_pencil_tool_register (Gimp *gimp)
_("Paint hard edged pixels"),
N_("/Tools/Paint Tools/Pencil"), "P",
NULL, "tools/pencil.html",
(const gchar **) pencil_bits);
GIMP_STOCK_TOOL_PENCIL);
}
GtkType
......
......@@ -46,9 +46,6 @@
#include "libgimp/gimpintl.h"
#define WANT_SMUDGE_BITS
#include "icons.h"
/* default defines */
......@@ -123,7 +120,7 @@ gimp_smudge_tool_register (Gimp *gimp)
_("Smudge image"),
N_("/Tools/Paint Tools/Smudge"), "S",
NULL, "tools/smudge.html",
(const gchar **) smudge_bits);
GIMP_STOCK_TOOL_SMUDGE);
}
GtkType
......
......@@ -49,9 +49,6 @@
#include "libgimp/gimpintl.h"
#define WANT_CLONE_BITS
#include "icons.h"
#define TARGET_HEIGHT 15
#define TARGET_WIDTH 15
......@@ -165,7 +162,7 @@ gimp_clone_tool_register (Gimp *gimp)
_("Paint using Patterns or Image Regions"),
N_("/Tools/Paint Tools/Clone"), "C",
NULL, "tools/clone.html",
(const gchar **) clone_bits);
GIMP_STOCK_TOOL_CLONE);
}
GtkType
......
......@@ -111,7 +111,6 @@ libapptools_a_SOURCES = @STRIP_BEGIN@ \
tool_options.c \
tool_options.h \
\
icons.h \
tool_manager.c \
tool_manager.h \
path_tool.h \
......
......@@ -45,9 +45,6 @@
#include "libgimp/gimpintl.h"
#define WANT_AIRBRUSH_BITS
#include "icons.h"
/* The maximum amount of pressure that can be exerted */
#define MAX_PRESSURE 0.075
......@@ -134,7 +131,7 @@ gimp_airbrush_tool_register (Gimp *gimp)
_("Airbrush with variable pressure"),
N_("/Tools/Paint Tools/Airbrush"), "A",
NULL, "tools/airbrush.html",
(const gchar **) airbrush_bits);
GIMP_STOCK_TOOL_AIRBRUSH);
}
GtkType
......
......@@ -56,9 +56,6 @@
#include "libgimp/gimpintl.h"
#define WANT_BEZIER_SELECT_BITS
#include "icons.h"
#define STATUSBAR_SIZE 128
......@@ -283,7 +280,7 @@ gimp_bezier_select_tool_register (Gimp *gimp)
_("Select regions using Bezier curves"),
_("/Tools/Selection Tools/Bezier Select"), "B",
NULL, "tools/bezier_select.html",
(const gchar **) bezier_select_bits);
GIMP_STOCK_TOOL_BEZIER_SELECT);
}
GtkType
......
......@@ -57,9 +57,6 @@
#include "libgimp/gimpintl.h"
#define WANT_BLEND_BITS
#include "icons.h"
/* target size */
#define TARGET_HEIGHT 15
......@@ -282,7 +279,7 @@ gimp_blend_tool_register (Gimp *gimp)
_("Fill with a color gradient"),
N_("/Tools/Paint Tools/Blend"), "L",
NULL, "tools/blend.html",
(const gchar **) blend_bits);
GIMP_STOCK_TOOL_BLEND);
}
GtkType
......
......@@ -43,9 +43,6 @@
#include "libgimp/gimpintl.h"
#define WANT_ADJUSTMENT_BITS
#include "icons.h"
#define SLIDER_WIDTH 200
......@@ -132,7 +129,7 @@ gimp_brightness_contrast_tool_register (Gimp *gimp)
_("Adjust brightness and contrast"),
N_("/Image/Colors/Brightness-Contrast..."), NULL,
NULL, "tools/brightness_contrast.html",
(const gchar **) adjustment_bits);
GIMP_STOCK_TOOL_BRIGHTNESS_CONTRAST);
}
GtkType
......
......@@ -53,9 +53,6 @@
#include "libgimp/gimpintl.h"
#define WANT_BUCKET_FILL_BITS
#include "icons.h"
typedef struct _BucketOptions BucketOptions;
......@@ -135,7 +132,7 @@ gimp_bucket_fill_tool_register (Gimp *gimp)
_("Fill with a color or pattern"),
N_("/Tools/Paint Tools/Bucket Fill"), "<shift>B",
NULL, "tools/bucket_fill.html",
(const gchar **) bucket_fill_bits);
GIMP_STOCK_TOOL_BUCKET_FILL);
}
GtkType
......
......@@ -54,9 +54,6 @@
#include "libgimp/gimpintl.h"
#define WANT_BY_COLOR_SELECT_BITS
#include "icons.h"
#define PREVIEW_WIDTH 256
#define PREVIEW_HEIGHT 256
......@@ -183,7 +180,7 @@ gimp_by_color_select_tool_register (Gimp *gimp)
_("Select regions by color"),
_("/Tools/Selection Tools/By Color Select"), "C",
NULL, "tools/by_color_select.html",
(const gchar **) by_color_select_bits);
GIMP_STOCK_TOOL_BY_COLOR_SELECT);
}
GtkType
......
......@@ -49,9 +49,6 @@
#include "libgimp/gimpintl.h"
#define WANT_CLONE_BITS
#include "icons.h"
#define TARGET_HEIGHT 15
#define TARGET_WIDTH 15
......@@ -165,7 +162,7 @@ gimp_clone_tool_register (Gimp *gimp)
_("Paint using Patterns or Image Regions"),
N_("/Tools/Paint Tools/Clone"), "C",
NULL, "tools/clone.html",
(const gchar **) clone_bits);
GIMP_STOCK_TOOL_CLONE);
}
GtkType
......
......@@ -44,9 +44,6 @@
#include "libgimp/gimpintl.h"
#define WANT_ADJUSTMENT_BITS
#include "icons.h"
#define CYAN_RED 0x1
#define MAGENTA_GREEN 0x2
......@@ -114,7 +111,7 @@ gimp_color_balance_tool_register (Gimp *gimp)