[gtkmm-documentation] Fix 'make check' after Gtk::Misc has been deprecated



commit a1256284efce9af624c616af0765fea093013725
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Mon May 26 17:01:08 2014 +0200

    Fix 'make check' after Gtk::Misc has been deprecated
    
    * examples/book/assistant/examplewindow.cc
    * examples/book/box/examplewindow.cc:
    * examples/book/custom/custom_container/examplewindow.cc:
    * examples/book/headerbar/examplewindow.cc:
    * examples/book/placessidebar/examplewindow.cc:
    * examples/book/searchbar/examplewindow.cc:
    * examples/book/spinbutton/examplewindow.cc: Don't use deprecated
    Misc::set_alignment() and deprecated Label ctor.

 examples/book/assistant/examplewindow.cc           |    6 ++----
 examples/book/box/examplewindow.cc                 |   15 +++++++++------
 .../book/custom/custom_container/examplewindow.cc  |    4 +---
 examples/book/headerbar/examplewindow.cc           |    6 +++---
 examples/book/placessidebar/examplewindow.cc       |    9 ++++++---
 examples/book/searchbar/examplewindow.cc           |    4 ++--
 examples/book/spinbutton/examplewindow.cc          |   15 +++++----------
 7 files changed, 28 insertions(+), 31 deletions(-)
---
diff --git a/examples/book/assistant/examplewindow.cc b/examples/book/assistant/examplewindow.cc
index 80883c7..3b879e7 100644
--- a/examples/book/assistant/examplewindow.cc
+++ b/examples/book/assistant/examplewindow.cc
@@ -19,8 +19,8 @@
 
 ExampleWindow::ExampleWindow()
 : m_button("Show the assistant"),
-  m_label1("State of assistant checkbutton:"),
-  m_label2("Contents of assistant entry:")
+  m_label1("State of assistant checkbutton:", Gtk::ALIGN_START, Gtk::ALIGN_CENTER),
+  m_label2("Contents of assistant entry:", Gtk::ALIGN_START, Gtk::ALIGN_CENTER)
 {
   set_title("Gtk::Assistant example");
   set_border_width(12);
@@ -32,10 +32,8 @@ ExampleWindow::ExampleWindow()
   m_button.set_valign(Gtk::ALIGN_CENTER);
 
   m_grid.attach(m_label1, 0, 1, 1, 1);
-  m_label1.set_alignment(0.0, 0.5);
 
   m_grid.attach(m_label2, 0, 2, 1, 1);
-  m_label2.set_alignment(0.0, 0.5);
 
   m_grid.attach(m_check, 1, 1, 1, 1);
   m_check.set_halign(Gtk::ALIGN_START);
diff --git a/examples/book/box/examplewindow.cc b/examples/book/box/examplewindow.cc
index bd32a75..ff655d1 100644
--- a/examples/book/box/examplewindow.cc
+++ b/examples/book/box/examplewindow.cc
@@ -34,9 +34,9 @@ ExampleWindow::ExampleWindow(int which)
     {
       m_Label1.set_text("Gtk::Box(Gtk::ORIENTATION_HORIZONTAL); set_homogeneous(false);");
 
-      // Align the label to the left side.  We'll discuss this function and
-      // others in the section on Widget Attributes.
-      m_Label1.set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_START);
+      // Align the label to the left side.
+      m_Label1.set_halign(Gtk::ALIGN_START);
+      m_Label1.set_valign(Gtk::ALIGN_START);
 
       // Pack the label into the vertical box (vbox box1).  Remember that
       // widgets added to a vbox will be packed one on top of the other in
@@ -65,7 +65,8 @@ ExampleWindow::ExampleWindow(int which)
 
       // create another new label, and show it.
       m_Label2.set_text("Gtk::Box(Gtk::ORIENTATION_HORIZONTAL); set_homogeneous(true);");
-      m_Label2.set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_START);
+      m_Label2.set_halign(Gtk::ALIGN_START);
+      m_Label2.set_valign(Gtk::ALIGN_START);
       m_box1.pack_start(m_Label2, Gtk::PACK_SHRINK);
 
       // Args are: homogeneous, spacing, options, padding
@@ -85,7 +86,8 @@ ExampleWindow::ExampleWindow(int which)
     {
 
       m_Label1.set_text("Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, 10); set_homogeneous(false);");
-      m_Label1.set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_START);
+      m_Label1.set_halign(Gtk::ALIGN_START);
+      m_Label1.set_valign(Gtk::ALIGN_START);
       m_box1.pack_start(m_Label1, Gtk::PACK_SHRINK);
 
       pPackBox1 = Gtk::manage(new PackBox(false, 10, Gtk::PACK_EXPAND_PADDING));
@@ -97,7 +99,8 @@ ExampleWindow::ExampleWindow(int which)
       m_box1.pack_start(m_separator1, Gtk::PACK_SHRINK, 5);
 
       m_Label2.set_text("Gtk::Box(Gtk::ORIENTATION_HORIZONTAL); set_homogeneous(false);");
-      m_Label2.set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_START);
+      m_Label2.set_halign(Gtk::ALIGN_START);
+      m_Label2.set_valign(Gtk::ALIGN_START);
       m_box1.pack_start(m_Label2, Gtk::PACK_SHRINK);
 
       pPackBox3 = Gtk::manage(new PackBox(false, 0, Gtk::PACK_SHRINK, 10));
diff --git a/examples/book/custom/custom_container/examplewindow.cc 
b/examples/book/custom/custom_container/examplewindow.cc
index 5e10fc0..5143cc0 100644
--- a/examples/book/custom/custom_container/examplewindow.cc
+++ b/examples/book/custom/custom_container/examplewindow.cc
@@ -22,7 +22,7 @@
 ExampleWindow::ExampleWindow()
 : m_VBox(Gtk::ORIENTATION_VERTICAL),
   m_Button_One("Child One"),
-  m_Label_Two("Child 2"),
+  m_Label_Two("Child 2", Gtk::ALIGN_END, Gtk::ALIGN_CENTER),
   m_Button_Quit("Quit")
 {
   set_title("Custom Container example");
@@ -34,8 +34,6 @@ ExampleWindow::ExampleWindow()
   //Add the child widgets to the custom container:
   m_MyContainer.set_child_widgets(m_Button_One, m_Label_Two);
 
-  m_Label_Two.set_alignment(1.0, 0.5);
-
   m_VBox.pack_start(m_MyContainer, Gtk::PACK_EXPAND_WIDGET);
   m_VBox.pack_start(m_ButtonBox, Gtk::PACK_SHRINK);
 
diff --git a/examples/book/headerbar/examplewindow.cc b/examples/book/headerbar/examplewindow.cc
index 21c4715..a4e4f34 100644
--- a/examples/book/headerbar/examplewindow.cc
+++ b/examples/book/headerbar/examplewindow.cc
@@ -17,9 +17,9 @@
 #include "examplewindow.h"
 
 ExampleWindow::ExampleWindow()
- : m_close_button_label("Show close button:", 1.0, 0.5),
-   m_title_label("Title:", 1.0, 0.5),
-   m_subtitle_label("Subtitle:", 1.0, 0.5)
+ : m_close_button_label("Show close button:", Gtk::ALIGN_END, Gtk::ALIGN_CENTER),
+   m_title_label("Title:", Gtk::ALIGN_END, Gtk::ALIGN_CENTER),
+   m_subtitle_label("Subtitle:", Gtk::ALIGN_END, Gtk::ALIGN_CENTER)
 {
   // Window properties
   set_title("HeaderBar Example");
diff --git a/examples/book/placessidebar/examplewindow.cc b/examples/book/placessidebar/examplewindow.cc
index d77d743..a895274 100644
--- a/examples/book/placessidebar/examplewindow.cc
+++ b/examples/book/placessidebar/examplewindow.cc
@@ -103,11 +103,14 @@ void ExampleWindow::on_placessidebar_open_location(const Glib::RefPtr<Gio::File>
   Gtk::Label file_basename_label, file_path_label, file_uri_label;
 
   file_basename_label.set_text(location->get_basename());
-  file_basename_label.set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
+  file_basename_label.set_halign(Gtk::ALIGN_START);
+  file_basename_label.set_valign(Gtk::ALIGN_CENTER);
   file_path_label.set_text(location->get_path());
-  file_path_label.set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
+  file_path_label.set_halign(Gtk::ALIGN_START);
+  file_path_label.set_valign(Gtk::ALIGN_CENTER);
   file_uri_label.set_text(location->get_uri());
-  file_uri_label.set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
+  file_uri_label.set_halign(Gtk::ALIGN_START);
+  file_uri_label.set_valign(Gtk::ALIGN_CENTER);
 
   location_information_grid.attach(basename_label, 0, 0, 1, 1);
   location_information_grid.attach(file_basename_label, 1, 0, 1, 1);
diff --git a/examples/book/searchbar/examplewindow.cc b/examples/book/searchbar/examplewindow.cc
index 278b81d..53d2e43 100644
--- a/examples/book/searchbar/examplewindow.cc
+++ b/examples/book/searchbar/examplewindow.cc
@@ -21,8 +21,8 @@ ExampleWindow::ExampleWindow()
   m_search_box(Gtk::ORIENTATION_HORIZONTAL),
   m_up_down_box(Gtk::ORIENTATION_HORIZONTAL),
   m_label("Press any key to start searching"),
-  m_search_mode_label("Show search bar:", 1.0, 0.5),
-  m_close_button_label("Show close button:", 1.0, 0.5)
+  m_search_mode_label("Show search bar:", Gtk::ALIGN_END, Gtk::ALIGN_CENTER),
+  m_close_button_label("Show close button:", Gtk::ALIGN_END, Gtk::ALIGN_CENTER)
 {
   // Window properties
   set_title("SearchBar Example");
diff --git a/examples/book/spinbutton/examplewindow.cc b/examples/book/spinbutton/examplewindow.cc
index 93b9d77..593c29c 100644
--- a/examples/book/spinbutton/examplewindow.cc
+++ b/examples/book/spinbutton/examplewindow.cc
@@ -32,11 +32,11 @@ ExampleWindow::ExampleWindow()
   m_VBox_Accelerated(Gtk::ORIENTATION_VERTICAL),
   m_VBox_Value(Gtk::ORIENTATION_VERTICAL),
   m_VBox_Digits(Gtk::ORIENTATION_VERTICAL),
-  m_Label_Day("Day: "),
-  m_Label_Month("Month: "),
-  m_Label_Year("Year: "),
-  m_Label_Value("Value: "),
-  m_Label_Digits("Digits: "),
+  m_Label_Day("Day: ", Gtk::ALIGN_START),
+  m_Label_Month("Month: ", Gtk::ALIGN_START),
+  m_Label_Year("Year: ", Gtk::ALIGN_START),
+  m_Label_Value("Value: ", Gtk::ALIGN_START),
+  m_Label_Digits("Digits: ", Gtk::ALIGN_START),
   m_adjustment_day( Gtk::Adjustment::create(1.0, 1.0, 31.0, 1.0, 5.0, 0.0) ),
   m_adjustment_month( Gtk::Adjustment::create(1.0, 1.0, 12.0, 1.0, 5.0, 0.0) ),
   m_adjustment_year( Gtk::Adjustment::create(2012.0, 1.0, 2200.0, 1.0, 100.0, 0.0) ),
@@ -67,7 +67,6 @@ ExampleWindow::ExampleWindow()
 
   m_VBox.pack_start(m_HBox_NotAccelerated, Gtk::PACK_EXPAND_WIDGET, 5);
 
-  m_Label_Day.set_alignment(Gtk::ALIGN_START);
   m_VBox_Day.pack_start(m_Label_Day);
 
   m_SpinButton_Day.set_wrap();
@@ -76,7 +75,6 @@ ExampleWindow::ExampleWindow()
 
   m_HBox_NotAccelerated.pack_start(m_VBox_Day, Gtk::PACK_EXPAND_WIDGET, 5);
 
-  m_Label_Month.set_alignment(Gtk::ALIGN_START);
   m_VBox_Month.pack_start(m_Label_Month);
 
   m_SpinButton_Month.set_wrap();
@@ -84,7 +82,6 @@ ExampleWindow::ExampleWindow()
 
   m_HBox_NotAccelerated.pack_start(m_VBox_Month, Gtk::PACK_EXPAND_WIDGET, 5);
 
-  m_Label_Year.set_alignment(Gtk::ALIGN_START);
   m_VBox_Year.pack_start(m_Label_Year);
 
   m_SpinButton_Year.set_wrap();
@@ -103,7 +100,6 @@ ExampleWindow::ExampleWindow()
 
   m_HBox_Accelerated.pack_start(m_VBox_Value, Gtk::PACK_EXPAND_WIDGET, 5);
 
-  m_Label_Value.set_alignment(Gtk::ALIGN_START);
   m_VBox_Value.pack_start(m_Label_Value);
 
   m_SpinButton_Value.set_wrap();
@@ -112,7 +108,6 @@ ExampleWindow::ExampleWindow()
 
   m_HBox_Accelerated.pack_start(m_VBox_Digits, Gtk::PACK_EXPAND_WIDGET, 5);
 
-  m_Label_Digits.set_alignment(Gtk::ALIGN_START);
   m_VBox_Digits.pack_start(m_Label_Digits);
 
   m_SpinButton_Digits.set_wrap();


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