Commit d5e99ee9 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/gimphelp.h libgimp/gimp.h declare the gimp_standard_help_func in

2000-01-11  Michael Natterer  <mitch@gimp.org>

	* app/gimphelp.h
	* libgimp/gimp.h
	* libgimp/gimphelpui.[ch]: declare the gimp_standard_help_func in
	gimphelpui.h because libgimp widgets must not include libgimp/gimp.h.

	* libgimp/gimpdialog.c
	* libgimp/gimpexport.c
	* libgimp/gimpunitmenu.c: use the dialog constructor for the
	export dialog and the unit selection.

	* plug-ins/gpc/gpc.[ch]
	* plug-ins/megawidget/megawidget.[ch]: removed unused functions
	(dialog creation and some other stuff). The rest of these libs is
	scheduled for removal, too...

	* plug-ins/AlienMap/AlienMap.c
	* plug-ins/AlienMap/Makefile.am
	* plug-ins/AlienMap2/AlienMap2.c
	* plug-ins/AlienMap2/Makefile.am
	* plug-ins/borderaverage/Makefile.am
	* plug-ins/borderaverage/borderaverage.c
	* plug-ins/common/align_layers.c
	* plug-ins/common/blur.c
	* plug-ins/common/colortoalpha.c
	* plug-ins/common/compose.c
	* plug-ins/common/decompose.c
	* plug-ins/common/gauss_iir.c
	* plug-ins/common/gauss_rle.c
	* plug-ins/common/mapcolor.c
	* plug-ins/common/max_rgb.c
	* plug-ins/common/mblur.c
	* plug-ins/common/noisify.c
	* plug-ins/common/spread.c
	* plug-ins/common/xbm.c
	* plug-ins/common/xpm.c
	* plug-ins/fp/Makefile.am
	* plug-ins/fp/fp_gtk.c
	* plug-ins/rcm/Makefile.am
	* plug-ins/rcm/rcm_callback.[ch]
	* plug-ins/rcm/rcm_dialog.c
	* plug-ins/sinus/sinus.c: standard ui (spacings etc.) for some
	more plugins. Did some indentation, prototyping and I18N fixes.
parent 63fd0799
2000-01-11 Michael Natterer <mitch@gimp.org>
* app/gimphelp.h
* libgimp/gimp.h
* libgimp/gimphelpui.[ch]: declare the gimp_standard_help_func in
gimphelpui.h because libgimp widgets must not include libgimp/gimp.h.
* libgimp/gimpdialog.c
* libgimp/gimpexport.c
* libgimp/gimpunitmenu.c: use the dialog constructor for the
export dialog and the unit selection.
* plug-ins/gpc/gpc.[ch]
* plug-ins/megawidget/megawidget.[ch]: removed unused functions
(dialog creation and some other stuff). The rest of these libs is
scheduled for removal, too...
* plug-ins/AlienMap/AlienMap.c
* plug-ins/AlienMap/Makefile.am
* plug-ins/AlienMap2/AlienMap2.c
* plug-ins/AlienMap2/Makefile.am
* plug-ins/borderaverage/Makefile.am
* plug-ins/borderaverage/borderaverage.c
* plug-ins/common/align_layers.c
* plug-ins/common/blur.c
* plug-ins/common/colortoalpha.c
* plug-ins/common/compose.c
* plug-ins/common/decompose.c
* plug-ins/common/gauss_iir.c
* plug-ins/common/gauss_rle.c
* plug-ins/common/mapcolor.c
* plug-ins/common/max_rgb.c
* plug-ins/common/mblur.c
* plug-ins/common/noisify.c
* plug-ins/common/spread.c
* plug-ins/common/xbm.c
* plug-ins/common/xpm.c
* plug-ins/fp/Makefile.am
* plug-ins/fp/fp_gtk.c
* plug-ins/rcm/Makefile.am
* plug-ins/rcm/rcm_callback.[ch]
* plug-ins/rcm/rcm_dialog.c
* plug-ins/sinus/sinus.c: standard ui (spacings etc.) for some
more plugins. Did some indentation, prototyping and I18N fixes.
Tue Jan 11 13:32:41 CET 2000 Sven Neumann <sven@gimp.org>
* plug-ins/gap/gap_navigator_dialog.c: some changes to make it use
......
......@@ -31,9 +31,6 @@ enum
HELP_BROWSER_NETSCAPE
};
/* the standard help function */
void gimp_standard_help_func (gchar *help_data);
/* the main help function */
void gimp_help (gchar *help_data);
......
......@@ -31,9 +31,6 @@ enum
HELP_BROWSER_NETSCAPE
};
/* the standard help function */
void gimp_standard_help_func (gchar *help_data);
/* the main help function */
void gimp_help (gchar *help_data);
......
......@@ -876,7 +876,6 @@ void gimp_parasite_detach (const char *name);
* Help *
****************************************/
void gimp_standard_help_func (gchar *help_data);
void gimp_plugin_help_func (gchar *help_data);
void gimp_help (gchar *help_data);
......
......@@ -141,8 +141,6 @@ gimp_dialog_newv (const gchar *title,
/* prepare the action_area */
gimp_dialog_create_action_areav (GTK_DIALOG (dialog), args);
gimp_dialog_set_icon (dialog);
/* connect the "F1" help key */
if (help_func)
gimp_help_connect_help_accel (dialog, help_func, help_data);
......
......@@ -21,6 +21,7 @@
#include <gtk/gtk.h>
#include "gimp.h"
#include "gimpdialog.h"
#include "gimpenums.h"
#include "gimpexport.h"
#include "gimpintl.h"
......@@ -119,8 +120,8 @@ static ExportAction export_action_merge =
{
export_merge,
NULL,
N_("can't handle layers"),
{ N_("Merge visible layers"), NULL },
N_("can't Handle Layers"),
{ N_("Merge Visible Layers"), NULL },
0
};
......@@ -128,8 +129,8 @@ static ExportAction export_action_animate_or_merge =
{
NULL,
export_merge,
N_("can only handle layers as animation frames"),
{ N_("Save as animation"), N_("Merge visible layers") },
N_("can only Handle Layers as Animation Frames"),
{ N_("Save as Animation"), N_("Merge Visible Layers") },
0
};
......@@ -137,7 +138,7 @@ static ExportAction export_action_flatten =
{
&export_flatten,
NULL,
N_("can't handle transparency"),
N_("can't Handle Transparency"),
{ N_("Flatten Image"), NULL },
0
};
......@@ -146,7 +147,7 @@ static ExportAction export_action_convert_rgb =
{
&export_convert_rgb,
NULL,
N_("can only handle RGB images"),
N_("can only Handle RGB Images"),
{ N_("Convert to RGB"), NULL },
0
};
......@@ -155,8 +156,8 @@ static ExportAction export_action_convert_grayscale =
{
&export_convert_grayscale,
NULL,
N_("can only handle grayscale images"),
{ N_("Convert to grayscale"), NULL },
N_("can only Handle Grayscale Images"),
{ N_("Convert to Grayscale"), NULL },
0
};
......@@ -164,8 +165,9 @@ static ExportAction export_action_convert_indexed =
{
&export_convert_indexed,
NULL,
N_("can only handle indexed images"),
{ N_("Convert to indexed using default settings\n(Do it manually to tune the result)"), NULL },
N_("can only Handle Indexed Images"),
{ N_("Convert to indexed using default settings\n"
"(Do it manually to tune the result)"), NULL },
0
};
......@@ -173,8 +175,8 @@ static ExportAction export_action_convert_rgb_or_grayscale =
{
&export_convert_rgb,
&export_convert_grayscale,
N_("can only handle RGB or grayscale images"),
{ N_("Convert to RGB"), N_("Convert to grayscale")},
N_("can only Handle RGB or Grayscale Images"),
{ N_("Convert to RGB"), N_("Convert to Grayscale")},
0
};
......@@ -182,8 +184,9 @@ static ExportAction export_action_convert_rgb_or_indexed =
{
&export_convert_rgb,
&export_convert_indexed,
N_("can only handle RGB or indexed images"),
{ N_("Convert to RGB"), N_("Convert to indexed using default settings\n(Do it manually to tune the result)")},
N_("can only Handle RGB or Indexed Images"),
{ N_("Convert to RGB"), N_("Convert to indexed using default settings\n"
"(Do it manually to tune the result)")},
0
};
......@@ -191,9 +194,10 @@ static ExportAction export_action_convert_indexed_or_grayscale =
{
&export_convert_indexed,
&export_convert_grayscale,
N_("can only handle grayscale or indexed images"),
{ N_("Convert to indexed using default settings\n(Do it manually to tune the result)"),
N_("Convert to grayscale") },
N_("can only Handle Grayscale or Indexed Images"),
{ N_("Convert to indexed using default settings\n"
"(Do it manually to tune the result)"),
N_("Convert to Grayscale") },
0
};
......@@ -201,8 +205,8 @@ static ExportAction export_action_add_alpha =
{
&export_add_alpha,
NULL,
N_("needs an alpha channel"),
{ N_("Add alpha channel"), NULL},
N_("needs an Alpha Channel"),
{ N_("Add Alpha Channel"), NULL},
0
};
......@@ -253,14 +257,13 @@ static gint
export_dialog (GSList *actions,
gchar *format)
{
GtkWidget *frame;
GtkWidget *button;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *hbbox;
GtkWidget *label;
GSList *list;
gchar *text;
GtkWidget *frame;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *button;
GtkWidget *label;
GSList *list;
gchar *text;
ExportAction *action;
dialog_return = EXPORT_CANCEL;
......@@ -272,44 +275,23 @@ export_dialog (GSList *actions,
*/
/* the dialog */
dialog = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (dialog), _("Export File"));
gtk_window_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);
dialog = gimp_dialog_new (_("Export File"), "export_file",
gimp_standard_help_func, "dialogs/export_file.html",
GTK_WIN_POS_MOUSE,
FALSE, FALSE, FALSE,
_("Export"), export_export_callback,
NULL, NULL, NULL, TRUE, FALSE,
_("Ignore"), export_skip_callback,
NULL, NULL, NULL, FALSE, FALSE,
_("Cancel"), gtk_widget_destroy,
NULL, 1, NULL, FALSE, TRUE,
NULL);
gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
(GtkSignalFunc) export_cancel_callback, NULL);
/* Action area */
gtk_container_set_border_width
(GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dialog)->action_area), FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dialog)->action_area), hbbox,
FALSE, FALSE, 0);
gtk_widget_show (hbbox);
button = gtk_button_new_with_label (_("Export"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) export_export_callback, NULL);
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_grab_default (button);
gtk_widget_show (button);
button = gtk_button_new_with_label (_("Ignore"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) export_skip_callback, NULL);
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
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, GTK_OBJECT (dialog));
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
GTK_SIGNAL_FUNC (export_cancel_callback),
NULL);
/* the headline */
vbox = gtk_vbox_new (FALSE, 6);
......@@ -317,7 +299,8 @@ export_dialog (GSList *actions,
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_widget_show (vbox);
label = gtk_label_new (_("Your image should be exported before it can be saved for the following reasons:"));
label = gtk_label_new (_("Your image should be exported before it "
"can be saved for the following reasons:"));
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
......@@ -325,14 +308,16 @@ export_dialog (GSList *actions,
for (list = actions; list; list = list->next)
{
action = (ExportAction*)(list->data);
action = (ExportAction *) (list->data);
text = g_strdup_printf ("%s %s", format, gettext (action->reason));
frame = gtk_frame_new (text);
g_free (text);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
hbox = gtk_hbox_new (FALSE, 4);
gtk_container_add (GTK_CONTAINER (frame), hbox);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 2);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
if (action->possibilities[0] && action->possibilities[1])
{
......@@ -344,7 +329,8 @@ export_dialog (GSList *actions,
radio_group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
(GtkSignalFunc) export_toggle_callback, &action->choice);
GTK_SIGNAL_FUNC (export_toggle_callback),
&action->choice);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_widget_show (button);
......@@ -376,17 +362,17 @@ export_dialog (GSList *actions,
}
/* the footline */
label = gtk_label_new (_("The export conversion won't modify your original image."));
label = gtk_label_new (_("The export conversion won't modify "
"your original image."));
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
gtk_widget_show (dialog);
gtk_main ();
return (dialog_return);
return dialog_return;
}
GimpExportReturnType
gimp_export_image (gint32 *image_ID_ptr,
gint32 *drawable_ID_ptr,
......@@ -507,12 +493,5 @@ gimp_export_image (gint32 *image_ID_ptr,
}
g_slist_free (actions);
return (dialog_return);
return dialog_return;
}
......@@ -22,6 +22,7 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "gimpdialog.h"
#include "gimphelpui.h"
/* external functions */
......@@ -84,6 +85,12 @@ gimp_help_connect_help_accel (GtkWidget *widget,
if (!help_func)
return;
/* for convenience we set the wm icon here because
* this function is called for almost all gimp windows
*/
if (GTK_IS_WINDOW (widget))
gimp_dialog_set_icon (widget);
/* set up the help signals and tips query widget */
if (!tips_query)
{
......@@ -156,9 +163,9 @@ gimp_help_connect_help_accel (GtkWidget *widget,
}
void
gimp_help_set_help_data (GtkWidget *widget,
gchar *tooltip,
gchar *help_data)
gimp_help_set_help_data (GtkWidget *widget,
const gchar *tooltip,
gchar *help_data)
{
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (widget));
......
......@@ -33,6 +33,9 @@ void gimp_help_free (void);
void gimp_help_enable_tooltips (void);
void gimp_help_disable_tooltips (void);
/* the standard gimp help function */
void gimp_standard_help_func (gchar *help_data);
/* connect the "F1" accelerator of a window */
void gimp_help_connect_help_accel (GtkWidget *widget,
GimpHelpFunc help_func,
......@@ -40,7 +43,7 @@ void gimp_help_connect_help_accel (GtkWidget *widget,
/* set help data for non-window widgets */
void gimp_help_set_help_data (GtkWidget *widget,
gchar *tool_tip,
const gchar *tool_tip,
gchar *help_data);
/* activate the context help inspector */
......
......@@ -21,9 +21,10 @@
*/
#include "config.h"
#include "gimpdialog.h"
#include "gimpunitmenu.h"
#include "libgimp/gimpintl.h"
#include "gimpintl.h"
/* private functions */
static const gchar * gimp_unit_menu_build_string (gchar *format,
......@@ -443,23 +444,27 @@ gimp_unit_menu_selection_delete_callback (GtkWidget *widget,
static void
gimp_unit_menu_create_selection (GimpUnitMenu *gum)
{
GtkWidget *hbbox;
GtkWidget *vbox;
GtkWidget *scrolled_win;
GtkWidget *button;
gchar *titles[2];
gchar *row[2];
GUnit unit;
gint num_units;
gint unit_width;
gint factor_width;
gum->selection = gtk_dialog_new ();
gtk_window_set_wmclass (GTK_WINDOW (gum->selection),
"unit_selection", "Gimp");
gtk_window_set_title (GTK_WINDOW (gum->selection), _("Unit Selection"));
gtk_window_set_policy (GTK_WINDOW (gum->selection), FALSE, TRUE, FALSE);
gtk_window_position (GTK_WINDOW (gum->selection), GTK_WIN_POS_MOUSE);
gchar *titles[2];
gchar *row[2];
GUnit unit;
gint num_units;
gint unit_width;
gint factor_width;
gum->selection =
gimp_dialog_new (_("Unit Selection"), "unit_selection",
gimp_standard_help_func, "dialogs/unit_selection.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
_("Select"), gimp_unit_menu_selection_select_callback,
gum, NULL, NULL, TRUE, FALSE,
_("Close"), gimp_unit_menu_selection_close_callback,
gum, NULL, NULL, FALSE, TRUE,
NULL);
gtk_signal_connect (GTK_OBJECT (gum->selection), "delete_event",
GTK_SIGNAL_FUNC (gimp_unit_menu_selection_delete_callback),
......@@ -526,35 +531,6 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum)
GTK_SIGNAL_FUNC (gtk_widget_destroyed),
&gum->clist);
/* the action area */
gtk_container_set_border_width
(GTK_CONTAINER (GTK_DIALOG (gum->selection)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (gum->selection)->action_area),
FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (gum->selection)->action_area), hbbox,
FALSE, FALSE, 0);
gtk_widget_show (hbbox);
button = gtk_button_new_with_label (_("Select"));
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_grab_default (button);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gimp_unit_menu_selection_select_callback),
gum);
gtk_widget_show (button);
button = gtk_button_new_with_label (_("Close"));
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gimp_unit_menu_selection_close_callback),
gum);
gtk_widget_show (button);
gtk_widget_show (vbox);
gtk_widget_show (gum->selection);
......
......@@ -141,8 +141,6 @@ gimp_dialog_newv (const gchar *title,
/* prepare the action_area */
gimp_dialog_create_action_areav (GTK_DIALOG (dialog), args);
gimp_dialog_set_icon (dialog);
/* connect the "F1" help key */
if (help_func)
gimp_help_connect_help_accel (dialog, help_func, help_data);
......
......@@ -22,6 +22,7 @@
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "gimpdialog.h"
#include "gimphelpui.h"
/* external functions */
......@@ -84,6 +85,12 @@ gimp_help_connect_help_accel (GtkWidget *widget,
if (!help_func)
return;
/* for convenience we set the wm icon here because
* this function is called for almost all gimp windows
*/
if (GTK_IS_WINDOW (widget))
gimp_dialog_set_icon (widget);
/* set up the help signals and tips query widget */
if (!tips_query)
{
......@@ -156,9 +163,9 @@ gimp_help_connect_help_accel (GtkWidget *widget,
}
void
gimp_help_set_help_data (GtkWidget *widget,
gchar *tooltip,
gchar *help_data)
gimp_help_set_help_data (GtkWidget *widget,
const gchar *tooltip,
gchar *help_data)
{
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (widget));
......
......@@ -33,6 +33,9 @@ void gimp_help_free (void);
void gimp_help_enable_tooltips (void);
void gimp_help_disable_tooltips (void);
/* the standard gimp help function */
void gimp_standard_help_func (gchar *help_data);
/* connect the "F1" accelerator of a window */
void gimp_help_connect_help_accel (GtkWidget *widget,
GimpHelpFunc help_func,
......@@ -40,7 +43,7 @@ void gimp_help_connect_help_accel (GtkWidget *widget,
/* set help data for non-window widgets */
void gimp_help_set_help_data (GtkWidget *widget,
gchar *tool_tip,
const gchar *tool_tip,
gchar *help_data);
/* activate the context help inspector */
......
......@@ -21,9 +21,10 @@
*/
#include "config.h"
#include "gimpdialog.h"
#include "gimpunitmenu.h"
#include "libgimp/gimpintl.h"
#include "gimpintl.h"
/* private functions */
static const gchar * gimp_unit_menu_build_string (gchar *format,
......@@ -443,23 +444,27 @@ gimp_unit_menu_selection_delete_callback (GtkWidget *widget,
static void
gimp_unit_menu_create_selection (GimpUnitMenu *gum)
{
GtkWidget *hbbox;
GtkWidget *vbox;
GtkWidget *scrolled_win;
GtkWidget *button;
gchar *titles[2];
gchar *row[2];
GUnit unit;
gint num_units;
gint unit_width;
gint factor_width;
gum->selection = gtk_dialog_new ();
gtk_window_set_wmclass (GTK_WINDOW (gum->selection),
"unit_selection", "Gimp");
gtk_window_set_title (GTK_WINDOW (gum->selection), _("Unit Selection"));
gtk_window_set_policy (GTK_WINDOW (gum->selection), FALSE, TRUE, FALSE);
gtk_window_position (GTK_WINDOW (gum->selection), GTK_WIN_POS_MOUSE);
gchar *titles[2];
gchar *row[2];
GUnit unit;
gint num_units;
gint unit_width;
gint factor_width;
gum->selection =
gimp_dialog_new (_("Unit Selection"), "unit_selection",
gimp_standard_help_func, "dialogs/unit_selection.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
_("Select"), gimp_unit_menu_selection_select_callback,
gum, NULL, NULL, TRUE, FALSE,
_("Close"), gimp_unit_menu_selection_close_callback,
gum, NULL, NULL, FALSE, TRUE,
NULL);
gtk_signal_connect (GTK_OBJECT (gum->selection), "delete_event",
GTK_SIGNAL_FUNC (gimp_unit_menu_selection_delete_callback),
......@@ -526,35 +531,6 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum)
GTK_SIGNAL_FUNC (gtk_widget_destroyed),
&gum->clist);
/* the action area */
gtk_container_set_border_width
(GTK_CONTAINER (GTK_DIALOG (gum->selection)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (gum->selection)->action_area),
FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (gum->selection)->action_area), hbbox,
FALSE, FALSE, 0);
gtk_widget_show (hbbox);
button = gtk_button_new_with_label (_("Select"));
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_grab_default (button);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gimp_unit_menu_selection_select_callback),
gum);
gtk_widget_show (button);
button = gtk_button_new_with_label (_("Close"));
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (gimp_unit_menu_selection_close_callback),
gum);
gtk_widget_show (button);
gtk_widget_show (vbox);
gtk_widget_show (gum->selection);
......
This diff is collapsed.
......@@ -17,6 +17,7 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimp/libgimp.la \
$(GTK_LIBS) \
$(INTLLIBS)
......
This diff is collapsed.
......@@ -17,6 +17,7 @@ INCLUDES = \
-I$(includedir)
LDADD = \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimp/libgimp.la \
$(GTK_LIBS) \
$(INTLLIBS)
......
......@@ -17,9 +17,10 @@ AM_CPPFLAGS = \
-DLOCALEDIR=\""$(localedir)"\"
LDADD = \
$(top_builddir)/plug-ins/libgck/gck/libgck.la \
$(top_builddir)/plug-ins/megawidget/libmegawidget.a \
$(top_builddir)/libgimp/libgimpui.la \
$(top_builddir)/libgimp/libgimp.la \
$(top_builddir)/plug-ins/libgck/gck/libgck.la \
$(GTK_LIBS) \
$(INTLLIBS)
......
......@@ -19,13 +19,20 @@
*/
#include "config.h"
#include <stdlib.h>
#include <gtk/gtk.h>
#include "libgimp/gimp.h"
#include "libgimp/stdplugins-intl.h"
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
#include "gck/gck.h"
#include "plug-ins/megawidget/megawidget.h"
#include "libgimp/stdplugins-intl.h"
/* Declare local functions.
......@@ -37,13 +44,16 @@ static void run (char *name,
int *nreturn_vals,
GParam **return_vals);
static void borderaverage(GDrawable *drawable, guchar *res_r, guchar *res_g, guchar *res_b);
static void borderaverage (GDrawable *drawable,
guchar *res_r, guchar *res_g, guchar *res_b);
static gint borderaverage_dialog(void);
static gint borderaverage_dialog (void);
static void add_new_color (gint bytes, guchar* buffer, gint* cube, gint bucket_expo);
static void add_new_color (gint bytes, guchar* buffer, gint* cube,
gint bucket_expo);
void menu_callback(GtkWidget *widget, gpointer client_data);
static void menu_callback (GtkWidget *widget,
gpointer client_data);
GPlugInInfo PLUG_IN_INFO =