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.
This commit is contained in:

committed by
Michael Natterer

parent
63fd0799da
commit
d5e99ee9a5
@ -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;
|
||||
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);
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user