[gtkmm/gtkmm-2-20] PrintOperation: get_default_page_setup(): refcount fix.



commit 85c85d6c688edd3243c6c7ac248c5fb65b8665bf
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Jun 28 08:57:06 2010 +0200

    PrintOperation: get_default_page_setup(): refcount fix.
    
           * gtk/src/printoperation.hg: get_default_page_setup(),
        get_print_settings(): Use refreturn, fixing bug #622957 (Kjell Ahlstedt).

 ChangeLog                 |   13 ++++++++++---
 gtk/src/printoperation.hg |   38 +++++++++++++++++++-------------------
 2 files changed, 29 insertions(+), 22 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cbed4fa..2fba861 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,11 @@
-This is the gtkmm-2-20 branch. See the gtkmm-2-22 branch for new API 
+2010-06-28  Murray Cumming  <murrayc murrayc com>
+
+	PrintOperation: get_default_page_setup(): refcount fix.
+
+	* gtk/src/printoperation.hg: get_default_page_setup(),
+    get_print_settings(): Use refreturn, fixing bug #622957 (Kjell Ahlstedt).
+
+This is the gtkmm-2-20 branch. See the gtkmm-2-22 branch for new API
 and see the master branch for the planned API/ABI-breaking gtkmm 3.
 
 2.20.3:
@@ -7,8 +14,8 @@ and see the master branch for the planned API/ABI-breaking gtkmm 3.
 
 	FileChooser::get_filter(): Don't ref the result.
 
-	* gtk/src/filechooser.hg: get_filter(): Don't ref the GtkFilter results, 
-	because it is a GtkObject, not just a GObject, and we should not 
+	* gtk/src/filechooser.hg: get_filter(): Don't ref the GtkFilter results,
+	because it is a GtkObject, not just a GObject, and we should not
 	reference-count GtkObjects. This does _not_ fix bug #583481 though.
 
 2010-04-23  David King  <davidk openismus com>
diff --git a/gtk/src/printoperation.hg b/gtk/src/printoperation.hg
index 00606ba..63354d1 100644
--- a/gtk/src/printoperation.hg
+++ b/gtk/src/printoperation.hg
@@ -38,18 +38,18 @@ _WRAP_GERROR(PrintError, GtkPrintError, GTK_PRINT_ERROR)
 /** @defgroup Printing Printing
  */
 
-/** PrintOperation is the high-level, portable printing API. It looks a bit different than other 
- * GTK+ dialogs such as the FileChooser, since some platforms don't expose enough infrastructure 
- * to implement a good print dialog. On such platforms, PrintOperation uses the native print 
+/** PrintOperation is the high-level, portable printing API. It looks a bit different than other
+ * GTK+ dialogs such as the FileChooser, since some platforms don't expose enough infrastructure
+ * to implement a good print dialog. On such platforms, PrintOperation uses the native print
  * dialog. On platforms which do not provide a native print dialog, GTK+ uses its own, see PrintUnixDialog.
  *
- * The typical way to use the high-level printing API is to create a PrintOperation object 
- * when the user chooses to print. Then you set some properties on it,such as the page size, any PrintSettings 
+ * The typical way to use the high-level printing API is to create a PrintOperation object
+ * when the user chooses to print. Then you set some properties on it,such as the page size, any PrintSettings
  * from previous print operations, the number of  pages, the current page, etc.
  *
- * Then you start the print operation by calling run(). It will then show a dialog to 
- * let the user select a printer and options. When the user finishes the dialog various signals will be 
- * emitted by the PrintOperation for you to handle, the main one being draw_page. You should then 
+ * Then you start the print operation by calling run(). It will then show a dialog to
+ * let the user select a printer and options. When the user finishes the dialog various signals will be
+ * emitted by the PrintOperation for you to handle, the main one being draw_page. You should then
  * render the page on the provided PrintContext using Cairo.
  *
  * @newin{2,10}
@@ -71,7 +71,7 @@ public:
 
   _WRAP_METHOD(void set_default_page_setup(const Glib::RefPtr<PageSetup>& default_page_setup),
                gtk_print_operation_set_default_page_setup)
-  _WRAP_METHOD(Glib::RefPtr<PageSetup> get_default_page_setup() const, gtk_print_operation_get_default_page_setup)
+  _WRAP_METHOD(Glib::RefPtr<PageSetup> get_default_page_setup() const, gtk_print_operation_get_default_page_setup, refreturn)
 
   _WRAP_METHOD(void set_print_settings(const Glib::RefPtr<PrintSettings>& print_settings),
                gtk_print_operation_set_print_settings)
@@ -104,8 +104,8 @@ 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)
@@ -172,15 +172,15 @@ public:
 
   //TODO: Make these static members of a class instead of non-class functions?
 
-  //Note: gtk_run_page_setup_dialog() can take a null page_setup object, but the application should always 
+  //Note: gtk_run_page_setup_dialog() can take a null page_setup object, but the application should always
   //store and reuse a page_setup object, so I see no need to provide an overload for that. murrayc.
   //TODO: The parent parameter may also be null, so maybe we should add an overload for that.
 
-  /** 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, 
+  /** 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. 
+   *
+   * 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.
@@ -195,15 +195,15 @@ public:
                                                 const Glib::RefPtr<const PrintSettings>& print_settings);
   //TODO: Add overloads that don't take page_setup.
 
-  /** For example, 
+  /** For example,
    * void on_setup_done(const Glib::RefPtr<PageSetup>& page_setup);
    */
   typedef sigc::slot< void, const Glib::RefPtr<PageSetup>& > SlotPrintSetupDone;
 
   /** 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 
+   * 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.



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