diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-11-25 06:51:19 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-11-25 06:51:19 +0000 |
commit | 4896e24bb1121bf114f9daf25a105f8a815066ff (patch) | |
tree | f124808c75f514a4aeb5ba043f06e9e3892f1560 | |
parent | 1719428849826d9baf80dcce3eb0059997919b6b (diff) | |
download | gtk+-4896e24bb1121bf114f9daf25a105f8a815066ff.tar.gz |
Require gtk-doc 1.8
2007-11-25 Matthias Clasen <mclasen@redhat.com>
* configure.in: Require gtk-doc 1.8
* */*.c: Use gtk-doc abbreviations for examples in docs.
svn path=/trunk/; revision=19041
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | gdk/gdk.c | 20 | ||||
-rw-r--r-- | gdk/gdkdisplaymanager.c | 6 | ||||
-rw-r--r-- | gdk/gdkevents.c | 11 | ||||
-rw-r--r-- | gtk/gtkaboutdialog.c | 4 | ||||
-rw-r--r-- | gtk/gtkcellrenderer.c | 11 | ||||
-rw-r--r-- | gtk/gtkdialog.c | 16 | ||||
-rw-r--r-- | gtk/gtkfilechooser.c | 48 | ||||
-rw-r--r-- | gtk/gtkfilefilter.c | 7 | ||||
-rw-r--r-- | gtk/gtkiconview.c | 4 | ||||
-rw-r--r-- | gtk/gtklabel.c | 6 | ||||
-rw-r--r-- | gtk/gtkliststore.c | 4 | ||||
-rw-r--r-- | gtk/gtkmessagedialog.c | 5 | ||||
-rw-r--r-- | gtk/gtknotebook.c | 5 | ||||
-rw-r--r-- | gtk/gtkprintoperation.c | 23 | ||||
-rw-r--r-- | gtk/gtkradioaction.c | 6 | ||||
-rw-r--r-- | gtk/gtkrc.c | 11 | ||||
-rw-r--r-- | gtk/gtkrecentfilter.c | 7 | ||||
-rw-r--r-- | gtk/gtktreeselection.c | 4 | ||||
-rw-r--r-- | gtk/gtktreestore.c | 4 | ||||
-rw-r--r-- | gtk/gtktreeviewcolumn.c | 6 | ||||
-rw-r--r-- | gtk/gtkuimanager.c | 6 | ||||
-rw-r--r-- | gtk/gtkwidget.c | 35 | ||||
-rw-r--r-- | gtk/gtkwindow.c | 15 |
25 files changed, 136 insertions, 138 deletions
@@ -1,5 +1,11 @@ 2007-11-25 Matthias Clasen <mclasen@redhat.com> + * configure.in: Require gtk-doc 1.8 + + * */*.c: Use gtk-doc abbreviations for examples in docs. + +2007-11-25 Matthias Clasen <mclasen@redhat.com> + * gtk/gtktreeview.c (gtk_tree_view_set_show_expanders): Fix a typo. (#498922) diff --git a/configure.in b/configure.in index 16996615d5..9c2cc9b833 100644 --- a/configure.in +++ b/configure.in @@ -220,7 +220,7 @@ AC_ARG_ENABLE(xkb, AC_ARG_ENABLE(xinerama, [AC_HELP_STRING([--enable-xinerama], [support xinerama extension if available [default=yes]])],, - [enable_xinerama="yes"]) + [enable_xinerama="no"]) AC_ARG_ENABLE(rebuilds, [AC_HELP_STRING([--disable-rebuilds], [disable all source autogeneration rules])],, @@ -1639,7 +1639,7 @@ fi # Checks for gtk-doc and docbook-tools ################################################## -GTK_DOC_CHECK([1.6]) +GTK_DOC_CHECK([1.8]) AC_CHECK_PROG(DB2HTML, db2html, true, false) AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML) @@ -504,18 +504,18 @@ gdk_threads_dispatch_free (gpointer data) * running in thread A and accessing @self after it has been finalized * in thread B: * - * <informalexample><programlisting> + * |[ * static gboolean * idle_callback (gpointer data) * { - * // gdk_threads_enter(); would be needed for g_idle_add() + * /* gdk_threads_enter(); would be needed for g_idle_add() */ * * SomeWidget *self = data; - * /<!-- -->* do stuff with self *<!-- -->/ + * /* do stuff with self */ * * self->idle_id = 0; * - * // gdk_threads_leave(); would be needed for g_idle_add() + * /* gdk_threads_leave(); would be needed for g_idle_add() */ * return FALSE; * } * @@ -523,7 +523,7 @@ gdk_threads_dispatch_free (gpointer data) * some_widget_do_stuff_later (SomeWidget *self) * { * self->idle_id = gdk_threads_add_idle (idle_callback, self) - * // using g_idle_add() here would require thread protection in the callback + * /* using g_idle_add() here would require thread protection in the callback */ * } * * static void @@ -534,7 +534,7 @@ gdk_threads_dispatch_free (gpointer data) * g_source_remove (self->idle_id); * G_OBJECT_CLASS (parent_class)->finalize (object); * } - * </programlisting></informalexample> + * ]| * * Return value: the ID (greater than 0) of the event source. * @@ -610,12 +610,12 @@ gdk_threads_add_idle (GSourceFunc function, * This variant of g_timeout_add_full() can be thought of a MT-safe version * for GTK+ widgets for the following use case: * - * <informalexample><programlisting> + * |[ * static gboolean timeout_callback (gpointer data) * { * SomeWidget *self = data; * - * /<!-- -->* do stuff with self *<!-- -->/ + * /* do stuff with self */ * * self->timeout_id = 0; * @@ -629,14 +629,14 @@ gdk_threads_add_idle (GSourceFunc function, * * static void some_widget_finalize (GObject *object) * { - * SomeWidget *self = SOME_WIDGET(object); + * SomeWidget *self = SOME_WIDGET (object); * * if (self->timeout_id) * g_source_remove (self->timeout_id); * * G_OBJECT_CLASS (parent_class)->finalize (object); * } - * </programlisting></informalexample> + * ]| * * Return value: the ID (greater than 0) of the event source. * diff --git a/gdk/gdkdisplaymanager.c b/gdk/gdkdisplaymanager.c index dc98b1a28b..77c5a0578c 100644 --- a/gdk/gdkdisplaymanager.c +++ b/gdk/gdkdisplaymanager.c @@ -188,10 +188,8 @@ gdk_display_manager_get_default_display (GdkDisplayManager *display_manager) * gdk_display_get_default: * * Gets the default #GdkDisplay. This is a convenience - * function for: - * <programlisting> - * gdk_display_manager_get_default_display (gdk_display_manager_get ()) - * </programlisting> + * function for + * <literal>gdk_display_manager_get_default_display (gdk_display_manager_get ())</literal>. * * Returns: a #GdkDisplay, or %NULL if there is no default * display. diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c index 1c58aadc89..f81d5eb363 100644 --- a/gdk/gdkevents.c +++ b/gdk/gdkevents.c @@ -843,14 +843,15 @@ gdk_event_get_axis (GdkEvent *event, * core pointer. Coordinate extraction, processing and requesting more * motion events from a %GDK_MOTION_NOTIFY event usually works like this: * - * <informalexample><programlisting> - * { // motion_event handler + * |[ + * { + * /* motion_event handler */ * x = motion_event->x; * y = motion_event->y; - * ; // handle (x,y) motion - * gdk_event_request_motions (motion_event); // handles is_hint events + * /* handle (x,y) motion */ + * gdk_event_request_motions (motion_event); /* handles is_hint events */ * } - * </programlisting></informalexample> + * ]| * * Since: 2.12 **/ diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c index 13c7fa8e16..8af1c1b2d6 100644 --- a/gtk/gtkaboutdialog.c +++ b/gtk/gtkaboutdialog.c @@ -1452,9 +1452,9 @@ gtk_about_dialog_get_translator_credits (GtkAboutDialog *about) * of the language which is currently used in the user interface. * Using gettext(), a simple way to achieve that is to mark the * string for translation: - * <informalexample><programlisting> + * |[ * gtk_about_dialog_set_translator_credits (about, _("translator-credits")); - * </programlisting></informalexample> + * ]| * It is a good idea to use the customary msgid "translator-credits" for this * purpose, since translators will already know the purpose of that msgid, and * since #GtkAboutDialog will detect if "translator-credits" is untranslated diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c index 28d200fd8e..71dba709b7 100644 --- a/gtk/gtkcellrenderer.c +++ b/gtk/gtkcellrenderer.c @@ -139,8 +139,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class) * continue to use the same kind of widget for editing in future * releases, therefore you should check the type of @editable * before doing any specific setup, as in the following example: - * - * <informalexample><programlisting> + * |[ * static void * text_editing_started (GtkCellRenderer *cell, * GtkCellEditable *editable, @@ -150,13 +149,13 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class) * if (GTK_IS_ENTRY (editable)) * { * GtkEntry *entry = GTK_ENTRY (editable); - * <!-- --> - * /<!-- -->* ... create a GtkEntryCompletion *<!-- -->/ - * <!-- --> + * + * /* ... create a GtkEntryCompletion */ + * * gtk_entry_set_completion (entry, completion); * } * } - * </programlisting></informalexample> + * ]| * * Since: 2.6 */ diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 8760c19caf..3ad4299c98 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -527,7 +527,7 @@ gtk_dialog_new_empty (const gchar *title, * so the first button in the list will be the leftmost button in the dialog. * * Here's a simple example: - * <informalexample><programlisting> + * |[ * GtkWidget *dialog = gtk_dialog_new_with_buttons ("My dialog", * main_app_window, * GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, @@ -536,7 +536,7 @@ gtk_dialog_new_empty (const gchar *title, * GTK_STOCK_CANCEL, * GTK_RESPONSE_REJECT, * NULL); - * </programlisting></informalexample> + * ]| * * Return value: a new #GtkDialog **/ @@ -989,19 +989,19 @@ run_destroy_handler (GtkDialog *dialog, gpointer data) * destroying the dialog if you wish to do so. * * Typical usage of this function might be: - * <informalexample><programlisting> + * |[ * gint result = gtk_dialog_run (GTK_DIALOG (dialog)); * switch (result) * { * case GTK_RESPONSE_ACCEPT: - * do_application_specific_something (<!-- -->); + * do_application_specific_something (); * break; * default: - * do_nothing_since_dialog_was_cancelled (<!-- -->); + * do_nothing_since_dialog_was_cancelled (); * break; * } * gtk_widget_destroy (dialog); - * </programlisting></informalexample> + * ]| * * Note that even though the recursive main loop gives the effect of a * modal dialog (it prevents the user from interacting with other @@ -1195,7 +1195,7 @@ gtk_dialog_set_alternative_button_order_valist (GtkDialog *dialog, * * Use this function after adding all the buttons to your dialog, as the * following example shows: - * <informalexample><programlisting> + * |[ * cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog), * GTK_STOCK_CANCEL, * GTK_RESPONSE_CANCEL); @@ -1215,7 +1215,7 @@ gtk_dialog_set_alternative_button_order_valist (GtkDialog *dialog, * GTK_RESPONSE_CANCEL, * GTK_RESPONSE_HELP, * -1); - * </programlisting></informalexample> + * ]| * * Since: 2.6 */ diff --git a/gtk/gtkfilechooser.c b/gtk/gtkfilechooser.c index 68243520b9..dbaeba006e 100644 --- a/gtk/gtkfilechooser.c +++ b/gtk/gtkfilechooser.c @@ -481,26 +481,26 @@ gtk_file_chooser_get_filename (GtkFileChooser *chooser) * Note that the file must exist, or nothing will be done except * for the directory change. * - * If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog, you - * should use this function if you already have a file name to which the user may save; for example, - * when the user opens an existing file and then does <guimenuitem>File/Save As...</guimenuitem> - * on it. If you don't have a file name already — for example, if the user just created - * a new file and is saving it for the first time, do not call this function. Instead, use - * something similar to this: - * - * <programlisting> + * If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog, + * you should use this function if you already have a file name to which the + * user may save; for example, when the user opens an existing file and then + * does <guimenuitem>File/Save As...</guimenuitem> on it. If you don't have + * a file name already — for example, if the user just created a new + * file and is saving it for the first time, do not call this function. + * Instead, use something similar to this: + * |[ * if (document_is_new) * { - * /<!-- -->* the user just created a new document *<!-- -->/ + * /* the user just created a new document */ * gtk_file_chooser_set_current_folder (chooser, default_folder_for_saving); * gtk_file_chooser_set_current_name (chooser, "Untitled document"); * } * else * { - * /<!-- -->* the user edited an existing document *<!-- -->/ + * /* the user edited an existing document */ * gtk_file_chooser_set_filename (chooser, existing_filename); * } - * </programlisting> + * ]| * * Return value: %TRUE if both the folder could be changed and the file was * selected successfully, %FALSE otherwise. @@ -805,28 +805,28 @@ gtk_file_chooser_get_uri (GtkFileChooser *chooser) * to a sequence of gtk_file_chooser_unselect_all() followed by * gtk_file_chooser_select_uri(). * - * Note that the URI must exist, or nothing will be done except - * for the directory change. - * If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog, you - * should use this function if you already have a file name to which the user may save; for example, - * when the user opens an existing file and then does <guimenuitem>File/Save As...</guimenuitem> - * on it. If you don't have a file name already — for example, if the user just created - * a new file and is saving it for the first time, do not call this function. Instead, use - * something similar to this: - * - * <programlisting> + * Note that the URI must exist, or nothing will be done except for the + * directory change. + * If you are implementing a <guimenuitem>File/Save As...</guimenuitem> dialog, + * you should use this function if you already have a file name to which the + * user may save; for example, when the user opens an existing file and then + * does <guimenuitem>File/Save As...</guimenuitem> on it. If you don't have + * a file name already — for example, if the user just created a new + * file and is saving it for the first time, do not call this function. + * Instead, use something similar to this: + * |[ * if (document_is_new) * { - * /<!-- -->* the user just created a new document *<!-- -->/ + * /* the user just created a new document */ * gtk_file_chooser_set_current_folder_uri (chooser, default_folder_for_saving); * gtk_file_chooser_set_current_name (chooser, "Untitled document"); * } * else * { - * /<!-- -->* the user edited an existing document *<!-- -->/ + * /* the user edited an existing document */ * gtk_file_chooser_set_uri (chooser, existing_uri); * } - * </programlisting> + * ]| * * Return value: %TRUE if both the folder could be changed and the URI was * selected successfully, %FALSE otherwise. diff --git a/gtk/gtkfilefilter.c b/gtk/gtkfilefilter.c index 2c7f6fee70..992de08a0d 100644 --- a/gtk/gtkfilefilter.c +++ b/gtk/gtkfilefilter.c @@ -144,11 +144,10 @@ gtk_file_filter_finalize (GObject *object) * gtk_file_filter_add_mime_type(), gtk_file_filter_add_pattern(), * or gtk_file_filter_add_custom(). To create a filter * that accepts any file, use: - * - * <informalexample><programlisting> - * GtkFileFilter *filter = gtk_file_filter_new (<!-- -->); + * |[ + * GtkFileFilter *filter = gtk_file_filter_new (); * gtk_file_filter_add_pattern (filter, "*"); - * </programlisting></informalexample> + * ]| * * Return value: a new #GtkFileFilter * diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index f5e14e506c..fd34c094ca 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -5592,10 +5592,10 @@ gtk_icon_view_unselect_path (GtkIconView *icon_view, * To do this, you can use gtk_tree_row_reference_new(). * * To free the return value, use: - * <informalexample><programlisting> + * |[ * g_list_foreach (list, gtk_tree_path_free, NULL); * g_list_free (list); - * </programlisting></informalexample> + * ]| * * Return value: A #GList containing a #GtkTreePath for each selected row. * diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 09fcb85a75..cd6c5acfd2 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -1412,13 +1412,13 @@ set_markup (GtkLabel *label, * label's text and attribute list based on the parse results. If the @str is * external data, you may need to escape it with g_markup_escape_text() or * g_markup_printf_escaped()<!-- -->: - * <informalexample><programlisting> + * |[ * char *markup; - * <!-- --> + * * markup = g_markup_printf_escaped ("<span style=\"italic\">%s</span>", str); * gtk_label_set_markup (GTK_LABEL (label), markup); * g_free (markup); - * </programlisting></informalexample> + * ]| **/ void gtk_label_set_markup (GtkLabel *label, diff --git a/gtk/gtkliststore.c b/gtk/gtkliststore.c index 617a5fedd8..3557a7cf36 100644 --- a/gtk/gtkliststore.c +++ b/gtk/gtkliststore.c @@ -1890,10 +1890,10 @@ gtk_list_store_has_default_sort_func (GtkTreeSortable *sortable) * Calling * <literal>gtk_list_store_insert_with_values(list_store, iter, position...)</literal> * has the same effect as calling - * <informalexample><programlisting> + * |[ * gtk_list_store_insert (list_store, iter, position); * gtk_list_store_set (list_store, iter, ...); - * </programlisting></informalexample> + * ]| * with the difference that the former will only emit a row_inserted signal, * while the latter will emit row_inserted, row_changed and, if the list store * is sorted, rows_reordered. Since emitting the rows_reordered signal diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c index c67277ebaf..fe1a5c0d7b 100644 --- a/gtk/gtkmessagedialog.c +++ b/gtk/gtkmessagedialog.c @@ -566,8 +566,7 @@ gtk_message_dialog_new (GtkWindow *parent, * instead, since you can't pass the markup string either * as the format (it might contain '%' characters) or as a string * argument. - * - * <informalexample><programlisting> + * |[ * GtkWidget *dialog; * dialog = gtk_message_dialog_new (main_application_window, * GTK_DIALOG_DESTROY_WITH_PARENT, @@ -576,7 +575,7 @@ gtk_message_dialog_new (GtkWindow *parent, * NULL); * gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), * markup); - * </programlisting></informalexample> + * ]| * * Return value: a new #GtkMessageDialog * diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 4389da32b1..eb201c5768 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -7508,8 +7508,7 @@ gtk_notebook_get_tab_detachable (GtkNotebook *notebook, * destination and accept the target "GTK_NOTEBOOK_TAB". The notebook * will fill the selection with a GtkWidget** pointing to the child * widget that corresponds to the dropped tab. - * - * <informalexample><programlisting> + * |[ * static void * on_drop_zone_drag_data_received (GtkWidget *widget, * GdkDragContext *context, @@ -7529,7 +7528,7 @@ gtk_notebook_get_tab_detachable (GtkNotebook *notebook, * process_widget (*child); * gtk_container_remove (GTK_CONTAINER (notebook), *child); * } - * </programlisting></informalexample> + * ]| * * If you want a notebook to accept drags from other widgets, * you will have to set your own DnD code to do it. diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c index 5d2740f5a6..d08f255067 100644 --- a/gtk/gtkprintoperation.c +++ b/gtk/gtkprintoperation.c @@ -667,8 +667,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class) * Emitted for every page that is printed. The signal handler * must render the @page_nr's page onto the cairo context obtained * from @context using gtk_print_context_get_cairo_context(). - * - * <informalexample><programlisting> + * |[ * static void * draw_page (GtkPrintOperation *operation, * GtkPrintContext *context, @@ -699,7 +698,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class) * pango_layout_set_width (layout, width * PANGO_SCALE); * pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER); * - * pango_layout_get_size (layout, NULL, &layout_height); + * pango_layout_get_size (layout, NULL, &layout_height); * text_height = (gdouble)layout_height / PANGO_SCALE; * * cairo_move_to (cr, width / 2, (HEADER_HEIGHT - text_height) / 2); @@ -707,7 +706,7 @@ gtk_print_operation_class_init (GtkPrintOperationClass *class) * * g_object_unref (layout); * } - * </programlisting></informalexample> + * ]| * * Use gtk_print_operation_set_use_full_page() and * gtk_print_operation_set_unit() before starting the print operation @@ -2349,8 +2348,7 @@ gtk_print_operation_get_error (GtkPrintOperation *op, * platform. The #GtkPrintOperation::done signal will be emitted with the * operation results when the operation is done (i.e. when the dialog is * canceled, or when the print succeeds or fails). - * - * <informalexample><programlisting> + * |[ * if (settings != NULL) * gtk_print_operation_set_print_settings (print, settings); * @@ -2358,11 +2356,14 @@ gtk_print_operation_get_error (GtkPrintOperation *op, * gtk_print_operation_set_default_page_setup (print, page_setup); * * g_signal_connect (print, "begin-print", - * G_CALLBACK (begin_print), &data); + * G_CALLBACK (begin_print), &data); * g_signal_connect (print, "draw-page", - * G_CALLBACK (draw_page), &data); + * G_CALLBACK (draw_page), &data); * - * res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, parent, &error); + * res = gtk_print_operation_run (print, + * GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, + * parent, + * &error); * * if (res == GTK_PRINT_OPERATION_RESULT_ERROR) * { @@ -2370,7 +2371,7 @@ gtk_print_operation_get_error (GtkPrintOperation *op, * GTK_DIALOG_DESTROY_WITH_PARENT, * GTK_MESSAGE_ERROR, * GTK_BUTTONS_CLOSE, - * "Error printing file:\n%s", + * "Error printing file:\n%s", * error->message); * g_signal_connect (error_dialog, "response", * G_CALLBACK (gtk_widget_destroy), NULL); @@ -2383,7 +2384,7 @@ gtk_print_operation_get_error (GtkPrintOperation *op, * g_object_unref (settings); * settings = g_object_ref (gtk_print_operation_get_print_settings (print)); * } - * </programlisting></informalexample> + * ]| * * Note that gtk_print_operation_run() can only be called once on a * given #GtkPrintOperation. diff --git a/gtk/gtkradioaction.c b/gtk/gtkradioaction.c index b2c8adee76..772dd8c57c 100644 --- a/gtk/gtkradioaction.c +++ b/gtk/gtkradioaction.c @@ -377,18 +377,18 @@ create_menu_item (GtkAction *action) * to the group. * * A common way to set up a group of radio group is the following: - * <informalexample><programlisting> + * |[ * GSList *group = NULL; * GtkRadioAction *action; * - * while (/<!-- -->* more actions to add *<!-- -->/) + * while (/* more actions to add */) * { * action = gtk_radio_action_new (...); * * gtk_radio_action_set_group (action, group); * group = gtk_radio_action_get_group (action); * } - * </programlisting></informalexample> + * ]| * * Returns: the list representing the radio group for this object * diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index 2100e00c7c..8c1145504b 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -2034,12 +2034,13 @@ gtk_rc_get_style (GtkWidget *widget) * would be items inside a GNOME canvas widget. * * The action of gtk_rc_get_style() is similar to: - * <informalexample><programlisting> - * gtk_widget_path (widget, NULL, &path, NULL); - * gtk_widget_class_path (widget, NULL, &class_path, NULL); - * gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget), path, class_path, + * |[ + * gtk_widget_path (widget, NULL, &path, NULL); + * gtk_widget_class_path (widget, NULL, &class_path, NULL); + * gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget), + * path, class_path, * G_OBJECT_TYPE (widget)); - * </programlisting></informalexample> + * ]| * * Return value: A style created by matching with the supplied paths, * or %NULL if nothing matching was specified and the default style should diff --git a/gtk/gtkrecentfilter.c b/gtk/gtkrecentfilter.c index a371042542..f5dbe8ef7e 100644 --- a/gtk/gtkrecentfilter.c +++ b/gtk/gtkrecentfilter.c @@ -168,11 +168,10 @@ gtk_recent_filter_init (GtkRecentFilter *filter) * gtk_recent_filter_add_pattern(), gtk_recent_filter_add_mime_type(), * gtk_recent_filter_add_application(), gtk_recent_filter_add_age(). * To create a filter that accepts any recently used resource, use: - * - * <informalexample><programlisting> - * GtkRecentFilter *filter = gtk_recent_filter_new (<!-- -->); + * |[ + * GtkRecentFilter *filter = gtk_recent_filter_new (); * gtk_recent_filter_add_pattern (filter, "*"); - * </programlisting></informalexample> + * ]| * * Return value: a new #GtkRecentFilter * diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c index d5aad37c8b..75889851c6 100644 --- a/gtk/gtktreeselection.c +++ b/gtk/gtktreeselection.c @@ -392,10 +392,10 @@ gtk_tree_selection_get_selected (GtkTreeSelection *selection, * To do this, you can use gtk_tree_row_reference_new(). * * To free the return value, use: - * <informalexample><programlisting> + * |[ * g_list_foreach (list, gtk_tree_path_free, NULL); * g_list_free (list); - * </programlisting></informalexample> + * ]| * * Return value: A #GList containing a #GtkTreePath for each selected row. * diff --git a/gtk/gtktreestore.c b/gtk/gtktreestore.c index ecc4271547..928926aa7e 100644 --- a/gtk/gtktreestore.c +++ b/gtk/gtktreestore.c @@ -1388,10 +1388,10 @@ gtk_tree_store_insert_after (GtkTreeStore *tree_store, * Calling * <literal>gtk_tree_store_insert_with_values (tree_store, iter, position, ...)</literal> * has the same effect as calling - * <informalexample><programlisting> + * |[ * gtk_tree_store_insert (tree_store, iter, position); * gtk_tree_store_set (tree_store, iter, ...); - * </programlisting></informalexample> + * ]| * with the different that the former will only emit a row_inserted signal, * while the latter will emit row_inserted, row_changed and if the tree store * is sorted, rows_reordered. Since emitting the rows_reordered signal diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index ea8adbb813..d3824c830c 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -1444,12 +1444,12 @@ gtk_tree_view_column_new (void) * gtk_tree_view_column_set_attributes() on the newly created #GtkTreeViewColumn. * * Here's a simple example: - * <informalexample><programlisting> + * |[ * enum { TEXT_COLUMN, COLOR_COLUMN, N_COLUMNS }; * ... * { * GtkTreeViewColumn *column; - * GtkCellRenderer *renderer = gtk_cell_renderer_text_new (<!-- -->); + * GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); * * column = gtk_tree_view_column_new_with_attributes ("Title", * renderer, @@ -1457,7 +1457,7 @@ gtk_tree_view_column_new (void) * "foreground", COLOR_COLUMN, * NULL); * } - * </programlisting></informalexample> + * ]| * * Return value: A newly created #GtkTreeViewColumn. **/ diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c index 95aa71da67..9528bc41f5 100644 --- a/gtk/gtkuimanager.c +++ b/gtk/gtkuimanager.c @@ -2782,8 +2782,7 @@ queue_update (GtkUIManager *self) * UI in an idle function. A typical example where this function is * useful is to enforce that the menubar and toolbar have been added to * the main window before showing it: - * <informalexample> - * <programlisting> + * |[ * gtk_container_add (GTK_CONTAINER (window), vbox); * g_signal_connect (merge, "add_widget", * G_CALLBACK (add_widget), vbox); @@ -2791,8 +2790,7 @@ queue_update (GtkUIManager *self) * gtk_ui_manager_add_ui_from_file (merge, "my-toolbars"); * gtk_ui_manager_ensure_update (merge); * gtk_widget_show (window); - * </programlisting> - * </informalexample> + * ]| * * Since: 2.4 **/ diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 27e4db5281..ca8d968f7d 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -1675,8 +1675,7 @@ gtk_widget_class_init (GtkWidgetClass *klass) * #GtkWidget::drag-leave and if not, treat the drag-motion signal as an * "enter" signal. Upon an "enter", the handler will typically highlight * the drop site with gtk_drag_highlight(). - * - * <informalexample><programlisting> + * |[ * static void * drag_motion (GtkWidget *widget, * GdkDragContext *context, @@ -1721,11 +1720,11 @@ gtk_widget_class_init (GtkWidgetClass *klass) * { * private_data->suggested_action = 0; * - * /<!-- -->* We are getting this data due to a request in drag_motion, + * /* We are getting this data due to a request in drag_motion, * * rather than due to a request in drag_drop, so we are just - * * supposed to call gdk_drag_status(<!-- -->), not actually paste in + * * supposed to call gdk_drag_status (), not actually paste in * * the data. - * *<!-- -->/ + * */ * str = gtk_selection_data_get_text (selection_data); * if (!data_is_acceptable (str)) * gdk_drag_status (context, 0, time); @@ -1734,10 +1733,10 @@ gtk_widget_class_init (GtkWidgetClass *klass) * } * else * { - * /<!-- -->* accept the drop *<!-- -->/ + * /* accept the drop */ * } * } - * </programlisting></informalexample> + * ]| */ widget_signals[DRAG_MOTION] = g_signal_new (I_("drag_motion"), @@ -1837,7 +1836,7 @@ gtk_widget_class_init (GtkWidgetClass *klass) * The handler may inspect and modify @drag_context->action before calling * gtk_drag_finish(), e.g. to implement %GDK_ACTION_ASK as shown in the * following example: - * <informalexample><programlisting> + * |[ * void * drag_data_received (GtkWidget *widget, * GdkDragContext *drag_context, @@ -1875,7 +1874,7 @@ gtk_widget_class_init (GtkWidgetClass *klass) * * gtk_drag_finish (drag_context, FALSE, FALSE, time); * } - * </programlisting></informalexample> + * ]| */ widget_signals[DRAG_DATA_RECEIVED] = g_signal_new (I_("drag_data_received"), @@ -5317,11 +5316,11 @@ gtk_widget_set_state (GtkWidget *widget, * Note that the background is still drawn when the widget is mapped. * If this is not suitable (e.g. because you want to make a transparent * window using an RGBA visual), you can work around this by doing: - * <informalexample><programlisting> + * |[ * gtk_widget_realize (window); * gdk_window_set_back_pixmap (window->window, NULL, FALSE); * gtk_widget_show (window); - * </programlisting></informalexample> + * ]| **/ void gtk_widget_set_app_paintable (GtkWidget *widget, @@ -7264,13 +7263,13 @@ gtk_widget_set_extension_events (GtkWidget *widget, * To reliably find the toplevel #GtkWindow, use * gtk_widget_get_toplevel() and check if the %TOPLEVEL flags * is set on the result. - * <informalexample><programlisting> + * |[ * GtkWidget *toplevel = gtk_widget_get_toplevel (widget); * if (GTK_WIDGET_TOPLEVEL (toplevel)) * { - * [ Perform action on toplevel. ] + * /* Perform action on toplevel. */ * } - * </programlisting></informalexample> + * ]| * * Return value: the topmost ancestor of @widget, or @widget itself * if there's no ancestor. @@ -7593,15 +7592,15 @@ gtk_widget_get_composite_name (GtkWidget *widget) * builders might want to treat them in a different way. * * Here is a simple example: - * <informalexample><programlisting> - * gtk_widget_push_composite_child (<!-- -->); + * |[ + * gtk_widget_push_composite_child (); * scrolled_window->hscrollbar = gtk_hscrollbar_new (hadjustment); * gtk_widget_set_composite_name (scrolled_window->hscrollbar, "hscrollbar"); - * gtk_widget_pop_composite_child (<!-- -->); + * gtk_widget_pop_composite_child (); * gtk_widget_set_parent (scrolled_window->hscrollbar, * GTK_WIDGET (scrolled_window)); * g_object_ref (scrolled_window->hscrollbar); - * </programlisting></informalexample> + * ]| **/ void gtk_widget_push_composite_child (void) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 78b34011c6..43d19d1a55 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -7663,14 +7663,13 @@ gtk_XParseGeometry (const char *string, * to be called when the window has its "final" size, i.e. after calling * gtk_widget_show_all() on the contents and gtk_window_set_geometry_hints() * on the window. - * - * <informalexample><programlisting> - * #include <gtk/gtk.h> + * |[ + * #include <gtk/gtk.h> * * static void * fill_with_content (GtkWidget *vbox) * { - * /<!-- -->* fill with content... *<!-- -->/ + * /* fill with content... */ * } * * int @@ -7681,7 +7680,7 @@ gtk_XParseGeometry (const char *string, * 100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST * }; * - * gtk_init (&argc, &argv); + * gtk_init (&argc, &argv); * * window = gtk_window_new (GTK_WINDOW_TOPLEVEL); * vbox = gtk_vbox_new (FALSE, 0); @@ -7692,7 +7691,7 @@ gtk_XParseGeometry (const char *string, * * gtk_window_set_geometry_hints (GTK_WINDOW (window), * window, - * &size_hints, + * &size_hints, * GDK_HINT_MIN_SIZE | * GDK_HINT_BASE_SIZE | * GDK_HINT_RESIZE_INC); @@ -7700,7 +7699,7 @@ gtk_XParseGeometry (const char *string, * if (argc > 1) * { * if (!gtk_window_parse_geometry (GTK_WINDOW (window), argv[1])) - * fprintf (stderr, "Failed to parse '%s'\n", argv[1]); + * fprintf (stderr, "Failed to parse '%s'\n", argv[1]); * } * * gtk_widget_show_all (window); @@ -7708,7 +7707,7 @@ gtk_XParseGeometry (const char *string, * * return 0; * } - * </programlisting></informalexample> + * ]| * * Return value: %TRUE if string was parsed successfully **/ |