[gtkmm-documentation] Update the buildapp examples



commit adae82fa988810cd96f816b65b77d79b0a6dbfe7
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Thu Nov 17 13:29:34 2016 +0100

    Update the buildapp examples
    
    * examples/book/buildapp/step[1245]/Makefile.example: Update to gtk+-4.0,
    gtkmm-4.0 and c++14.
    * examples/book/buildapp/step[1245]/exampleapplication.cc: Remove explicit
    template parameters from calls to sigc::bind(). They were probably unnecessary
    also with gtkmm-3.0 and libsigc-2.0. Now the order of the template parameters
    have changed, making it more difficult the explicitly specify the type of
    the bound parameter.

 examples/book/buildapp/step1/Makefile.example      |    4 ++--
 examples/book/buildapp/step1/exampleapplication.cc |    2 +-
 examples/book/buildapp/step2/Makefile.example      |    6 +++---
 examples/book/buildapp/step2/exampleapplication.cc |    2 +-
 examples/book/buildapp/step4/Makefile.example      |    6 +++---
 examples/book/buildapp/step4/exampleapplication.cc |    2 +-
 examples/book/buildapp/step5/Makefile.example      |    6 +++---
 examples/book/buildapp/step5/exampleapplication.cc |    4 ++--
 8 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/examples/book/buildapp/step1/Makefile.example b/examples/book/buildapp/step1/Makefile.example
index 893f576..feb1648 100644
--- a/examples/book/buildapp/step1/Makefile.example
+++ b/examples/book/buildapp/step1/Makefile.example
@@ -3,8 +3,8 @@ PROGRAM = exampleapp
 CXXFILES = main.cc exampleappwindow.cc exampleapplication.cc
 OBJS = $(CXXFILES:.cc=.o)
 DEPDIR = .deps
-CXXFLAGS = `pkg-config --cflags gtkmm-3.0` -std=c++11 -Wall -g
-LIBS = `pkg-config --libs gtkmm-3.0`
+CXXFLAGS = `pkg-config --cflags gtkmm-4.0` -std=c++14 -Wall -g
+LIBS = `pkg-config --libs gtkmm-4.0`
 
 all: $(PROGRAM)
 
diff --git a/examples/book/buildapp/step1/exampleapplication.cc 
b/examples/book/buildapp/step1/exampleapplication.cc
index ffe3a79..956834b 100644
--- a/examples/book/buildapp/step1/exampleapplication.cc
+++ b/examples/book/buildapp/step1/exampleapplication.cc
@@ -40,7 +40,7 @@ ExampleAppWindow* ExampleApplication::create_appwindow()
   // otherwise equivalent to Gtk::Application::add_window().
 
   // Delete the window when it is hidden.
-  appwindow->signal_hide().connect(sigc::bind<Gtk::Window*>(sigc::mem_fun(*this,
+  appwindow->signal_hide().connect(sigc::bind(sigc::mem_fun(*this,
     &ExampleApplication::on_hide_window), appwindow));
 
   return appwindow;
diff --git a/examples/book/buildapp/step2/Makefile.example b/examples/book/buildapp/step2/Makefile.example
index 7c85510..e6fad9e 100644
--- a/examples/book/buildapp/step2/Makefile.example
+++ b/examples/book/buildapp/step2/Makefile.example
@@ -5,9 +5,9 @@ CXXFILES = main.cc exampleappwindow.cc exampleapplication.cc
 BUILT_SRC = resources.c
 OBJS = $(BUILT_SRC:.c=.o) $(CXXFILES:.cc=.o)
 DEPDIR = .deps
-CXXFLAGS = `pkg-config --cflags gtkmm-3.0` -std=c++11 -Wall -g
-CFLAGS = `pkg-config --cflags gtk+-3.0`
-LIBS = `pkg-config --libs gtkmm-3.0`
+CXXFLAGS = `pkg-config --cflags gtkmm-4.0` -std=c++14 -Wall -g
+CFLAGS = `pkg-config --cflags gtk+-4.0`
+LIBS = `pkg-config --libs gtkmm-4.0`
 GLIB_COMPILE_RESOURCES = $(shell pkg-config --variable=glib_compile_resources gio-2.0)
 
 all: $(PROGRAM)
diff --git a/examples/book/buildapp/step2/exampleapplication.cc 
b/examples/book/buildapp/step2/exampleapplication.cc
index 63a5eec..59523f9 100644
--- a/examples/book/buildapp/step2/exampleapplication.cc
+++ b/examples/book/buildapp/step2/exampleapplication.cc
@@ -42,7 +42,7 @@ ExampleAppWindow* ExampleApplication::create_appwindow()
   // otherwise equivalent to Gtk::Application::add_window().
 
   // Delete the window when it is hidden.
-  appwindow->signal_hide().connect(sigc::bind<Gtk::Window*>(sigc::mem_fun(*this,
+  appwindow->signal_hide().connect(sigc::bind(sigc::mem_fun(*this,
     &ExampleApplication::on_hide_window), appwindow));
 
   return appwindow;
diff --git a/examples/book/buildapp/step4/Makefile.example b/examples/book/buildapp/step4/Makefile.example
index 4cad3dc..70ce9e5 100644
--- a/examples/book/buildapp/step4/Makefile.example
+++ b/examples/book/buildapp/step4/Makefile.example
@@ -5,9 +5,9 @@ CXXFILES = main.cc exampleappwindow.cc exampleapplication.cc
 BUILT_SRC = resources.c
 OBJS = $(BUILT_SRC:.c=.o) $(CXXFILES:.cc=.o)
 DEPDIR = .deps
-CXXFLAGS = `pkg-config --cflags gtkmm-3.0` -std=c++11 -Wall -g
-CFLAGS = `pkg-config --cflags gtk+-3.0`
-LIBS = `pkg-config --libs gtkmm-3.0`
+CXXFLAGS = `pkg-config --cflags gtkmm-4.0` -std=c++14 -Wall -g
+CFLAGS = `pkg-config --cflags gtk+-4.0`
+LIBS = `pkg-config --libs gtkmm-4.0`
 GLIB_COMPILE_RESOURCES = $(shell pkg-config --variable=glib_compile_resources gio-2.0)
 
 all: $(PROGRAM)
diff --git a/examples/book/buildapp/step4/exampleapplication.cc 
b/examples/book/buildapp/step4/exampleapplication.cc
index 0bebedd..3cc81a9 100644
--- a/examples/book/buildapp/step4/exampleapplication.cc
+++ b/examples/book/buildapp/step4/exampleapplication.cc
@@ -42,7 +42,7 @@ ExampleAppWindow* ExampleApplication::create_appwindow()
   // otherwise equivalent to Gtk::Application::add_window().
 
   // Delete the window when it is hidden.
-  appwindow->signal_hide().connect(sigc::bind<Gtk::Window*>(sigc::mem_fun(*this,
+  appwindow->signal_hide().connect(sigc::bind(sigc::mem_fun(*this,
     &ExampleApplication::on_hide_window), appwindow));
 
   return appwindow;
diff --git a/examples/book/buildapp/step5/Makefile.example b/examples/book/buildapp/step5/Makefile.example
index 6a1b0d2..5fac411 100644
--- a/examples/book/buildapp/step5/Makefile.example
+++ b/examples/book/buildapp/step5/Makefile.example
@@ -5,9 +5,9 @@ CXXFILES = main.cc exampleappwindow.cc exampleapplication.cc exampleappprefs.cc
 BUILT_SRC = resources.c
 OBJS = $(BUILT_SRC:.c=.o) $(CXXFILES:.cc=.o)
 DEPDIR = .deps
-CXXFLAGS = `pkg-config --cflags gtkmm-3.0` -std=c++11 -Wall -g
-CFLAGS = `pkg-config --cflags gtk+-3.0`
-LIBS = `pkg-config --libs gtkmm-3.0`
+CXXFLAGS = `pkg-config --cflags gtkmm-4.0` -std=c++14 -Wall -g
+CFLAGS = `pkg-config --cflags gtk+-4.0`
+LIBS = `pkg-config --libs gtkmm-4.0`
 GLIB_COMPILE_RESOURCES = $(shell pkg-config --variable=glib_compile_resources gio-2.0)
 GLIB_COMPILE_SCHEMAS   = $(shell pkg-config --variable=glib_compile_schemas gio-2.0)
 
diff --git a/examples/book/buildapp/step5/exampleapplication.cc 
b/examples/book/buildapp/step5/exampleapplication.cc
index 1cdfc56..219ddd1 100644
--- a/examples/book/buildapp/step5/exampleapplication.cc
+++ b/examples/book/buildapp/step5/exampleapplication.cc
@@ -43,7 +43,7 @@ ExampleAppWindow* ExampleApplication::create_appwindow()
   // otherwise equivalent to Gtk::Application::add_window().
 
   // Delete the window when it is hidden.
-  appwindow->signal_hide().connect(sigc::bind<Gtk::Window*>(sigc::mem_fun(*this,
+  appwindow->signal_hide().connect(sigc::bind(sigc::mem_fun(*this,
     &ExampleApplication::on_hide_window), appwindow));
 
   return appwindow;
@@ -143,7 +143,7 @@ void ExampleApplication::on_action_preferences()
     prefs_dialog->present();
 
     // Delete the dialog when it is hidden.
-    prefs_dialog->signal_hide().connect(sigc::bind<Gtk::Window*>(sigc::mem_fun(*this,
+    prefs_dialog->signal_hide().connect(sigc::bind(sigc::mem_fun(*this,
       &ExampleApplication::on_hide_window), prefs_dialog));
   }
   catch (const Glib::Error& ex)


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