[gtkmm] Added InfoBar



commit 76e6db2a0dd1f52026efa232a469adf7a9e6823f
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Jun 22 15:21:09 2009 +0200

    Added InfoBar

 ChangeLog                               |    7 +
 gtk/src/Makefile_list_of_hg.am_fragment |    2 +-
 gtk/src/enums.hg                        |    1 +
 gtk/src/gtk_docs.xml                    |  879 +++++++++++++++++++++----------
 gtk/src/infobar.ccg                     |   29 +
 gtk/src/infobar.hg                      |   76 +++
 gtk/src/label.hg                        |    3 +
 gtk/src/messagedialog.hg                |    2 +-
 gtk/src/printoperation.hg               |    6 +
 9 files changed, 733 insertions(+), 272 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c04bb89..2d73e6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-06-22  Murray Cumming  <murrayc murrayc com>
+
+	* gtk/src/infobar.[hg|ccg]: Added InfoBar.
+	
+	This is the master branch, for gtkmm 2.18, wrapping GTK+ 2.18.
+	See also the gtkmm-2-16 branch.
+
 2009-06-19  Murray Cumming  <murrayc murrayc com>
 
 	Fix the build with GTK+ 2.17.x
diff --git a/gtk/src/Makefile_list_of_hg.am_fragment b/gtk/src/Makefile_list_of_hg.am_fragment
index a5e70a0..f278464 100644
--- a/gtk/src/Makefile_list_of_hg.am_fragment
+++ b/gtk/src/Makefile_list_of_hg.am_fragment
@@ -17,7 +17,7 @@ files_general_hg = aboutdialog.hg accelgroup.hg accellabel.hg action.hg actiongr
           filechooser.hg filechooserbutton.hg filechooserwidget.hg filechooserdialog.hg filefilter.hg \
           fileselection.hg fixed.hg fontbutton.hg fontselection.hg frame.hg \
           handlebox.hg \
-          iconfactory.hg iconset.hg iconsource.hg iconinfo.hg icontheme.hg iconview.hg image.hg imagemenuitem.hg inputdialog.hg invisible.hg item.hg \
+          iconfactory.hg iconset.hg iconsource.hg iconinfo.hg icontheme.hg iconview.hg image.hg imagemenuitem.hg infobar.hg inputdialog.hg invisible.hg item.hg \
           label.hg layout.hg linkbutton.hg liststore.hg \
           main.hg menu.hg menubar.hg menuitem.hg menushell.hg menutoolbutton.hg messagedialog.hg misc.hg \
           notebook.hg object.hg optionmenu.hg orientable.hg \
diff --git a/gtk/src/enums.hg b/gtk/src/enums.hg
index c1515dd..3f4e4a0 100644
--- a/gtk/src/enums.hg
+++ b/gtk/src/enums.hg
@@ -73,6 +73,7 @@ _WRAP_ENUM(BuiltinIconSize, GtkIconSize)
 _WRAP_ENUM(TextDirection, GtkTextDirection)
 _WRAP_ENUM(Justification, GtkJustification)
 _WRAP_ENUM(MenuDirectionType, GtkMenuDirectionType)
+_WRAP_ENUM(MessageType, GtkMessageType)
 _WRAP_ENUM(MetricType, GtkMetricType)
 _WRAP_ENUM(MovementStep, GtkMovementStep)
 _WRAP_ENUM(Orientation, GtkOrientation)
diff --git a/gtk/src/gtk_docs.xml b/gtk/src/gtk_docs.xml
index 8051cbb..5b074d6 100644
--- a/gtk/src/gtk_docs.xml
+++ b/gtk/src/gtk_docs.xml
@@ -1690,7 +1690,7 @@ The string is converted to the form determined by
 </parameter_description>
 </parameter>
 <parameter name="uris">
-<parameter_description> a %NULL-terminated array of strings hilding URIs
+<parameter_description> a %NULL-terminated array of strings holding URIs
 </parameter_description>
 </parameter>
 </parameters>
@@ -2039,6 +2039,28 @@ gtk_list_store_set() or gtk_list_store_set_value().
 <return></return>
 </function>
 
+<function name="gtk_recent_chooser_set_show_numbers">
+<description>
+Whether to show recently used resources prepended by a unique number.
+
+Deprecated: 2.12: Use gtk_recent_chooser_menu_set_show_numbers() instead.
+
+Since: 2.10
+
+</description>
+<parameters>
+<parameter name="chooser">
+<parameter_description> a #GtkRecentChooser
+</parameter_description>
+</parameter>
+<parameter name="show_numbers">
+<parameter_description> %TRUE to show numbers, %FALSE otherwise
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_test_find_widget">
 <description>
 This function will search the descendants of @widget for a widget
@@ -7318,6 +7340,20 @@ Since: 2.6
 </return>
 </function>
 
+<function name="GtkInfoBar">
+<description>
+When %TRUE, use the same background/foreground color as #GtkTooltip.
+Otherwise, GTK+ uses #GtkInfoBar::message-type to determine which
+symbolic colors to use.
+
+Since: 2.18
+
+</description>
+<parameters>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_tree_model_sort_clear_cache">
 <description>
 This function should almost never be called.  It clears the @tree_model_sort
@@ -9127,6 +9163,28 @@ Deprecated: 2.0: Use gtk_paint_tab() instead.
 <return></return>
 </function>
 
+<function name="gtk_info_bar_set_message_type">
+<description>
+Sets the message type of the message area.
+GTK+ uses this type to determine what color to use
+when drawing the message area.
+
+Since: 2.18
+
+</description>
+<parameters>
+<parameter name="info_bar">
+<parameter_description> a #GtkInfoBar
+</parameter_description>
+</parameter>
+<parameter name="message_type">
+<parameter_description> a #GtkMessageType
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_font_selection_get_size">
 <description>
 The selected font size.
@@ -11427,66 +11485,6 @@ DND operation, or -1.
 </return>
 </function>
 
-<function name="gtk_stock_set_translate_func">
-<description>
-Sets a function to be used for translating the @label of 
-a stock item.
-
-If no function is registered for a translation domain,
-g_dgettext() is used.
-
-The function is used for all stock items whose
- translation_domain matches @domain. Note that it is possible
-to use strings different from the actual gettext translation domain
-of your application for this, as long as your #GtkTranslateFunc uses
-the correct domain when calling dgettext(). This can be useful, e.g.
-when dealing with message contexts:
-
-|[
-GtkStockItem items[] = { 
-{ MY_ITEM1, NC_(&quot;odd items&quot;, &quot;Item 1&quot;), 0, 0, &quot;odd-item-domain&quot; },
-{ MY_ITEM2, NC_(&quot;even items&quot;, &quot;Item 2&quot;), 0, 0, &quot;even-item-domain&quot; },
-};
-
-gchar *
-my_translate_func (const gchar *msgid,
-gpointer     data)
-{
-gchar *msgctxt = data;
-
-return (gchar*)g_dpgettext2 (GETTEXT_PACKAGE, msgctxt, msgid);
-}
-
-gtk_stock_add (items, G_N_ELEMENTS (items));
-gtk_stock_set_translate_func (&quot;odd-item-domain&quot;, my_translate_func, &quot;odd items&quot;); 
-gtk_stock_set_translate_func (&quot;even-item-domain&quot;, my_translate_func, &quot;even items&quot;); 
-]|
-
-Since: 2.8
-
-</description>
-<parameters>
-<parameter name="domain">
-<parameter_description> the translation domain for which @func shall be used
-</parameter_description>
-</parameter>
-<parameter name="func">
-<parameter_description> a #GtkTranslateFunc 
-</parameter_description>
-</parameter>
-<parameter name="data">
-<parameter_description> data to pass to @func
-</parameter_description>
-</parameter>
-<parameter name="notify">
-<parameter_description> a #GDestroyNotify that is called when @data is
-no longer needed
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
 <function name="gtk_list_store_set_valist">
 <description>
 See gtk_list_store_set(); this version takes a va_list for use by language
@@ -13090,7 +13088,7 @@ Since: 2.16
 
 <function name="gtk_assistant_get_page_complete">
 <description>
-Gets whether @page is complete..
+Gets whether @page is complete.
 
 
 </description>
@@ -14573,24 +14571,7 @@ up additional columns in a #GtkComboBox.
 Note that GTK+ doesn't guarantee that cell renderers will
 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:
-|[
-static void
-text_editing_started (GtkCellRenderer *cell,
-GtkCellEditable *editable,
-const gchar     *path,
-gpointer         data)
-{
-if (GTK_IS_ENTRY (editable)) 
-{
-GtkEntry *entry = GTK_ENTRY (editable);
-
-// ... create a GtkEntryCompletion
-
-gtk_entry_set_completion (entry, completion);
-}
-}
-]|
+before doing any specific setup.
 
 Since: 2.6
 
@@ -15166,6 +15147,23 @@ in the @plug.
 <return></return>
 </function>
 
+<function name="gtk_info_bar_get_message_type">
+<description>
+Returns: the message type of the message area.
+
+</description>
+<parameters>
+<parameter name="info_bar">
+<parameter_description> a #GtkInfoBar
+</parameter_description>
+</parameter>
+</parameters>
+<return> the message type of the message area.
+
+Since: 2.18
+</return>
+</function>
+
 <function name="gtk_button_box_get_child_secondary">
 <description>
 Return value: whether @child should appear in a secondary group of children.
@@ -15622,6 +15620,24 @@ Since: 2.16
 <return></return>
 </function>
 
+<function name="gtk_print_operation_get_has_selection">
+<description>
+Gets the value of #GtkPrintOperation::has-selection property.
+
+
+</description>
+<parameters>
+<parameter name="op">
+<parameter_description> a #GtkPrintOperation
+</parameter_description>
+</parameter>
+</parameters>
+<return> whether there is a selection
+
+Since: 2.18
+</return>
+</function>
+
 <function name="gtk_menu_set_accel_path">
 <description>
 Sets an accelerator path for this menu from which accelerator paths
@@ -15684,6 +15700,26 @@ Since: 2.12
 <return></return>
 </function>
 
+<function name="gtk_print_operation_set_support_selection">
+<description>
+Sets whether selection is supported by #GtkPrintOperation.
+
+Since: 2.18
+
+</description>
+<parameters>
+<parameter name="op">
+<parameter_description> a #GtkPrintOperation
+</parameter_description>
+</parameter>
+<parameter name="support_selection">
+<parameter_description> %TRUE to support selection
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_adjustment_get_upper">
 <description>
 Retrieves the maximum value of the adjustment.
@@ -15780,8 +15816,9 @@ for this application
 </parameter>
 </parameters>
 <return> %TRUE if an application with @app_name has registered this
-resource inside the recently used list, or %FALSE otherwise.  You should
-free the returned command line using g_free().
+resource inside the recently used list, or %FALSE otherwise. The
+ app_exec string is owned by the #GtkRecentInfo and should not be
+modified or freed
 
 Since: 2.10
 </return>
@@ -16211,6 +16248,29 @@ have been reordered
 <return></return>
 </function>
 
+<function name="gtk_status_icon_set_title">
+<description>
+Sets the title of this tray icon.
+This should be a short, human-readable, localized string 
+describing the tray icon. It may be used by tools like screen
+readers to render the tray icon.
+
+Since: 2.18
+
+</description>
+<parameters>
+<parameter name="status_icon">
+<parameter_description> a #GtkStatusIcon
+</parameter_description>
+</parameter>
+<parameter name="title">
+<parameter_description> the title 
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_file_chooser_get_preview_file">
 <description>
 Gets the #GFile that should be previewed in a custom preview
@@ -16872,6 +16932,32 @@ Since: 2.8
 <return></return>
 </function>
 
+<function name="gtk_info_bar_set_response_sensitive">
+<description>
+Calls gtk_widget_set_sensitive (widget, setting) for each
+widget in the info bars's action area with the given response_id.
+A convenient way to sensitize/desensitize dialog buttons.
+
+Since: 2.18
+
+</description>
+<parameters>
+<parameter name="info_bar">
+<parameter_description> a #GtkInfoBar
+</parameter_description>
+</parameter>
+<parameter name="response_id">
+<parameter_description> a response ID
+</parameter_description>
+</parameter>
+<parameter name="setting">
+<parameter_description> TRUE for sensitive
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_icon_view_set_item_width">
 <description>
 Sets the ::item-width property which specifies the width 
@@ -18112,6 +18198,26 @@ e.g. use 1 to display 1.0, 2 to display 1.00, etc
 <return></return>
 </function>
 
+<function name="gtk_print_unix_dialog_set_has_selection">
+<description>
+Sets whether a selection exists.
+
+Since: 2.18
+
+</description>
+<parameters>
+<parameter name="dialog">
+<parameter_description> a #GtkPrintUnixDialog
+</parameter_description>
+</parameter>
+<parameter name="has_selection">
+<parameter_description> %TRUE indicates that a selection exists
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_action_group_new">
 <description>
 Creates a new #GtkActionGroup object. The name of the action group
@@ -21820,6 +21926,9 @@ Since: 2.16
 Installs a global function to be called whenever the user activates an
 email link in an about dialog. 
 
+Since 2.18 there exists a default function which uses gtk_show_uri(). To
+deactivate it, you can pass %NULL for @func.
+
 
 </description>
 <parameters>
@@ -22239,6 +22348,34 @@ Since: 2.6
 <return></return>
 </function>
 
+<function name="gtk_info_bar_add_buttons">
+<description>
+Adds more buttons, same as calling gtk_info_bar_add_button()
+repeatedly. The variable argument list should be %NULL-terminated
+as with gtk_info_bar_new_with_buttons(). Each button must have both
+text and response ID.
+
+Since: 2.18
+
+</description>
+<parameters>
+<parameter name="info_bar">
+<parameter_description> a #GtkInfoBar
+</parameter_description>
+</parameter>
+<parameter name="first_button_text">
+<parameter_description> button text or stock ID
+</parameter_description>
+</parameter>
+<parameter name="Varargs">
+<parameter_description> response ID for first button, then more text-response_id pairs,
+ending with %NULL
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="GtkRecentChooser">
 <description>
 The #GtkRecentFilter object to be used when displaying
@@ -23355,26 +23492,7 @@ the model uptodate.
 
 Note that @func is called whenever a row is inserted, when it may still be
 empty. The visible function should therefore take special care of empty
-rows, like in the example below.
-
-&lt;informalexample&gt;&lt;programlisting&gt;
-static gboolean
-visible_func (GtkTreeModel *model,
-GtkTreeIter  *iter,
-gpointer      data)
-{
-// Visible if row is non-empty and first column is &quot;HI&quot;.
-gchar *str;
-gboolean visible = FALSE;
-
-gtk_tree_model_get (model, iter, 0, &amp;str, -1);
-if (str &amp;&amp; strcmp (str, &quot;HI&quot;) == 0)
-visible = TRUE;
-g_free (str);
-
-return visible;
-}
-&lt;/programlisting&gt;&lt;/informalexample&gt;
+rows.
 
 Since: 2.4
 
@@ -24422,6 +24540,24 @@ Since: 2.14
 <return></return>
 </function>
 
+<function name="gtk_print_unix_dialog_get_manual_capabilities">
+<description>
+Gets the value of #GtkPrintUnixDialog::manual-capabilities property.
+
+
+</description>
+<parameters>
+<parameter name="dialog">
+<parameter_description> a #GtkPrintUnixDialog
+</parameter_description>
+</parameter>
+</parameters>
+<return> the printing capabilities
+
+Since: 2.18
+</return>
+</function>
+
 <function name="GtkToolItem">
 <description>
 This signal is emitted when the toolitem's tooltip changes.
@@ -24626,15 +24762,6 @@ inside a #GtkSocket within the same application.
 To reliably find the toplevel #GtkWindow, use
 gtk_widget_get_toplevel() and check if the %TOPLEVEL flags
 is set on the result.
-|[
-GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
-if (GTK_WIDGET_TOPLEVEL (toplevel))
-{
-  // Perform action on toplevel.
-}
-]|
-
-
 </description>
 <parameters>
 <parameter name="widget">
@@ -25222,6 +25349,23 @@ policy involved.
 <return></return>
 </function>
 
+<function name="gtk_info_bar_get_content_area">
+<description>
+Returns: the content area.
+
+</description>
+<parameters>
+<parameter name="info_bar">
+<parameter_description> a #GtkInfoBar
+</parameter_description>
+</parameter>
+</parameters>
+<return> the content area.
+
+Since: 2.18
+</return>
+</function>
+
 <function name="gtk_print_settings_get_double_with_default">
 <description>
 Return value: the floating point number associated with @key
@@ -26330,6 +26474,36 @@ Gets the value set by gtk_tree_view_column_set_sort_order().
 </return>
 </function>
 
+<function name="gtk_item_factory_set_translate_func">
+<description>
+Sets a function to be used for translating the path elements before they
+are displayed. 
+
+Deprecated: 2.4: Use #GtkUIManager instead.
+
+</description>
+<parameters>
+<parameter name="ifactory">
+<parameter_description> a #GtkItemFactory
+</parameter_description>
+</parameter>
+<parameter name="func">
+<parameter_description> the #GtkTranslateFunc function to be used to translate path elements 
+</parameter_description>
+</parameter>
+<parameter name="data">
+<parameter_description> data to pass to @func and @notify
+</parameter_description>
+</parameter>
+<parameter name="notify">
+<parameter_description> a #GDestroyNotify function to be called when @ifactory is 
+destroyed and when the translation function is changed again
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_text_iter_get_tags">
 <description>
 Return value: list of #GtkTextTag
@@ -27553,6 +27727,26 @@ Return value: #GtkJustification
 </return>
 </function>
 
+<function name="gtk_print_unix_dialog_set_support_selection">
+<description>
+Sets whether the print dialog allows user to print a selection.
+
+Since: 2.18
+
+</description>
+<parameters>
+<parameter name="dialog">
+<parameter_description> a #GtkPrintUnixDialog
+</parameter_description>
+</parameter>
+<parameter name="support_selection">
+<parameter_description> %TRUE to allow print selection
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_accel_label_get_accel_widget">
 <description>
 Fetches the widget monitored by this accelerator label. See
@@ -28713,52 +28907,6 @@ Note that for gtk_window_parse_geometry() to work as expected, it has
 to be called when the window has its &quot;final&quot; size, i.e. after calling
 gtk_widget_show_all() on the contents and gtk_window_set_geometry_hints()
 on the window.
-|[
-#include &lt;gtk/gtk.h&gt;
-
-static void
-fill_with_content (GtkWidget *vbox)
-{
- // fill with content...
-}
-
-int
-main (int argc, char *argv[])
-{
-GtkWidget *window, *vbox;
-GdkGeometry size_hints = {
-100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST  
-};
-
-gtk_init (&amp;argc, &amp;argv);
-
-window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-vbox = gtk_vbox_new (FALSE, 0);
-
-gtk_container_add (GTK_CONTAINER (window), vbox);
-fill_with_content (vbox);
-gtk_widget_show_all (vbox);
-
-gtk_window_set_geometry_hints (GTK_WINDOW (window),
-window,
-&amp;size_hints,
-GDK_HINT_MIN_SIZE | 
-GDK_HINT_BASE_SIZE | 
-GDK_HINT_RESIZE_INC);
-
-if (argc &gt; 1)
-{
-if (!gtk_window_parse_geometry (GTK_WINDOW (window), argv[1]))
-fprintf (stderr, &quot;Failed to parse '%s'\n&quot;, argv[1]);
-}
-
-gtk_widget_show_all (window);
-gtk_main ();
-
-return 0;
-}
-]|
-
 
 </description>
 <parameters>
@@ -30037,6 +30185,24 @@ widget
 <return></return>
 </function>
 
+<function name="gtk_print_unix_dialog_get_support_selection">
+<description>
+Gets the value of #GtkPrintUnixDialog::support-selection property.
+
+
+</description>
+<parameters>
+<parameter name="dialog">
+<parameter_description> a #GtkPrintUnixDialog
+</parameter_description>
+</parameter>
+</parameters>
+<return> whether the application supports print of selection
+
+Since: 2.18
+</return>
+</function>
+
 <function name="gtk_notebook_get_scrollable">
 <description>
 Return value: %TRUE if arrows for scrolling are present
@@ -31121,6 +31287,33 @@ can be unloaded or shut down.
 <return></return>
 </function>
 
+<function name="gtk_info_bar_new_with_buttons">
+<description>
+Creates a new #GtkInfoBar with buttons. Button text/response ID
+pairs should be listed, with a %NULL pointer ending the list.
+Button text can be either a stock ID such as %GTK_STOCK_OK, or
+some arbitrary text. A response ID can be any positive number,
+or one of the values in the #GtkResponseType enumeration. If the
+user clicks one of these dialog buttons, GtkInfoBar will emit
+the &quot;response&quot; signal with the corresponding response ID.
+
+
+</description>
+<parameters>
+<parameter name="first_button_text">
+<parameter_description> stock ID or text to go in first button, or %NULL
+</parameter_description>
+</parameter>
+<parameter name="Varargs">
+<parameter_description> response ID for first button, then additional buttons, ending
+with %NULL
+</parameter_description>
+</parameter>
+</parameters>
+<return> a new #GtkInfoBar
+</return>
+</function>
+
 <function name="gtk_tree_drag_source_drag_data_delete">
 <description>
 Asks the #GtkTreeDragSource to delete the row at @path, because
@@ -31276,6 +31469,12 @@ gtk_expander_set_label(). If the label text has not been set the
 return value will be %NULL. This will be the case if you create an
 empty button with gtk_button_new() to use as a container.
 
+Note that this function behaved differently in versions prior to
+2.14 and used to return the label text stripped of embedded
+underlines indicating mnemonics and Pango markup. This problem can
+be avoided by fetching the label text directly from the label
+widget.
+
 
 </description>
 <parameters>
@@ -31827,22 +32026,6 @@ user may save; for example, when the user opens an existing file and then
 does &lt;guimenuitem&gt;File/Save As...&lt;/guimenuitem&gt; on it.  If you don't have 
 a file name already &#8212; 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.
-  gtk_file_chooser_set_current_folder (chooser, default_folder_for_saving);
-  gtk_file_chooser_set_current_name (chooser, &quot;Untitled document&quot;);
-}
-else
-{
-  //The user edited an existing document. 
-  gtk_file_chooser_set_filename (chooser, existing_filename);
-}
-]|
-
-
 </description>
 <parameters>
 <parameter name="chooser">
@@ -33628,6 +33811,24 @@ Deprecated: 2.4: Use gtk_toolbar_insert() instead.
 </return>
 </function>
 
+<function name="gtk_print_unix_dialog_get_has_selection">
+<description>
+Gets the value of #GtkPrintUnixDialog::has-selection property.
+
+
+</description>
+<parameters>
+<parameter name="dialog">
+<parameter_description> a #GtkPrintUnixDialog
+</parameter_description>
+</parameter>
+</parameters>
+<return> whether there is a selection
+
+Since: 2.18
+</return>
+</function>
+
 <function name="gtk_file_chooser_unselect_all">
 <description>
 Unselects all the files in the current folder of a file chooser.
@@ -33747,6 +33948,9 @@ Since: 2.4
 Installs a global function to be called whenever the user activates a
 URL link in an about dialog.
 
+Since 2.18 there exists a default function which uses gtk_show_uri(). To
+deactivate it, you can pass %NULL for @func.
+
 
 </description>
 <parameters>
@@ -37400,11 +37604,14 @@ gtk_handle_box_set_shadow_type().
 
 <function name="gtk_tooltip_set_custom">
 <description>
-Replaces the widget packed into the tooltip with @custom_widget.  
+Replaces the widget packed into the tooltip with
+ custom_widget  @custom_widget does not get destroyed when the tooltip goes
+away.
 By default a box with a #GtkImage and #GtkLabel is embedded in 
 the tooltip, which can be configured using gtk_tooltip_set_markup() 
 and gtk_tooltip_set_icon().
 
+
 Since: 2.12
 
 </description>
@@ -37414,7 +37621,7 @@ Since: 2.12
 </parameter_description>
 </parameter>
 <parameter name="custom_widget">
-<parameter_description> a #GtkWidget
+<parameter_description> a #GtkWidget, or %NULL to unset the old custom widget.
 </parameter_description>
 </parameter>
 </parameters>
@@ -37881,6 +38088,33 @@ Since: 2.4
 </return>
 </function>
 
+<function name="gtk_info_bar_add_action_widget">
+<description>
+Add an activatable widget to the action area of a #GtkInfoBar,
+connecting a signal handler that will emit the #GtkInfoBar::response
+signal on the message area when the widget is activated. The widget
+is appended to the end of the message areas action area.
+
+Since: 2.18
+
+</description>
+<parameters>
+<parameter name="info_bar">
+<parameter_description> a #GtkInfoBar
+</parameter_description>
+</parameter>
+<parameter name="child">
+<parameter_description> an activatable widget
+</parameter_description>
+</parameter>
+<parameter name="response_id">
+<parameter_description> response ID for @child
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_tree_view_row_activated">
 <description>
 Activates the cell determined by @path and @column.
@@ -38942,6 +39176,30 @@ Since: 2.10
 </return>
 </function>
 
+<function name="gtk_print_operation_set_has_selection">
+<description>
+Sets whether there is a selection to print.
+
+Application has to set number of pages to which the selection
+will draw by gtk_print_operation_set_n_pages() in a callback of
+#GtkPrintOperation::begin-print.
+
+Since: 2.18
+
+</description>
+<parameters>
+<parameter name="op">
+<parameter_description> a #GtkPrintOperation
+</parameter_description>
+</parameter>
+<parameter name="has_selection">
+<parameter_description> %TRUE indicates that a selection exists
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_action_get_label">
 <description>
 Gets the label text of @action.
@@ -42893,6 +43151,8 @@ Return value: A list of #GtkCellRenderers
 </parameter>
 </parameters>
 <return> A list of #GtkCellRenderers
+
+Deprecated: 2.18: use gtk_cell_layout_get_cells() instead.
 </return>
 </function>
 
@@ -43289,6 +43549,26 @@ Since: 2.16
 </return>
 </function>
 
+<function name="gtk_info_bar_response">
+<description>
+Emits the 'response' signal with the given @response_id.
+
+Since: 2.18
+
+</description>
+<parameters>
+<parameter name="info_bar">
+<parameter_description> a #GtkInfoBar
+</parameter_description>
+</parameter>
+<parameter name="response_id">
+<parameter_description> a response ID
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_tree_model_filter_convert_child_iter_to_iter">
 <description>
 Sets @filter_iter to point to the row in @filter that corresponds to the
@@ -45263,26 +45543,34 @@ Since: 2.2
 </return>
 </function>
 
-<function name="gtk_recent_chooser_set_show_numbers">
+<function name="gtk_info_bar_add_button">
 <description>
-Whether to show recently used resources prepended by a unique number.
+Adds a button with the given text (or a stock button, if button_text
+is a stock ID) and sets things up so that clicking the button will emit
+the &quot;response&quot; signal with the given response_id. The button is appended
+to the end of the info bars's action area. The button widget is
+returned, but usually you don't need it.
 
-Deprecated: 2.12: Use gtk_recent_chooser_menu_set_show_numbers() instead.
-
-Since: 2.10
 
 </description>
 <parameters>
-<parameter name="chooser">
-<parameter_description> a #GtkRecentChooser
+<parameter name="info_bar">
+<parameter_description> a #GtkInfoBar
 </parameter_description>
 </parameter>
-<parameter name="show_numbers">
-<parameter_description> %TRUE to show numbers, %FALSE otherwise
+<parameter name="button_text">
+<parameter_description> text of button, or stock ID
+</parameter_description>
+</parameter>
+<parameter name="response_id">
+<parameter_description> response ID for the button
 </parameter_description>
 </parameter>
 </parameters>
-<return></return>
+<return> the button widget that was added
+
+Since: 2.18
+</return>
 </function>
 
 <function name="gtk_print_settings_set_number_up">
@@ -45700,12 +45988,11 @@ event. %FALSE to propagate the event further.
 
 <function name="GtkPrintOperation">
 <description>
-Used as the label of the tab containing custom widgets.
-Note that this property may be ignored on some platforms.
+Determines whether there is a selection in your application.
+This can allow your application to print the selection.
+This is typically used to make a &quot;Selection&quot; button sensitive.
 
-If this is %NULL, GTK+ uses a default label.
-
-Since: 2.10
+Since: 2.18
 
 </description>
 <parameters>
@@ -47083,6 +47370,24 @@ Since: 2.6
 <return></return>
 </function>
 
+<function name="gtk_print_operation_get_support_selection">
+<description>
+Gets the value of #GtkPrintOperation::support-selection property.
+
+
+</description>
+<parameters>
+<parameter name="op">
+<parameter_description> a #GtkPrintOperation
+</parameter_description>
+</parameter>
+</parameters>
+<return> whether the application supports print of selection
+
+Since: 2.18
+</return>
+</function>
+
 <function name="gtk_expander_set_label_widget">
 <description>
 Set the label widget for the expander. This is the widget
@@ -47566,6 +47871,24 @@ modifiers in entries.
 </return>
 </function>
 
+<function name="gtk_status_icon_get_title">
+<description>
+Gets the title of this tray icon. See gtk_status_icon_set_title().
+
+
+</description>
+<parameters>
+<parameter name="status_icon">
+<parameter_description> a #GtkStatusIcon
+</parameter_description>
+</parameter>
+</parameters>
+<return> the title of the status icon
+
+Since: 2.18
+</return>
+</function>
+
 <function name="gtk_ui_manager_new_merge_id">
 <description>
 Return value: an unused merge id.
@@ -48928,6 +49251,36 @@ Since: 2.4
 <return></return>
 </function>
 
+<function name="gtk_style_get_style_property">
+<description>
+Queries the value of a style property corresponding to a
+widget class is in the given style.
+
+Since: 2.16
+
+</description>
+<parameters>
+<parameter name="style">
+<parameter_description> a #GtkStyle
+</parameter_description>
+</parameter>
+<parameter name="widget_type">
+<parameter_description> the #GType of a descendant of #GtkWidget
+</parameter_description>
+</parameter>
+<parameter name="property_name">
+<parameter_description> the name of the style property to get
+</parameter_description>
+</parameter>
+<parameter name="value">
+<parameter_description> a #GValue where the value of the property being
+queried will be stored
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_tree_row_reference_new">
 <description>
 Creates a row reference based on @path.  This reference will keep pointing 
@@ -49848,36 +50201,6 @@ of properties to set on the tag, as with g_object_set().
 </return>
 </function>
 
-<function name="gtk_style_get_property">
-<description>
-Queries the value of a style property corresponding to a
-widget class is in the given style.
-
-Since: 2.16
-
-</description>
-<parameters>
-<parameter name="style">
-<parameter_description> a #GtkStyle
-</parameter_description>
-</parameter>
-<parameter name="widget_type">
-<parameter_description> the #GType of a descendant of #GtkWidget
-</parameter_description>
-</parameter>
-<parameter name="property_name">
-<parameter_description> the name of the style property to get
-</parameter_description>
-</parameter>
-<parameter name="value">
-<parameter_description> a #GValue where the value of the property being
-queried will be stored
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
 <function name="gtk_window_set_urgency_hint">
 <description>
 Windows may set a hint asking the desktop environment to draw
@@ -53859,6 +54182,28 @@ Since: 2.10
 </return>
 </function>
 
+<function name="gtk_info_bar_set_default_response">
+<description>
+Sets the last widget in the info bar's action area with
+the given response_id as the default widget for the dialog.
+Pressing &quot;Enter&quot; normally activates the default widget.
+
+Since: 2.18
+
+</description>
+<parameters>
+<parameter name="info_bar">
+<parameter_description> a #GtkInfoBar
+</parameter_description>
+</parameter>
+<parameter name="response_id">
+<parameter_description> a response ID
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
 <function name="gtk_file_filter_add_pattern">
 <description>
 Adds a rule allowing a shell style glob to a filter.
@@ -54716,21 +55061,7 @@ 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 &lt;guimenuitem&gt;File/Save As...&lt;/guimenuitem&gt; on it.  If you don't have 
 a file name already &#8212; 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.
-  gtk_file_chooser_set_current_folder_uri (chooser, default_folder_for_saving);
-  gtk_file_chooser_set_current_name (chooser, &quot;Untitled document&quot;);
-}
-else
-{
-  // The user edited an existing document.
-  gtk_file_chooser_set_uri (chooser, existing_uri);
-}
-]|
+file and is saving it for the first time, do not call this function.
 
 
 </description>
@@ -59414,6 +59745,7 @@ Returns: a newly allocated string containing the currently active text.
 </parameter>
 </parameters>
 <return> a newly allocated string containing the currently active text.
+Must be freed with g_free().
 
 Since: 2.6
 </return>
@@ -60631,6 +60963,24 @@ use by language bindings.
 <return></return>
 </function>
 
+<function name="gtk_label_get_current_uri">
+<description>
+Returns: the currently active URI. The string is owned by GTK+ and must
+
+</description>
+<parameters>
+<parameter name="label">
+<parameter_description> a #GtkLabel
+</parameter_description>
+</parameter>
+</parameters>
+<return> the currently active URI. The string is owned by GTK+ and must
+not be freed or modified.
+
+Since: 2.18
+</return>
+</function>
+
 <function name="gtk_enumerate_printers">
 <description>
 Calls a function for all #GtkPrinter&lt;!-- --&gt;s. 
@@ -61772,20 +62122,6 @@ user may save; for example, when the user opens an existing file and then
 does &lt;guimenuitem&gt;File/Save As...&lt;/guimenuitem&gt; on it.  If you don't have
 a file name already &#8212; 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.
-  gtk_file_chooser_set_current_folder_file (chooser, default_file_for_saving);
-  gtk_file_chooser_set_current_name (chooser, &quot;Untitled document&quot;);
-}
-else
-{
-  // The user edited an existing document.
-  gtk_file_chooser_set_file (chooser, existing_file);
-}
-]|
 
 
 </description>
@@ -63532,6 +63868,8 @@ renderers has been newly allocated and should be freed with
 g_list_free() when no longer needed.
 
 Since: 2.6
+
+Deprecated: 2.18: use gtk_cell_layout_get_cells() instead.
 </return>
 </function>
 
@@ -64341,34 +64679,21 @@ Since: 2.10
 </return>
 </function>
 
-<function name="gtk_item_factory_set_translate_func">
+<function name="gtk_info_bar_get_action_area">
 <description>
-Sets a function to be used for translating the path elements before they
-are displayed. 
-
-Deprecated: 2.4: Use #GtkUIManager instead.
+Returns: the action area.
 
 </description>
 <parameters>
-<parameter name="ifactory">
-<parameter_description> a #GtkItemFactory
-</parameter_description>
-</parameter>
-<parameter name="func">
-<parameter_description> the #GtkTranslateFunc function to be used to translate path elements 
-</parameter_description>
-</parameter>
-<parameter name="data">
-<parameter_description> data to pass to @func and @notify
-</parameter_description>
-</parameter>
-<parameter name="notify">
-<parameter_description> a #GDestroyNotify function to be called when @ifactory is 
-destroyed and when the translation function is changed again
+<parameter name="info_bar">
+<parameter_description> a #GtkInfoBar
 </parameter_description>
 </parameter>
 </parameters>
-<return></return>
+<return> the action area.
+
+Since: 2.18
+</return>
 </function>
 
 <function name="gtk_action_activate">
@@ -64468,6 +64793,20 @@ for the context and the global default input method.
 <return></return>
 </function>
 
+<function name="gtk_info_bar_new">
+<description>
+Creates a new #GtkInfoBar object.
+
+
+</description>
+<parameters>
+</parameters>
+<return> a new #GtkInfoBar object
+
+Since: 2.18
+</return>
+</function>
+
 <function name="gtk_image_get_gicon">
 <description>
 Gets the #GIcon and size being displayed by the #GtkImage.
diff --git a/gtk/src/infobar.ccg b/gtk/src/infobar.ccg
new file mode 100644
index 0000000..4d9ff04
--- /dev/null
+++ b/gtk/src/infobar.ccg
@@ -0,0 +1,29 @@
+// -*- c++ -*-
+/* $Id: infobar.ccg,v 1.1 2003/01/21 13:38:43 murrayc Exp $ */
+
+/* 
+ *
+ * Copyright 2009 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtk.h>
+
+namespace Gtk
+{
+
+} // namespace Gtk
+
diff --git a/gtk/src/infobar.hg b/gtk/src/infobar.hg
new file mode 100644
index 0000000..4595c1a
--- /dev/null
+++ b/gtk/src/infobar.hg
@@ -0,0 +1,76 @@
+/* $Id: infobar.hg,v 1.10 2006/08/21 19:07:14 jjongsma Exp $ */
+
+/* Copyright (C) 2009 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/box.h>
+#include <gtkmm/button.h>
+#include <gtkmm/enums.h>
+
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/box_p.h)
+
+
+namespace Gtk
+{
+
+/** TODO
+ *
+ * The InfoBar widget looks like this: TODO
+ *
+ * @ingroup Widgets
+ */
+class InfoBar : public HBox
+{
+  _CLASS_GTKOBJECT(InfoBar, GtkInfoBar, GTK_INFO_BAR, Gtk::HBox, GtkHBox)
+public:
+
+  _CTOR_DEFAULT
+  _IGNORE(gtk_info_bar_new, gtk_info_bar_new_with_buttons)
+
+
+
+//TODO: What types are these widgets really?
+  _WRAP_METHOD(Widget* get_action_area(), gtk_info_bar_get_action_area)
+  _WRAP_METHOD(const Widget* get_action_area() const, gtk_info_bar_get_action_area)
+  
+  _WRAP_METHOD(Widget* get_content_area(), gtk_info_bar_get_content_area)
+  _WRAP_METHOD(const Widget* get_content_area() const, gtk_info_bar_get_content_area)
+
+  _WRAP_METHOD(void add_action_widget(Widget& child, int response_id), gtk_info_bar_add_action_widget)
+  
+  _WRAP_METHOD(Button* add_button(const Glib::ustring& button_text, int response_id), gtk_info_bar_add_button)
+  _WRAP_METHOD(Button* add_button(const Gtk::StockID& stock_id, int response_id), gtk_info_bar_add_button)
+    
+  _IGNORE(gtk_info_bar_add_buttons)
+  _WRAP_METHOD(void set_response_sensitive(int response_id, bool setting = true), gtk_info_bar_set_response_sensitive)
+  _WRAP_METHOD(void set_default_response(int response_id), gtk_info_bar_set_default_response)
+
+  _WRAP_METHOD(void response(int response_id), gtk_info_bar_response)
+
+  _WRAP_METHOD(void set_message_type(MessageType message_type), gtk_info_bar_set_message_type)
+  _WRAP_METHOD(MessageType get_message_type() const, gtk_info_bar_get_message_type)
+  
+
+  //ignored: key-binding signal: _WRAP_SIGNAL(void close(), "close")
+  _WRAP_SIGNAL(void response(), "response")
+
+  _WRAP_PROPERTY("message-type", MessageType)
+};
+
+} // namespace Gtk
+
diff --git a/gtk/src/label.hg b/gtk/src/label.hg
index 8793600..d400199 100644
--- a/gtk/src/label.hg
+++ b/gtk/src/label.hg
@@ -137,6 +137,9 @@ public:
   
   _WRAP_METHOD(void set_single_line_mode(bool single_line_mode = true), gtk_label_set_single_line_mode)
   _WRAP_METHOD(bool get_single_line_mode() const, gtk_label_get_single_line_mode)
+  
+  _WRAP_METHOD(Glib::ustring get_current_uri() const, gtk_label_get_current_uri)
+
 
   _WRAP_SIGNAL(void populate_popup(Menu* menu), "populate_popup")
 
diff --git a/gtk/src/messagedialog.hg b/gtk/src/messagedialog.hg
index 103666c..2d4094c 100644
--- a/gtk/src/messagedialog.hg
+++ b/gtk/src/messagedialog.hg
@@ -20,6 +20,7 @@
  */
 
 #include <gtkmm/dialog.h>
+#include <gtkmm/enums.h>
 
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/dialog_p.h)
@@ -28,7 +29,6 @@ namespace Gtk
 {
 
 _CC_INCLUDE(gtk/gtk.h)
-_WRAP_ENUM(MessageType, GtkMessageType)
 _WRAP_ENUM(ButtonsType, GtkButtonsType)
 
 
diff --git a/gtk/src/printoperation.hg b/gtk/src/printoperation.hg
index 2ad2b6c..4ff2d32 100644
--- a/gtk/src/printoperation.hg
+++ b/gtk/src/printoperation.hg
@@ -104,6 +104,12 @@ public:
 
   _WRAP_METHOD(void draw_page_finish(), gtk_print_operation_draw_page_finish)
   _WRAP_METHOD(void set_defer_drawing(), gtk_print_operation_set_defer_drawing)
+  
+  
+  _WRAP_METHOD(void set_support_selection(bool support_selection = true), gtk_print_operation_set_support_selection)
+  _WRAP_METHOD(bool get_support_selection() const, gtk_print_operation_get_support_selection)
+  _WRAP_METHOD(void set_has_selection(bool has_selection = true), gtk_print_operation_set_has_selection)
+  _WRAP_METHOD(bool get_has_selection() const, gtk_print_operation_get_has_selection)
 
   _IGNORE(gtk_print_run_page_setup_dialog, gtk_print_run_page_setup_dialog_async)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]