guard old functions using GIMP_DISABLE_DEPRECATED. Added a note to the

2003-11-14  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpwidgets.[ch]: guard old functions using
	GIMP_DISABLE_DEPRECATED. Added a note to the docs what functions
	should be used instead.

2003-11-14  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/Makefile.am: tell gtk-doc about
	GIMP_DISABLE_DEPRECATED.

	* libgimpwidgets/libgimpwidgets-sections.txt: added new functions.

	* libgimpwidgets/tmpl/gimpwidgets.sgml: removed outdated docs of
	deprecated functions.
This commit is contained in:
Sven Neumann 2003-11-14 20:22:05 +00:00 committed by Sven Neumann
parent 178c225318
commit cc718bfa6b
7 changed files with 119 additions and 177 deletions

View file

@ -1,3 +1,9 @@
2003-11-14 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpwidgets.[ch]: guard old functions using
GIMP_DISABLE_DEPRECATED. Added a note to the docs what functions
should be used instead.
2003-11-14 Manish Singh <yosh@gimp.org>
* libgimpwidgets/gimpwidgets.[ch]: add gimp_int_option_menu_set_history

View file

@ -1,3 +1,13 @@
2003-11-14 Sven Neumann <sven@gimp.org>
* libgimpwidgets/Makefile.am: tell gtk-doc about
GIMP_DISABLE_DEPRECATED.
* libgimpwidgets/libgimpwidgets-sections.txt: added new functions.
* libgimpwidgets/tmpl/gimpwidgets.sgml: removed outdated docs of
deprecated functions.
2003-11-13 Sven Neumann <sven@gimp.org>
* app/app-sections.txt: updated.

View file

@ -13,7 +13,7 @@ DOC_SOURCE_DIR = $(top_srcdir)/$(DOC_MODULE)
SCANGOBJ_OPTIONS =
# Extra options to supply to gtkdoc-scan
SCAN_OPTIONS =
SCAN_OPTIONS = --deprecated-guards="GIMP_DISABLE_DEPRECATED"
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS = --sgml-mode --output-format=xml

View file

@ -480,11 +480,14 @@ GIMP_STOCK_WILBER_EEK
<SECTION>
<FILE>gimpwidgets</FILE>
<TITLE>GimpWidgets</TITLE>
gimp_int_option_menu_new
gimp_int_option_menu_set_history
gimp_option_menu_new
gimp_option_menu_new2
gimp_option_menu_set_history
gimp_option_menu_set_sensitive
GimpOptionMenuSensitivityCallback
gimp_int_radio_group_new
gimp_radio_group_new
gimp_radio_group_new2
gimp_radio_group_set_active

View file

@ -15,48 +15,30 @@ helper functions.
</para>
<!-- ##### FUNCTION gimp_option_menu_new ##### -->
<!-- ##### FUNCTION gimp_int_option_menu_new ##### -->
<para>
The @va_list describing the #GtkMenuItem's has the following format:
</para>
<informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2"><colspec colwidth="4*"/><colspec colwidth="8*"/>
<tbody>
@menu_only:
@menu_item_callback:
@menu_item_callback_data:
@initial:
@Varargs:
@Returns:
<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>
<!-- ##### FUNCTION gimp_int_option_menu_set_history ##### -->
<para>
<row>
<entry>#gpointer data,</entry>
<entry>The callback data which will be used in gtk_signal_connect().</entry>
</row>
</para>
<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>
@option_menu:
@item_data:
<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>
<!-- ##### FUNCTION gimp_option_menu_new ##### -->
<para>
</para>
@ -68,30 +50,6 @@ gtk_object_set_user_data().</entry>
<!-- ##### 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:
@ -131,48 +89,22 @@ gtk_object_set_user_data().</entry>
@Returns:
<!-- ##### FUNCTION gimp_radio_group_new ##### -->
<!-- ##### FUNCTION gimp_int_radio_group_new ##### -->
<para>
The @va_list describing the #GtkRadioButton's has the following format:
</para>
<informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2"><colspec colwidth="4*"/><colspec colwidth="8*"/>
<tbody>
@in_frame:
@frame_title:
@radio_button_callback:
@radio_button_callback_data:
@initial:
@Varargs:
@Returns:
<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>
<!-- ##### FUNCTION gimp_radio_group_new ##### -->
<para>
</para>
@ -185,30 +117,6 @@ gtk_object_set_user_data().</entry>
<!-- ##### 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:

View file

@ -51,6 +51,8 @@
* @menu_only: %TRUE if the function should return a #GtkMenu only.
* @...: A %NULL-terminated @va_list describing the menu items.
*
* DEPRECATED. Use gimp_int_option_menu_new() instead.
*
* Convenience function to create a #GtkOptionMenu or a #GtkMenu.
*
* Returns: A #GtkOptionMenu or a #GtkMenu (depending on @menu_only).
@ -165,6 +167,8 @@ gimp_option_menu_new (gboolean menu_only,
* @initial: The @item_data of the initially selected menu item.
* @...: A %NULL-terminated @va_list describing the menu items.
*
* DEPRECATED. Use gimp_int_option_menu_new() instead.
*
* Convenience function to create a #GtkOptionMenu or a #GtkMenu.
*
* Returns: A #GtkOptionMenu or a #GtkMenu (depending on @menu_only).
@ -274,9 +278,10 @@ gimp_option_menu_new2 (gboolean menu_only,
* @...: A %NULL-terminated @va_list describing the menu items.
*
* Convenience function to create a #GtkOptionMenu or a #GtkMenu. This
* function does the same thing as gimp_option_menu_new2(), but it takes
* integers as @item_data instead of pointers, since that is a very
* common case (mapping an enum to a menu).
* function does the same thing as the deprecated function
* gimp_option_menu_new2(), but it takes integers as @item_data
* instead of pointers, since that is a very common case (mapping an
* enum to a menu).
*
* Returns: A #GtkOptionMenu or a #GtkMenu (depending on @menu_only).
**/
@ -383,9 +388,12 @@ gimp_int_option_menu_new (gboolean menu_only,
* gimp_option_menu_new2().
* @item_data: The @item_data of the menu item you want to select.
*
* Iterates over all entries in a #GtkOptionMenu and selects the one with the
* matching @item_data. Probably only makes sense to use with a #GtkOptionMenu
* that was created using gimp_option_menu_new() or gimp_option_menu_new2().
* DEPRECATED. Use gimp_int_option_menu_set_history() instead.
*
* Iterates over all entries in a #GtkOptionMenu and selects the one
* with the matching @item_data. Probably only makes sense to use with
* a #GtkOptionMenu that was created using gimp_option_menu_new() or
* gimp_option_menu_new2().
**/
void
gimp_option_menu_set_history (GtkOptionMenu *option_menu,
@ -484,6 +492,8 @@ gimp_option_menu_set_sensitive (GtkOptionMenu *option_menu,
* @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.
*
* DEPRECATED. Use gimp_int_radio_group_new() instead.
*
* Convenience function to create a group of radio buttons embedded into
* a #GtkFrame or #GtkVbox.
*
@ -595,6 +605,8 @@ gimp_radio_group_new (gboolean in_frame,
* @...: A %NULL-terminated @va_list describing
* the radio buttons.
*
* DEPRECATED. Use gimp_int_radio_group_new() instead.
*
* Convenience function to create a group of radio buttons embedded into
* a #GtkFrame or #GtkVbox.
*

View file

@ -60,49 +60,48 @@ G_BEGIN_DECLS
* Widget Constructors
*/
GtkWidget * gimp_option_menu_new (gboolean menu_only,
GtkWidget * gimp_int_option_menu_new (gboolean menu_only,
GCallback menu_item_callback,
gpointer menu_item_callback_data,
gint initial, /* item_data */
/* specify menu items as va_list:
* gchar *label,
* GCallback callback,
* gpointer callback_data,
* gpointer item_data,
* GtkWidget **widget_ptr,
* gboolean active
*/
/* specify menu items as va_list:
* gchar *label,
* gint item_data,
* GtkWidget **widget_ptr,
*/
...);
...);
GtkWidget * gimp_option_menu_new2 (gboolean menu_only,
GCallback menu_item_callback,
gpointer menu_item_callback_data,
gpointer initial, /* item_data */
void gimp_int_option_menu_set_history (GtkOptionMenu *option_menu,
gint item_data);
/* specify menu items as va_list:
* gchar *label,
* gpointer item_data,
* GtkWidget **widget_ptr,
*/
#ifndef GIMP_DISABLE_DEPRECATED
GtkWidget * gimp_option_menu_new (gboolean menu_only,
...);
/* specify menu items as va_list:
* gchar *label,
* GCallback callback,
* gpointer callback_data,
* gpointer item_data,
* GtkWidget **widget_ptr,
* gboolean active
*/
GtkWidget * gimp_int_option_menu_new (gboolean menu_only,
GCallback menu_item_callback,
gpointer menu_item_callback_data,
gint initial, /* item_data */
...);
GtkWidget * gimp_option_menu_new2 (gboolean menu_only,
GCallback menu_item_callback,
gpointer menu_item_callback_data,
gpointer initial, /* item_data */
/* specify menu items as va_list:
* gchar *label,
* gint item_data,
* GtkWidget **widget_ptr,
*/
...);
void gimp_option_menu_set_history (GtkOptionMenu *option_menu,
gpointer item_data);
void gimp_int_option_menu_set_history (GtkOptionMenu *option_menu,
gint item_data);
/* specify menu items as va_list:
* gchar *label,
* gpointer item_data,
* GtkWidget **widget_ptr,
*/
...);
void gimp_option_menu_set_history (GtkOptionMenu *option_menu,
gpointer item_data);
typedef gboolean (*GimpOptionMenuSensitivityCallback) (gpointer item_data,
gpointer callback_data);
@ -110,6 +109,24 @@ void gimp_option_menu_set_sensitive (GtkOptionMenu *option_menu,
GimpOptionMenuSensitivityCallback callback,
gpointer callback_data);
#endif /* GIMP_DISABLE_DEPRECATED */
GtkWidget * gimp_int_radio_group_new (gboolean in_frame,
const gchar *frame_title,
GCallback radio_button_callback,
gpointer radio_button_callback_data,
gint initial, /* item_data */
/* specify radio buttons as va_list:
* const gchar *label,
* gint item_data,
* GtkWidget **widget_ptr,
*/
...);
#ifndef GIMP_DISABLE_DEPRECATED
GtkWidget * gimp_radio_group_new (gboolean in_frame,
const gchar *frame_title,
@ -123,7 +140,6 @@ GtkWidget * gimp_radio_group_new (gboolean in_frame,
*/
...);
GtkWidget * gimp_radio_group_new2 (gboolean in_frame,
const gchar *frame_title,
GCallback radio_button_callback,
@ -137,23 +153,10 @@ GtkWidget * gimp_radio_group_new2 (gboolean in_frame,
*/
...);
GtkWidget * gimp_int_radio_group_new (gboolean in_frame,
const gchar *frame_title,
GCallback radio_button_callback,
gpointer radio_button_callback_data,
gint initial, /* item_data */
/* specify radio buttons as va_list:
* const gchar *label,
* gint item_data,
* GtkWidget **widget_ptr,
*/
...);
void gimp_radio_group_set_active (GtkRadioButton *radio_button,
gpointer item_data);
#endif /* GIMP_DISABLE_DEPRECATED */
GtkWidget * gimp_spin_button_new (/* return value: */
GtkObject **adjustment,