[gtkmm-documentation] Remove the FileChooserButton example



commit 87e1ddd50aa371b8303a558730dc26fc2967b968
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Fri Dec 4 14:58:25 2020 +0100

    Remove the FileChooserButton example
    
    Gtk::FileChooserButton has been removed from gtkmm.

 docs/tutorial/C/index-in.docbook                   |  5 ++-
 examples/Makefile.am                               |  6 ----
 .../buttons/filechooserbutton/examplewindow.cc     | 33 --------------------
 .../book/buttons/filechooserbutton/examplewindow.h | 36 ----------------------
 examples/book/buttons/filechooserbutton/main.cc    | 26 ----------------
 examples/book/meson.build                          |  1 -
 examples/book/tooltips/examplewindow.cc            | 15 +++------
 .../cellrenderercustom/cellrenderertoggle.cc       |  8 ++---
 examples/others/cellrenderercustom/popupentry.cc   |  2 +-
 9 files changed, 11 insertions(+), 121 deletions(-)
---
diff --git a/docs/tutorial/C/index-in.docbook b/docs/tutorial/C/index-in.docbook
index c874d2a..cc3020d 100644
--- a/docs/tutorial/C/index-in.docbook
+++ b/docs/tutorial/C/index-in.docbook
@@ -5434,11 +5434,10 @@ if (info)
     <para>
       <classname>FileChooser</classname> is an interface that can be
       implemented by widgets displaying a list of files.
-      &gtkmm; provides four built-in implementations for choosing recent files
+      &gtkmm; provides three built-in implementations for choosing recent files
       or other files:
       <classname>FileChooserWidget</classname>,
-      <classname>FileChooserDialog</classname>,
-      <classname>FileChooserButton</classname>, and
+      <classname>FileChooserDialog</classname>, and
       <classname>FileChooserNative</classname>.
     </para>
     <para>
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 66cbeaf..39a525a 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -21,7 +21,6 @@ check_PROGRAMS =                                      \
        book/builder/derived/example                    \
        book/buttons/button/buttons                     \
        book/buttons/checkbutton/example                \
-       book/buttons/filechooserbutton/example          \
        book/buttons/radiobutton/radiobuttons           \
        book/buttons/scalebutton/example                        \
        book/buttons/togglebutton/example               \
@@ -208,11 +207,6 @@ book_buttons_checkbutton_example_SOURCES =         \
        book/buttons/checkbutton/examplewindow.h        \
        book/buttons/checkbutton/main.cc
 
-book_buttons_filechooserbutton_example_SOURCES =       \
-       book/buttons/filechooserbutton/examplewindow.cc \
-       book/buttons/filechooserbutton/examplewindow.h  \
-       book/buttons/filechooserbutton/main.cc
-
 book_buttons_radiobutton_radiobuttons_SOURCES =                \
        book/buttons/radiobutton/main.cc                \
        book/buttons/radiobutton/radiobuttons.cc        \
diff --git a/examples/book/meson.build b/examples/book/meson.build
index 52bcce9..213e2dc 100644
--- a/examples/book/meson.build
+++ b/examples/book/meson.build
@@ -25,7 +25,6 @@ examples_book = [
   [['builder', 'derived'], 'example', ['deriveddialog.cc', 'derivedbutton.cc', 'main.cc']],
   [['buttons', 'button'], 'buttons', ['buttons.cc', 'main.cc']],
   [['buttons', 'checkbutton'], 'example', exwindow_main],
-  [['buttons', 'filechooserbutton'], 'example', exwindow_main],
   [['buttons', 'radiobutton'], 'radiobuttons', ['main.cc', 'radiobuttons.cc']],
   [['buttons', 'scalebutton'], 'example', exwindow_main],
   [['buttons', 'togglebutton'], 'example', exwindow_main],
diff --git a/examples/book/tooltips/examplewindow.cc b/examples/book/tooltips/examplewindow.cc
index b0de444..293a79f 100644
--- a/examples/book/tooltips/examplewindow.cc
+++ b/examples/book/tooltips/examplewindow.cc
@@ -145,18 +145,13 @@ bool ExampleWindow::on_textview_query_tooltip(int x, int y, bool keyboard_toolti
     m_text_view.get_iter_at_position(iter, trailing, mouse_x, mouse_y);
   }
 
-  //Show a tooltip if the cursor or mouse pointer is over the text
-  //with the specific tag:
-  if (iter.has_tag(m_ref_bold_tag))
-  {
-    tooltip->set_markup("<b>Information</b> attached to a text tag");
-    tooltip->set_icon_from_icon_name("dialog-information");
-  }
-  else
-  {
+  if (!iter.has_tag(m_ref_bold_tag))
     return false;
-  }
 
+  //Show a tooltip if the cursor or mouse pointer is over the text
+  //with the specific tag:
+  tooltip->set_markup("<b>Information</b> attached to a text tag");
+  tooltip->set_icon("dialog-information");
   return true;
 }
 
diff --git a/examples/others/cellrenderercustom/cellrenderertoggle.cc 
b/examples/others/cellrenderercustom/cellrenderertoggle.cc
index c86a4be..c06f069 100644
--- a/examples/others/cellrenderercustom/cellrenderertoggle.cc
+++ b/examples/others/cellrenderercustom/cellrenderertoggle.cc
@@ -175,13 +175,11 @@ void MyCellRendererToggle::snapshot_vfunc(const Glib::RefPtr<Gtk::Snapshot>& sna
   const unsigned int cell_xpad = property_xpad();
   const unsigned int cell_ypad = property_ypad();
 
-  int width = 0, height = 0;
-
   //TODO: Support natural size.
-  GtkRequisition requisition_min, requisition_natural;
+  Gtk::Requisition requisition_min, requisition_natural;
   get_preferred_size(widget, requisition_min, requisition_natural);
-  width = requisition_min.width;
-  height = requisition_min.height;
+  int width = requisition_min.get_width();
+  int height = requisition_min.get_height();
 
   width  -= cell_xpad * 2;
   height -= cell_ypad * 2;
diff --git a/examples/others/cellrenderercustom/popupentry.cc 
b/examples/others/cellrenderercustom/popupentry.cc
index 45ac2cb..a1fb117 100644
--- a/examples/others/cellrenderercustom/popupentry.cc
+++ b/examples/others/cellrenderercustom/popupentry.cc
@@ -91,7 +91,7 @@ int PopupEntry::get_button_width()
   Gtk::Requisition requisition_min, requisition_natural;
   window.get_preferred_size(requisition_min, requisition_natural);
 
-  return requisition_min.width;
+  return requisition_min.get_width();
 }
 
 PopupEntry::type_signal_arrow_clicked& PopupEntry::signal_arrow_clicked()


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