# HG changeset patch
# User Sahil Yadav <yadavsahil5198@gmail.com>
# Date 1516629283 -19800
#      Mon Jan 22 19:24:43 2018 +0530
# Node ID ba0c739ca9e290d8ec96b9f3739ea6ac261b5168
# Parent  be37df6e1fb4fd1e7e2b31f977702928ec8b065b
Changed the 'bool_property' constructor calling from const char* to bool (bug #52798)

Earlier the constructor for a 'bool_property' used to be:
  bool_property (const std::string& nm, const graphics_handle& h,
                 const char *val)
Now it has been changed to:
  bool_property (const std::string& nm, const graphics_handle& h,
                 bool val)
due to error checking in graphics.cc. See bug report for complete reasoning.

diff -r be37df6e1fb4 -r ba0c739ca9e2 libinterp/corefcn/graphics.in.h
--- a/libinterp/corefcn/graphics.in.h	Sat Jan 20 09:29:07 2018 +0100
+++ b/libinterp/corefcn/graphics.in.h	Mon Jan 22 19:24:43 2018 +0530
@@ -2355,28 +2355,28 @@
 
   BEGIN_BASE_PROPERTIES
     // properties common to all objects
-    bool_property beingdeleted , "off"
+    bool_property beingdeleted , false
     radio_property busyaction , "{queue}|cancel"
     callback_property buttondownfcn , Matrix ()
     children_property children gf , Matrix ()
-    bool_property clipping , "on"
+    bool_property clipping , true
     callback_property createfcn , Matrix ()
     callback_property deletefcn , Matrix ()
     radio_property handlevisibility u , "{on}|callback|off"
-    bool_property hittest , "on"
-    bool_property interruptible , "on"
+    bool_property hittest , true
+    bool_property interruptible , true
     handle_property parent fs , p
     radio_property pickableparts , "{visible}|all|none"
-    bool_property selected , "off"
-    bool_property selectionhighlight , "on"
+    bool_property selected , false
+    bool_property selectionhighlight , true
     string_property tag s , ""
     string_property type frs , ty
     handle_property uicontextmenu u , graphics_handle ()
     any_property userdata , Matrix ()
-    bool_property visible , "on"
+    bool_property visible , true
 
     // Octave-specific properties
-    bool_property __modified__ hs , "on"
+    bool_property __modified__ hs , true
     graphics_handle __myhandle__ fhrs , mh
   END_PROPERTIES
 
@@ -2914,7 +2914,7 @@
       double_property screendepth r , default_screendepth ()
       double_property screenpixelsperinch r , default_screenpixelsperinch ()
       array_property screensize r , default_screensize ()
-      bool_property showhiddenhandles , "off"
+      bool_property showhiddenhandles , false
       radio_property units U , "inches|centimeters|normalized|points|{pixels}"
       // Hide base properties which don't make sense for root object
       //radio_property beingdeleted h , "{off}|on"
@@ -3114,11 +3114,11 @@
       string_property currentcharacter r , ""
       handle_property currentobject r , graphics_handle ()
       array_property currentpoint r , Matrix (2, 1, 0)
-      bool_property dockcontrols , "off"
+      bool_property dockcontrols , false
       string_property filename , ""
-      bool_property graphicssmoothing , "on"
-      bool_property integerhandle S , "on"
-      bool_property inverthardcopy , "on"
+      bool_property graphicssmoothing , true
+      bool_property integerhandle S , true
+      bool_property inverthardcopy , true
       callback_property keypressfcn , Matrix ()
       callback_property keyreleasefcn , Matrix ()
       radio_property menubar , "{figure}|none"
@@ -3126,7 +3126,7 @@
       // FIXME: Need RO property which returns current figure number.
       // double_property number r ,
       radio_property nextplot , "{add}|new|replace|replacechildren"
-      bool_property numbertitle , "on"
+      bool_property numbertitle , true
       array_property outerposition s , Matrix (1, 4, -1.0)
       radio_property paperorientation U , "{portrait}|landscape"
       array_property paperposition m , default_figure_paperposition ()
@@ -3141,7 +3141,7 @@
       array_property position s , default_figure_position ()
       radio_property renderer m , "{opengl}|painters"
       radio_property renderermode , "{auto}|manual"
-      bool_property resize , "on"
+      bool_property resize , true
       // FIXME: resizefcn has been deprecated by Matlab, and
       //        replaced with sizechangedfcn
       //        Eventually this will need to be hidden, and then removed.
@@ -3174,7 +3174,7 @@
       // Obsolete properties: doublebuffer, mincolormap, wvisual, wvisualmode,
       //                      xdisplay, xvisual, xvisualmode
       // FIXME: Remove in version 4.6
-      bool_property doublebuffer hd , "on"
+      bool_property doublebuffer hd , true
       double_property mincolormap hd , 64
       string_property wvisual hmd , ""
       radio_property wvisualmode hd , "{auto}|manual"
@@ -3591,7 +3591,7 @@
       row_vector_property alim m , default_lim ()
       radio_property alimmode , "{auto}|manual"
       color_property ambientlightcolor , color_values (1, 1, 1)
-      bool_property box u , "off"
+      bool_property box u , false
       radio_property boxstyle , "{back}|full"
       row_vector_property cameraposition mu , Matrix (1, 3, 0.0)
       radio_property camerapositionmode u , "{auto}|manual"
@@ -3616,7 +3616,7 @@
       string_property fontname u , OCTAVE_DEFAULT_FONTNAME
       double_property fontsize u , 10
       radio_property fontunits SU , "{points}|inches|centimeters|normalized|pixels"
-      bool_property fontsmoothing , "on"
+      bool_property fontsmoothing , true
       radio_property fontweight u , "{normal}|bold"
       double_property gridalpha m , 0.15
       radio_property gridalphamode , "{auto}|manual"
@@ -3658,12 +3658,12 @@
       color_property xcolor mu , color_values (0.15, 0.15, 0.15)
       radio_property xcolormode , "{auto}|manual"
       radio_property xdir u , "{normal}|reverse"
-      bool_property xgrid , "off"
+      bool_property xgrid , false
       handle_property xlabel SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)
       row_vector_property xlim mu , default_lim ()
       radio_property xlimmode al , "{auto}|manual"
-      bool_property xminorgrid , "off"
-      bool_property xminortick , "off"
+      bool_property xminorgrid , false
+      bool_property xminortick , false
       radio_property xscale alu , "{linear}|log"
       row_vector_property xtick mu , default_axes_tick ()
       // FIXME: should be kind of string array.
@@ -3676,12 +3676,12 @@
       color_property ycolor mu , color_values (0.15, 0.15, 0.15)
       radio_property ycolormode , "{auto}|manual"
       radio_property ydir u , "{normal}|reverse"
-      bool_property ygrid , "off"
+      bool_property ygrid , false
       handle_property ylabel SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)
       row_vector_property ylim mu , default_lim ()
       radio_property ylimmode al , "{auto}|manual"
-      bool_property yminorgrid , "off"
-      bool_property yminortick , "off"
+      bool_property yminorgrid , false
+      bool_property yminortick , false
       radio_property yscale alu , "{linear}|log"
       row_vector_property ytick mu , default_axes_tick ()
       any_property yticklabel S , ""
@@ -3691,12 +3691,12 @@
       color_property zcolor mu , color_values (0.15, 0.15, 0.15)
       radio_property zcolormode , "{auto}|manual"
       radio_property zdir u , "{normal}|reverse"
-      bool_property zgrid , "off"
+      bool_property zgrid , false
       handle_property zlabel SOf , gh_manager::make_graphics_handle ("text", __myhandle__, false, false, false)
       row_vector_property zlim mu , default_lim ()
       radio_property zlimmode al , "{auto}|manual"
-      bool_property zminorgrid , "off"
-      bool_property zminortick , "off"
+      bool_property zminorgrid , false
+      bool_property zminortick , false
       radio_property zscale alu , "{linear}|log"
       row_vector_property ztick mu , default_axes_tick ()
       any_property zticklabel S , ""
@@ -4320,9 +4320,9 @@
       row_vector_property xlim hlr , Matrix ()
       row_vector_property ylim hlr , Matrix ()
       row_vector_property zlim hlr , Matrix ()
-      bool_property xliminclude hl , "on"
-      bool_property yliminclude hl , "on"
-      bool_property zliminclude hl , "off"
+      bool_property xliminclude hl , true
+      bool_property yliminclude hl , true
+      bool_property zliminclude hl , false
     END_PROPERTIES
 
   protected:
@@ -4411,7 +4411,7 @@
       color_property backgroundcolor , color_property (radio_values ("{none}"), color_values (1, 1, 1))
       color_property color u , color_values (0, 0, 0)
       color_property edgecolor , color_property (radio_values ("{none}"), color_values (0, 0, 0))
-      bool_property editing , "off"
+      bool_property editing , false
       radio_property erasemode h , "{normal}|none|xor|background"
       array_property extent rG , Matrix (1, 4, 0.0)
       radio_property fontangle u , "{normal}|italic|oblique"
@@ -4434,9 +4434,9 @@
       row_vector_property xlim hlr , Matrix ()
       row_vector_property ylim hlr , Matrix ()
       row_vector_property zlim hlr , Matrix ()
-      bool_property xliminclude hl , "off"
-      bool_property yliminclude hl , "off"
-      bool_property zliminclude hl , "off"
+      bool_property xliminclude hl , false
+      bool_property yliminclude hl , false
+      bool_property zliminclude hl , false
       // hidden properties for auto-positioning
       radio_property positionmode hu , "{auto}|manual"
       radio_property rotationmode hu , "{auto}|manual"
@@ -4596,10 +4596,10 @@
       row_vector_property clim hlr , Matrix ()
       row_vector_property xlim hlr , Matrix ()
       row_vector_property ylim hlr , Matrix ()
-      bool_property aliminclude hlg , "on"
-      bool_property climinclude hlg , "on"
-      bool_property xliminclude hl , "on"
-      bool_property yliminclude hl , "on"
+      bool_property aliminclude hlg , true
+      bool_property climinclude hlg , true
+      bool_property xliminclude hl , true
+      bool_property yliminclude hl , true
       radio_property xdatamode ha , "{auto}|manual"
       radio_property ydatamode ha , "{auto}|manual"
     END_PROPERTIES
@@ -4892,11 +4892,11 @@
       row_vector_property xlim hlr , Matrix ()
       row_vector_property ylim hlr , Matrix ()
       row_vector_property zlim hlr , Matrix ()
-      bool_property aliminclude hlg , "on"
-      bool_property climinclude hlg , "on"
-      bool_property xliminclude hl , "on"
-      bool_property yliminclude hl , "on"
-      bool_property zliminclude hl , "on"
+      bool_property aliminclude hlg , true
+      bool_property climinclude hlg , true
+      bool_property xliminclude hl , true
+      bool_property yliminclude hl , true
+      bool_property zliminclude hl , true
     END_PROPERTIES
 
   protected:
@@ -5106,11 +5106,11 @@
       row_vector_property xlim hlr , Matrix ()
       row_vector_property ylim hlr , Matrix ()
       row_vector_property zlim hlr , Matrix ()
-      bool_property aliminclude hlg , "on"
-      bool_property climinclude hlg , "on"
-      bool_property xliminclude hl , "on"
-      bool_property yliminclude hl , "on"
-      bool_property zliminclude hl , "on"
+      bool_property aliminclude hlg , true
+      bool_property climinclude hlg , true
+      bool_property xliminclude hl , true
+      bool_property yliminclude hl , true
+      bool_property zliminclude hl , true
     END_PROPERTIES
 
   protected:
@@ -5261,11 +5261,11 @@
       row_vector_property xlim hr , Matrix ()
       row_vector_property ylim hr , Matrix ()
       row_vector_property zlim hr , Matrix ()
-      bool_property aliminclude h , "on"
-      bool_property climinclude h , "on"
-      bool_property xliminclude h , "on"
-      bool_property yliminclude h , "on"
-      bool_property zliminclude h , "on"
+      bool_property aliminclude h , true
+      bool_property climinclude h , true
+      bool_property xliminclude h , true
+      bool_property yliminclude h , true
+      bool_property zliminclude h , true
     END_PROPERTIES
 
   private:
@@ -5335,12 +5335,12 @@
     BEGIN_PROPERTIES (uimenu)
       string_property accelerator , ""
       callback_property callback , Matrix ()
-      bool_property checked , "off"
-      bool_property enable , "on"
+      bool_property checked , false
+      bool_property enable , true
       color_property foregroundcolor , color_values (0, 0, 0)
       string_property label , ""
       double_property position , 0
-      bool_property separator , "off"
+      bool_property separator , false
 
       // Octave-specific properties
       string_property __fltk_label__ h , ""
@@ -5469,7 +5469,7 @@
       color_property backgroundcolor , color_values (1, 1, 1)
       callback_property callback , Matrix ()
       array_property cdata , Matrix ()
-      bool_property clipping , "on"
+      bool_property clipping , true
       radio_property enable , "{on}|inactive|off"
       array_property extent rG , Matrix (1, 4, 0.0)
       radio_property fontangle u , "{normal}|italic|oblique"
@@ -5580,7 +5580,7 @@
       color_property backgroundcolor , color_values (1, 1, 1)
       radio_property bordertype , "none|{etchedin}|etchedout|beveledin|beveledout|line"
       double_property borderwidth , 1
-      bool_property clipping , "on"
+      bool_property clipping , true
       radio_property fontangle , "{normal}|italic|oblique"
       string_property fontname , OCTAVE_DEFAULT_FONTNAME
       double_property fontsize , 10
@@ -5856,8 +5856,8 @@
     BEGIN_PROPERTIES (uipushtool)
       array_property cdata , Matrix ()
       callback_property clickedcallback , Matrix ()
-      bool_property enable , "on"
-      bool_property separator , "off"
+      bool_property enable , true
+      bool_property separator , false
       string_property tooltipstring , ""
 
       // Octave-specific properties
@@ -5914,11 +5914,11 @@
     BEGIN_PROPERTIES (uitoggletool)
       array_property cdata , Matrix ()
       callback_property clickedcallback , Matrix ()
-      bool_property enable , "on"
+      bool_property enable , true
       callback_property offcallback , Matrix ()
       callback_property oncallback , Matrix ()
-      bool_property separator , "off"
-      bool_property state , "off"
+      bool_property separator , false
+      bool_property state , false
       string_property tooltipstring , ""
 
       // Octave-specific properties
