# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1331488151 14400 # Node ID 55fcb6b575bb08e85e057bb329d039b00b4e30f3 # Parent ab46762884142dfe282f6d658a4ea432188566cf# Parent 8cdfd3cabea35f563c915eb8bcef4c813a5a4639 Merge in Mike's changes diff -r ab4676288414 -r 55fcb6b575bb liboctave/regexp.h --- a/liboctave/regexp.h Sat Mar 10 15:53:55 2012 -0500 +++ b/liboctave/regexp.h Sun Mar 11 13:49:11 2012 -0400 @@ -89,7 +89,7 @@ std::string replace (const std::string& buffer, const std::string& replacement); - struct opts + class opts { public: diff -r ab4676288414 -r 55fcb6b575bb src/DLD-FUNCTIONS/__init_fltk__.cc --- a/src/DLD-FUNCTIONS/__init_fltk__.cc Sat Mar 10 15:53:55 2012 -0500 +++ b/src/DLD-FUNCTIONS/__init_fltk__.cc Sun Mar 11 13:49:11 2012 -0400 @@ -668,6 +668,14 @@ callback (window_close, static_cast (this)); size_range (4*status_h, 2*status_h); + // FIXME: The function below is only available in FLTK >= 1.3 + // At some point support for FLTK 1.1 will be dropped in Octave. + // At that point this function should be uncommented. + // The current solution is to call xclass() before show() for each window. + // Set WM_CLASS which allows window managers to properly group related + // windows. Otherwise, the class is just "FLTK" + //default_xclass ("Octave"); + begin (); { @@ -722,6 +730,13 @@ canvas->mode (FL_DEPTH | FL_DOUBLE ); if (fp.is_visible ()) { + // FIXME: This code should be removed when Octave drops support + // for FLTK 1.1. Search for default_xclass in this file to find + // code that should be uncommented to take its place. + // + // Set WM_CLASS which allows window managers to properly group + // related windows. Otherwise, the class is just "FLTK" + xclass ("Octave"); show (); if (fp.get_currentaxes ().ok()) show_canvas (); diff -r ab4676288414 -r 55fcb6b575bb src/graphics.h.in --- a/src/graphics.h.in Sat Mar 10 15:53:55 2012 -0500 +++ b/src/graphics.h.in Sun Mar 11 13:49:11 2012 -0400 @@ -4235,13 +4235,38 @@ public: double get_fontsize_points (double box_pix_height = 0) const; + void set_position (const octave_value& val) + { + if (! error_state) + { + octave_value new_val (val); + + if (new_val.numel () == 2) + { + dim_vector dv (1, 3); + + new_val = new_val.resize (dv, true); + } + + if (position.set (new_val, false)) + { + set_positionmode ("manual"); + update_position (); + position.run_listeners (POSTSET); + mark_modified (); + } + else + set_positionmode ("manual"); + } + } + // See the genprops.awk script for an explanation of the // properties declarations. BEGIN_PROPERTIES (text) text_label_property string u , "" radio_property units u , "{data}|pixels|normalized|inches|centimeters|points" - array_property position mu , Matrix (1, 3, 0.0) + array_property position smu , Matrix (1, 3, 0.0) double_property rotation mu , 0 radio_property horizontalalignment mu , "{left}|center|right" color_property color u , color_values (0, 0, 0) @@ -4287,7 +4312,6 @@ protected: void init (void) { - position.add_constraint (dim_vector (1, 2)); position.add_constraint (dim_vector (1, 3)); cached_units = get_units (); update_font ();