[gtkmm/gtkmm-2-22] Dealt with some TODOs.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gtkmm-2-22] Dealt with some TODOs.
- Date: Tue, 14 Sep 2010 09:34:50 +0000 (UTC)
commit c98a6b5ace99d2ba73e4d5ebb477bba41ce98c51
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Sep 14 11:34:37 2010 +0200
Dealt with some TODOs.
* configure.ac: Depend on the latest GTK+ 2.21.x release.
* gdk/src/drawable.hg: Do not deprecate draw_indexed_image() because
GdkRgbCmap is not fully deprecated.
* gdk/src/rgbcmap.[hg|ccg]: Only deprecate the methods, not the class,
as in the C API.
* gtk/src/menuitem.[hg|ccg]: Added unset_submenu().
* gtk/src/papersize.[hg|ccg]: Added get_paper_sizes().
* gtk/src/printoperation.[hg|ccg]: Added run_page_setup_dialog() overloads
with no PageSetup parameter, because the C API allows this.
These must be moved into the class in gtkmm 3.
* gtk/src/style.hg: Added copy().
* gtk/src/iconset.hg: Added class documentation based on the C documentation.
* gtk/src/printsettings.hg: Add the exceptions documentation now that
it is in the C documentation.
* gtk/src/statusbar.hg: Added documentation for push() and remove_message().
ChangeLog | 25 +++++++++++++++++++++++--
configure.ac | 2 +-
gdk/src/device.hg | 1 -
gdk/src/drawable.hg | 3 +--
gdk/src/rgbcmap.ccg | 12 ++++++------
gdk/src/rgbcmap.hg | 13 +++++--------
gtk/src/assistant.hg | 1 +
gtk/src/buttonbox.ccg | 8 ++++----
gtk/src/enums.hg | 2 +-
gtk/src/filefilter.hg | 2 +-
gtk/src/iconset.hg | 6 ++++--
gtk/src/menuitem.ccg | 9 ++++++---
gtk/src/menuitem.hg | 7 ++++++-
gtk/src/papersize.ccg | 4 +++-
gtk/src/papersize.hg | 39 ++++++++++++++++++++++++++++++---------
gtk/src/printoperation.ccg | 35 +++++++++++++++++++++++++++++++++++
gtk/src/printoperation.hg | 35 ++++++++++++++++++++++++++++++++++-
gtk/src/printsettings.hg | 11 ++++-------
gtk/src/scalebutton.hg | 2 +-
gtk/src/scrolledwindow.hg | 2 +-
gtk/src/statusbar.hg | 14 +++++++++++++-
gtk/src/style.hg | 4 ++--
22 files changed, 182 insertions(+), 55 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d710231..000ea42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2010-09-14 Murray Cumming <murrayc murrayc com>
+
+ Dealt with some TODOs.
+
+ * configure.ac: Depend on the latest GTK+ 2.21.x release.
+ * gdk/src/drawable.hg: Do not deprecate draw_indexed_image() because
+ GdkRgbCmap is not fully deprecated.
+ * gdk/src/rgbcmap.[hg|ccg]: Only deprecate the methods, not the class,
+ as in the C API.
+ * gtk/src/menuitem.[hg|ccg]: Added unset_submenu().
+ * gtk/src/papersize.[hg|ccg]: Added get_paper_sizes().
+ * gtk/src/printoperation.[hg|ccg]: Added run_page_setup_dialog() overloads
+ with no PageSetup parameter, because the C API allows this.
+ These must be moved into the class in gtkmm 3.
+ * gtk/src/style.hg: Added copy().
+
+ * gtk/src/iconset.hg: Added class documentation based on the C documentation.
+ * gtk/src/printsettings.hg: Add the exceptions documentation now that
+ it is in the C documentation.
+ * gtk/src/statusbar.hg: Added documentation for push() and remove_message().
+
2010-09-13 Murray Cumming <murrayc murrayc com>
Make sure that deprecated API is inside an ifdef.
@@ -6,7 +27,7 @@
* gtk/src/notebook.hg:
* gtk/src/textbuffer.ccg:
* gtk/src/textbuffer.hg:
- * gtk/src/widget.hg: Put anything documented with @deprecated in
+ * gtk/src/widget.hg: Put anything documented with @deprecated in
#ifndef GTKMM_DISABLE_DEPRECATED.
2010-09-13 Murray Cumming <murrayc murrayc com>
@@ -18,7 +39,7 @@
* gdk/src/filelist.am:
* gdk/src/gdk_pixbuf_docs.xml: Added this, including it in filelist.am.
Previously it was in gdk_doc.xml.
-
+
2010-09-13 Murray Cumming <murrayc murrayc com>>
MessageDialog: Added get_message_area().
diff --git a/configure.ac b/configure.ac
index 4dce84b..3655445 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,7 +54,7 @@ AS_IF([test "x$enable_static" = xyes],
[AC_DEFINE([GTKMM_STATIC_LIB], [1], [Define when building gtkmm as a static library])])
# gdkmm really does need GTK+, because part of Gdk::DragContext is in GTK+.
-AC_SUBST([GDKMM_MODULES], ['giomm-2.4 >= 2.24 pangomm-1.4 >= 2.26 gtk+-2.0 >= 2.21.7'])
+AC_SUBST([GDKMM_MODULES], ['giomm-2.4 >= 2.24 pangomm-1.4 >= 2.26 gtk+-2.0 >= 2.21.8'])
AS_IF([test "x$gtkmm_host_windows" = xyes],
[GTKMM_MODULES=$GDKMM_MODULES],
diff --git a/gdk/src/device.hg b/gdk/src/device.hg
index 81201aa..cdabcd3 100644
--- a/gdk/src/device.hg
+++ b/gdk/src/device.hg
@@ -62,7 +62,6 @@ public:
_WRAP_METHOD(bool get_has_cursor() const, gdk_device_get_has_cursor)
_WRAP_METHOD(gint get_n_axes() const, gdk_device_get_n_axes)
- //TODO: A list of GdkAtom, which we should show as strings: _WRAP_METHOD(GList * gdk_device_list_axes () const, gdk_device_list_axes)
};
} // namespace Gdk
diff --git a/gdk/src/drawable.hg b/gdk/src/drawable.hg
index ea07d9b..fc8ab03 100644
--- a/gdk/src/drawable.hg
+++ b/gdk/src/drawable.hg
@@ -188,13 +188,12 @@ public:
RgbDither dith, const guchar* rgb_buf, int rowstride),
gdk_draw_gray_image)
- //TODO: Make sure that this is really deprecated in GTK+ and improve the deprecation message.
_WRAP_METHOD(void draw_indexed_image(
const Glib::RefPtr<const GC>& gc,
int x, int y, int width, int height,
RgbDither dith, const guchar* rgb_buf, int rowstride,
const RgbCmap& cmap),
- gdk_draw_indexed_image, deprecated "Because RgbCmap is deprecated.")
+ gdk_draw_indexed_image)
_WRAP_METHOD(Glib::RefPtr<Screen> get_screen(), gdk_drawable_get_screen, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Screen> get_screen() const, gdk_drawable_get_screen, refreturn, constversion)
diff --git a/gdk/src/rgbcmap.ccg b/gdk/src/rgbcmap.ccg
index 62677f2..37e8156 100644
--- a/gdk/src/rgbcmap.ccg
+++ b/gdk/src/rgbcmap.ccg
@@ -24,18 +24,18 @@
namespace Gdk
{
-#ifndef GDKMM_DISABLE_DEPRECATED
-
-RgbCmap::RgbCmap(const Glib::ArrayHandle<guint32>& colors)
-: gobject_ (gdk_rgb_cmap_new(const_cast<guint32*>(colors.data()), colors.size()))
-{}
-
RgbCmap::~RgbCmap()
{
if(gobject_)
gdk_rgb_cmap_free(gobject_);
}
+#ifndef GDKMM_DISABLE_DEPRECATED
+
+RgbCmap::RgbCmap(const Glib::ArrayHandle<guint32>& colors)
+: gobject_ (gdk_rgb_cmap_new(const_cast<guint32*>(colors.data()), colors.size()))
+{}
+
guint32& RgbCmap::operator[](unsigned long index)
{
return gobject_->colors[index];
diff --git a/gdk/src/rgbcmap.hg b/gdk/src/rgbcmap.hg
index b1a8c0b..bfdfdfe 100644
--- a/gdk/src/rgbcmap.hg
+++ b/gdk/src/rgbcmap.hg
@@ -25,8 +25,6 @@ _DEFS(gdkmm,gdk)
#include <gdkmmconfig.h>
-#ifndef GDKMM_DISABLE_DEPRECATED
-
#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C" { typedef struct _GdkRgbCmap GdkRgbCmap; }
#endif
@@ -34,18 +32,18 @@ extern "C" { typedef struct _GdkRgbCmap GdkRgbCmap; }
namespace Gdk
{
-//TODO: Say why is this deprecated.
-/** @deprecated
- */
class RgbCmap
{
_CLASS_GENERIC(RgbCmap, GdkRgbCmap)
_IGNORE(gdk_rgb_cmap_new, gdk_rgb_cmap_free)
public:
- explicit RgbCmap(const Glib::ArrayHandle<guint32>& colors);
+
virtual ~RgbCmap();
+#ifndef GDKMM_DISABLE_DEPRECATED
+ explicit RgbCmap(const Glib::ArrayHandle<guint32>& colors);
+
///Number of colors.
unsigned long size() const;
@@ -54,6 +52,7 @@ public:
///Access the colors.
const guint32& operator[](unsigned long index) const;
+#endif //GDKMM_DISABLE_DEPRECATED
/// Provides access to the underlying C GObject.
GdkRgbCmap* gobj() { return gobject_; }
@@ -70,5 +69,3 @@ private:
};
} // namespace Gdk
-
-#endif //GDKMM_DISABLE_DEPRECATED
diff --git a/gtk/src/assistant.hg b/gtk/src/assistant.hg
index 18097dd..8aa5387 100644
--- a/gtk/src/assistant.hg
+++ b/gtk/src/assistant.hg
@@ -82,6 +82,7 @@ public:
_WRAP_SIGNAL(void close(), "close")
_WRAP_SIGNAL(void cancel(), "cancel")
+ //There are no normal properties.
//TODO: Child properties?
};
diff --git a/gtk/src/buttonbox.ccg b/gtk/src/buttonbox.ccg
index 36a7549..7c390fa 100644
--- a/gtk/src/buttonbox.ccg
+++ b/gtk/src/buttonbox.ccg
@@ -51,7 +51,7 @@ int ButtonBox::get_child_min_width() const
void ButtonBox::set_child_min_width(const int& value)
{
- //TODO: Find a way to set style properties in code, though this is deprecate anyway:
+ //TODO: Find a way to set style properties in code, though this is deprecated anyway:
gobj()->child_min_width = value;
}
@@ -64,7 +64,7 @@ int ButtonBox::get_child_min_height() const
void ButtonBox::set_child_min_height(const int& value)
{
- //TODO: Find a way to set style properties in code, though this is deprecate anyway:
+ //TODO: Find a way to set style properties in code, though this is deprecated anyway:
gobj()->child_min_height = value;
}
@@ -77,7 +77,7 @@ int ButtonBox::get_child_ipadding_x() const
void ButtonBox::set_child_ipadding_x(const int& value)
{
- //TODO: Find a way to set style properties in code, though this is deprecate anyway:
+ //TODO: Find a way to set style properties in code, though this is deprecated anyway:
gobj()->child_ipad_x = value;
}
@@ -90,7 +90,7 @@ int ButtonBox::get_child_ipadding_y() const
void ButtonBox::set_child_ipadding_y(const int& value)
{
- //TODO: Find a way to set style properties in code, though this is deprecate anyway:
+ //TODO: Find a way to set style properties in code, though this is deprecated anyway:
gobj()->child_ipad_y = value;
}
diff --git a/gtk/src/enums.hg b/gtk/src/enums.hg
index e1f7c38..d40cd03 100644
--- a/gtk/src/enums.hg
+++ b/gtk/src/enums.hg
@@ -141,7 +141,7 @@ public:
explicit IconSize(int size) : size_ (size) {}
operator int() const { return size_; }
- // These static methods are implement in iconfactory.ccg. TODO: That's probably unnecessarily obscure. murrayc.
+ // These static methods are implemented in iconfactory.ccg. TODO: That's probably unnecessarily obscure. murrayc.
/** Obtains the pixel size of a semantic icon size, possibly modified by user preferences for the default Gtk::Settings.
* Normally size would be Gtk::ICON_SIZE_MENU, Gtk::ICON_SIZE_BUTTON, etc.
diff --git a/gtk/src/filefilter.hg b/gtk/src/filefilter.hg
index 36d4c81..3488c93 100644
--- a/gtk/src/filefilter.hg
+++ b/gtk/src/filefilter.hg
@@ -79,7 +79,7 @@ public:
_WRAP_METHOD(FileFilterFlags get_needed() const, gtk_file_filter_get_needed)
- //TODO: This method is used by FileChooser implementors, so we don't need to wrap it.
+ //TODO: This method is onlyused by FileChooser implementors, so we don't need to wrap it.
_IGNORE(gtk_file_filter_filter)
//_WRAP_METHOD(bool filter(const GtkFileFilterInfo* filter_info), gtk_file_filter_filter)
};
diff --git a/gtk/src/iconset.hg b/gtk/src/iconset.hg
index 98d8356..62316e1 100644
--- a/gtk/src/iconset.hg
+++ b/gtk/src/iconset.hg
@@ -37,8 +37,10 @@ class Widget;
//TODO_API: Is _CLASS_BOXEDTYPE the appropriate thing to use here.
//This seems to be reference-counted, not copied.
-// TODO: Documentation, thought the C API has no documentation for this either.
-// See http://bugzilla.gnome.org/show_bug.cgi?id=575537
+/** This manages a set of variants of a particular icon
+ * An IconSet contains variants for different sizes and widget states.
+ * Icons in an icon factory are named by a stock ID, which is a simple string identifying the icon. Each GtkStyle has a list of GtkIconFactory derived from the current theme; those icon factories are consulted first when searching for an icon. If the theme doesn't set a particular icon, GTK+ looks for the icon in a list of default icon factories, maintained by gtk_icon_factory_add_default() and gtk_icon_factory_remove_default(). Applications with icons should add a default icon factory with their icons, which will allow themes to override the icons for the application.
+ */
class IconSet
{
_CLASS_BOXEDTYPE(IconSet, GtkIconSet, gtk_icon_set_new, gtk_icon_set_ref, gtk_icon_set_unref)
diff --git a/gtk/src/menuitem.ccg b/gtk/src/menuitem.ccg
index 930fa7b..4a26fd9 100644
--- a/gtk/src/menuitem.ccg
+++ b/gtk/src/menuitem.ccg
@@ -1,7 +1,7 @@
// -*- c++ -*-
/* $Id: menuitem.ccg,v 1.5 2006/05/11 11:40:24 murrayc Exp $ */
-/*
+/*
*
* Copyright 1998-2002 The gtkmm Development Team
*
@@ -81,7 +81,7 @@ void MenuItem::accelerate(Window& window)
{
if(accel_key_.get_path().empty())
{
- add_accelerator("activate", window.get_accel_group(),
+ add_accelerator("activate", window.get_accel_group(),
accel_key_.get_key(), accel_key_.get_mod(), ACCEL_VISIBLE);
}
else
@@ -103,6 +103,9 @@ void MenuItem::unset_accel_path()
gtk_menu_item_set_accel_path(gobj(), 0);
}
+void MenuItem::unset_submenu()
+{
+ gtk_menu_item_set_submenu(gobj(), 0);
+}
} // namespace Gtk
-
diff --git a/gtk/src/menuitem.hg b/gtk/src/menuitem.hg
index 6667b94..ab5657c 100644
--- a/gtk/src/menuitem.hg
+++ b/gtk/src/menuitem.hg
@@ -55,7 +55,12 @@ public:
explicit MenuItem(const Glib::ustring& label, bool mnemonic = false);
_WRAP_METHOD(void set_submenu(Menu& submenu), gtk_menu_item_set_submenu)
- //void unset_submenu(); // TODO: new API, implement after freeze
+
+ /** Remove the menu item's sub-menu.
+ * @newin{2,22}
+ */
+ void unset_submenu();
+
_WRAP_METHOD(Menu* get_submenu(), gtk_menu_item_get_submenu)
_WRAP_METHOD(const Menu* get_submenu() const, gtk_menu_item_get_submenu, constversion)
bool has_submenu() const;
diff --git a/gtk/src/papersize.ccg b/gtk/src/papersize.ccg
index 25a2cfe..a9201e3 100644
--- a/gtk/src/papersize.ccg
+++ b/gtk/src/papersize.ccg
@@ -20,6 +20,7 @@
namespace Gtk
{
+typedef PaperSize::ListHandle_PaperSizes ListHandle_PaperSizes;
//PaperSize::PaperSize()
//:
// gobject_(gtk_paper_size_new(gtk_paper_size_get_default()))
@@ -48,6 +49,7 @@ PaperSize::PaperSize(const Glib::ustring& name, const Glib::ustring& display_nam
{}
//TODO: Add an operator bool() so we can detect if this succeeded:
+//TODO: No, throw the error/exception instead.
PaperSize::PaperSize(const Glib::KeyFile& key_file, const Glib::ustring& group_name)
:
gobject_(gtk_paper_size_new_from_key_file(const_cast<GKeyFile*>(key_file.gobj()), (group_name.empty() ? NULL : group_name.c_str()) , NULL /* GError */))
@@ -66,7 +68,7 @@ PaperSize::operator bool() const
void PaperSize::save_to_key_file(Glib::KeyFile& key_file)
{
- gtk_paper_size_to_key_file( gobj(), (key_file).gobj(), 0);
+ gtk_paper_size_to_key_file( gobj(), (key_file).gobj(), 0);
}
diff --git a/gtk/src/papersize.hg b/gtk/src/papersize.hg
index c320070..2e5700d 100644
--- a/gtk/src/papersize.hg
+++ b/gtk/src/papersize.hg
@@ -20,6 +20,10 @@ _DEFS(gtkmm,gtk)
namespace Gtk
{
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+class PaperSizeTraits;
+#endif
+
/** Common paper names, from PWG 5101.1-2002 PWG: Standard for Media Standardized Names
*
*/
@@ -33,12 +37,12 @@ const Glib::ustring PAPER_NAME_LEGAL = "na_legal";
_WRAP_ENUM(Unit, GtkUnit)
-/** PaperSize handles paper sizes. It uses the standard called "PWG 5101.1-2002 PWG: Standard for Media Standardized Names"
- * to name the paper sizes (and to get the data for the page sizes). In addition to standard paper sizes, PaperSize allows
+/** PaperSize handles paper sizes. It uses the standard called "PWG 5101.1-2002 PWG: Standard for Media Standardized Names"
+ * to name the paper sizes (and to get the data for the page sizes). In addition to standard paper sizes, PaperSize allows
* to construct custom paper sizes with arbitrary dimensions.
*
- * The PaperSize object stores not only the dimensions (width and height) of a paper size and its name, it also provides
- * default print margins.
+ * The PaperSize object stores not only the dimensions (width and height) of a paper size and its name, it also provides
+ * default print margins.
*
* @newin{2,10}
*
@@ -49,7 +53,8 @@ class PaperSize
// Cannot pass the _new function here, it must accept the 'name' argument.
_CLASS_BOXEDTYPE(PaperSize, GtkPaperSize, NONE, gtk_paper_size_copy, gtk_paper_size_free)
public:
- // We don't use a "" default parameter vale, though gtk_paper_size_new() can take NULL,
+
+ // We don't use a "" default parameter value, though gtk_paper_size_new() can take NULL,
// because there is already a (desired) default constructor (creating an invalid instance).
// get_default() does what name="" would do.
explicit PaperSize(const Glib::ustring& name);
@@ -66,9 +71,11 @@ public:
*/
operator bool() const;
- //TODO: Check this conversion and type:
- #m4 _CONVERSION(`GList*', `Glib::ListHandle<PaperSize>', `$2($3, Glib::OWNERSHIP_DEEP)')
- //TODO: _WRAP_METHOD(static Glib::ListHandle<PaperSize> get_paper_sizes(bool include_custom = true) const, gtk_paper_size_get_paper_sizes)
+ typedef Glib::ListHandle<PaperSize, PaperSizeTraits> ListHandle_PaperSizes;
+ _CONVERSION(`GList*',`ListHandle_RecentInfos',__FL2H_SHALLOW)
+
+ #m4 _CONVERSION(`GList*', `ListHandle_PaperSizes', __FL2H_DEEP)
+ _WRAP_METHOD(static ListHandle_PaperSizes get_paper_sizes(bool include_custom = true), gtk_paper_size_get_paper_sizes)
_WRAP_METHOD(Glib::ustring get_name() const, gtk_paper_size_get_name)
_WRAP_METHOD(Glib::ustring get_display_name() const, gtk_paper_size_get_display_name)
@@ -90,7 +97,7 @@ public:
_WRAP_METHOD(void save_to_key_file(Glib::KeyFile& key_file, const Glib::ustring& group_name), gtk_paper_size_to_key_file)
/** This function adds the paper size to @a key_file in the first group.
- *
+ *
* @newin{2,12}
* @param key_file The Glib::KeyFile to save the paper size to.
*/
@@ -105,4 +112,18 @@ inline bool operator==(const PaperSize& lhs, const PaperSize& rhs)
inline bool operator!=(const PaperSize& lhs, const PaperSize& rhs)
{ return !lhs.equal(rhs); }
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+struct PaperSizeTraits
+{
+ typedef PaperSize CppType;
+ typedef const GtkPaperSize* CType;
+ typedef GtkPaperSize* CTypeNonConst;
+
+ static CType to_c_type (const CppType& obj) { return obj.gobj(); }
+ static CType to_c_type (CType ptr) { return ptr; }
+ static CppType to_cpp_type (CType ptr) { return PaperSize(const_cast<GtkPaperSize*>(ptr), true /* make_copy */); /* Does not take ownership */ }
+ static void release_c_type (CType /* ptr */) { /* Doesn't happen */ }
+};
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
} // namespace Gtk
diff --git a/gtk/src/printoperation.ccg b/gtk/src/printoperation.ccg
index fd4da91..e54b7b9 100644
--- a/gtk/src/printoperation.ccg
+++ b/gtk/src/printoperation.ccg
@@ -74,6 +74,22 @@ run_page_setup_dialog(Window& parent,
}
+Glib::RefPtr<PageSetup>
+run_page_setup_dialog(Window& parent,
+ const Glib::RefPtr<const PrintSettings>& print_settings)
+{
+ // Specify the exact type with template specialization, to avoid possible
+ // ambiguities between the const and non-const versions of unwrap() reported
+ // by Sun's compiler (specifying unwrap<const Object> was reported
+ // not to work):
+ return Glib::wrap(
+ gtk_print_run_page_setup_dialog(
+ parent.gobj(),
+ 0,
+ const_cast<GtkPrintSettings*>(Glib::unwrap<PrintSettings>(print_settings))));
+
+}
+
void
run_page_setup_dialog_async(Window& parent,
const Glib::RefPtr<const PageSetup>& page_setup,
@@ -94,4 +110,23 @@ run_page_setup_dialog_async(Window& parent,
slot_copy);
}
+void
+run_page_setup_dialog_async(Window& parent,
+ const Glib::RefPtr<const PrintSettings>& print_settings,
+ const SlotPrintSetupDone& slot)
+{
+ SlotPrintSetupDone* slot_copy = new SlotPrintSetupDone(slot);
+
+ // Specify the exact type with template specialization, to avoid possible
+ // ambiguities between the const and non-const versions of unwrap() reported
+ // by Sun's compiler (specifying unwrap<const Object> was reported
+ // not to work):
+ gtk_print_run_page_setup_dialog_async(
+ parent.gobj(),
+ 0,
+ const_cast<GtkPrintSettings*>(Glib::unwrap<PrintSettings>(print_settings)),
+ &SignalProxy_PrintSetupDone_gtk_callback,
+ slot_copy);
+}
+
} // namespace Gtk
diff --git a/gtk/src/printoperation.hg b/gtk/src/printoperation.hg
index 8ca689f..0965125 100644
--- a/gtk/src/printoperation.hg
+++ b/gtk/src/printoperation.hg
@@ -189,7 +189,22 @@ public:
Glib::RefPtr<PageSetup> run_page_setup_dialog(Window& parent,
const Glib::RefPtr<const PageSetup>& page_setup,
const Glib::RefPtr<const PrintSettings>& print_settings);
- //TODO: Add overloads that don't take page_setup.
+
+ /** Runs a page setup dialog, letting the user modify the values from page_setup.
+ * If the user cancels the dialog, the returned PageSetup is identical to that passed in @a page_setup,
+ * otherwise it contains the modifications done in the dialog.
+ *
+ * Note that this function may use a recursive mainloop to show the page setup dialog.
+ * See run_page_setup_dialog_async() if this is a problem.
+ *
+ * @param parent Transient parent.
+ * @param settings Print settings.
+ * @result A new PageSetup object.
+ *
+ * @since 2.22
+ */
+ Glib::RefPtr<PageSetup> run_page_setup_dialog(Window& parent,
+ const Glib::RefPtr<const PrintSettings>& print_settings);
/** For example,
* void on_setup_done(const Glib::RefPtr<PageSetup>& page_setup);
@@ -215,4 +230,22 @@ public:
const Glib::RefPtr<const PrintSettings>& print_settings,
const SlotPrintSetupDone& slot);
+ /** Runs a page setup dialog, letting the user modify the values from page_setup.
+ *
+ * In contrast to run_page_setup_dialog(), this function returns after showing the
+ * page setup dialog on platforms that support this, and calls the @a slot from a
+ * signal handler for the ::response signal of the dialog.
+ *
+ * @param parent Transient parent.
+ * @param page_setup An existing GtkPageSetup.
+ * @param settings Print settings.
+ * @result A new PageSetup object.
+ * @param slot
+ *
+ * @since 2.22
+ */
+ void run_page_setup_dialog_async(Window& parent,
+ const Glib::RefPtr<const PrintSettings>& print_settings,
+ const SlotPrintSetupDone& slot);
+
} // namespace Gtk
diff --git a/gtk/src/printsettings.hg b/gtk/src/printsettings.hg
index 1c9a368..cd33de9 100644
--- a/gtk/src/printsettings.hg
+++ b/gtk/src/printsettings.hg
@@ -50,9 +50,6 @@ class PrintSettings : public Glib::Object
protected:
_CTOR_DEFAULT
- //TODO: We need fuller information about the GError domains:
- //http://bugzilla.gnome.org/show_bug.cgi?id=544706
-
/** Reads the print settings from the @a key_file.
* Returns a new PrintSettings object with the restored settings,
* or an empty RefPtr if an error occurred.
@@ -61,7 +58,7 @@ protected:
* @param key_file The KeyFile to retrieve the settings from.
* @result the restored PrintSettings
*
- * @throws KeyFileError
+ * @throws KeyFileError, FileError
*
* @newin{2,14}
*/
@@ -76,7 +73,7 @@ protected:
* @param group_name The name of the group to use.
* @result the restored PrintSettings
*
- * @throws KeyFileError
+ * @throws KeyFileError, FileError
*
* @newin{2,14}
*/
@@ -90,7 +87,7 @@ protected:
* @param file_name The filename to read the settings from.
* @result the restored PrintSettings
*
- * @throws KeyFileError
+ * @throws KeyFileError, FileError
*
* @newin{2,14}
*/
@@ -150,7 +147,7 @@ public:
* @param key_file The KeyFile to retrieve the settings from.
* @result true on success.
*
- * @throws KeyFileError
+ * @throws KeyFileError, FileError
*
* @newin{2,14}
*/
diff --git a/gtk/src/scalebutton.hg b/gtk/src/scalebutton.hg
index 29d1de9..83d6218 100644
--- a/gtk/src/scalebutton.hg
+++ b/gtk/src/scalebutton.hg
@@ -59,7 +59,7 @@ public:
_WRAP_METHOD(void set_adjustment(Gtk::Adjustment& adjustment), gtk_scale_button_set_adjustment)
- // TODO: Should be deprecated, but we have no replacement yet.
+ // TODO: Should be deprecated, but we have no replacement yet, until we break ABI.
_WRAP_METHOD(Orientation get_orientation(), gtk_scale_button_get_orientation)
_WRAP_METHOD(void set_orientation(Orientation orientation), gtk_scale_button_set_orientation)
diff --git a/gtk/src/scrolledwindow.hg b/gtk/src/scrolledwindow.hg
index 484e6b7..4a8efc9 100644
--- a/gtk/src/scrolledwindow.hg
+++ b/gtk/src/scrolledwindow.hg
@@ -25,7 +25,7 @@ _PINCLUDE(gtkmm/private/bin_p.h)
#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
//Allow us to use the struct fields.
-//TODO: W need to remove these methods anyway in a future ABI break.
+//TODO: We need to remove these methods anyway in a future ABI break.
#undef GSEAL_ENABLE
#m4 _POP()
diff --git a/gtk/src/statusbar.hg b/gtk/src/statusbar.hg
index 92e601d..abf9a42 100644
--- a/gtk/src/statusbar.hg
+++ b/gtk/src/statusbar.hg
@@ -49,10 +49,22 @@ public:
_CTOR_DEFAULT
_WRAP_METHOD(guint get_context_id(const Glib::ustring& context_description), gtk_statusbar_get_context_id)
+
+ //TODO: Remove the default 0 context_id values in all these methods?
+
+ /** Pushes a new message onto a statusbar's stack.
+ * @param text The message to add to the statusbar.
+ * @param context_id The message's context id, as returned by get_context_id()
+ */
guint push(const Glib::ustring& text, guint context_id = 0);
+
_WRAP_METHOD(void pop(guint context_id = 0), gtk_statusbar_pop)
- //TODO: Documentation
+ /** Forces the removal of a message from a statusbar's stack.
+ * The exact context_id and message_id must be specified.
+ * @param message_id A message identifier, as returned by push().
+ * @param context_id A context identifier.
+ */
void remove_message(guint message_id, guint context_id = 0);
_IGNORE(gtk_statusbar_remove)
diff --git a/gtk/src/style.hg b/gtk/src/style.hg
index 5cc0074..97f0d1b 100644
--- a/gtk/src/style.hg
+++ b/gtk/src/style.hg
@@ -390,8 +390,8 @@ public:
int height) const, gtk_paint_resize_grip)
-//TODO: This should be const:
- _WRAP_METHOD(Glib::RefPtr<Style> copy(), gtk_style_copy)
+ _WRAP_METHOD(Glib::RefPtr<Style> copy(), gtk_style_copy, deprecated "Use the const version")
+ _WRAP_METHOD(Glib::RefPtr<Style> copy() const, gtk_style_copy)
_WRAP_METHOD(Glib::RefPtr<Style> attach(const Glib::RefPtr<Gdk::Window>& window), gtk_style_attach)
_WRAP_METHOD(void detach(), gtk_style_detach)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]