[gtkmm-documentation] Update application/command_line_handling and printing/advanced examples



commit c535abe1d5948980e78f6f8850b8b6e625c7ef8c
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Mon Dec 12 19:47:07 2016 +0100

    Update application/command_line_handling and printing/advanced examples
    
    to fit with the latest updates of cariomm and gtkmm.

 .../command_line_handling/exampleapplication.cc    |    3 ---
 .../command_line_handling/exampleapplication.h     |    4 +---
 examples/book/printing/advanced/previewdialog.cc   |    2 +-
 3 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/examples/book/application/command_line_handling/exampleapplication.cc 
b/examples/book/application/command_line_handling/exampleapplication.cc
index d9f988d..a39a595 100644
--- a/examples/book/application/command_line_handling/exampleapplication.cc
+++ b/examples/book/application/command_line_handling/exampleapplication.cc
@@ -24,9 +24,6 @@ ExampleApplication::ExampleApplication()
 {
   Glib::set_application_name("Gtk::Application Example");
 
-  signal_handle_local_options().connect(
-    sigc::mem_fun(*this, &ExampleApplication::on_handle_local_options), false);
-
   //These are just pointless command-line arguments to show the use of the API:
 
   //A bool.
diff --git a/examples/book/application/command_line_handling/exampleapplication.h 
b/examples/book/application/command_line_handling/exampleapplication.h
index bf78241..42df37c 100644
--- a/examples/book/application/command_line_handling/exampleapplication.h
+++ b/examples/book/application/command_line_handling/exampleapplication.h
@@ -33,9 +33,7 @@ protected:
   void on_open(const Gio::Application::type_vec_files& files,
     const Glib::ustring& hint) override;
   int on_command_line(const Glib::RefPtr<Gio::ApplicationCommandLine>& command_line) override;
-
-  //A regular signal handler, because there is no default signal handler for this:
-  int on_handle_local_options(const Glib::RefPtr<Glib::VariantDict>& options);
+  int on_handle_local_options(const Glib::RefPtr<Glib::VariantDict>& options) override;
 
   //Callback functions for handling some command-line arguments
   bool on_option_arg_string(const Glib::ustring& option_name,
diff --git a/examples/book/printing/advanced/previewdialog.cc 
b/examples/book/printing/advanced/previewdialog.cc
index 80dd6e7..4fb32c4 100644
--- a/examples/book/printing/advanced/previewdialog.cc
+++ b/examples/book/printing/advanced/previewdialog.cc
@@ -166,7 +166,7 @@ void PreviewDialog::on_hide()
   //We will not be using these anymore, so null the RefPtrs:
   m_refPreview.reset();
   m_refPrintContext.reset();
-  m_refCairoContext.clear();
+  m_refCairoContext.reset();
 }
 
 void PreviewDialog::on_close_clicked()


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