[gtkmm-documentation] Update the book/buildapp examples



commit 01d13fbcf4718fa21ff406092e01c9e8fb53dc29
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Fri Feb 8 15:57:17 2019 +0100

    Update the book/buildapp examples

 examples/book/buildapp/step1/Makefile.example    | 2 +-
 examples/book/buildapp/step2/Makefile.example    | 4 ++--
 examples/book/buildapp/step4/Makefile.example    | 4 ++--
 examples/book/buildapp/step5/Makefile.example    | 4 ++--
 examples/book/buildapp/step5/prefs.ui            | 4 ++--
 examples/book/buildapp/step6/prefs.ui            | 4 ++--
 examples/book/buildapp/step7/prefs.ui            | 4 ++--
 examples/book/buildapp/step8/prefs.ui            | 4 ++--
 examples/book/buildapp/step9/exampleappwindow.cc | 3 ++-
 examples/book/buildapp/step9/prefs.ui            | 4 ++--
 10 files changed, 19 insertions(+), 18 deletions(-)
---
diff --git a/examples/book/buildapp/step1/Makefile.example b/examples/book/buildapp/step1/Makefile.example
index feb1648..e9cfd33 100644
--- a/examples/book/buildapp/step1/Makefile.example
+++ b/examples/book/buildapp/step1/Makefile.example
@@ -3,7 +3,7 @@ PROGRAM = exampleapp
 CXXFILES = main.cc exampleappwindow.cc exampleapplication.cc
 OBJS = $(CXXFILES:.cc=.o)
 DEPDIR = .deps
-CXXFLAGS = `pkg-config --cflags gtkmm-4.0` -std=c++14 -Wall -g
+CXXFLAGS = `pkg-config --cflags gtkmm-4.0` -std=c++17 -Wall -g
 LIBS = `pkg-config --libs gtkmm-4.0`
 
 all: $(PROGRAM)
diff --git a/examples/book/buildapp/step2/Makefile.example b/examples/book/buildapp/step2/Makefile.example
index e6fad9e..a59647e 100644
--- a/examples/book/buildapp/step2/Makefile.example
+++ b/examples/book/buildapp/step2/Makefile.example
@@ -5,8 +5,8 @@ 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-4.0` -std=c++14 -Wall -g
-CFLAGS = `pkg-config --cflags gtk+-4.0`
+CXXFLAGS = `pkg-config --cflags gtkmm-4.0` -std=c++17 -Wall -g
+CFLAGS = `pkg-config --cflags gtk4`
 LIBS = `pkg-config --libs gtkmm-4.0`
 GLIB_COMPILE_RESOURCES = $(shell pkg-config --variable=glib_compile_resources gio-2.0)
 
diff --git a/examples/book/buildapp/step4/Makefile.example b/examples/book/buildapp/step4/Makefile.example
index 70ce9e5..20c3d25 100644
--- a/examples/book/buildapp/step4/Makefile.example
+++ b/examples/book/buildapp/step4/Makefile.example
@@ -5,8 +5,8 @@ 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-4.0` -std=c++14 -Wall -g
-CFLAGS = `pkg-config --cflags gtk+-4.0`
+CXXFLAGS = `pkg-config --cflags gtkmm-4.0` -std=c++17 -Wall -g
+CFLAGS = `pkg-config --cflags gtk4`
 LIBS = `pkg-config --libs gtkmm-4.0`
 GLIB_COMPILE_RESOURCES = $(shell pkg-config --variable=glib_compile_resources gio-2.0)
 
diff --git a/examples/book/buildapp/step5/Makefile.example b/examples/book/buildapp/step5/Makefile.example
index 5fac411..c8afdb1 100644
--- a/examples/book/buildapp/step5/Makefile.example
+++ b/examples/book/buildapp/step5/Makefile.example
@@ -5,8 +5,8 @@ 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-4.0` -std=c++14 -Wall -g
-CFLAGS = `pkg-config --cflags gtk+-4.0`
+CXXFLAGS = `pkg-config --cflags gtkmm-4.0` -std=c++17 -Wall -g
+CFLAGS = `pkg-config --cflags gtk4`
 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/prefs.ui b/examples/book/buildapp/step5/prefs.ui
index 1089e95..abe5d95 100644
--- a/examples/book/buildapp/step5/prefs.ui
+++ b/examples/book/buildapp/step5/prefs.ui
@@ -6,8 +6,8 @@
     <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="use-header-bar">1</property>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="vbox">
+    <child internal-child="content_area">
+      <object class="GtkBox" id="content_area">
         <child>
           <object class="GtkGrid" id="grid">
             <property name="visible">True</property>
diff --git a/examples/book/buildapp/step6/prefs.ui b/examples/book/buildapp/step6/prefs.ui
index 1089e95..abe5d95 100644
--- a/examples/book/buildapp/step6/prefs.ui
+++ b/examples/book/buildapp/step6/prefs.ui
@@ -6,8 +6,8 @@
     <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="use-header-bar">1</property>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="vbox">
+    <child internal-child="content_area">
+      <object class="GtkBox" id="content_area">
         <child>
           <object class="GtkGrid" id="grid">
             <property name="visible">True</property>
diff --git a/examples/book/buildapp/step7/prefs.ui b/examples/book/buildapp/step7/prefs.ui
index 1089e95..abe5d95 100644
--- a/examples/book/buildapp/step7/prefs.ui
+++ b/examples/book/buildapp/step7/prefs.ui
@@ -6,8 +6,8 @@
     <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="use-header-bar">1</property>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="vbox">
+    <child internal-child="content_area">
+      <object class="GtkBox" id="content_area">
         <child>
           <object class="GtkGrid" id="grid">
             <property name="visible">True</property>
diff --git a/examples/book/buildapp/step8/prefs.ui b/examples/book/buildapp/step8/prefs.ui
index 1089e95..abe5d95 100644
--- a/examples/book/buildapp/step8/prefs.ui
+++ b/examples/book/buildapp/step8/prefs.ui
@@ -6,8 +6,8 @@
     <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="use-header-bar">1</property>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="vbox">
+    <child internal-child="content_area">
+      <object class="GtkBox" id="content_area">
         <child>
           <object class="GtkGrid" id="grid">
             <property name="visible">True</property>
diff --git a/examples/book/buildapp/step9/exampleappwindow.cc 
b/examples/book/buildapp/step9/exampleappwindow.cc
index b1a2e71..0b6d7dc 100644
--- a/examples/book/buildapp/step9/exampleappwindow.cc
+++ b/examples/book/buildapp/step9/exampleappwindow.cc
@@ -114,7 +114,8 @@ ExampleAppWindow::ExampleAppWindow(BaseObjectType* cobject,
   set_show_menubar(true);
 
   // Set the window icon.
-  set_icon(Gdk::Texture::create_from_resource("/org/gtkmm/exampleapp/exampleapp.png"));
+  Gtk::IconTheme::get_default()->add_resource_path("/org/gtkmm/exampleapp");
+  set_icon_name("exampleapp");
 }
 
 //static
diff --git a/examples/book/buildapp/step9/prefs.ui b/examples/book/buildapp/step9/prefs.ui
index 1089e95..abe5d95 100644
--- a/examples/book/buildapp/step9/prefs.ui
+++ b/examples/book/buildapp/step9/prefs.ui
@@ -6,8 +6,8 @@
     <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="use-header-bar">1</property>
-    <child internal-child="vbox">
-      <object class="GtkBox" id="vbox">
+    <child internal-child="content_area">
+      <object class="GtkBox" id="content_area">
         <child>
           <object class="GtkGrid" id="grid">
             <property name="visible">True</property>


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