# HG changeset patch # User Rik # Date 1440092093 25200 # Node ID 564e59f75ef8f5abbd15ff0a6a538a4c7b8714aa # Parent 642ce72cf1abfaead53c61e999ed383aad4c4f4e Remove obsolete properties from root figure object. * graphics.in.h (root_figure::properties): Remove diary, diaryfile, echo, errormessage, format, formatspacing, and language from root object. * graphics.cc (get_diary, set_diary, get_diaryfile, set_diaryfile, get_echo, set_echo, get_errormessage, get_format, set_format, get_formatspacing, set_formatspacing, get_recursionlimit, set_recursionlimit): Remove functions for setting obsolete properties of root figure object. diff -r 642ce72cf1ab -r 564e59f75ef8 libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Thu Aug 20 06:42:54 2015 -0700 +++ b/libinterp/corefcn/graphics.cc Thu Aug 20 10:34:53 2015 -0700 @@ -3488,169 +3488,6 @@ gripe_set_invalid ("currentfigure"); } -std::string -root_figure::properties::get_diary (void) const -{ - bool is_diary_on = F__diarystate__ ()(0).bool_value (); - if (is_diary_on) - return std::string ("on"); - else - return std::string ("off"); -} - -void -root_figure::properties::set_diary (const octave_value& val) -{ - if (! error_state) - { - // Input checking and abrev. matching - diary.set (val, false); - - if (! error_state) - { - Fdiary (ovl (diary.current_value ())); - - diary.run_listeners (); - } - } -} - -std::string -root_figure::properties::get_diaryfile (void) const -{ - return F__diaryfile__ ()(0).string_value (); -} - -void -root_figure::properties::set_diaryfile (const octave_value& val) -{ - if (! error_state) - { - // Input checking and abrev. matching - diaryfile.set (val, false); - - if (! error_state) - { - Fdiary (ovl (diaryfile.string_value ())); - - diaryfile.run_listeners (); - } - } -} - -std::string -root_figure::properties::get_echo (void) const -{ - bool is_echo_on = F__echostate__ ()(0).bool_value (); - if (is_echo_on) - return std::string ("on"); - else - return std::string ("off"); -} - -void -root_figure::properties::set_echo (const octave_value& val) -{ - if (! error_state) - { - // Input checking and abrev. matching - echo.set (val, false); - - if (! error_state) - { - Fecho (ovl (echo.current_value ())); - - echo.run_listeners (); - } - } -} - -std::string -root_figure::properties::get_errormessage (void) const -{ - return Flasterr ()(0).string_value (); -} - -std::string -root_figure::properties::get_format (void) const -{ - return F__formatstring__ ()(0).string_value (); -} - -void -root_figure::properties::set_format (const octave_value& val) -{ - if (! error_state) - { - // Input checking and abrev. matching - format.set (val, false); - - if (! error_state) - { - Fformat (ovl (format.current_value ())); - - format.run_listeners (); - } - } -} - -std::string -root_figure::properties::get_formatspacing (void) const -{ - bool iscompact = F__compactformat__ ()(0).bool_value (); - if (iscompact) - return std::string ("compact"); - else - return std::string ("loose"); -} - -void -root_figure::properties::set_formatspacing (const octave_value& val) -{ - if (! error_state) - { - // Input checking and abrev. matching - formatspacing.set (val, false); - - if (! error_state) - { - std::string strval = formatspacing.current_value (); - - if (strval == "compact") - F__compactformat__ (ovl (true)); - else - F__compactformat__ (ovl (false)); - - formatspacing.run_listeners (); - } - } -} - -double -root_figure::properties::get_recursionlimit (void) const -{ - return Fmax_recursion_depth ()(0).double_value (); -} - -void -root_figure::properties::set_recursionlimit (const octave_value& val) -{ - if (! error_state) - { - // Input checking and abrev. matching - recursionlimit.set (val, false); - - if (! error_state) - { - double dval = recursionlimit.double_value (); - - Fmax_recursion_depth (ovl (dval)); - - recursionlimit.run_listeners (); - } - } -} - void figure::properties::set_integerhandle (const octave_value& val) { diff -r 642ce72cf1ab -r 564e59f75ef8 libinterp/corefcn/graphics.in.h --- a/libinterp/corefcn/graphics.in.h Thu Aug 20 06:42:54 2015 -0700 +++ b/libinterp/corefcn/graphics.in.h Thu Aug 20 10:34:53 2015 -0700 @@ -3223,11 +3223,9 @@ // Note that these properties are not yet used by Octave, so setting // them will have no effect. - // FIXME: Several properties have been deleted from Matlab. - // We should either immediately remove them or figure out a way - // to deprecate them for a release or two. - // Obsolete properties: commandwindowsize, diary, diaryfile, echo, - // errormessage, format, formatspacing, language, recursionlimit. + // FIXME: The commandwindowsize property has been deprecated in Matlab + // and is now available through matlab.desktop.comandwindow.size. + // Until Octave has something similar, keep this property in root. // Programming note: Keep property list sorted if new ones are added. @@ -3235,18 +3233,10 @@ handle_property callbackobject Sr , graphics_handle () array_property commandwindowsize r , Matrix (1, 2, 0) handle_property currentfigure S , graphics_handle () - bool_property diary GS , "off" - string_property diaryfile GS , "diary" - bool_property echo GS , "off" - string_property errormessage Gr , "" string_property fixedwidthfontname , "Courier" - radio_property format GS , "+|bank|bit|hex|long|longe|longeng|longg|native-bit|native-hex|none|rat|{short}|shorte|shorteng|shortg" - radio_property formatspacing GS , "compact|{loose}" - string_property language , "ascii" array_property monitorpositions r , Matrix (1, 4, 0) array_property pointerlocation , Matrix (1, 2, 0) double_property pointerwindow r , 0.0 - double_property recursionlimit GS , 256.0 double_property screendepth r , default_screendepth () double_property screenpixelsperinch r , default_screenpixelsperinch () array_property screensize r , default_screensize ()