mirror of https://github.com/GNOME/gimp.git
use a gimp_query_boolean_box().
2000-02-23 Michael Natterer <mitch@gimp.org> * app/file_new_dialog.c: use a gimp_query_boolean_box(). * libgimp/gimpenv.c * libgimp/gimpquerybox.c: documentation updates. * libgimp/gimpwidgets.[ch]: changed the widget constructors to return only the container widget and added access marcos for the sub-widgets. Added documentation for all functions. Made gimp_toggle_button_sensitive_update() public so this feature can be properly documented. * plug-ins/common/blur.c * plug-ins/common/gauss_iir.c * plug-ins/common/gauss_rle.c * plug-ins/common/plasma.c * plug-ins/common/randomize.c * plug-ins/common/snoise.c * plug-ins/common/spread.c * plug-ins/common/tile.c * plug-ins/gflare/gflare.c: updated according to the gimpwidgets.[ch] changes. 2000-02-23 Michael Natterer <mitch@gimp.org> * libgimp/libgimp-decl.txt * libgimp/libgimp-sections.txt * libgimp/tmpl/gimpenv.sgml * libgimp/tmpl/gimppixmap.sgml * libgimp/tmpl/gimpwidgets.sgml: various updates and documentation for all gimpwidgets.[ch] functions.
This commit is contained in:
parent
c7bacaeadb
commit
27d4717c78
24
ChangeLog
24
ChangeLog
|
@ -1,3 +1,27 @@
|
|||
2000-02-23 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/file_new_dialog.c: use a gimp_query_boolean_box().
|
||||
|
||||
* libgimp/gimpenv.c
|
||||
* libgimp/gimpquerybox.c: documentation updates.
|
||||
|
||||
* libgimp/gimpwidgets.[ch]: changed the widget constructors to
|
||||
return only the container widget and added access marcos for the
|
||||
sub-widgets. Added documentation for all functions.
|
||||
Made gimp_toggle_button_sensitive_update() public so this feature
|
||||
can be properly documented.
|
||||
|
||||
* plug-ins/common/blur.c
|
||||
* plug-ins/common/gauss_iir.c
|
||||
* plug-ins/common/gauss_rle.c
|
||||
* plug-ins/common/plasma.c
|
||||
* plug-ins/common/randomize.c
|
||||
* plug-ins/common/snoise.c
|
||||
* plug-ins/common/spread.c
|
||||
* plug-ins/common/tile.c
|
||||
* plug-ins/gflare/gflare.c: updated according to the
|
||||
gimpwidgets.[ch] changes.
|
||||
|
||||
Wed Feb 23 14:50:09 CET 2000 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/print/print-escp2.c
|
||||
|
|
|
@ -148,59 +148,40 @@ file_new_cancel_callback (GtkWidget *widget,
|
|||
g_free (info);
|
||||
}
|
||||
|
||||
/* local callbacks of file_new_confirm_dialog() */
|
||||
/* local callback of file_new_confirm_dialog() */
|
||||
static void
|
||||
file_new_confirm_dialog_ok_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
file_new_confirm_dialog_callback (GtkWidget *widget,
|
||||
gboolean create,
|
||||
gpointer data)
|
||||
{
|
||||
NewImageInfo *info;
|
||||
|
||||
info = (NewImageInfo*) data;
|
||||
|
||||
gtk_widget_destroy (info->confirm_dlg);
|
||||
gtk_widget_destroy (info->dlg);
|
||||
image_new_create_image (info->values);
|
||||
image_new_values_free (info->values);
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
static void
|
||||
file_new_confirm_dialog_cancel_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
NewImageInfo *info;
|
||||
|
||||
info = (NewImageInfo*) data;
|
||||
|
||||
gtk_widget_destroy (info->confirm_dlg);
|
||||
info->confirm_dlg = NULL;
|
||||
gtk_widget_set_sensitive (info->dlg, TRUE);
|
||||
|
||||
if (create)
|
||||
{
|
||||
gtk_widget_destroy (info->dlg);
|
||||
image_new_create_image (info->values);
|
||||
image_new_values_free (info->values);
|
||||
g_free (info);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_set_sensitive (info->dlg, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
file_new_confirm_dialog (NewImageInfo *info)
|
||||
{
|
||||
GtkWidget *label;
|
||||
gchar *size;
|
||||
gchar *max_size;
|
||||
gchar *text;
|
||||
|
||||
gtk_widget_set_sensitive (info->dlg, FALSE);
|
||||
|
||||
info->confirm_dlg =
|
||||
gimp_dialog_new (_("Confirm Image Size"), "confirm_size",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new.html#confirm_size",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
_("OK"), file_new_confirm_dialog_ok_callback,
|
||||
info, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), file_new_confirm_dialog_cancel_callback,
|
||||
info, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
size = image_new_get_size_string (info->size);
|
||||
max_size = image_new_get_size_string (max_new_image_size);
|
||||
|
||||
|
@ -216,11 +197,17 @@ file_new_confirm_dialog (NewImageInfo *info)
|
|||
"setting (currently %s) in the\n"
|
||||
"preferences dialog."),
|
||||
size, max_size);
|
||||
label = gtk_label_new (text);
|
||||
gtk_misc_set_padding (GTK_MISC (label), 6, 6);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->confirm_dlg)->vbox), label,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
info->confirm_dlg =
|
||||
gimp_query_boolean_box (_("Confirm Image Size"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new.html#confirm_size",
|
||||
FALSE,
|
||||
text,
|
||||
_("OK"), _("Cancel"),
|
||||
NULL, NULL,
|
||||
file_new_confirm_dialog_callback,
|
||||
info);
|
||||
|
||||
g_free (text);
|
||||
g_free (max_size);
|
||||
|
|
|
@ -148,59 +148,40 @@ file_new_cancel_callback (GtkWidget *widget,
|
|||
g_free (info);
|
||||
}
|
||||
|
||||
/* local callbacks of file_new_confirm_dialog() */
|
||||
/* local callback of file_new_confirm_dialog() */
|
||||
static void
|
||||
file_new_confirm_dialog_ok_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
file_new_confirm_dialog_callback (GtkWidget *widget,
|
||||
gboolean create,
|
||||
gpointer data)
|
||||
{
|
||||
NewImageInfo *info;
|
||||
|
||||
info = (NewImageInfo*) data;
|
||||
|
||||
gtk_widget_destroy (info->confirm_dlg);
|
||||
gtk_widget_destroy (info->dlg);
|
||||
image_new_create_image (info->values);
|
||||
image_new_values_free (info->values);
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
static void
|
||||
file_new_confirm_dialog_cancel_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
NewImageInfo *info;
|
||||
|
||||
info = (NewImageInfo*) data;
|
||||
|
||||
gtk_widget_destroy (info->confirm_dlg);
|
||||
info->confirm_dlg = NULL;
|
||||
gtk_widget_set_sensitive (info->dlg, TRUE);
|
||||
|
||||
if (create)
|
||||
{
|
||||
gtk_widget_destroy (info->dlg);
|
||||
image_new_create_image (info->values);
|
||||
image_new_values_free (info->values);
|
||||
g_free (info);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_set_sensitive (info->dlg, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
file_new_confirm_dialog (NewImageInfo *info)
|
||||
{
|
||||
GtkWidget *label;
|
||||
gchar *size;
|
||||
gchar *max_size;
|
||||
gchar *text;
|
||||
|
||||
gtk_widget_set_sensitive (info->dlg, FALSE);
|
||||
|
||||
info->confirm_dlg =
|
||||
gimp_dialog_new (_("Confirm Image Size"), "confirm_size",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new.html#confirm_size",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
_("OK"), file_new_confirm_dialog_ok_callback,
|
||||
info, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), file_new_confirm_dialog_cancel_callback,
|
||||
info, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
size = image_new_get_size_string (info->size);
|
||||
max_size = image_new_get_size_string (max_new_image_size);
|
||||
|
||||
|
@ -216,11 +197,17 @@ file_new_confirm_dialog (NewImageInfo *info)
|
|||
"setting (currently %s) in the\n"
|
||||
"preferences dialog."),
|
||||
size, max_size);
|
||||
label = gtk_label_new (text);
|
||||
gtk_misc_set_padding (GTK_MISC (label), 6, 6);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->confirm_dlg)->vbox), label,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
info->confirm_dlg =
|
||||
gimp_query_boolean_box (_("Confirm Image Size"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new.html#confirm_size",
|
||||
FALSE,
|
||||
text,
|
||||
_("OK"), _("Cancel"),
|
||||
NULL, NULL,
|
||||
file_new_confirm_dialog_callback,
|
||||
info);
|
||||
|
||||
g_free (text);
|
||||
g_free (max_size);
|
||||
|
|
|
@ -148,59 +148,40 @@ file_new_cancel_callback (GtkWidget *widget,
|
|||
g_free (info);
|
||||
}
|
||||
|
||||
/* local callbacks of file_new_confirm_dialog() */
|
||||
/* local callback of file_new_confirm_dialog() */
|
||||
static void
|
||||
file_new_confirm_dialog_ok_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
file_new_confirm_dialog_callback (GtkWidget *widget,
|
||||
gboolean create,
|
||||
gpointer data)
|
||||
{
|
||||
NewImageInfo *info;
|
||||
|
||||
info = (NewImageInfo*) data;
|
||||
|
||||
gtk_widget_destroy (info->confirm_dlg);
|
||||
gtk_widget_destroy (info->dlg);
|
||||
image_new_create_image (info->values);
|
||||
image_new_values_free (info->values);
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
static void
|
||||
file_new_confirm_dialog_cancel_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
NewImageInfo *info;
|
||||
|
||||
info = (NewImageInfo*) data;
|
||||
|
||||
gtk_widget_destroy (info->confirm_dlg);
|
||||
info->confirm_dlg = NULL;
|
||||
gtk_widget_set_sensitive (info->dlg, TRUE);
|
||||
|
||||
if (create)
|
||||
{
|
||||
gtk_widget_destroy (info->dlg);
|
||||
image_new_create_image (info->values);
|
||||
image_new_values_free (info->values);
|
||||
g_free (info);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_set_sensitive (info->dlg, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
file_new_confirm_dialog (NewImageInfo *info)
|
||||
{
|
||||
GtkWidget *label;
|
||||
gchar *size;
|
||||
gchar *max_size;
|
||||
gchar *text;
|
||||
|
||||
gtk_widget_set_sensitive (info->dlg, FALSE);
|
||||
|
||||
info->confirm_dlg =
|
||||
gimp_dialog_new (_("Confirm Image Size"), "confirm_size",
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new.html#confirm_size",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
_("OK"), file_new_confirm_dialog_ok_callback,
|
||||
info, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), file_new_confirm_dialog_cancel_callback,
|
||||
info, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
size = image_new_get_size_string (info->size);
|
||||
max_size = image_new_get_size_string (max_new_image_size);
|
||||
|
||||
|
@ -216,11 +197,17 @@ file_new_confirm_dialog (NewImageInfo *info)
|
|||
"setting (currently %s) in the\n"
|
||||
"preferences dialog."),
|
||||
size, max_size);
|
||||
label = gtk_label_new (text);
|
||||
gtk_misc_set_padding (GTK_MISC (label), 6, 6);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->confirm_dlg)->vbox), label,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
info->confirm_dlg =
|
||||
gimp_query_boolean_box (_("Confirm Image Size"),
|
||||
gimp_standard_help_func,
|
||||
"dialogs/file_new.html#confirm_size",
|
||||
FALSE,
|
||||
text,
|
||||
_("OK"), _("Cancel"),
|
||||
NULL, NULL,
|
||||
file_new_confirm_dialog_callback,
|
||||
info);
|
||||
|
||||
g_free (text);
|
||||
g_free (max_size);
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
2000-02-23 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* libgimp/libgimp-decl.txt
|
||||
* libgimp/libgimp-sections.txt
|
||||
* libgimp/tmpl/gimpenv.sgml
|
||||
* libgimp/tmpl/gimppixmap.sgml
|
||||
* libgimp/tmpl/gimpwidgets.sgml: various updates and documentation
|
||||
for all gimpwidgets.[ch] functions.
|
||||
|
||||
Mon Feb 21 11:55:18 CET 2000 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimp/libgimp-decl.txt
|
||||
* libgimp/tmpl/gimpwidgets.sgml; updated
|
||||
* libgimp/tmpl/gimpwidgets.sgml: updated
|
||||
|
||||
2000-02-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* libgimp/libgimp-decl.txt
|
||||
* libgimp/tmpl/gimpmatrix.sgml
|
||||
* libgimp/tmpl/gimpvector.sgml
|
||||
* libgimp/tmpl/libgimp-unused.sgml: updates and
|
||||
cleanups.
|
||||
* libgimp/tmpl/libgimp-unused.sgml: updates and cleanups.
|
||||
|
||||
2000-02-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -572,6 +572,10 @@ gimp_directory
|
|||
gimp_personal_rc_file
|
||||
gimp_data_directory
|
||||
gimp_gtkrc
|
||||
gimp_path_parse
|
||||
gimp_path_free
|
||||
gimp_path_to_str
|
||||
gimp_path_get_user_writable_dir
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
@ -713,6 +717,7 @@ GimpPixmap
|
|||
GIMP_PIXMAP
|
||||
<TITLE>GimpPixmap</TITLE>
|
||||
gimp_pixmap_new
|
||||
gimp_pixmap_set
|
||||
<SUBSECTION Standard>
|
||||
GIMP_TYPE_PIXMAP
|
||||
GIMP_IS_PIXMAP
|
||||
|
@ -870,11 +875,16 @@ GIMP_SCALE_ENTRY_SCALE_ADJ
|
|||
GIMP_SCALE_ENTRY_SPINBUTTON
|
||||
GIMP_SCALE_ENTRY_SPINBUTTON_ADJ
|
||||
gimp_random_seed_new
|
||||
GIMP_RANDOM_SEED_SPINBUTTON
|
||||
GIMP_RANDOM_SEED_SPINBUTTON_ADJ
|
||||
GIMP_RANDOM_SEED_TOGGLEBUTTON
|
||||
gimp_coordinates_new
|
||||
GIMP_COORDINATES_CHAINBUTTON
|
||||
gimp_pixmap_button_new
|
||||
gimp_toggle_button_sensitive_update
|
||||
gimp_toggle_button_update
|
||||
gimp_menu_item_update
|
||||
gimp_radio_button_update
|
||||
gimp_menu_item_update
|
||||
gimp_int_adjustment_update
|
||||
gimp_float_adjustment_update
|
||||
gimp_double_adjustment_update
|
||||
|
|
|
@ -48,3 +48,41 @@ configuration files.
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_path_parse ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@max_paths:
|
||||
@check:
|
||||
@check_failed:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_path_free ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_path_to_str ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_path_get_user_writable_dir ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
|
|
@ -38,3 +38,12 @@ performs the cast if valid.
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_pixmap_set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixmap:
|
||||
@xpm_data:
|
||||
|
||||
|
||||
|
|
|
@ -18,6 +18,46 @@ helper functions.
|
|||
<!-- ##### FUNCTION gimp_option_menu_new ##### -->
|
||||
<para>
|
||||
|
||||
The @va_list describing the #GtkMenuItem's has the following format:
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="4*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>#gchar label,</entry>
|
||||
<entry>The menu item's label.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GtkSignalFunc callback,</entry>
|
||||
<entry>The callback which will be connected to the menu item's
|
||||
"activate" signal</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gpointer data,</entry>
|
||||
<entry>The callback data which will be used in gtk_signal_connect().</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gpointer user_data,</entry>
|
||||
<entry>The menu item's @user_data which will be set with
|
||||
gtk_object_set_user_data().</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GtkWidget **widget_ptr,</entry>
|
||||
<entry>A pointer to store the created menu item in.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gboolean active,</entry>
|
||||
<entry>#TRUE if this should be the initially selected menu item.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
|
||||
</para>
|
||||
|
||||
@menu_only:
|
||||
|
@ -28,6 +68,30 @@ helper functions.
|
|||
<!-- ##### FUNCTION gimp_option_menu_new2 ##### -->
|
||||
<para>
|
||||
|
||||
The @va_list describing the #GtkMenuItem's has the following format:
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="4*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>#gchar label,</entry>
|
||||
<entry>The menu item's label.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gpointer user_data,</entry>
|
||||
<entry>The menu item's @user_data which will be set with
|
||||
gtk_object_set_user_data().</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GtkWidget **widget_ptr,</entry>
|
||||
<entry>A pointer to store the created menu item in.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
|
||||
</para>
|
||||
|
||||
@menu_only:
|
||||
|
@ -50,6 +114,46 @@ helper functions.
|
|||
<!-- ##### FUNCTION gimp_radio_group_new ##### -->
|
||||
<para>
|
||||
|
||||
The @va_list describing the #GtkRadioButton's has the following format:
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="4*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>#gchar label,</entry>
|
||||
<entry>The radio button's label.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GtkSignalFunc callback,</entry>
|
||||
<entry>The callback which will be connected to the radio button's
|
||||
"toggled" signal</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gpointer data,</entry>
|
||||
<entry>The callback data which will be used in gtk_signal_connect().</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gpointer user_data,</entry>
|
||||
<entry>The radio button's @user_data which will be set with
|
||||
gtk_object_set_user_data().</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GtkWidget **widget_ptr,</entry>
|
||||
<entry>A pointer to store the created radio button in.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gboolean active,</entry>
|
||||
<entry>#TRUE if this should be the initially pressed radio button.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
|
||||
</para>
|
||||
|
||||
@in_frame:
|
||||
|
@ -61,6 +165,30 @@ helper functions.
|
|||
<!-- ##### FUNCTION gimp_radio_group_new2 ##### -->
|
||||
<para>
|
||||
|
||||
The @va_list describing the #GtkRadioButton's has the following format:
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="4*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>#gchar label,</entry>
|
||||
<entry>The radio button's label.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gpointer user_data,</entry>
|
||||
<entry>The radio button's @user_data which will be set with
|
||||
gtk_object_set_user_data().</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GtkWidget **widget_ptr,</entry>
|
||||
<entry>A pointer to store the created radio button in.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
|
||||
</para>
|
||||
|
||||
@in_frame:
|
||||
|
@ -116,42 +244,42 @@ helper functions.
|
|||
|
||||
<!-- ##### MACRO GIMP_SCALE_ENTRY_LABEL ##### -->
|
||||
<para>
|
||||
|
||||
Returns the scale_entry's #GtkLabel.
|
||||
</para>
|
||||
|
||||
@adj:
|
||||
@adj: The #GtkAdjustment returned by gimp_scale_entry_new().
|
||||
|
||||
|
||||
<!-- ##### MACRO GIMP_SCALE_ENTRY_SCALE ##### -->
|
||||
<para>
|
||||
|
||||
Returns the scale_entry's #GtkHScale.
|
||||
</para>
|
||||
|
||||
@adj:
|
||||
@adj: The #GtkAdjustment returned by gimp_scale_entry_new().
|
||||
|
||||
|
||||
<!-- ##### MACRO GIMP_SCALE_ENTRY_SCALE_ADJ ##### -->
|
||||
<para>
|
||||
|
||||
Returns the #GtkAdjustment of the scale_entry's #GtkHScale.
|
||||
</para>
|
||||
|
||||
@adj:
|
||||
@adj: The #GtkAdjustment returned by gimp_scale_entry_new().
|
||||
|
||||
|
||||
<!-- ##### MACRO GIMP_SCALE_ENTRY_SPINBUTTON ##### -->
|
||||
<para>
|
||||
|
||||
Returns the scale_entry's #GtkSpinButton.
|
||||
</para>
|
||||
|
||||
@adj:
|
||||
@adj: The #GtkAdjustment returned by gimp_scale_entry_new().
|
||||
|
||||
|
||||
<!-- ##### MACRO GIMP_SCALE_ENTRY_SPINBUTTON_ADJ ##### -->
|
||||
<para>
|
||||
|
||||
Returns the #GtkAdjustment of the scale_entry's #GtkSpinButton.
|
||||
</para>
|
||||
|
||||
@adj:
|
||||
@adj: The #GtkAdjustment returned by gimp_scale_entry_new().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_random_seed_new ##### -->
|
||||
|
@ -160,14 +288,36 @@ helper functions.
|
|||
</para>
|
||||
|
||||
@seed:
|
||||
@seed_spinbutton:
|
||||
@use_time:
|
||||
@time_button:
|
||||
@time_true:
|
||||
@time_false:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### MACRO GIMP_RANDOM_SEED_SPINBUTTON ##### -->
|
||||
<para>
|
||||
Returns the random_seed's #GtkSpinButton.
|
||||
</para>
|
||||
|
||||
@hbox: The #GtkHBox returned by gimp_random_seed_new().
|
||||
|
||||
|
||||
<!-- ##### MACRO GIMP_RANDOM_SEED_SPINBUTTON_ADJ ##### -->
|
||||
<para>
|
||||
Returns the #GtkAdjustment of the random_seed's #GtkSpinButton.
|
||||
</para>
|
||||
|
||||
@hbox: The #GtkHBox returned by gimp_random_seed_new().
|
||||
|
||||
|
||||
<!-- ##### MACRO GIMP_RANDOM_SEED_TOGGLEBUTTON ##### -->
|
||||
<para>
|
||||
Returns the random_seed's #GtkToggleButton.
|
||||
</para>
|
||||
|
||||
@hbox: The #GtkHBox returned by gimp_random_seed_new().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_coordinates_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -181,7 +331,6 @@ helper functions.
|
|||
@update_policy:
|
||||
@chainbutton_active:
|
||||
@chain_constrains_ratio:
|
||||
@chainbutton:
|
||||
@xlabel:
|
||||
@x:
|
||||
@xres:
|
||||
|
@ -199,6 +348,14 @@ helper functions.
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### MACRO GIMP_COORDINATES_CHAINBUTTON ##### -->
|
||||
<para>
|
||||
Returns the #GimpChainButton which is attached to the #GimpSizeEntry.
|
||||
</para>
|
||||
|
||||
@sizeentry: The #GimpSizeEntry returned by gimp_coordinates_new().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_pixmap_button_new ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -209,6 +366,14 @@ helper functions.
|
|||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_toggle_button_sensitive_update ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@toggle_button:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_toggle_button_update ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -218,7 +383,7 @@ helper functions.
|
|||
@data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_menu_item_update ##### -->
|
||||
<!-- ##### FUNCTION gimp_radio_button_update ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
@ -227,7 +392,7 @@ helper functions.
|
|||
@data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_radio_button_update ##### -->
|
||||
<!-- ##### FUNCTION gimp_menu_item_update ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
|
|
@ -249,11 +249,12 @@ gimp_gtkrc (void)
|
|||
/**
|
||||
* gimp_path_parse:
|
||||
* @path: A list of directories separated by #G_SEARCHPATH_SEPARATOR.
|
||||
* @max_path: The maximum number of directories to return.
|
||||
* @max_paths: The maximum number of directories to return.
|
||||
* @check: #TRUE if you want the directories to be checked.
|
||||
* @not_found: #
|
||||
* @check_failed: Returns a #GList of path elements for which the
|
||||
* check failed.
|
||||
*
|
||||
* Return: A list of all directories in @path.
|
||||
* Returns: A #GList of all directories in @path.
|
||||
*
|
||||
*/
|
||||
GList *
|
||||
|
|
|
@ -383,7 +383,8 @@ gimp_query_size_box (gchar *title,
|
|||
* @false_button: The string to be shown in the dialog's right button.
|
||||
* @object: The object this query box is associated with.
|
||||
* @signal: The object's signal which will cause the query box to be closed.
|
||||
* @callback: The function which will be called when the user selects "OK".
|
||||
* @callback: The function which will be called when the user clicks one
|
||||
* of the buttons.
|
||||
* @data: The callback's user data.
|
||||
*
|
||||
* Returns: A pointer to the new #GtkDialog.
|
||||
|
|
|
@ -31,23 +31,16 @@
|
|||
|
||||
#include "libgimp-intl.h"
|
||||
|
||||
/*
|
||||
* Forward declarations
|
||||
*/
|
||||
|
||||
static void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button);
|
||||
|
||||
|
||||
/*
|
||||
* Widget Constructors
|
||||
*/
|
||||
|
||||
/**
|
||||
* gimp_option_menu_new:
|
||||
* @menu_only:
|
||||
* @...:
|
||||
* @menu_only: #TRUE if the function should return a #GtkMenu only.
|
||||
* @...: A #NULL terminated @va_list describing the menu items.
|
||||
*
|
||||
* Returns:
|
||||
* Returns: A #GtkOptionMenu or a #GtkMenu (depending on @menu_only).
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -142,13 +135,14 @@ gimp_option_menu_new (gboolean menu_only,
|
|||
|
||||
/**
|
||||
* gimp_option_menu_new2:
|
||||
* @menu_only:
|
||||
* @menu_item_callback:
|
||||
* @data:
|
||||
* @initial:
|
||||
* @...:
|
||||
* @menu_only: #TRUE if the function should return a #GtkMenu only.
|
||||
* @menu_item_callback: The callback each menu item's "activate" signal will
|
||||
* be connected with.
|
||||
* @data: The data which will be passed to gtk_signal_connect().
|
||||
* @initial: The @user_data of the initially selected menu item.
|
||||
* @...: A #NULL terminated @va_list describing the menu items.
|
||||
*
|
||||
* Returns:
|
||||
* Returns: A #GtkOptionMenu or a #GtkMenu (depending on @menu_only).
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -237,8 +231,9 @@ gimp_option_menu_new2 (gboolean menu_only,
|
|||
|
||||
/**
|
||||
* gimp_option_menu_set_history:
|
||||
* @option_menu:
|
||||
* @user_data:
|
||||
* @option_menu: A #GtkOptionMenu as returned by gimp_option_menu_new() or
|
||||
* gimp_option_menu_new2().
|
||||
* @user_data: The @user_data of the menu item you want to select.
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -273,11 +268,11 @@ gimp_option_menu_set_history (GtkOptionMenu *option_menu,
|
|||
|
||||
/**
|
||||
* gimp_radio_group_new:
|
||||
* @in_frame:
|
||||
* @frame_title:
|
||||
* @...:
|
||||
* @in_frame: #TRUE if you want a #GtkFrame around the radio button group.
|
||||
* @frame_title: The title of the Frame or #NULL if you don't want a title.
|
||||
* @...: A #NULL terminated @va_list describing the radio buttons.
|
||||
*
|
||||
* Returns:
|
||||
* Returns: A #GtkFrame or #GtkVbox (depending on @in_frame).
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -368,14 +363,15 @@ gimp_radio_group_new (gboolean in_frame,
|
|||
|
||||
/**
|
||||
* gimp_radio_group_new2:
|
||||
* @in_frame:
|
||||
* @frame_title:
|
||||
* @radio_button_callback:
|
||||
* @data:
|
||||
* @initial:
|
||||
* @...:
|
||||
* @in_frame: #TRUE if you want a #GtkFrame around the radio button group.
|
||||
* @frame_title: The title of the Frame or #NULL if you don't want a title.
|
||||
* @radio_button_callback: The callback each button's "toggled" signal will
|
||||
* be connected with.
|
||||
* @data: The data which will be passed to gtk_signal_connect().
|
||||
* @initial: The @user_data of the initially pressed radio button.
|
||||
* @...: A #NULL terminated @va_list describing the radio buttons.
|
||||
*
|
||||
* Returns:
|
||||
* Returns: A #GtkFrame or #GtkVbox (depending on @in_frame).
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -460,17 +456,21 @@ gimp_radio_group_new2 (gboolean in_frame,
|
|||
|
||||
/**
|
||||
* gimp_spin_button_new:
|
||||
* @adjustment:
|
||||
* @value:
|
||||
* @lower:
|
||||
* @upper:
|
||||
* @step_increment:
|
||||
* @page_increment:
|
||||
* @page_size:
|
||||
* @climb_rate:
|
||||
* @digits:
|
||||
* @adjustment: Returns the spinbutton's #GtkAdjustment.
|
||||
* @value: The initial value of the spinbutton.
|
||||
* @lower: The lower boundary.
|
||||
* @upper: The uppper boundary.
|
||||
* @step_increment: The spinbutton's step increment.
|
||||
* @page_increment: The spinbutton's page increment (mouse button 2).
|
||||
* @page_size: The spinbutton's page size.
|
||||
* @climb_rate: The spinbutton's climb rate.
|
||||
* @digits: The spinbutton's number of decimal digits.
|
||||
*
|
||||
* Returns:
|
||||
* This function is a shortcut for gtk_adjustment_new() and a subsequent
|
||||
* gtk_spin_button_new() and does some more initialisation stuff like
|
||||
* setting a standard minimun horizontal size.
|
||||
*
|
||||
* Returns: A #GtkSpinbutton and it's #GtkAdjustment.
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -512,25 +512,34 @@ gimp_scale_entry_unconstrained_adjustment_callback (GtkAdjustment *adjustment,
|
|||
|
||||
/**
|
||||
* gimp_scale_entry_new:
|
||||
* @table:
|
||||
* @column:
|
||||
* @row:
|
||||
* @text:
|
||||
* @scale_usize:
|
||||
* @spinbutton_usize:
|
||||
* @value:
|
||||
* @lower:
|
||||
* @upper:
|
||||
* @step_increment:
|
||||
* @page_increment:
|
||||
* @digits:
|
||||
* @constrain:
|
||||
* @unconstrained_lower:
|
||||
* @unconstrained_upper:
|
||||
* @tooltip:
|
||||
* @private_tip:
|
||||
* @table: The #GtkTable the widgets will be attached to.
|
||||
* @column: The column to start with.
|
||||
* @row: The row to attach the widgets.
|
||||
* @text: The text for the #GtkLabel which will appear left of the #GtkHScale.
|
||||
* @scale_usize: The minimum horizontal size of the #GtkHScale.
|
||||
* @spinbutton_usize: The minimum horizontal size of the #GtkSpinButton.
|
||||
* @value: The initial value.
|
||||
* @lower: The lower boundary.
|
||||
* @upper: The upper boundary.
|
||||
* @step_increment: The step increment.
|
||||
* @page_increment: The page increment.
|
||||
* @digits: The number of decimal digits.
|
||||
* @constrain: #TRUE if the range of possible values of the #GtkSpinButton
|
||||
* should be the same as of the #GtkHScale.
|
||||
* @unconstrained_lower: The spinbutton's lower boundary
|
||||
* if @constrain == #FALSE.
|
||||
* @unconstrained_upper: The spinbutton's upper boundary
|
||||
* if @constrain == #FALSE.
|
||||
* @tooltip: A tooltip message for the scale and the spinbutton.
|
||||
* @private_tip: The widgets' private_tip (see gimp_help_set_help_data()).
|
||||
*
|
||||
* Returns:
|
||||
* This function creates a #GtkLabel, a #GtkHScale and a #GtkSpinButton and
|
||||
* attaches them to a 3-column #GtkTable.
|
||||
*
|
||||
* Note that if you pass a @tooltip or @private_tip to this function you'll
|
||||
* have to initialize GIMP's help system with gimp_help_init() before using it.
|
||||
*
|
||||
* Returns: The #GtkSpinButton's #GtkAdjustment.
|
||||
*
|
||||
*/
|
||||
GtkObject *
|
||||
|
@ -655,21 +664,24 @@ gimp_random_seed_toggle_update (GtkWidget *widget,
|
|||
|
||||
/**
|
||||
* gimp_random_seed_new:
|
||||
* @seed:
|
||||
* @seed_spinbutton:
|
||||
* @use_time:
|
||||
* @time_button:
|
||||
* @time_true:
|
||||
* @time_false:
|
||||
* @seed: A pointer to the variable which stores the random seed.
|
||||
* @use_time: A pointer to the variable which stores the @use_time
|
||||
* toggle boolean.
|
||||
* @time_true: The value to write to @use_time if the toggle button is checked.
|
||||
* @time_false: The value to write to @use_time if the toggle button is
|
||||
* unchecked.
|
||||
*
|
||||
* Returns:
|
||||
* Note that this widget automatically sets tooltips with
|
||||
* gimp_help_set_help_data(), so you'll have to initialize GIMP's help
|
||||
* system with gimp_help_init() before using it.
|
||||
*
|
||||
* Returns: A #GtkHBox containing a #GtkSpinButton for the random seed and
|
||||
* a #GtkToggleButton for toggling the @use_time behaviour.
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
gimp_random_seed_new (gint *seed,
|
||||
GtkWidget **seed_spinbutton,
|
||||
gint *use_time,
|
||||
GtkWidget **time_button,
|
||||
gint time_true,
|
||||
gint time_false)
|
||||
{
|
||||
|
@ -688,9 +700,6 @@ gimp_random_seed_new (gint *seed,
|
|||
seed);
|
||||
gtk_widget_show (spinbutton);
|
||||
|
||||
if (seed_spinbutton)
|
||||
*seed_spinbutton = spinbutton;
|
||||
|
||||
gimp_help_set_help_data (spinbutton,
|
||||
_("If the \"Time\" button is not pressed, "
|
||||
"use this value for random number generator "
|
||||
|
@ -705,9 +714,6 @@ gimp_random_seed_new (gint *seed,
|
|||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
if (time_button)
|
||||
*time_button = button;
|
||||
|
||||
gimp_help_set_help_data (button,
|
||||
_("Seed random number generator from the current "
|
||||
"time - this guarantees a reasonable "
|
||||
|
@ -724,6 +730,9 @@ gimp_random_seed_new (gint *seed,
|
|||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
|
||||
*use_time == time_true);
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT (hbox), "spinbutton", spinbutton);
|
||||
gtk_object_set_data (GTK_OBJECT (hbox), "togglebutton", button);
|
||||
|
||||
return hbox;
|
||||
}
|
||||
|
||||
|
@ -799,31 +808,38 @@ gimp_coordinates_callback (GtkWidget *widget,
|
|||
|
||||
/**
|
||||
* gimp_coordinates_new:
|
||||
* @unit:
|
||||
* @unit_format:
|
||||
* @menu_show_pixels:
|
||||
* @menu_show_percent:
|
||||
* @spinbutton_usize:
|
||||
* @update_policy:
|
||||
* @chainbutton_active:
|
||||
* @chain_constrains_ratio:
|
||||
* @chainbutton:
|
||||
* @xlabel:
|
||||
* @x:
|
||||
* @xres:
|
||||
* @lower_boundary_x:
|
||||
* @upper_boundary_x:
|
||||
* @xsize_0:
|
||||
* @xsize_100:
|
||||
* @ylabel:
|
||||
* @y:
|
||||
* @yres:
|
||||
* @lower_boundary_y:
|
||||
* @upper_boundary_y:
|
||||
* @ysize_0:
|
||||
* @ysize_100:
|
||||
* @unit: The unitial unit of the #GimpUnitMenu.
|
||||
* @unit_format: The unit format string as passed to gimp_size_entry_new().
|
||||
* @menu_show_pixels: #TRUE if the #GimpUnitMenu should contain an item for
|
||||
* GIMP_UNIT_PIXEL.
|
||||
* @menu_show_percent: #TRUE if the #GimpUnitMenu should contain an item for
|
||||
* GIMP_UNIT_PERCENT.
|
||||
* @spinbutton_usize: The horizontal usize of the #GimpSizeEntry's
|
||||
* #GtkSpinButton's.
|
||||
* @update_policy: The update policy for the #GimpSizeEntry.
|
||||
* @chainbutton_active: #TRUE if the attached #GimpChainButton should be
|
||||
* active.
|
||||
* @chain_constrains_ratio: #TRUE if the chainbutton should constrain the
|
||||
* fields' aspect ratio. If #FALSE, the values will
|
||||
* be constrained.
|
||||
* @xlabel: The label for the X coordinate.
|
||||
* @x: The initial value of the X coordinate.
|
||||
* @xres: The horizontal resolution in DPI.
|
||||
* @lower_boundary_x: The lower boundary of the X coordinate.
|
||||
* @upper_boundary_x: The upper boundary of the X coordinate.
|
||||
* @xsize_0: The X value which will be treated as 0%.
|
||||
* @xsize_100: The X value which will be treated as 100%.
|
||||
* @ylabel: The label for the Y coordinate.
|
||||
* @y: The initial value of the Y coordinate.
|
||||
* @yres: The vertical resolution in DPI.
|
||||
* @lower_boundary_y: The lower boundary of the Y coordinate.
|
||||
* @upper_boundary_y: The upper boundary of the Y coordinate.
|
||||
* @ysize_0: The Y value which will be treated as 0%.
|
||||
* @ysize_100: The Y value which will be treated as 100%.
|
||||
*
|
||||
* Returns:
|
||||
* Returns: A #GimpSizeEntry with two fields for x/y coordinates/sizes with
|
||||
* a #GimpChainButton attached to constrain either the two fields'
|
||||
* values or the ratio between them.
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -836,8 +852,6 @@ gimp_coordinates_new (GimpUnit unit,
|
|||
|
||||
gboolean chainbutton_active,
|
||||
gboolean chain_constrains_ratio,
|
||||
/* return value: */
|
||||
GtkWidget **chainbutton,
|
||||
|
||||
gchar *xlabel,
|
||||
gdouble x,
|
||||
|
@ -859,7 +873,7 @@ gimp_coordinates_new (GimpUnit unit,
|
|||
GtkObject *adjustment;
|
||||
GtkWidget *spinbutton;
|
||||
GtkWidget *sizeentry;
|
||||
GtkWidget *chainb;
|
||||
GtkWidget *chainbutton;
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adjustment, 1, 0, 1, 1, 10, 1, 1, 2);
|
||||
sizeentry = gimp_size_entry_new (1, unit, unit_format,
|
||||
|
@ -898,18 +912,15 @@ gimp_coordinates_new (GimpUnit unit,
|
|||
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (sizeentry), xlabel, 0, 0, 1.0);
|
||||
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (sizeentry), ylabel, 1, 0, 1.0);
|
||||
|
||||
chainb = gimp_chain_button_new (GIMP_CHAIN_RIGHT);
|
||||
chainbutton = gimp_chain_button_new (GIMP_CHAIN_RIGHT);
|
||||
if (chainbutton_active)
|
||||
gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chainb), TRUE);
|
||||
gtk_table_attach (GTK_TABLE (sizeentry), chainb, 2, 3, 0, 2,
|
||||
gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chainbutton), TRUE);
|
||||
gtk_table_attach (GTK_TABLE (sizeentry), chainbutton, 2, 3, 0, 2,
|
||||
GTK_SHRINK | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
|
||||
gtk_widget_show (chainb);
|
||||
|
||||
if (chainbutton)
|
||||
*chainbutton = chainb;
|
||||
gtk_widget_show (chainbutton);
|
||||
|
||||
gcd = g_new (GimpCoordinatesData, 1);
|
||||
gcd->chainbutton = GIMP_CHAIN_BUTTON (chainb);
|
||||
gcd->chainbutton = GIMP_CHAIN_BUTTON (chainbutton);
|
||||
gcd->chain_constrains_ratio = chain_constrains_ratio;
|
||||
gcd->orig_x = x;
|
||||
gcd->orig_y = y;
|
||||
|
@ -924,15 +935,17 @@ gimp_coordinates_new (GimpUnit unit,
|
|||
GTK_SIGNAL_FUNC (gimp_coordinates_callback),
|
||||
gcd);
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT (sizeentry), "chainbutton", chainbutton);
|
||||
|
||||
return sizeentry;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_pixmap_button_new:
|
||||
* @xpm_data:
|
||||
* @text:
|
||||
* @xpm_data: The XPM data which will be passed to gimp_pixmap_new().
|
||||
* @text: An optional text which will appear right of the pixmap.
|
||||
*
|
||||
* Returns:
|
||||
* Returns: A #GtkButton with a #GimpPixmap and an optional #GtkLabel.
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -980,7 +993,25 @@ gimp_pixmap_button_new (gchar **xpm_data,
|
|||
* Standard Callbacks
|
||||
*/
|
||||
|
||||
static void
|
||||
/**
|
||||
* gimp_toggle_button_sensitive_update:
|
||||
* @toggle_button: The #GtkToggleButton the "set_sensitive" and
|
||||
* "inverse_sensitive" lists are attached to.
|
||||
*
|
||||
* If you attached a pointer to a #GtkWidget with gtk_object_set_data() and
|
||||
* the "set_sensitive" key to the #GtkToggleButton, the sensitive state of
|
||||
* the attached widget will be set according to the toggle button's
|
||||
* "active" state.
|
||||
*
|
||||
* You can attach an arbitrary list of widgets by attaching another
|
||||
* "set_sensitive" data pointer to the first widget (and so on...).
|
||||
*
|
||||
* This function can also set the sensitive state according to the toggle
|
||||
* button's inverse "active" state by attaching widgets with the
|
||||
* "inverse_sensitive" key.
|
||||
*
|
||||
*/
|
||||
void
|
||||
gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button)
|
||||
{
|
||||
GtkWidget *set_sensitive;
|
||||
|
@ -1009,8 +1040,11 @@ gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button)
|
|||
|
||||
/**
|
||||
* gimp_toggle_button_update:
|
||||
* @widget:
|
||||
* @data:
|
||||
* @widget: A #GtkToggleButton.
|
||||
* @data: A pointer to a #gint variable which will store the value of
|
||||
* gtk_toggle_button_get_active().
|
||||
*
|
||||
* Note that this function calls gimp_toggle_button_sensitive_update().
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -1029,27 +1063,13 @@ gimp_toggle_button_update (GtkWidget *widget,
|
|||
gimp_toggle_button_sensitive_update (GTK_TOGGLE_BUTTON (widget));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_menu_item_update:
|
||||
* @widget:
|
||||
* @data:
|
||||
*
|
||||
*/
|
||||
void
|
||||
gimp_menu_item_update (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
gint *item_val;
|
||||
|
||||
item_val = (gint *) data;
|
||||
|
||||
*item_val = (gint) gtk_object_get_user_data (GTK_OBJECT (widget));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_radio_button_update:
|
||||
* @widget:
|
||||
* @data:
|
||||
* @widget: A #GtkRadioButton.
|
||||
* @data: A pointer to a #gint variable which will store the value of
|
||||
* (#gint) gtk_object_get_user_data().
|
||||
*
|
||||
* Note that this function calls gimp_toggle_button_sensitive_update().
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -1068,10 +1088,32 @@ gimp_radio_button_update (GtkWidget *widget,
|
|||
gimp_toggle_button_sensitive_update (GTK_TOGGLE_BUTTON (widget));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_menu_item_update:
|
||||
* @widget: A #GtkMenuItem.
|
||||
* @data: A pointer to a #gint variable which will store the value of
|
||||
* (#gint) gtk_object_get_user_data().
|
||||
*
|
||||
*/
|
||||
void
|
||||
gimp_menu_item_update (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
gint *item_val;
|
||||
|
||||
item_val = (gint *) data;
|
||||
|
||||
*item_val = (gint) gtk_object_get_user_data (GTK_OBJECT (widget));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_int_adjustment_update:
|
||||
* @adjustment:
|
||||
* @data:
|
||||
* @adjustment: A #GtkAdjustment.
|
||||
* @data: A pointer to a #gint variable which will store the adjustment's
|
||||
* value.
|
||||
*
|
||||
* Note that the #GtkAdjustment's value (which is a #gfloat) will be rounded
|
||||
* with (#gint) (value + 0.5).
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -1086,8 +1128,9 @@ gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
|||
|
||||
/**
|
||||
* gimp_float_adjustment_update:
|
||||
* @adjustment:
|
||||
* @data:
|
||||
* @adjustment: A #GtkAdjustment.
|
||||
* @data: A pointer to a #gfloat varaiable which willl store the adjustment's
|
||||
* value.
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -1102,8 +1145,9 @@ gimp_float_adjustment_update (GtkAdjustment *adjustment,
|
|||
|
||||
/**
|
||||
* gimp_double_adjustment_update:
|
||||
* @adjustment:
|
||||
* @data:
|
||||
* @adjustment: A #GtkAdjustment.
|
||||
* @data: A pointer to a #gdouble variable which will store the adjustment's
|
||||
* value.
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -1118,8 +1162,17 @@ gimp_double_adjustment_update (GtkAdjustment *adjustment,
|
|||
|
||||
/**
|
||||
* gimp_unit_menu_update:
|
||||
* @widget:
|
||||
* @data:
|
||||
* @widget: A #GimpUnitMenu.
|
||||
* @data: A pointer to a #GimpUnit variable which will store the unit menu's
|
||||
* value.
|
||||
*
|
||||
* This callback can set the number of decimal digits of an arbitrary number
|
||||
* of #GtkSpinButton's. To use this functionality, attach the spinbuttons
|
||||
* as list of data pointers attached with gtk_object_set_data() with the
|
||||
* "set_digits" key.
|
||||
*
|
||||
* See gimp_toggle_button_sensitive_update() for a description of how
|
||||
* to set up the list.
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -1152,15 +1205,19 @@ gimp_unit_menu_update (GtkWidget *widget,
|
|||
|
||||
/**
|
||||
* gimp_table_attach_aligned:
|
||||
* @table:
|
||||
* @column:
|
||||
* @row:
|
||||
* @label_text:
|
||||
* @xalign:
|
||||
* @yalign:
|
||||
* @widget:
|
||||
* @colspan:
|
||||
* @left_align:
|
||||
* @table: The #GtkTable the widgets will be attached to.
|
||||
* @column: The column to start with.
|
||||
* @row: The row to attach the eidgets.
|
||||
* @label_text: The text for the #GtkLabel which will be attached left of the
|
||||
* widget.
|
||||
* @xalign: The horizontal alignment of the #GtkLabel.
|
||||
* @yalign: The vertival alignment of the #GtkLabel.
|
||||
* @widget: The #GtkWidget to attach right of the label.
|
||||
* @colspan: The number of columns the widget will use.
|
||||
* @left_align: #TRUE if the widget should be left-aligned.
|
||||
*
|
||||
* Note that the @label_text can be #NULL and that the widget will be attached
|
||||
* starting at (@column + 1) in this case, too.
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* For information look into the C source or the html documentation */
|
||||
|
||||
/*
|
||||
* Widget Constructors
|
||||
*/
|
||||
|
@ -110,13 +112,13 @@ GtkWidget * gimp_spin_button_new (/* return value: */
|
|||
GTK_HSCALE (gtk_object_get_data (GTK_OBJECT(adj), "scale"))
|
||||
#define GIMP_SCALE_ENTRY_SCALE_ADJ(adj) \
|
||||
gtk_range_get_adjustment \
|
||||
(GTK_RANGE (gtk_object_get_data (GTK_OBJECT(adj), "scale")))
|
||||
(GTK_RANGE (gtk_object_get_data (GTK_OBJECT (adj), "scale")))
|
||||
|
||||
#define GIMP_SCALE_ENTRY_SPINBUTTON(adj) \
|
||||
GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT(adj), "spinbutton"))
|
||||
GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (adj), "spinbutton"))
|
||||
#define GIMP_SCALE_ENTRY_SPINBUTTON_ADJ(adj) \
|
||||
gtk_spin_button_get_adjustment \
|
||||
(GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT(adj), "spinbutton")))
|
||||
(GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (adj), "spinbutton")))
|
||||
|
||||
GtkObject * gimp_scale_entry_new (GtkTable *table,
|
||||
gint column,
|
||||
|
@ -136,13 +138,25 @@ GtkObject * gimp_scale_entry_new (GtkTable *table,
|
|||
gchar *tooltip,
|
||||
gchar *private_tip);
|
||||
|
||||
#define GIMP_RANDOM_SEED_SPINBUTTON(hbox) \
|
||||
GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT( hbox), "spinbutton"))
|
||||
#define GIMP_RANDOM_SEED_SPINBUTTON_ADJ(hbox) \
|
||||
gtk_spin_button_get_adjustment \
|
||||
(GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (hbox), "spinbutton")))
|
||||
|
||||
#define GIMP_RANDOM_SEED_TOGGLEBUTTON(hbox) \
|
||||
GTK_TOGGLE_BUTTON (gtk_object_get_data (GTK_OBJECT (hbox), \
|
||||
"togglebutton"))
|
||||
|
||||
GtkWidget * gimp_random_seed_new (gint *seed,
|
||||
GtkWidget **seed_spinbutton,
|
||||
gint *use_time,
|
||||
GtkWidget **time_button,
|
||||
gint time_true,
|
||||
gint time_false);
|
||||
|
||||
#define GIMP_COORDINATES_CHAINBUTTON(sizeentry) \
|
||||
GIMP_CHAIN_BUTTON (gtk_object_get_data (GTK_OBJECT (sizeentry), \
|
||||
"chainbutton"))
|
||||
|
||||
GtkWidget * gimp_coordinates_new (GimpUnit unit,
|
||||
gchar *unit_format,
|
||||
gboolean menu_show_pixels,
|
||||
|
@ -152,8 +166,6 @@ GtkWidget * gimp_coordinates_new (GimpUnit unit,
|
|||
|
||||
gboolean chainbutton_active,
|
||||
gboolean chain_constrains_ratio,
|
||||
/* return value: */
|
||||
GtkWidget **chainbutton,
|
||||
|
||||
gchar *xlabel,
|
||||
gdouble x,
|
||||
|
@ -178,32 +190,33 @@ GtkWidget * gimp_pixmap_button_new (gchar **xpm_data,
|
|||
* Standard Callbacks
|
||||
*/
|
||||
|
||||
void gimp_toggle_button_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button);
|
||||
|
||||
void gimp_menu_item_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void gimp_toggle_button_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
void gimp_radio_button_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void gimp_radio_button_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
void gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
void gimp_menu_item_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
void gimp_float_adjustment_update (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
void gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
|
||||
void gimp_double_adjustment_update (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
void gimp_float_adjustment_update (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
|
||||
void gimp_unit_menu_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void gimp_double_adjustment_update (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
|
||||
void gimp_unit_menu_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
/*
|
||||
* Helper Functions
|
||||
*/
|
||||
|
||||
/* add aligned label & widget to a table */
|
||||
void gimp_table_attach_aligned (GtkTable *table,
|
||||
gint column,
|
||||
gint row,
|
||||
|
|
|
@ -249,11 +249,12 @@ gimp_gtkrc (void)
|
|||
/**
|
||||
* gimp_path_parse:
|
||||
* @path: A list of directories separated by #G_SEARCHPATH_SEPARATOR.
|
||||
* @max_path: The maximum number of directories to return.
|
||||
* @max_paths: The maximum number of directories to return.
|
||||
* @check: #TRUE if you want the directories to be checked.
|
||||
* @not_found: #
|
||||
* @check_failed: Returns a #GList of path elements for which the
|
||||
* check failed.
|
||||
*
|
||||
* Return: A list of all directories in @path.
|
||||
* Returns: A #GList of all directories in @path.
|
||||
*
|
||||
*/
|
||||
GList *
|
||||
|
|
|
@ -383,7 +383,8 @@ gimp_query_size_box (gchar *title,
|
|||
* @false_button: The string to be shown in the dialog's right button.
|
||||
* @object: The object this query box is associated with.
|
||||
* @signal: The object's signal which will cause the query box to be closed.
|
||||
* @callback: The function which will be called when the user selects "OK".
|
||||
* @callback: The function which will be called when the user clicks one
|
||||
* of the buttons.
|
||||
* @data: The callback's user data.
|
||||
*
|
||||
* Returns: A pointer to the new #GtkDialog.
|
||||
|
|
|
@ -31,23 +31,16 @@
|
|||
|
||||
#include "libgimp-intl.h"
|
||||
|
||||
/*
|
||||
* Forward declarations
|
||||
*/
|
||||
|
||||
static void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button);
|
||||
|
||||
|
||||
/*
|
||||
* Widget Constructors
|
||||
*/
|
||||
|
||||
/**
|
||||
* gimp_option_menu_new:
|
||||
* @menu_only:
|
||||
* @...:
|
||||
* @menu_only: #TRUE if the function should return a #GtkMenu only.
|
||||
* @...: A #NULL terminated @va_list describing the menu items.
|
||||
*
|
||||
* Returns:
|
||||
* Returns: A #GtkOptionMenu or a #GtkMenu (depending on @menu_only).
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -142,13 +135,14 @@ gimp_option_menu_new (gboolean menu_only,
|
|||
|
||||
/**
|
||||
* gimp_option_menu_new2:
|
||||
* @menu_only:
|
||||
* @menu_item_callback:
|
||||
* @data:
|
||||
* @initial:
|
||||
* @...:
|
||||
* @menu_only: #TRUE if the function should return a #GtkMenu only.
|
||||
* @menu_item_callback: The callback each menu item's "activate" signal will
|
||||
* be connected with.
|
||||
* @data: The data which will be passed to gtk_signal_connect().
|
||||
* @initial: The @user_data of the initially selected menu item.
|
||||
* @...: A #NULL terminated @va_list describing the menu items.
|
||||
*
|
||||
* Returns:
|
||||
* Returns: A #GtkOptionMenu or a #GtkMenu (depending on @menu_only).
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -237,8 +231,9 @@ gimp_option_menu_new2 (gboolean menu_only,
|
|||
|
||||
/**
|
||||
* gimp_option_menu_set_history:
|
||||
* @option_menu:
|
||||
* @user_data:
|
||||
* @option_menu: A #GtkOptionMenu as returned by gimp_option_menu_new() or
|
||||
* gimp_option_menu_new2().
|
||||
* @user_data: The @user_data of the menu item you want to select.
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -273,11 +268,11 @@ gimp_option_menu_set_history (GtkOptionMenu *option_menu,
|
|||
|
||||
/**
|
||||
* gimp_radio_group_new:
|
||||
* @in_frame:
|
||||
* @frame_title:
|
||||
* @...:
|
||||
* @in_frame: #TRUE if you want a #GtkFrame around the radio button group.
|
||||
* @frame_title: The title of the Frame or #NULL if you don't want a title.
|
||||
* @...: A #NULL terminated @va_list describing the radio buttons.
|
||||
*
|
||||
* Returns:
|
||||
* Returns: A #GtkFrame or #GtkVbox (depending on @in_frame).
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -368,14 +363,15 @@ gimp_radio_group_new (gboolean in_frame,
|
|||
|
||||
/**
|
||||
* gimp_radio_group_new2:
|
||||
* @in_frame:
|
||||
* @frame_title:
|
||||
* @radio_button_callback:
|
||||
* @data:
|
||||
* @initial:
|
||||
* @...:
|
||||
* @in_frame: #TRUE if you want a #GtkFrame around the radio button group.
|
||||
* @frame_title: The title of the Frame or #NULL if you don't want a title.
|
||||
* @radio_button_callback: The callback each button's "toggled" signal will
|
||||
* be connected with.
|
||||
* @data: The data which will be passed to gtk_signal_connect().
|
||||
* @initial: The @user_data of the initially pressed radio button.
|
||||
* @...: A #NULL terminated @va_list describing the radio buttons.
|
||||
*
|
||||
* Returns:
|
||||
* Returns: A #GtkFrame or #GtkVbox (depending on @in_frame).
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -460,17 +456,21 @@ gimp_radio_group_new2 (gboolean in_frame,
|
|||
|
||||
/**
|
||||
* gimp_spin_button_new:
|
||||
* @adjustment:
|
||||
* @value:
|
||||
* @lower:
|
||||
* @upper:
|
||||
* @step_increment:
|
||||
* @page_increment:
|
||||
* @page_size:
|
||||
* @climb_rate:
|
||||
* @digits:
|
||||
* @adjustment: Returns the spinbutton's #GtkAdjustment.
|
||||
* @value: The initial value of the spinbutton.
|
||||
* @lower: The lower boundary.
|
||||
* @upper: The uppper boundary.
|
||||
* @step_increment: The spinbutton's step increment.
|
||||
* @page_increment: The spinbutton's page increment (mouse button 2).
|
||||
* @page_size: The spinbutton's page size.
|
||||
* @climb_rate: The spinbutton's climb rate.
|
||||
* @digits: The spinbutton's number of decimal digits.
|
||||
*
|
||||
* Returns:
|
||||
* This function is a shortcut for gtk_adjustment_new() and a subsequent
|
||||
* gtk_spin_button_new() and does some more initialisation stuff like
|
||||
* setting a standard minimun horizontal size.
|
||||
*
|
||||
* Returns: A #GtkSpinbutton and it's #GtkAdjustment.
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -512,25 +512,34 @@ gimp_scale_entry_unconstrained_adjustment_callback (GtkAdjustment *adjustment,
|
|||
|
||||
/**
|
||||
* gimp_scale_entry_new:
|
||||
* @table:
|
||||
* @column:
|
||||
* @row:
|
||||
* @text:
|
||||
* @scale_usize:
|
||||
* @spinbutton_usize:
|
||||
* @value:
|
||||
* @lower:
|
||||
* @upper:
|
||||
* @step_increment:
|
||||
* @page_increment:
|
||||
* @digits:
|
||||
* @constrain:
|
||||
* @unconstrained_lower:
|
||||
* @unconstrained_upper:
|
||||
* @tooltip:
|
||||
* @private_tip:
|
||||
* @table: The #GtkTable the widgets will be attached to.
|
||||
* @column: The column to start with.
|
||||
* @row: The row to attach the widgets.
|
||||
* @text: The text for the #GtkLabel which will appear left of the #GtkHScale.
|
||||
* @scale_usize: The minimum horizontal size of the #GtkHScale.
|
||||
* @spinbutton_usize: The minimum horizontal size of the #GtkSpinButton.
|
||||
* @value: The initial value.
|
||||
* @lower: The lower boundary.
|
||||
* @upper: The upper boundary.
|
||||
* @step_increment: The step increment.
|
||||
* @page_increment: The page increment.
|
||||
* @digits: The number of decimal digits.
|
||||
* @constrain: #TRUE if the range of possible values of the #GtkSpinButton
|
||||
* should be the same as of the #GtkHScale.
|
||||
* @unconstrained_lower: The spinbutton's lower boundary
|
||||
* if @constrain == #FALSE.
|
||||
* @unconstrained_upper: The spinbutton's upper boundary
|
||||
* if @constrain == #FALSE.
|
||||
* @tooltip: A tooltip message for the scale and the spinbutton.
|
||||
* @private_tip: The widgets' private_tip (see gimp_help_set_help_data()).
|
||||
*
|
||||
* Returns:
|
||||
* This function creates a #GtkLabel, a #GtkHScale and a #GtkSpinButton and
|
||||
* attaches them to a 3-column #GtkTable.
|
||||
*
|
||||
* Note that if you pass a @tooltip or @private_tip to this function you'll
|
||||
* have to initialize GIMP's help system with gimp_help_init() before using it.
|
||||
*
|
||||
* Returns: The #GtkSpinButton's #GtkAdjustment.
|
||||
*
|
||||
*/
|
||||
GtkObject *
|
||||
|
@ -655,21 +664,24 @@ gimp_random_seed_toggle_update (GtkWidget *widget,
|
|||
|
||||
/**
|
||||
* gimp_random_seed_new:
|
||||
* @seed:
|
||||
* @seed_spinbutton:
|
||||
* @use_time:
|
||||
* @time_button:
|
||||
* @time_true:
|
||||
* @time_false:
|
||||
* @seed: A pointer to the variable which stores the random seed.
|
||||
* @use_time: A pointer to the variable which stores the @use_time
|
||||
* toggle boolean.
|
||||
* @time_true: The value to write to @use_time if the toggle button is checked.
|
||||
* @time_false: The value to write to @use_time if the toggle button is
|
||||
* unchecked.
|
||||
*
|
||||
* Returns:
|
||||
* Note that this widget automatically sets tooltips with
|
||||
* gimp_help_set_help_data(), so you'll have to initialize GIMP's help
|
||||
* system with gimp_help_init() before using it.
|
||||
*
|
||||
* Returns: A #GtkHBox containing a #GtkSpinButton for the random seed and
|
||||
* a #GtkToggleButton for toggling the @use_time behaviour.
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
gimp_random_seed_new (gint *seed,
|
||||
GtkWidget **seed_spinbutton,
|
||||
gint *use_time,
|
||||
GtkWidget **time_button,
|
||||
gint time_true,
|
||||
gint time_false)
|
||||
{
|
||||
|
@ -688,9 +700,6 @@ gimp_random_seed_new (gint *seed,
|
|||
seed);
|
||||
gtk_widget_show (spinbutton);
|
||||
|
||||
if (seed_spinbutton)
|
||||
*seed_spinbutton = spinbutton;
|
||||
|
||||
gimp_help_set_help_data (spinbutton,
|
||||
_("If the \"Time\" button is not pressed, "
|
||||
"use this value for random number generator "
|
||||
|
@ -705,9 +714,6 @@ gimp_random_seed_new (gint *seed,
|
|||
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
if (time_button)
|
||||
*time_button = button;
|
||||
|
||||
gimp_help_set_help_data (button,
|
||||
_("Seed random number generator from the current "
|
||||
"time - this guarantees a reasonable "
|
||||
|
@ -724,6 +730,9 @@ gimp_random_seed_new (gint *seed,
|
|||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
|
||||
*use_time == time_true);
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT (hbox), "spinbutton", spinbutton);
|
||||
gtk_object_set_data (GTK_OBJECT (hbox), "togglebutton", button);
|
||||
|
||||
return hbox;
|
||||
}
|
||||
|
||||
|
@ -799,31 +808,38 @@ gimp_coordinates_callback (GtkWidget *widget,
|
|||
|
||||
/**
|
||||
* gimp_coordinates_new:
|
||||
* @unit:
|
||||
* @unit_format:
|
||||
* @menu_show_pixels:
|
||||
* @menu_show_percent:
|
||||
* @spinbutton_usize:
|
||||
* @update_policy:
|
||||
* @chainbutton_active:
|
||||
* @chain_constrains_ratio:
|
||||
* @chainbutton:
|
||||
* @xlabel:
|
||||
* @x:
|
||||
* @xres:
|
||||
* @lower_boundary_x:
|
||||
* @upper_boundary_x:
|
||||
* @xsize_0:
|
||||
* @xsize_100:
|
||||
* @ylabel:
|
||||
* @y:
|
||||
* @yres:
|
||||
* @lower_boundary_y:
|
||||
* @upper_boundary_y:
|
||||
* @ysize_0:
|
||||
* @ysize_100:
|
||||
* @unit: The unitial unit of the #GimpUnitMenu.
|
||||
* @unit_format: The unit format string as passed to gimp_size_entry_new().
|
||||
* @menu_show_pixels: #TRUE if the #GimpUnitMenu should contain an item for
|
||||
* GIMP_UNIT_PIXEL.
|
||||
* @menu_show_percent: #TRUE if the #GimpUnitMenu should contain an item for
|
||||
* GIMP_UNIT_PERCENT.
|
||||
* @spinbutton_usize: The horizontal usize of the #GimpSizeEntry's
|
||||
* #GtkSpinButton's.
|
||||
* @update_policy: The update policy for the #GimpSizeEntry.
|
||||
* @chainbutton_active: #TRUE if the attached #GimpChainButton should be
|
||||
* active.
|
||||
* @chain_constrains_ratio: #TRUE if the chainbutton should constrain the
|
||||
* fields' aspect ratio. If #FALSE, the values will
|
||||
* be constrained.
|
||||
* @xlabel: The label for the X coordinate.
|
||||
* @x: The initial value of the X coordinate.
|
||||
* @xres: The horizontal resolution in DPI.
|
||||
* @lower_boundary_x: The lower boundary of the X coordinate.
|
||||
* @upper_boundary_x: The upper boundary of the X coordinate.
|
||||
* @xsize_0: The X value which will be treated as 0%.
|
||||
* @xsize_100: The X value which will be treated as 100%.
|
||||
* @ylabel: The label for the Y coordinate.
|
||||
* @y: The initial value of the Y coordinate.
|
||||
* @yres: The vertical resolution in DPI.
|
||||
* @lower_boundary_y: The lower boundary of the Y coordinate.
|
||||
* @upper_boundary_y: The upper boundary of the Y coordinate.
|
||||
* @ysize_0: The Y value which will be treated as 0%.
|
||||
* @ysize_100: The Y value which will be treated as 100%.
|
||||
*
|
||||
* Returns:
|
||||
* Returns: A #GimpSizeEntry with two fields for x/y coordinates/sizes with
|
||||
* a #GimpChainButton attached to constrain either the two fields'
|
||||
* values or the ratio between them.
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -836,8 +852,6 @@ gimp_coordinates_new (GimpUnit unit,
|
|||
|
||||
gboolean chainbutton_active,
|
||||
gboolean chain_constrains_ratio,
|
||||
/* return value: */
|
||||
GtkWidget **chainbutton,
|
||||
|
||||
gchar *xlabel,
|
||||
gdouble x,
|
||||
|
@ -859,7 +873,7 @@ gimp_coordinates_new (GimpUnit unit,
|
|||
GtkObject *adjustment;
|
||||
GtkWidget *spinbutton;
|
||||
GtkWidget *sizeentry;
|
||||
GtkWidget *chainb;
|
||||
GtkWidget *chainbutton;
|
||||
|
||||
spinbutton = gimp_spin_button_new (&adjustment, 1, 0, 1, 1, 10, 1, 1, 2);
|
||||
sizeentry = gimp_size_entry_new (1, unit, unit_format,
|
||||
|
@ -898,18 +912,15 @@ gimp_coordinates_new (GimpUnit unit,
|
|||
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (sizeentry), xlabel, 0, 0, 1.0);
|
||||
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (sizeentry), ylabel, 1, 0, 1.0);
|
||||
|
||||
chainb = gimp_chain_button_new (GIMP_CHAIN_RIGHT);
|
||||
chainbutton = gimp_chain_button_new (GIMP_CHAIN_RIGHT);
|
||||
if (chainbutton_active)
|
||||
gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chainb), TRUE);
|
||||
gtk_table_attach (GTK_TABLE (sizeentry), chainb, 2, 3, 0, 2,
|
||||
gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chainbutton), TRUE);
|
||||
gtk_table_attach (GTK_TABLE (sizeentry), chainbutton, 2, 3, 0, 2,
|
||||
GTK_SHRINK | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
|
||||
gtk_widget_show (chainb);
|
||||
|
||||
if (chainbutton)
|
||||
*chainbutton = chainb;
|
||||
gtk_widget_show (chainbutton);
|
||||
|
||||
gcd = g_new (GimpCoordinatesData, 1);
|
||||
gcd->chainbutton = GIMP_CHAIN_BUTTON (chainb);
|
||||
gcd->chainbutton = GIMP_CHAIN_BUTTON (chainbutton);
|
||||
gcd->chain_constrains_ratio = chain_constrains_ratio;
|
||||
gcd->orig_x = x;
|
||||
gcd->orig_y = y;
|
||||
|
@ -924,15 +935,17 @@ gimp_coordinates_new (GimpUnit unit,
|
|||
GTK_SIGNAL_FUNC (gimp_coordinates_callback),
|
||||
gcd);
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT (sizeentry), "chainbutton", chainbutton);
|
||||
|
||||
return sizeentry;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_pixmap_button_new:
|
||||
* @xpm_data:
|
||||
* @text:
|
||||
* @xpm_data: The XPM data which will be passed to gimp_pixmap_new().
|
||||
* @text: An optional text which will appear right of the pixmap.
|
||||
*
|
||||
* Returns:
|
||||
* Returns: A #GtkButton with a #GimpPixmap and an optional #GtkLabel.
|
||||
*
|
||||
*/
|
||||
GtkWidget *
|
||||
|
@ -980,7 +993,25 @@ gimp_pixmap_button_new (gchar **xpm_data,
|
|||
* Standard Callbacks
|
||||
*/
|
||||
|
||||
static void
|
||||
/**
|
||||
* gimp_toggle_button_sensitive_update:
|
||||
* @toggle_button: The #GtkToggleButton the "set_sensitive" and
|
||||
* "inverse_sensitive" lists are attached to.
|
||||
*
|
||||
* If you attached a pointer to a #GtkWidget with gtk_object_set_data() and
|
||||
* the "set_sensitive" key to the #GtkToggleButton, the sensitive state of
|
||||
* the attached widget will be set according to the toggle button's
|
||||
* "active" state.
|
||||
*
|
||||
* You can attach an arbitrary list of widgets by attaching another
|
||||
* "set_sensitive" data pointer to the first widget (and so on...).
|
||||
*
|
||||
* This function can also set the sensitive state according to the toggle
|
||||
* button's inverse "active" state by attaching widgets with the
|
||||
* "inverse_sensitive" key.
|
||||
*
|
||||
*/
|
||||
void
|
||||
gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button)
|
||||
{
|
||||
GtkWidget *set_sensitive;
|
||||
|
@ -1009,8 +1040,11 @@ gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button)
|
|||
|
||||
/**
|
||||
* gimp_toggle_button_update:
|
||||
* @widget:
|
||||
* @data:
|
||||
* @widget: A #GtkToggleButton.
|
||||
* @data: A pointer to a #gint variable which will store the value of
|
||||
* gtk_toggle_button_get_active().
|
||||
*
|
||||
* Note that this function calls gimp_toggle_button_sensitive_update().
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -1029,27 +1063,13 @@ gimp_toggle_button_update (GtkWidget *widget,
|
|||
gimp_toggle_button_sensitive_update (GTK_TOGGLE_BUTTON (widget));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_menu_item_update:
|
||||
* @widget:
|
||||
* @data:
|
||||
*
|
||||
*/
|
||||
void
|
||||
gimp_menu_item_update (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
gint *item_val;
|
||||
|
||||
item_val = (gint *) data;
|
||||
|
||||
*item_val = (gint) gtk_object_get_user_data (GTK_OBJECT (widget));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_radio_button_update:
|
||||
* @widget:
|
||||
* @data:
|
||||
* @widget: A #GtkRadioButton.
|
||||
* @data: A pointer to a #gint variable which will store the value of
|
||||
* (#gint) gtk_object_get_user_data().
|
||||
*
|
||||
* Note that this function calls gimp_toggle_button_sensitive_update().
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -1068,10 +1088,32 @@ gimp_radio_button_update (GtkWidget *widget,
|
|||
gimp_toggle_button_sensitive_update (GTK_TOGGLE_BUTTON (widget));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_menu_item_update:
|
||||
* @widget: A #GtkMenuItem.
|
||||
* @data: A pointer to a #gint variable which will store the value of
|
||||
* (#gint) gtk_object_get_user_data().
|
||||
*
|
||||
*/
|
||||
void
|
||||
gimp_menu_item_update (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
gint *item_val;
|
||||
|
||||
item_val = (gint *) data;
|
||||
|
||||
*item_val = (gint) gtk_object_get_user_data (GTK_OBJECT (widget));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_int_adjustment_update:
|
||||
* @adjustment:
|
||||
* @data:
|
||||
* @adjustment: A #GtkAdjustment.
|
||||
* @data: A pointer to a #gint variable which will store the adjustment's
|
||||
* value.
|
||||
*
|
||||
* Note that the #GtkAdjustment's value (which is a #gfloat) will be rounded
|
||||
* with (#gint) (value + 0.5).
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -1086,8 +1128,9 @@ gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
|||
|
||||
/**
|
||||
* gimp_float_adjustment_update:
|
||||
* @adjustment:
|
||||
* @data:
|
||||
* @adjustment: A #GtkAdjustment.
|
||||
* @data: A pointer to a #gfloat varaiable which willl store the adjustment's
|
||||
* value.
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -1102,8 +1145,9 @@ gimp_float_adjustment_update (GtkAdjustment *adjustment,
|
|||
|
||||
/**
|
||||
* gimp_double_adjustment_update:
|
||||
* @adjustment:
|
||||
* @data:
|
||||
* @adjustment: A #GtkAdjustment.
|
||||
* @data: A pointer to a #gdouble variable which will store the adjustment's
|
||||
* value.
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -1118,8 +1162,17 @@ gimp_double_adjustment_update (GtkAdjustment *adjustment,
|
|||
|
||||
/**
|
||||
* gimp_unit_menu_update:
|
||||
* @widget:
|
||||
* @data:
|
||||
* @widget: A #GimpUnitMenu.
|
||||
* @data: A pointer to a #GimpUnit variable which will store the unit menu's
|
||||
* value.
|
||||
*
|
||||
* This callback can set the number of decimal digits of an arbitrary number
|
||||
* of #GtkSpinButton's. To use this functionality, attach the spinbuttons
|
||||
* as list of data pointers attached with gtk_object_set_data() with the
|
||||
* "set_digits" key.
|
||||
*
|
||||
* See gimp_toggle_button_sensitive_update() for a description of how
|
||||
* to set up the list.
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
@ -1152,15 +1205,19 @@ gimp_unit_menu_update (GtkWidget *widget,
|
|||
|
||||
/**
|
||||
* gimp_table_attach_aligned:
|
||||
* @table:
|
||||
* @column:
|
||||
* @row:
|
||||
* @label_text:
|
||||
* @xalign:
|
||||
* @yalign:
|
||||
* @widget:
|
||||
* @colspan:
|
||||
* @left_align:
|
||||
* @table: The #GtkTable the widgets will be attached to.
|
||||
* @column: The column to start with.
|
||||
* @row: The row to attach the eidgets.
|
||||
* @label_text: The text for the #GtkLabel which will be attached left of the
|
||||
* widget.
|
||||
* @xalign: The horizontal alignment of the #GtkLabel.
|
||||
* @yalign: The vertival alignment of the #GtkLabel.
|
||||
* @widget: The #GtkWidget to attach right of the label.
|
||||
* @colspan: The number of columns the widget will use.
|
||||
* @left_align: #TRUE if the widget should be left-aligned.
|
||||
*
|
||||
* Note that the @label_text can be #NULL and that the widget will be attached
|
||||
* starting at (@column + 1) in this case, too.
|
||||
*
|
||||
*/
|
||||
void
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* For information look into the C source or the html documentation */
|
||||
|
||||
/*
|
||||
* Widget Constructors
|
||||
*/
|
||||
|
@ -110,13 +112,13 @@ GtkWidget * gimp_spin_button_new (/* return value: */
|
|||
GTK_HSCALE (gtk_object_get_data (GTK_OBJECT(adj), "scale"))
|
||||
#define GIMP_SCALE_ENTRY_SCALE_ADJ(adj) \
|
||||
gtk_range_get_adjustment \
|
||||
(GTK_RANGE (gtk_object_get_data (GTK_OBJECT(adj), "scale")))
|
||||
(GTK_RANGE (gtk_object_get_data (GTK_OBJECT (adj), "scale")))
|
||||
|
||||
#define GIMP_SCALE_ENTRY_SPINBUTTON(adj) \
|
||||
GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT(adj), "spinbutton"))
|
||||
GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (adj), "spinbutton"))
|
||||
#define GIMP_SCALE_ENTRY_SPINBUTTON_ADJ(adj) \
|
||||
gtk_spin_button_get_adjustment \
|
||||
(GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT(adj), "spinbutton")))
|
||||
(GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (adj), "spinbutton")))
|
||||
|
||||
GtkObject * gimp_scale_entry_new (GtkTable *table,
|
||||
gint column,
|
||||
|
@ -136,13 +138,25 @@ GtkObject * gimp_scale_entry_new (GtkTable *table,
|
|||
gchar *tooltip,
|
||||
gchar *private_tip);
|
||||
|
||||
#define GIMP_RANDOM_SEED_SPINBUTTON(hbox) \
|
||||
GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT( hbox), "spinbutton"))
|
||||
#define GIMP_RANDOM_SEED_SPINBUTTON_ADJ(hbox) \
|
||||
gtk_spin_button_get_adjustment \
|
||||
(GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (hbox), "spinbutton")))
|
||||
|
||||
#define GIMP_RANDOM_SEED_TOGGLEBUTTON(hbox) \
|
||||
GTK_TOGGLE_BUTTON (gtk_object_get_data (GTK_OBJECT (hbox), \
|
||||
"togglebutton"))
|
||||
|
||||
GtkWidget * gimp_random_seed_new (gint *seed,
|
||||
GtkWidget **seed_spinbutton,
|
||||
gint *use_time,
|
||||
GtkWidget **time_button,
|
||||
gint time_true,
|
||||
gint time_false);
|
||||
|
||||
#define GIMP_COORDINATES_CHAINBUTTON(sizeentry) \
|
||||
GIMP_CHAIN_BUTTON (gtk_object_get_data (GTK_OBJECT (sizeentry), \
|
||||
"chainbutton"))
|
||||
|
||||
GtkWidget * gimp_coordinates_new (GimpUnit unit,
|
||||
gchar *unit_format,
|
||||
gboolean menu_show_pixels,
|
||||
|
@ -152,8 +166,6 @@ GtkWidget * gimp_coordinates_new (GimpUnit unit,
|
|||
|
||||
gboolean chainbutton_active,
|
||||
gboolean chain_constrains_ratio,
|
||||
/* return value: */
|
||||
GtkWidget **chainbutton,
|
||||
|
||||
gchar *xlabel,
|
||||
gdouble x,
|
||||
|
@ -178,32 +190,33 @@ GtkWidget * gimp_pixmap_button_new (gchar **xpm_data,
|
|||
* Standard Callbacks
|
||||
*/
|
||||
|
||||
void gimp_toggle_button_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button);
|
||||
|
||||
void gimp_menu_item_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void gimp_toggle_button_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
void gimp_radio_button_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void gimp_radio_button_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
void gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
void gimp_menu_item_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
void gimp_float_adjustment_update (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
void gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
|
||||
void gimp_double_adjustment_update (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
void gimp_float_adjustment_update (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
|
||||
void gimp_unit_menu_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
void gimp_double_adjustment_update (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
|
||||
void gimp_unit_menu_update (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
/*
|
||||
* Helper Functions
|
||||
*/
|
||||
|
||||
/* add aligned label & widget to a table */
|
||||
void gimp_table_attach_aligned (GtkTable *table,
|
||||
gint column,
|
||||
gint row,
|
||||
|
|
|
@ -650,8 +650,8 @@ blur_dialog (void)
|
|||
gtk_widget_show (table);
|
||||
|
||||
/* Random Seed */
|
||||
seed_hbox = gimp_random_seed_new (&pivals.blur_seed, NULL,
|
||||
&pivals.seed_type, NULL,
|
||||
seed_hbox = gimp_random_seed_new (&pivals.blur_seed,
|
||||
&pivals.seed_type,
|
||||
SEED_TIME, SEED_USER);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Random Seed:"), 1.0, 0.5,
|
||||
|
|
|
@ -464,7 +464,7 @@ gauss_iir2_dialog (gint32 image_ID,
|
|||
GIMP_SIZE_ENTRY_UPDATE_SIZE,
|
||||
|
||||
b2vals.horizontal == b2vals.vertical,
|
||||
FALSE, NULL,
|
||||
FALSE,
|
||||
|
||||
_("Horizontal:"), b2vals.horizontal, xres,
|
||||
0, 8 * MAX (drawable->width, drawable->height),
|
||||
|
|
|
@ -461,7 +461,7 @@ gauss_rle2_dialog (gint32 image_ID,
|
|||
GIMP_SIZE_ENTRY_UPDATE_SIZE,
|
||||
|
||||
b2vals.horizontal == b2vals.vertical,
|
||||
FALSE, NULL,
|
||||
FALSE,
|
||||
|
||||
_("Horizontal:"), b2vals.horizontal, xres,
|
||||
0, 8 * MAX (drawable->width, drawable->height),
|
||||
|
|
|
@ -317,8 +317,8 @@ plasma_dialog (void)
|
|||
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
||||
seed_hbox = gimp_random_seed_new (&pvals.seed, NULL,
|
||||
&pvals.timeseed, NULL,
|
||||
seed_hbox = gimp_random_seed_new (&pvals.seed,
|
||||
&pvals.timeseed,
|
||||
TRUE, FALSE);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Random Seed:"), 1.0, 0.5,
|
||||
|
|
|
@ -738,8 +738,8 @@ randomize_dialog (void)
|
|||
gtk_widget_show(table);
|
||||
|
||||
/* Random Seed */
|
||||
seed_hbox = gimp_random_seed_new (&pivals.rndm_seed, NULL,
|
||||
&pivals.seed_type, NULL,
|
||||
seed_hbox = gimp_random_seed_new (&pivals.rndm_seed,
|
||||
&pivals.seed_type,
|
||||
SEED_TIME, SEED_USER);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Random Seed:"), 1.0, 0.5,
|
||||
|
|
|
@ -549,8 +549,8 @@ solid_noise_dialog (void)
|
|||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
||||
/* Random Seed */
|
||||
seed_hbox = gimp_random_seed_new (&snvals.seed, NULL,
|
||||
&snvals.timeseed, NULL,
|
||||
seed_hbox = gimp_random_seed_new (&snvals.seed,
|
||||
&snvals.timeseed,
|
||||
TRUE, FALSE);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Random Seed:"), 1.0, 0.5,
|
||||
|
|
|
@ -403,7 +403,7 @@ spread_dialog (gint32 image_ID,
|
|||
GIMP_SIZE_ENTRY_UPDATE_SIZE,
|
||||
|
||||
spvals.spread_amount_x == spvals.spread_amount_y,
|
||||
FALSE, NULL,
|
||||
FALSE,
|
||||
|
||||
_("Horizontal:"), spvals.spread_amount_x, xres,
|
||||
0, MAX (drawable->width, drawable->height),
|
||||
|
|
|
@ -415,7 +415,7 @@ tile_dialog (gint32 image_ID,
|
|||
sizeentry = gimp_coordinates_new (unit, "%a", TRUE, TRUE, 75,
|
||||
GIMP_SIZE_ENTRY_UPDATE_SIZE,
|
||||
|
||||
tvals.constrain, TRUE, &tint.chainbutton,
|
||||
tvals.constrain, TRUE,
|
||||
|
||||
_("Width:"), width, xres,
|
||||
1, GIMP_MAX_IMAGE_SIZE,
|
||||
|
@ -430,6 +430,7 @@ tile_dialog (gint32 image_ID,
|
|||
gtk_widget_show (sizeentry);
|
||||
|
||||
tint.sizeentry = sizeentry;
|
||||
tint.chainbutton = GTK_WIDGET (GIMP_COORDINATES_CHAINBUTTON (sizeentry));
|
||||
|
||||
toggle = gtk_check_button_new_with_label (_("Create New Image"));
|
||||
gtk_table_attach (GTK_TABLE (sizeentry), toggle, 0, 4, 2, 3,
|
||||
|
|
|
@ -2864,7 +2864,7 @@ dlg_make_page_settings (GFlareDialog *dlg,
|
|||
gimp_coordinates_new (gimp_image_get_unit (image_ID), "%a",
|
||||
TRUE, TRUE, 75, GIMP_SIZE_ENTRY_UPDATE_SIZE,
|
||||
|
||||
FALSE, FALSE, &chain,
|
||||
FALSE, FALSE,
|
||||
|
||||
_("X:"), pvals.xcenter, xres,
|
||||
-GIMP_MAX_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE,
|
||||
|
@ -2873,6 +2873,9 @@ dlg_make_page_settings (GFlareDialog *dlg,
|
|||
_("Y:"), pvals.ycenter, yres,
|
||||
-GIMP_MAX_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE,
|
||||
0, gimp_drawable_height (drawable->id));
|
||||
|
||||
chain = GTK_WIDGET (GIMP_COORDINATES_CHAINBUTTON (center));
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (center), 4);
|
||||
gtk_container_add (GTK_CONTAINER (frame), center);
|
||||
gtk_signal_connect (GTK_OBJECT (center), "value_changed",
|
||||
|
@ -4094,9 +4097,13 @@ ed_make_page_sflare (GFlareEditor *ed,
|
|||
gtk_box_pack_start (GTK_BOX (seed_hbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
seed = gimp_random_seed_new (&gflare->sflare_seed, &entry,
|
||||
&gflare->sflare_seed_time, &toggle,
|
||||
seed = gimp_random_seed_new (&gflare->sflare_seed,
|
||||
&gflare->sflare_seed_time,
|
||||
TRUE, FALSE);
|
||||
|
||||
entry = GTK_WIDGET (GIMP_RANDOM_SEED_SPINBUTTON (seed));
|
||||
toggle = GTK_WIDGET (GIMP_RANDOM_SEED_TOGGLEBUTTON (seed));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (seed_hbox), seed, FALSE, TRUE, 0);
|
||||
gtk_widget_show (seed);
|
||||
|
||||
|
|
Loading…
Reference in New Issue