Commit 95e1a366 authored by Sven Neumann's avatar Sven Neumann

Applied a patch from Wolfgang Hofer.

parent 03729ee7
2003-06-03 Wolfgang Hofer <hof@gimp.org>
- switched to PNG stock-icons
added gap_stock.c [.h]
added images directory
removed pixmaps directory
(gap_navigator_dialog.c, gap_mov_dialog.c)
- gap_vin.c : using setlocale independent float conversion procedures g_ascii_strtod() and g_ascii_dtostr()
- gap_thumbnail.c: check only for thumbnail-size "none" (suggested by sven see #113033)
removed p_gimp_file_has_valid_thumbnail
### unstable prerelease: gimp-gap-1.3.14a_pre37 (http://sven.gimp.org/gimp-gap-2003-05-30.tar.gz)
2003-05-27 Wolfgang Hofer <hof@gimp.org>
- GAP thumbnail handling procedures are now in module gap_thumbnail
- support for new PNG thumbnail standard
......
## Process this file with automake to produce Makefile.in
SUBDIRS = gap pixmaps po
SUBDIRS = images gap po
......@@ -72,7 +72,7 @@ AC_SUBST(LOCALEDIR)
AC_OUTPUT([
Makefile
images/Makefile
gap/Makefile
pixmaps/Makefile
po/Makefile.in
])
......@@ -7,5 +7,6 @@ gap_filter
gap_plugins
gap_frontends
gap_decode_mpeg
gap_name2layer
gap_navigator_dialog
gap_onion
......@@ -55,6 +55,8 @@ gap_plugins_SOURCES = \
gap_resi_dialog.h \
gap_split.c \
gap_split.h \
gap_stock.c \
gap_stock.h \
gap_thumbnail.c \
gap_thumbnail.h \
gap_vin.c \
......@@ -77,6 +79,8 @@ gap_filter_SOURCES = \
gap_lastvaldesc.h \
gap_pdb_calls.c \
gap_pdb_calls.h \
gap_stock.c \
gap_stock.h \
gap_vin.c \
gap_vin.h
......@@ -102,6 +106,8 @@ gap_frontends_SOURCES = \
gap_pdb_calls.h \
gap_thumbnail.c \
gap_thumbnail.h \
gap_stock.c \
gap_stock.h \
gap_vin.c \
gap_vin.h
......@@ -110,6 +116,8 @@ gap_name2layer_SOURCES = \
gap_arr_dialog.h \
gap_lastvaldesc.c \
gap_lastvaldesc.h \
gap_stock.c \
gap_stock.h \
gap_name2layer_main.c
gap_navigator_dialog_SOURCES = \
......@@ -124,6 +132,8 @@ gap_navigator_dialog_SOURCES = \
gap_navigator_dialog.c \
gap_pdb_calls.c \
gap_pdb_calls.h \
gap_stock.c \
gap_stock.h \
gap_thumbnail.c \
gap_thumbnail.h \
gap_vin.c \
......@@ -152,6 +162,8 @@ gap_onion_SOURCES = \
gap_pdb_calls.h \
gap_thumbnail.c \
gap_thumbnail.h \
gap_stock.c \
gap_stock.h \
gap_vin.c \
gap_vin.h
......
......@@ -38,6 +38,7 @@
*/
/* revision history:
* gimp 1.3.14b; 2003/06/03 hof: added gap_stock_init
* gimp 1.3.14a; 2003/05/19 hof: GUI standard (OK ist rightmost button)
* changed WGT_INT, and WGT_FLT from entry to spinbutton
* added WGT_FONTSEL
......@@ -82,6 +83,7 @@
/* private includes */
#include "gap_arr_dialog.h"
#include "gap_stock.h"
#include "gap-intl.h"
typedef void (*t_entry_cb_func) (GtkWidget *widget, t_arr_arg *arr_ptr);
......@@ -1051,7 +1053,8 @@ gint p_array_std_dialog(char *title_txt,
}
gimp_ui_init ("gap_std_dialog", FALSE);
gap_stock_init();
/* dialog */
g_arrint.dlg = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (g_arrint.dlg), title_txt);
......
......@@ -30,9 +30,12 @@
*/
/* revision history:
* gimp 1.3.14b; 2003/06/03 hof: added gap_stock_init
* replaced mov_gtk_button_new_with_pixmap by gtk_button_new_from_stock
* gimp 1.3.14a; 2003/05/24 hof: moved render procedures to module gap_mov_render
* placed OK button right.
* added pixmaps (thanks to Jakub Steiner for providing the pixmaps)
* sven: replaced _gimp_help_init by gimp_ui_init
* gimp 1.3.12a; 2003/05/03 hof: merge into CVS-gimp-gap project, replace gimp_help_init by _gimp_help_init
* gimp 1.3.4b; 2002/03/15 hof: temp. reverted setting of preview widget size.
* gimp 1.3.4; 2002/03/12 hof: ported to gtk+-2.0.0
......@@ -95,21 +98,8 @@
#include "gap_vin.h"
#include "gap_arr_dialog.h"
#include "gap_stock.h"
#include <pixmaps/add-point.xpm>
#include <pixmaps/anim-preview.xpm>
#include <pixmaps/insert-point.xpm>
#include <pixmaps/reset-point.xpm>
#include <pixmaps/reset-all-points.xpm>
#include <pixmaps/delete-all-points.xpm>
#include <pixmaps/delete-point.xpm>
#include <pixmaps/first-point.xpm>
#include <pixmaps/last-point.xpm>
#include <pixmaps/next-point.xpm>
#include <pixmaps/prev-point.xpm>
#include <pixmaps/rotate-follow.xpm>
#include <pixmaps/source-image.xpm>
#include <pixmaps/stepmode.xpm>
extern int gap_debug; /* ==0 ... dont print debug infos */
......@@ -272,7 +262,6 @@ static void mov_stepmode_menu_callback (GtkWidget *, gpointer);
static void mov_gint_toggle_callback (GtkWidget *, gpointer);
static void mov_show_path_callback (GtkWidget *, gpointer);
static GtkWidget * mov_gtk_button_new_with_pixmap (char* label_text, GtkWidget *shell, char **pixmap_data);
/* the option menu items -- the paint modes */
static MenuItem option_paint_items[] =
......@@ -469,6 +458,7 @@ mov_dialog ( GimpDrawable *drawable, t_mov_path_preview *path_ptr,
if(gap_debug) printf("GAP-DEBUG: START mov_dialog\n");
gimp_ui_init ("gap_move", FALSE);
gap_stock_init();
/* dialog */
dlg = gtk_dialog_new ();
......@@ -512,7 +502,7 @@ mov_dialog ( GimpDrawable *drawable, t_mov_path_preview *path_ptr,
G_CALLBACK (mov_upvw_callback),
path_ptr);
button = mov_gtk_button_new_with_pixmap ( _("Anim Preview"), path_ptr->shell, anim_preview_xpm);
button = gtk_button_new_from_stock ( GAP_STOCK_ANIM_PREVIEW );
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (hbbox), button, TRUE, TRUE, 0);
gimp_help_set_help_data(button,
......@@ -1741,95 +1731,6 @@ mov_src_sel_create()
return frame;
} /* end mov_src_sel_create */
/* ============================================================================
* mov_gtk_button_new_with_pixmap
* ============================================================================
* create button with pixmap and label
* both pixmap_data and label are optional (pass NULL iif you dont need one of them)
* return the newly created button widget
*/
static GtkWidget *
mov_gtk_button_new_with_pixmap (char* label_text, GtkWidget *shell, char **pixmap_data)
{
GtkWidget *label;
GtkWidget *button;
GtkWidget *pixmap_widget;
GdkPixmap *pixmap;
GdkBitmap *mask;
/* GtkStyle *style; */
GdkColormap *colormap;
label = NULL;
pixmap_widget = NULL;
button = gtk_button_new ();
if (label_text)
{
label = gtk_label_new ( label_text );
}
if(pixmap_data)
{
/* style = gtk_widget_get_style (shell);
* printf("style: %d\n", (int)style);
* colormap = gtk_widget_get_colormap (shell);
* pixmap = gdk_pixmap_create_from_xpm_d (shell->window,
* &mask,
* &style->bg[GTK_STATE_NORMAL],
* pixmap_data
* );
*/
colormap = gtk_widget_get_colormap (shell);
pixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL,
colormap,
&mask,
NULL,
pixmap_data
);
if(pixmap == NULL)
{
printf("could not create pixmap for label: %s\n", label_text);
}
else
{
pixmap_widget = gtk_pixmap_new (pixmap, mask);
}
}
if(pixmap_widget)
{
GtkWidget *hbox;
hbox = gtk_hbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox), pixmap_widget, FALSE, FALSE, 0);
if(label)
{
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
}
gtk_widget_show (pixmap_widget);
gtk_widget_show (hbox);
gtk_container_add (GTK_CONTAINER (button), hbox);
}
else
{
if(label)
{
gtk_widget_show (label);
gtk_container_add (GTK_CONTAINER (button), label);
}
}
return(button);
} /* end mov_gtk_button_new_with_pixmap */
/* ============================================================================
* Create new path_preview Frame, and return it (GtkFrame).
* A frame that contains one preview and the entries of the current point
......@@ -2116,7 +2017,7 @@ mov_path_prevw_create ( GimpDrawable *drawable, t_mov_path_preview *path_ptr)
row++;
button = mov_gtk_button_new_with_pixmap ( _("Add Point"), path_ptr->shell, add_point_xpm);
button = gtk_button_new_from_stock ( GAP_STOCK_ADD_POINT );
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_table_attach( GTK_TABLE(button_table), button, 0, 1, row, row+1,
GTK_FILL, 0, 0, 0 );
......@@ -2146,7 +2047,7 @@ mov_path_prevw_create ( GimpDrawable *drawable, t_mov_path_preview *path_ptr)
row++;
button = mov_gtk_button_new_with_pixmap ( _("Insert Point"), path_ptr->shell, insert_point_xpm);
button = gtk_button_new_from_stock ( GAP_STOCK_INSERT_POINT );
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_table_attach( GTK_TABLE(button_table), button, 0, 1, row, row+1,
GTK_FILL, 0, 0, 0 );
......@@ -2158,7 +2059,7 @@ mov_path_prevw_create ( GimpDrawable *drawable, t_mov_path_preview *path_ptr)
G_CALLBACK (mov_pins_callback),
path_ptr);
button = mov_gtk_button_new_with_pixmap ( _("Delete Point"), path_ptr->shell, delete_point_xpm);
button = gtk_button_new_from_stock ( GAP_STOCK_DELETE_POINT );
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_table_attach( GTK_TABLE(button_table), button, 1, 2, row, row+1,
GTK_FILL, 0, 0, 0 );
......@@ -2172,7 +2073,7 @@ mov_path_prevw_create ( GimpDrawable *drawable, t_mov_path_preview *path_ptr)
row++;
button = mov_gtk_button_new_with_pixmap ( _("Prev Point"), path_ptr->shell, prev_point_xpm);
button = gtk_button_new_from_stock ( GAP_STOCK_PREV_POINT );
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_table_attach( GTK_TABLE(button_table), button, 0, 1, row, row+1,
GTK_FILL, 0, 0, 0 );
......@@ -2184,7 +2085,7 @@ mov_path_prevw_create ( GimpDrawable *drawable, t_mov_path_preview *path_ptr)
G_CALLBACK (mov_pprev_callback),
path_ptr);
button = mov_gtk_button_new_with_pixmap ( _("Next Point"), path_ptr->shell, next_point_xpm);
button = gtk_button_new_from_stock ( GAP_STOCK_NEXT_POINT );
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_table_attach( GTK_TABLE(button_table), button, 1, 2, row, row+1,
GTK_FILL, 0, 0, 0 );
......@@ -2198,7 +2099,7 @@ mov_path_prevw_create ( GimpDrawable *drawable, t_mov_path_preview *path_ptr)
row++;
button = mov_gtk_button_new_with_pixmap ( _("First Point"), path_ptr->shell, first_point_xpm);
button = gtk_button_new_from_stock ( GAP_STOCK_FIRST_POINT );
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_table_attach( GTK_TABLE(button_table), button, 0, 1, row, row+1,
GTK_FILL, 0, 0, 0 );
......@@ -2210,7 +2111,7 @@ mov_path_prevw_create ( GimpDrawable *drawable, t_mov_path_preview *path_ptr)
G_CALLBACK (mov_pfirst_callback),
path_ptr);
button = mov_gtk_button_new_with_pixmap ( _("Last Point"), path_ptr->shell, last_point_xpm);
button = gtk_button_new_from_stock ( GAP_STOCK_LAST_POINT );
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_table_attach( GTK_TABLE(button_table), button, 1, 2, row, row+1,
GTK_FILL, 0, 0, 0 );
......@@ -2224,7 +2125,7 @@ mov_path_prevw_create ( GimpDrawable *drawable, t_mov_path_preview *path_ptr)
row++;
button = mov_gtk_button_new_with_pixmap ( _("Reset Point"), path_ptr->shell, reset_point_xpm);
button = gtk_button_new_from_stock ( GAP_STOCK_RESET_POINT );
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_table_attach( GTK_TABLE(button_table), button, 0, 1, row, row+1,
GTK_FILL, 0, 0, 0 );
......@@ -2236,7 +2137,7 @@ mov_path_prevw_create ( GimpDrawable *drawable, t_mov_path_preview *path_ptr)
G_CALLBACK (mov_pclr_callback),
path_ptr);
button = mov_gtk_button_new_with_pixmap ( _("Reset All Points"), path_ptr->shell, reset_all_points_xpm);
button = gtk_button_new_from_stock ( GAP_STOCK_RESET_ALL_POINTS );
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_table_attach( GTK_TABLE(button_table), button, 1, 2, row, row+1,
GTK_FILL, 0, 0, 0 );
......@@ -2251,7 +2152,7 @@ mov_path_prevw_create ( GimpDrawable *drawable, t_mov_path_preview *path_ptr)
row++;
button = mov_gtk_button_new_with_pixmap ( _("Rotate Follow"), path_ptr->shell, rotate_follow_xpm);
button = gtk_button_new_from_stock ( GAP_STOCK_ROTATE_FOLLOW );
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_table_attach( GTK_TABLE(button_table), button, 0, 1, row, row+1,
GTK_FILL, 0, 0, 0 );
......@@ -2265,7 +2166,7 @@ mov_path_prevw_create ( GimpDrawable *drawable, t_mov_path_preview *path_ptr)
G_CALLBACK (mov_prot_follow_callback),
path_ptr);
button = mov_gtk_button_new_with_pixmap ( _("Delete All Points"), path_ptr->shell, delete_all_points_xpm);
button = gtk_button_new_from_stock ( GAP_STOCK_DELETE_ALL_POINTS );
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_table_attach( GTK_TABLE(button_table), button, 1, 2, row, row+1,
GTK_FILL, 0, 0, 0 );
......
......@@ -61,6 +61,7 @@
#include "gap_lib.h"
#include "gap_mov_dialog.h"
#include "gap_mov_exec.h"
#include "gap_mov_render.h"
#include "gap_pdb_calls.h"
extern int gap_debug; /* ==0 ... dont print debug infos */
......
......@@ -70,6 +70,8 @@
/* revision history:
* gimp 1.3.14b; 2003/06/03 hof: added gap_stock_init
* ops_button_box_new: now using stock buttons instead of xpm pixmap data
* gimp 1.3.14a; 2003/05/27 hof: replaced old workaround procedure readXVThumb by legal API gimp_file_load_thumbnail
* replaced scale widgets by spinbuttons
* gimp 1.3.12a; 2003/05/03 hof: merge into CVS-gimp-gap project
......@@ -107,6 +109,10 @@ static char *gap_navigator_version = "1.3.14a; 2003/05/27";
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
#include "gap_stock.h"
/*
#include <pixmaps/update.xpm>
#include <pixmaps/play.xpm>
#include <pixmaps/duplicate.xpm>
......@@ -116,6 +122,7 @@ static char *gap_navigator_version = "1.3.14a; 2003/05/27";
#include <pixmaps/next.xpm>
#include <pixmaps/first.xpm>
#include <pixmaps/last.xpm>
*/
#include "gap_navi_activtable.h"
......@@ -161,7 +168,7 @@ typedef struct _OpsButton OpsButton;
struct _OpsButton
{
gchar **xpm_data; /* xpm data for the button */
const char *stock_id; /* STOCK id for the stock button */
OpsButtonFunc callback; /* callback function */
OpsButtonFunc *ext_callbacks; /* callback functions when
* modifiers are pressed */
......@@ -383,21 +390,21 @@ static OpsButtonFunc navi_dialog_vcr_goto_next_ext_callbacks[] =
static OpsButton frames_ops_buttons[] =
{
{ play_xpm, OPS_BUTTON_FUNC (navi_dialog_vcr_play_callback), navi_dialog_vcr_play_ext_callbacks,
{ GAP_STOCK_PLAY, OPS_BUTTON_FUNC (navi_dialog_vcr_play_callback), navi_dialog_vcr_play_ext_callbacks,
N_("Playback \n"
"<Shift> optimized"),
"#playback",
NULL, 0 },
{ update_xpm, OPS_BUTTON_FUNC (navi_dialog_thumb_update_callback), navi_dialog_update_ext_callbacks,
{ GAP_STOCK_UPDATE, OPS_BUTTON_FUNC (navi_dialog_thumb_update_callback), navi_dialog_update_ext_callbacks,
N_("Smart Update Thumbnails\n"
"<Shift> forced upd"),
"#update",
NULL, 0 },
{ duplicate_xpm, OPS_BUTTON_FUNC (navi_dialog_frames_duplicate_frame_callback), NULL,
{ GAP_STOCK_DUPLICATE, OPS_BUTTON_FUNC (navi_dialog_frames_duplicate_frame_callback), NULL,
N_("Duplicate selected Frames"),
"#duplicate",
NULL, 0 },
{ delete_xpm, OPS_BUTTON_FUNC (navi_dialog_frames_delete_frame_callback), NULL,
{ GAP_STOCK_DELETE, OPS_BUTTON_FUNC (navi_dialog_frames_delete_frame_callback), NULL,
N_("Delete selected Frames"),
"#delete",
NULL, 0 },
......@@ -406,21 +413,21 @@ static OpsButton frames_ops_buttons[] =
static OpsButton vcr_ops_buttons[] =
{
{ first_xpm, OPS_BUTTON_FUNC (navi_dialog_vcr_goto_first_callback), NULL,
{ GAP_STOCK_FIRST, OPS_BUTTON_FUNC (navi_dialog_vcr_goto_first_callback), NULL,
N_("Goto 1st Frame"),
"#goto_first",
NULL, 0 },
{ prev_xpm, OPS_BUTTON_FUNC (navi_dialog_vcr_goto_prev_callback), navi_dialog_vcr_goto_prev_ext_callbacks,
{ GAP_STOCK_PREV, OPS_BUTTON_FUNC (navi_dialog_vcr_goto_prev_callback), navi_dialog_vcr_goto_prev_ext_callbacks,
N_("Goto prev Frame\n"
"<Shift> use timezoom stepsize"),
"#goto_previous",
NULL, 0 },
{ next_xpm, OPS_BUTTON_FUNC (navi_dialog_vcr_goto_next_callback), navi_dialog_vcr_goto_next_ext_callbacks,
{ GAP_STOCK_NEXT, OPS_BUTTON_FUNC (navi_dialog_vcr_goto_next_callback), navi_dialog_vcr_goto_next_ext_callbacks,
N_("Goto next Frame\n"
"<Shift> use timezoom stepsize"),
"#goto_next",
NULL, 0 },
{ last_xpm, OPS_BUTTON_FUNC (navi_dialog_vcr_goto_last_callback), NULL,
{ GAP_STOCK_LAST, OPS_BUTTON_FUNC (navi_dialog_vcr_goto_last_callback), NULL,
N_("Goto last Frame"),
"#goto_last",
NULL, 0 },
......@@ -514,7 +521,6 @@ run (char *name,
l_rc = 0;
INIT_I18N();
setlocale (LC_NUMERIC, "C");
l_env = g_getenv("GAP_DEBUG");
if(l_env != NULL)
......@@ -1365,10 +1371,31 @@ navi_thumb_update(gint update_all)
if(!update_all)
{
if (p_gimp_file_has_valid_thumbnail(l_image_filename))
gint32 l_th_width;
gint32 l_th_height;
gint32 l_th_data_count;
guchar *l_raw_thumb;
l_raw_thumb = NULL;
if(FALSE == p_gimp_file_load_thumbnail(l_image_filename
, &l_th_width
, &l_th_height
, &l_th_data_count
, &l_raw_thumb
))
{
/* Thumbnail load failed, so an update is needed to create one */
l_upd_flag = FALSE;
}
else
{
/* Thumbnail load succeeded, update is not needed */
if(l_raw_thumb)
{
g_free(l_raw_thumb);
}
}
}
if(l_upd_flag)
......@@ -3037,9 +3064,9 @@ navi_dialog_create (GtkWidget* shell, gint32 image_id)
10.0, /* pagestep */
0.0, /* page_size */
1.0, /* climb_rate */
1 /* digits */
4 /* digits */
);
naviD->framerate_data = adj;
naviD->framerate_data = GTK_ADJUSTMENT(adj);
gtk_box_pack_start (GTK_BOX (util_box), spinbutton, TRUE, TRUE, 0);
g_signal_connect (G_OBJECT (naviD->framerate_data), "value_changed",
......@@ -3070,7 +3097,7 @@ navi_dialog_create (GtkWidget* shell, gint32 image_id)
0 /* digits */
);
naviD->timezoom_data = adj;
naviD->timezoom_data = GTK_ADJUSTMENT(adj);
gtk_box_pack_start (GTK_BOX (util_box), spinbutton, TRUE, TRUE, 0);
g_signal_connect (G_OBJECT (naviD->timezoom_data), "value_changed",
G_CALLBACK (navi_timezoom_scale_update),
......@@ -3139,6 +3166,7 @@ int gap_navigator(gint32 image_id)
if(gap_debug) fprintf(stderr, "\nSTARTing gap_navigator_dialog\n");
gimp_ui_init ("gap_navigator", FALSE);
gap_stock_init();
/* The main shell */
......@@ -3215,6 +3243,7 @@ int gap_navigator(gint32 image_id)
/* --------------------------------------- start copy of gimp-1.1.14/app/ops_buttons.c */
/* -- 2003.06.03 hof: changed code by using stock buttons instead of xpm pixmap data */
static void ops_button_pressed_callback (GtkWidget*, GdkEventButton*, gpointer);
static void ops_button_extended_callback (GtkWidget*, gpointer);
......@@ -3226,29 +3255,18 @@ ops_button_box_new (GtkWidget *parent,
{
GtkWidget *button;
GtkWidget *button_box;
GtkWidget *pixmap_widget;
GdkPixmap *pixmap;
GdkBitmap *mask;
GtkStyle *style;
GSList *group = NULL;
gtk_widget_realize (parent);
style = gtk_widget_get_style (parent);
button_box = gtk_hbox_new (TRUE, 1);
while (ops_button->xpm_data)
while (ops_button->stock_id)
{
pixmap = gdk_pixmap_create_from_xpm_d (parent->window,
&mask,
&style->bg[GTK_STATE_NORMAL],
ops_button->xpm_data);
pixmap_widget = gtk_pixmap_new (pixmap, mask);
switch (ops_type)
{
case OPS_BUTTON_NORMAL :
button = gtk_button_new ();
button = gtk_button_new_from_stock (ops_button->stock_id);
break;
case OPS_BUTTON_RADIO :
button = gtk_radio_button_new (group);
......@@ -3262,8 +3280,6 @@ ops_button_box_new (GtkWidget *parent,
break;
}
gtk_container_add (GTK_CONTAINER (button), pixmap_widget);
if (ops_button->ext_callbacks == NULL)
{
g_signal_connect_swapped (G_OBJECT (button), "clicked",
......@@ -3286,7 +3302,6 @@ ops_button_box_new (GtkWidget *parent,
gtk_box_pack_start (GTK_BOX (button_box), button, TRUE, TRUE, 0);
gtk_widget_show (pixmap_widget);
gtk_widget_show (button);
ops_button->widget = button;
......
......@@ -23,6 +23,7 @@
*/
/* revision history:
* version 1.3.14b; 2003/06/03 hof: gboolean retcode for thumbnail procedures
* version 1.3.14a; 2003/05/24 hof: moved vin Procedures to gap_vin module
* version 1.3.5a; 2002/04/20 hof: p_gimp_layer_new_from_drawable. (removed set_drabale)
* version 1.3.4a; 2002/03/12 hof: removed duplicate wrappers that are available in libgimp too.
......@@ -190,7 +191,7 @@ p_gimp_layer_new_from_drawable(gint32 drawable_id, gint32 dst_image_id)
* ============================================================================
*/
gint
gboolean
p_gimp_file_save_thumbnail(gint32 image_id, char* filename)
{
static char *l_called_proc = "gimp_file_save_thumbnail";
......@@ -207,10 +208,10 @@ p_gimp_file_save_thumbnail(gint32 image_id, char* filename)
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
return (0);
return (TRUE);
}
printf("GAP: Error: PDB call of %s failed\n", l_called_proc);
return(-1);
return(FALSE);
} /* end p_gimp_file_save_thumbnail */
/* ============================================================================
......@@ -219,7 +220,7 @@ p_gimp_file_save_thumbnail(gint32 image_id, char* filename)
* ============================================================================
*/
gint
gboolean
p_gimp_file_load_thumbnail(char* filename, gint32 *th_width, gint32 *th_height,
gint32 *th_data_count, unsigned char **th_data)
{
......@@ -227,7 +228,7 @@ p_gimp_file_load_thumbnail(char* filename, gint32 *th_width, gint32 *th_height,
GimpParam *return_vals;
int nreturn_vals;
printf("p_gimp_file_load_thumbnail: %s\n", filename);
if(gap_debug) printf("p_gimp_file_load_thumbnail: %s\n", filename);
*th_data = NULL;
return_vals = gimp_run_procedure (l_called_proc,
......@@ -241,15 +242,15 @@ printf("p_gimp_file_load_thumbnail: %s\n", filename);
*th_height = return_vals[2].data.d_int32;
*th_data_count = return_vals[3].data.d_int32;
*th_data = (unsigned char *)return_vals[4].data.d_int8array;
return (0); /* OK */
return (TRUE); /* OK */
}
printf("GAP: Error: PDB call of %s failed\n", l_called_proc);
return(-1);
if(gap_debug) printf("GAP: Error: PDB call of %s failed\n", l_called_proc);
return(FALSE);
} /* end p_gimp_file_load_thumbnail */
gint p_gimp_image_thumbnail(gint32 image_id, gint32 width, gint32 height,
gboolean p_gimp_image_thumbnail(gint32 image_id, gint32 width, gint32 height,
gint32 *th_width, gint32 *th_height, gint32 *th_bpp,
gint32 *th_data_count, unsigned char **th_data)
{
......@@ -272,9 +273,9 @@ gint p_gimp_image_thumbnail(gint32 image_id, gint32 width, gint32 height,
*th_bpp = return_vals[3].data.d_int32;
*th_data_count = return_vals[4].data.d_int32;
*th_data = (unsigned char *)return_vals[5].data.d_int8array;
return(0); /* OK */
return(TRUE); /* OK */
}
printf("GAP: Error: PDB call of %s failed\n", l_called_proc);
return(-1);
return(FALSE);
} /* end p_gimp_image_thumbnail */
......@@ -21,6 +21,7 @@
*/
/* revision history:
* version 1.3.14b; 2003/06/03 hof: gboolean retcode for thumbnail procedures
* version 1.3.14a; 2003/05/24 hof: moved vin Procedures to gap_vin module
* version 1.3.5a; 2002/04/20 hof: p_gimp_layer_new_from_drawable. (removed set_drabale)
* version 1.3.4a; 2002/03/12 hof: removed duplicate wrappers that are available in libgimp too.
......@@ -45,10 +46,10 @@ gint32 p_gimp_rotate_degree(gint32 drawable_id, gboolean interpolation, gdouble
gboolean p_gimp_displays_reconnect(gint32 old_image_id, gint32 new_image_id);
gint32 p_gimp_layer_new_from_drawable(gint32 drawable_id, gint32 dst_image_id);
gint p_gimp_file_save_thumbnail(gint32 image_id, char* filename);
gint p_gimp_file_load_thumbnail(char* filename, gint32 *th_width, gint32 *th_height, gint32 *th_data_count, unsigned char **th_data);
gboolean p_gimp_file_save_thumbnail(gint32 image_id, char* filename);
gboolean p_gimp_file_load_thumbnail(char* filename, gint32 *th_width, gint32 *th_height, gint32 *th_data_count, unsigned char **th_data);
gint p_gimp_image_thumbnail(gint32 image_id, gint32 width, gint32 height,
gboolean p_gimp_image_thumbnail(gint32 image_id, gint32 width, gint32 height,
gint32 *th_width, gint32 *th_height, gint32 *th_bpp,
gint32 *th_data_count, unsigned char **th_data);
......
/*
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
*
* Copyright (C) 1997 Andy Thomas <alt@picnic.demon.co.uk>
* 2003 Sven Neumann <sven@gimp.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "gap_stock.h"
#include "gap-intl.h"
#include "images/gap-stock-pixbufs.h"
static GtkIconFactory *gap_icon_factory = NULL;
static GtkStockItem gap_stock_items[] =
{
{ GAP_STOCK_ADD_POINT , N_("Add Point"), 0, 0, NULL },
{ GAP_STOCK_ANIM_PREVIEW , N_("Anim Preview"), 0, 0, NULL },
{ GAP_STOCK_DELETE_ALL_POINTS , N_("Delete All Points"), 0, 0, NULL },
{ GAP_STOCK_DELETE_POINT , N_("Delete Point"), 0, 0, NULL },
{ GAP_STOCK_DELETE , NULL, 0, 0, NULL },
{ GAP_STOCK_DUPLICATE , NULL, 0, 0, NULL },
{ GAP_STOCK_FIRST_POINT , N_("First Point"), 0, 0, NULL },
{