From 31ee951523c9d38e2aef9ddd5f2f8e2a5b746f6d Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 18 Jan 2000 20:52:16 +0000 Subject: [PATCH] Some clarifications. 2000-01-18 Tor Lillqvist * README.win32: Some clarifications. * PLUGIN_MAINTAINERS: I maintain psp. * libgimp/gimp.def * libgimp/gimpui.def * libgimp/makefile.cygwin * libgimp/makefile.msc * plug-ins/makefile.cygwin * plug-ins/makefile.msc: Updates. * plug-ins/twain/twain.c * plug-ins/winsnap/winsnap.c * po-plug-ins/POTFILES.in: i18n. --- ChangeLog | 17 +++++++++++++++++ PLUGIN_MAINTAINERS | 4 ++-- README.win32 | 19 +++++++++++-------- libgimp/gimp.def | 3 +++ libgimp/gimpui.def | 25 +++++++++++++++++++++++++ libgimp/makefile.cygwin | 9 ++++++++- libgimp/makefile.msc | 9 ++++++++- plug-ins/makefile.cygwin | 3 +-- plug-ins/makefile.msc | 5 +---- plug-ins/twain/twain.c | 25 ++++++++++++++++--------- plug-ins/winsnap/winsnap.c | 33 +++++++++++++++++++++------------ po-plug-ins/POTFILES.in | 2 ++ 12 files changed, 115 insertions(+), 39 deletions(-) diff --git a/ChangeLog b/ChangeLog index 58e0dfd1fb..ad642357fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2000-01-18 Tor Lillqvist + + * README.win32: Some clarifications. + + * PLUGIN_MAINTAINERS: I maintain psp. + + * libgimp/gimp.def + * libgimp/gimpui.def + * libgimp/makefile.cygwin + * libgimp/makefile.msc + * plug-ins/makefile.cygwin + * plug-ins/makefile.msc: Updates. + + * plug-ins/twain/twain.c + * plug-ins/winsnap/winsnap.c + * po-plug-ins/POTFILES.in: i18n. + 2000-01-18 David Monniaux * app/tools.c: clearer tool-tip for transform tool. diff --git a/PLUGIN_MAINTAINERS b/PLUGIN_MAINTAINERS index 780c266f5f..ad801c90d1 100644 --- a/PLUGIN_MAINTAINERS +++ b/PLUGIN_MAINTAINERS @@ -705,8 +705,8 @@ SIZE : 63.4 kB in 1 file (only C files counted) COMMENT : ----------- NAME : psp -AUTHOR : Tor Lillqvist -MAINTAINER : +AUTHOR : Tor Lillqvist +MAINTAINER : Tor Lillqvist SIZE : 48.0 kB in 1 file (only C files counted) COMMENT : ----------- diff --git a/README.win32 b/README.win32 index cad46461a7..9235505e7a 100644 --- a/README.win32 +++ b/README.win32 @@ -21,15 +21,18 @@ called gnu-intl.dll to reduce name clash risks. If you don't want any i18n stuff, undefine ENABLE_NLS in the config.h.win32 file, and remove references to the gnu-intl library from the makefiles. -Note that while the GNU gettext package is under the GPL, the "intl" -library part as distributed with GNU libc is under the LGPL (like GTk+ -or GLib). We want the LGPL one, even if they are the same, more or -less. It doesn't matter much for the GIMP which itself is under the -GPL, but does a bit for GTk+, which is under the LGPL. +Note that while the GNU gettext package is under the GPL (GNU General +Public License), the "intl" library part as distributed with GNU libc +is under the LGPL (GNU Lesser General Public License, a.k.a. GNU +Library General Public License) (like GTk+ and GLib). We want the +LGPL-licensed version of the intl library, even if they are the same, +more or less. It doesn't matter much for the GIMP which itself is also +licensed under the GPL, but it does matter for GTk+, which is licensed +under the LGPL. -First, build in the libgimp directory, then in tools/gcg, then in app, -plug-ins, and finally in modules. Check the makefile.msc or -makefile.cygwin files in said directories. +First, build in the libgimp directory, then in app, plug-ins, and +finally in modules. Check the makefile.msc or makefile.cygwin files in +said directories. The current build setup for Windows is a mess, with complex hand-maintained makefiles. I know. Adding parallel makefiles for gcc diff --git a/libgimp/gimp.def b/libgimp/gimp.def index 72054800f1..6f62e5ff9a 100644 --- a/libgimp/gimp.def +++ b/libgimp/gimp.def @@ -75,6 +75,7 @@ EXPORTS gimp_gradients_sample_uniform gimp_gradients_set_active gimp_gtkrc + gimp_help gimp_hls_to_rgb gimp_hls_value gimp_hsv_to_rgb @@ -217,6 +218,7 @@ EXPORTS gimp_pixel_rgns_process gimp_pixel_rgns_register gimp_pixel_rgns_register2 + gimp_plugin_help_func gimp_progress_init gimp_progress_update gimp_query_database @@ -238,6 +240,7 @@ EXPORTS gimp_selection_float gimp_selection_is_empty gimp_set_data + gimp_standard_help_func gimp_tile_cache_ntiles gimp_tile_cache_size gimp_tile_flush diff --git a/libgimp/gimpui.def b/libgimp/gimpui.def index e70d78d48d..1c65fb8d26 100644 --- a/libgimp/gimpui.def +++ b/libgimp/gimpui.def @@ -10,25 +10,46 @@ EXPORTS gimp_color_button_get_type gimp_color_button_new gimp_color_button_update + gimp_context_help + gimp_dialog_create_action_area + gimp_dialog_create_action_areav + gimp_dialog_new + gimp_dialog_newv + gimp_dialog_set_icon + gimp_double_adjustment_update gimp_drawable_menu_new gimp_export_image gimp_file_selection_get_filename gimp_file_selection_get_type gimp_file_selection_new gimp_file_selection_set_filename + gimp_float_adjustment_update gimp_gradient_select_widget gimp_gradient_select_widget_close_popup gimp_gradient_select_widget_set_popup + gimp_help_connect_help_accel + gimp_help_disable_tooltips + gimp_help_enable_tooltips + gimp_help_free + gimp_help_init + gimp_help_set_help_data gimp_image_menu_new + gimp_int_adjustment_update gimp_interactive_selection_brush gimp_interactive_selection_pattern gimp_layer_menu_new + gimp_menu_item_update + gimp_option_menu_new gimp_pattern_close_popup gimp_pattern_get_pattern_data gimp_pattern_select_widget gimp_pattern_select_widget_close_popup gimp_pattern_select_widget_set_popup gimp_pattern_set_popup + gimp_radio_button_update + gimp_radio_group_new + gimp_radio_group_new2 + gimp_scale_entry_new gimp_size_entry_add_field gimp_size_entry_attach_label gimp_size_entry_get_refval @@ -45,3 +66,7 @@ EXPORTS gimp_size_entry_set_unit gimp_size_entry_set_value gimp_size_entry_set_value_boundaries + gimp_spin_button_new + gimp_table_attach_aligned + gimp_toggle_button_update + gimp_unit_menu_update diff --git a/libgimp/makefile.cygwin b/libgimp/makefile.cygwin index 1025d0d9f6..75dcf42beb 100644 --- a/libgimp/makefile.cygwin +++ b/libgimp/makefile.cygwin @@ -53,12 +53,15 @@ gimpi_OBJECTS = \ gimpchainbutton.o \ gimpcolorbutton.o \ gimpcolorspace.o \ + gimpdialog.o \ gimpfileselection.o\ + gimphelpui.o \ gimpmatrix.o \ gimppatheditor.o\ gimpprotocol.o \ gimpsizeentry.o \ gimpunitmenu.o \ + gimpwidgets.o \ gimpwire.o \ gserialize.o \ parasite.o \ @@ -75,6 +78,7 @@ gimp_OBJECTS = \ gimpdrawable.o \ gimpenv.o \ gimpgradient.o \ + gimphelp.o \ gimpimage.o \ gimplayer.o \ gimpmatrix.o \ @@ -137,12 +141,15 @@ gimpui_OBJECTS = \ gimpbrushmenu.o \ gimpchainbutton.o \ gimpcolorbutton.o \ + gimpdialog.o \ gimpexport.o \ gimpfileselection.o \ + gimphelpui.o \ gimpgradientmenu.o \ gimppatternmenu.o \ gimpsizeentry.o \ - gimpunitmenu.o + gimpunitmenu.o \ + gimpwidgets.o gimpui-$(GIMP_VER).dll : $(gimpui_OBJECTS) gimpui.def $(GLIB)/build-dll gimpui $(GIMP_VER) gimpui.def -s $(gimpui_OBJECTS) -L . -lgimp-$(GIMP_VER) -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk -lgdk-$(GTK_VER) -L $(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) diff --git a/libgimp/makefile.msc b/libgimp/makefile.msc index c3e0b362fb..4a3dd74d54 100644 --- a/libgimp/makefile.msc +++ b/libgimp/makefile.msc @@ -59,12 +59,15 @@ gimpi_OBJECTS = \ gimpchainbutton.obj\ gimpcolorbutton.obj\ gimpcolorspace.obj \ + gimpdialog.obj \ gimpfileselection.obj\ + gimphelpui.obj \ gimpmatrix.obj \ gimppatheditor.obj\ gimpprotocol.obj\ gimpsizeentry.obj\ gimpunitmenu.obj\ + gimpwidgets.obj \ gimpwire.obj \ gserialize.obj \ parasite.obj \ @@ -81,6 +84,7 @@ gimp_OBJECTS = \ gimpdrawable.obj\ gimpenv.obj \ gimpgradient.obj\ + gimphelp.obj \ gimpimage.obj \ gimplayer.obj \ gimpmatrix.obj \ @@ -143,12 +147,15 @@ gimpui_OBJECTS = \ gimpbrushmenu.obj\ gimpchainbutton.obj\ gimpcolorbutton.obj\ + gimpdialog.obj \ gimpexport.obj \ gimpfileselection.obj\ gimpgradientmenu.obj\ + gimphelpui.obj \ gimppatternmenu.obj\ gimpsizeentry.obj\ - gimpunitmenu.obj + gimpunitmenu.obj\ + gimpwidgets.obj gimpui-$(GIMP_VER).dll : $(gimpui_OBJECTS) gimpui.def $(CC) $(CFLAGS) -LD -Fegimpui-$(GIMP_VER).dll $(gimpui_OBJECTS) gimp-$(GIMP_VER).lib $(GTK)\gtk\gtk-$(GTK_VER).lib $(GTK)\gdk\gdk-$(GTK_VER).lib $(INTL)\gnu-intl.lib $(GLIB)\glib-$(GLIB_VER).lib $(LDFLAGS) /def:gimpui.def diff --git a/plug-ins/makefile.cygwin b/plug-ins/makefile.cygwin index 605e65a96b..5f65980034 100644 --- a/plug-ins/makefile.cygwin +++ b/plug-ins/makefile.cygwin @@ -64,7 +64,6 @@ libs-clean : sub-libs: cd megawidget; $(MAKE) -f ../makefile.cygwin TOP=../.. LIBRARY=megawidget $(TARGET) - cd gpc; $(MAKE) -f ../makefile.cygwin TOP=../.. LIBRARY=gpc $(TARGET) cd libgck/gck; $(MAKE) -f ../../makefile.cygwin TOP=../../.. LIBRARY=gck OBJECTS="gckcolor.o gcklistbox.o gckmath.o gckui.o gckvector.o" $(TARGET) @@ -566,7 +565,7 @@ RESOURCE = ../../app/gimpres.o endif $(PLUGIN).exe : $(OBJECTS) $(RESOURCE) - $(CC) $(CFLAGS) -mwindows -s -o $(PLUGIN).exe $(OBJECTS) $(RESOURCE) -L $(PLUGINDIR)/megawidget -lmegawidget -L $(PLUGINDIR)/gpc -lgpc -L $(PLUGINDIR)/libgck/gck -lgck -L ../../libgimp -lgimp-$(GIMP_VER) -lgimpui-$(GIMP_VER) -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk -lgdk-$(GTK_VER) -L $(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) $(EXTRALIBS) $(LDFLAGS) + $(CC) $(CFLAGS) -mwindows -s -o $(PLUGIN).exe $(OBJECTS) $(RESOURCE) -L $(PLUGINDIR)/megawidget -lmegawidget -L $(PLUGINDIR)/libgck/gck -lgck -L ../../libgimp -lgimp-$(GIMP_VER) -lgimpui-$(GIMP_VER) -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk -lgdk-$(GTK_VER) -L $(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) $(EXTRALIBS) $(LDFLAGS) # Kludge to get the path to the win32 headers WIN32APIHEADERS = $(shell echo "\#include " | $(CC) -M -E - | tail -1 | sed -e 's!/winver.h!!') diff --git a/plug-ins/makefile.msc b/plug-ins/makefile.msc index 10eacd3049..dc6988a4bd 100644 --- a/plug-ins/makefile.msc +++ b/plug-ins/makefile.msc @@ -65,9 +65,6 @@ sub-libs: cd megawidget nmake -nologo -f ..\makefile.msc TOP=..\.. LIBRARY=megawidget $(TARGET) cd .. - cd gpc - nmake -nologo -f ..\makefile.msc TOP=..\.. LIBRARY=gpc $(TARGET) - cd .. cd libgck\gck nmake -nologo -f ..\..\makefile.msc TOP=..\..\.. LIBRARY=gck OBJECTS="gckcolor.obj gcklistbox.obj gckmath.obj gckui.obj gckvector.obj" $(TARGET) cd ..\.. @@ -603,7 +600,7 @@ RESOURCE = ..\..\app\gimp.res !ENDIF $(PLUGIN).exe : $(OBJECTS) $(RESOURCE) - $(CC) $(CFLAGS) -MD -Fe$(PLUGIN).exe $(OBJECTS) $(RESOURCE) $(PLUGINDIR)\megawidget\megawidget.lib $(PLUGINDIR)\gpc\gpc.lib $(PLUGINDIR)\libgck\gck\gck.lib ..\..\libgimp\gimp-$(GIMP_VER).lib ..\..\libgimp\gimpui-$(GIMP_VER).lib $(GTK)\gtk\gtk-$(GTK_VER).lib $(GTK)\gdk\gdk-$(GTK_VER).lib $(INTL)\gnu-intl.lib $(GLIB)\glib-$(GLIB_VER).lib $(EXTRALIBS) $(LDFLAGS) + $(CC) $(CFLAGS) -MD -Fe$(PLUGIN).exe $(OBJECTS) $(RESOURCE) $(PLUGINDIR)\megawidget\megawidget.lib $(PLUGINDIR)\libgck\gck\gck.lib ..\..\libgimp\gimp-$(GIMP_VER).lib ..\..\libgimp\gimpui-$(GIMP_VER).lib $(GTK)\gtk\gtk-$(GTK_VER).lib $(GTK)\gdk\gdk-$(GTK_VER).lib $(INTL)\gnu-intl.lib $(GLIB)\glib-$(GLIB_VER).lib $(EXTRALIBS) $(LDFLAGS) $(PLUGIN).res : $(PLUGIN).rc rc -r -fo $(PLUGIN).res $(PLUGIN).rc diff --git a/plug-ins/twain/twain.c b/plug-ins/twain/twain.c index 8b6388f150..b8a15c2c05 100644 --- a/plug-ins/twain/twain.c +++ b/plug-ins/twain/twain.c @@ -56,6 +56,8 @@ * (03/31/99) v0.5 Added support for multi-byte samples and paletted * images. */ +#include "config.h" + #include /* Needed when compiling with gcc */ #include @@ -63,9 +65,12 @@ #include #include #include -#include "gtk/gtk.h" + +#include + #include "libgimp/gimp.h" -#include "twain.h" +#include "libgimp/stdplugins-intl.h" + #include "tw_func.h" #include "tw_util.h" @@ -77,12 +82,12 @@ * Plug-in Definitions */ #define PLUG_IN_NAME "twain-acquire" -#define PLUG_IN_DESCRIPTION "Capture an image from a TWAIN datasource" -#define PLUG_IN_HELP "This plug-in will capture an image from a TWAIN datasource" +#define PLUG_IN_DESCRIPTION _("Capture an image from a TWAIN datasource") +#define PLUG_IN_HELP _("This plug-in will capture an image from a TWAIN datasource") #define PLUG_IN_AUTHOR "Craig Setera (setera@infonet.isl.net)" #define PLUG_IN_COPYRIGHT "Craig Setera" #define PLUG_IN_VERSION "v0.5 (03/31/1999)" -#define PLUG_IN_MENU_PATH "/File/Acquire/TWAIN..." +#define PLUG_IN_MENU_PATH N_("/File/Acquire/TWAIN...") #ifdef _DEBUG #define PLUG_IN_D_NAME "twain-acquire-dump" @@ -264,13 +269,13 @@ getAppIdentity(void) appIdentity->Version.MinorNum = 1; appIdentity->Version.Language = TWLG_USA; appIdentity->Version.Country = TWCY_USA; - strcpy(appIdentity->Version.Info, "GIMP TWAIN 0.1"); + strcpy(appIdentity->Version.Info, "GIMP TWAIN 0.5"); appIdentity->ProtocolMajor = TWON_PROTOCOLMAJOR; appIdentity->ProtocolMinor = TWON_PROTOCOLMINOR; appIdentity->SupportedGroups = DG_IMAGE; strcpy(appIdentity->Manufacturer, "Craig Setera"); strcpy(appIdentity->ProductFamily, "GIMP"); - strcpy(appIdentity->ProductName, "GIMP for WIN32"); + strcpy(appIdentity->ProductName, "GIMP for Win32"); return appIdentity; } @@ -463,6 +468,8 @@ query(void) static GParamDef args[] = { IN_ARGS }; static GParamDef return_vals[] = { OUT_ARGS }; + INIT_I18N (); + #ifdef _DEBUG if (twain_run_mode == RUN_DUMP) /* the installation of the plugin */ @@ -636,7 +643,7 @@ void preTransferCallback(void *clientData) { /* Initialize our progress dialog */ - gimp_progress_init("Transferring TWAIN data"); + gimp_progress_init(_("Transferring TWAIN data")); } /* @@ -714,7 +721,7 @@ beginTransferCallback(pTW_IMAGEINFO imageInfo, void *clientData) /* Create a layer */ theClientData->layer_id = gimp_layer_new(theClientData->image_id, - "Background", + _("Background"), imageInfo->ImageWidth, imageInfo->ImageLength, layerType, 100, NORMAL_MODE); diff --git a/plug-ins/winsnap/winsnap.c b/plug-ins/winsnap/winsnap.c index cf7089e93b..88604544a4 100644 --- a/plug-ins/winsnap/winsnap.c +++ b/plug-ins/winsnap/winsnap.c @@ -37,26 +37,32 @@ * (07/16/99) v0.70 Switched name */ +#include "config.h" + #include #include #include #include #include + #include "resource.h" -#include "gtk/gtk.h" + +#include + #include "libgimp/gimp.h" +#include "libgimp/stdplugins-intl.h" /* * Plug-in Definitions */ #define PLUG_IN_NAME "extension_winsnap" #define PLUG_IN_PRINT_NAME "WinSnap" -#define PLUG_IN_DESCRIPTION "Capture a Win32 window or desktop image" -#define PLUG_IN_HELP "This plug-in will capture an image of a Win32 window or desktop" +#define PLUG_IN_DESCRIPTION _("Capture a Win32 window or desktop image") +#define PLUG_IN_HELP _("This plug-in will capture an image of a Win32 window or desktop") #define PLUG_IN_AUTHOR "Craig Setera (setera@infonet.isl.net)" #define PLUG_IN_COPYRIGHT "Craig Setera" #define PLUG_IN_VERSION "v0.70 (07/16/1999)" -#define PLUG_IN_MENU_PATH "/File/Acquire/Screen Shot..." +#define PLUG_IN_MENU_PATH N_("/File/Acquire/Screen Shot...") /* * Application definitions @@ -662,7 +668,7 @@ InitApplication(HINSTANCE hInstance) /* Log error */ if (!retValue) { formatWindowsError(buffer); - g_error("Error Registering class: %s", buffer); + g_error("Error registering class: %s", buffer); return retValue; } @@ -888,7 +894,7 @@ snap_dialog(void) NULL); /* Action area */ - button = gtk_button_new_with_label("Grab"); + button = gtk_button_new_with_label(_("Grab")); GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_signal_connect(GTK_OBJECT (button), "clicked", (GtkSignalFunc) snap_grab_callback, @@ -898,7 +904,7 @@ snap_dialog(void) gtk_widget_grab_default(button); gtk_widget_show(button); - button = gtk_button_new_with_label("Cancel"); + button = gtk_button_new_with_label(_("Cancel")); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", (GtkSignalFunc) gtk_widget_destroy, @@ -931,7 +937,7 @@ snap_dialog(void) gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (winsnapintf.single_button), radio_pressed[0]); gtk_widget_show (winsnapintf.single_button); - radio_label = gtk_label_new ( "Grab a single window" ); + radio_label = gtk_label_new (_("Grab a single window")); gtk_box_pack_start (GTK_BOX (hbox), radio_label, TRUE, TRUE, 0); gtk_widget_show (radio_label); @@ -941,7 +947,8 @@ snap_dialog(void) #ifdef CAN_SET_DECOR hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_end (GTK_BOX (vbox), hbox, TRUE, TRUE, 0); - winsnapintf.decor_button = gtk_check_button_new_with_label ("Include decorations"); + winsnapintf.decor_button = + gtk_check_button_new_with_label (_("Include decorations")); gtk_signal_connect (GTK_OBJECT (winsnapintf.decor_button), "toggled", (GtkSignalFunc) snap_toggle_update, &decorations); @@ -977,7 +984,7 @@ snap_dialog(void) radio_pressed[1]); gtk_widget_show (winsnapintf.root_button); - radio_label = gtk_label_new ( "Grab the whole screen" ); + radio_label = gtk_label_new (_("Grab the whole screen")); gtk_box_pack_start (GTK_BOX (hbox), radio_label, TRUE, TRUE, 0); gtk_widget_show (radio_label); @@ -1024,6 +1031,8 @@ query(void) static GParamDef args[] = { IN_ARGS }; static GParamDef return_vals[] = { OUT_ARGS }; + INIT_I18N(); + /* the installation of the plugin */ gimp_install_procedure(PLUG_IN_NAME, PLUG_IN_DESCRIPTION, @@ -1177,7 +1186,7 @@ sendBMPToGimp(HBITMAP hBMP, HDC hDC, RECT rect) /* Check that we got the memory */ if (!capBytes) { - g_warning("No data captured"); + g_warning(_("No data captured")); return 0; } @@ -1190,7 +1199,7 @@ sendBMPToGimp(HBITMAP hBMP, HDC hDC, RECT rect) /* Create the GIMP image and layers */ image_id = gimp_image_new(width, height, imageType); - layer_id = gimp_layer_new(image_id, "Background", + layer_id = gimp_layer_new(image_id, _("Background"), ROUND4(width), height, layerType, 100, NORMAL_MODE); gimp_image_add_layer(image_id, layer_id, 0); diff --git a/po-plug-ins/POTFILES.in b/po-plug-ins/POTFILES.in index 4a9ee0ef63..d345242269 100644 --- a/po-plug-ins/POTFILES.in +++ b/po-plug-ins/POTFILES.in @@ -243,7 +243,9 @@ plug-ins/sel2path/sel2path.c plug-ins/sgi/sgi.c plug-ins/sinus/sinus.c plug-ins/struc/struc.c +plug-ins/twain/twain.c plug-ins/webbrowser/webbrowser.c +plug-ins/winsnap/winsnap.c libgimp/gimpcolorbutton.c libgimp/gimpexport.c libgimp/gimpfileselection.c