GUI editor tabs

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

GUI editor tabs

Richard Crozier

The devs may be aware of this, but as of Qt 4.5 you can have movable
tabs so to order can be changed by dragging them around. In Octave I
have tried this by adding the line

_tab_widget->setMovable (true);

just after the tab is created around line 874 of file-editor.cc. Is
there a maximum version of Qt for features in the GUI? If higher than
4.5, I think adding this might be a nice feature, as it's annoying that
you can't rearrange the tabs.

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply | Threaded
Open this post in threaded view
|

Re: GUI editor tabs

Thorsten Liebig
Just make it depend on the Qt version found?

#if QT_VERSION >= 0x040500
   _tab_widget->setMovable (true);
#endif


Am 28.11.2013 12:29, schrieb Richard Crozier:

>
> The devs may be aware of this, but as of Qt 4.5 you can have movable tabs so to order can be changed by dragging them around. In Octave I have tried
> this by adding the line
>
> _tab_widget->setMovable (true);
>
> just after the tab is created around line 874 of file-editor.cc. Is there a maximum version of Qt for features in the GUI? If higher than 4.5, I
> think adding this might be a nice feature, as it's annoying that you can't rearrange the tabs.
>
> Richard
>

Reply | Threaded
Open this post in threaded view
|

Re: GUI editor tabs

Richard Crozier
On 28/11/2013 11:43, Thorsten Liebig wrote:
> Just make it depend on the Qt version found?
>
> #if QT_VERSION >= 0x040500
>     _tab_widget->setMovable (true);
> #endif
>
>

This works for me. It's quite a small change, would you make it, or
should I create a changeset?

Richard


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply | Threaded
Open this post in threaded view
|

File Browser bug

Richard Crozier
In reply to this post by Thorsten Liebig

Now, I'm using ( 6762a6d23010+ (classdef) ) so this may not be present
on default/stable.

When I try to open an m-file in the editor which contains an underscore
character in the file name, which is not the first character, instead of
opening the file in the editor, octave attempts to load it as a data
file, i.e. I get:

 >> error: load: failed to read matrix from file
'/home/richard/octave/test/t_est.m'

in this case t_est.m contains just "disp('hello')"

I get the same behaviour using the context menu open option on the file
browser, but I can open it fine using the editor open file methods.

Octave also does not return the prompt after displaying the error until
you hit enter or CTRL+C.

Is this known, already fixed, or should I file a bug report?

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply | Threaded
Open this post in threaded view
|

Re: File Browser bug

Richard Crozier
On 28/11/2013 12:14, Richard Crozier wrote:
>

> When I try to open an m-file in the editor

I mean file browser

Richard


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply | Threaded
Open this post in threaded view
|

Re: GUI editor tabs

Thorsten Liebig
In reply to this post by Richard Crozier
Am 28.11.2013 13:03, schrieb Richard Crozier:

> On 28/11/2013 11:43, Thorsten Liebig wrote:
>> Just make it depend on the Qt version found?
>>
>> #if QT_VERSION >= 0x040500
>>     _tab_widget->setMovable (true);
>> #endif
>>
>>
>
> This works for me. It's quite a small change, would you make it, or should I create a changeset?
>
> Richard
>
>
Please make the changeset, I have little time atm and it is your idea ;)
But I like the change...
Please verify that  "0x040500" as the version is correct, but I'm pretty sure it should.
Does it work with Qt5 as well?

regards
Thorsten


Reply | Threaded
Open this post in threaded view
|

Re: GUI editor tabs

Richard Crozier
On 28/11/2013 12:38, Thorsten Liebig wrote:

> Am 28.11.2013 13:03, schrieb Richard Crozier:
>> On 28/11/2013 11:43, Thorsten Liebig wrote:
>>> Just make it depend on the Qt version found?
>>>
>>> #if QT_VERSION >= 0x040500
>>>      _tab_widget->setMovable (true);
>>> #endif
>>>
>>>
>>
>> This works for me. It's quite a small change, would you make it, or should I create a changeset?
>>
>> Richard
>>
>>
> Please make the changeset, I have little time atm and it is your idea ;)
> But I like the change...
> Please verify that  "0x040500" as the version is correct, but I'm pretty sure it should.
> Does it work with Qt5 as well?
>
> regards
> Thorsten
>
>
>

Ok, I'll check and create a patch. I should really learn how to make an
online clone so I can send pull requests.

 From the Qt5 online docs the property and access functions for this are
the same.

Richard


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply | Threaded
Open this post in threaded view
|

Re: File Browser bug

Torsten
In reply to this post by Richard Crozier
On 28.11.2013 13:14, Richard Crozier wrote:

>
> Now, I'm using ( 6762a6d23010+ (classdef) ) so this may not be present
> on default/stable.
>
> When I try to open an m-file in the editor which contains an underscore
> character in the file name, which is not the first character, instead of
> opening the file in the editor, octave attempts to load it as a data
> file, i.e. I get:
>
>>> error: load: failed to read matrix from file
> '/home/richard/octave/test/t_est.m'
>
> in this case t_est.m contains just "disp('hello')"
>
> I get the same behaviour using the context menu open option on the file
> browser, but I can open it fine using the editor open file methods.
>
> Octave also does not return the prompt after displaying the error until
> you hit enter or CTRL+C.
>
> Is this known, already fixed, or should I file a bug report?
>
> Richard
>

I switched to classdef (hg id 6762a6d23010 (classdef)) but can not
reproduce the error.

Torsten

Reply | Threaded
Open this post in threaded view
|

Re: File Browser bug

Richard Crozier
On 28/11/2013 19:30, Torsten wrote:

> On 28.11.2013 13:14, Richard Crozier wrote:
>>
>>
>
> I switched to classdef (hg id 6762a6d23010 (classdef)) but can not
> reproduce the error.
>
> Torsten
>
>

ok, I won't submit a bug report. I'll wait and see if this 'goes away'
for me after a while, and if it doesn't, I'll try stepping through with
a debugger to see what actually happens for me.

Thanks
Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply | Threaded
Open this post in threaded view
|

Re: GUI editor tabs

Richard Crozier
In reply to this post by Richard Crozier
On 28/11/2013 12:46, Richard Crozier wrote:
> On 28/11/2013 12:38, Thorsten Liebig wrote:
>> Am 28.11.2013 13:03, schrieb Richard Crozier:
>>> On 28/11/2013 11:43, Thorsten Liebig wrote:
>>>> Just make it depend on the Qt version found?
>>>>
>>>> #if QT_VERSION >= 0x040500
>>>>      _tab_widget->setMovable (true);
>>>> #endif

>>
>>
>>
>
> Ok, I'll check and create a patch. I should really learn how to make an
> online clone so I can send pull requests.
>
>  From the Qt5 online docs the property and access functions for this are
> the same.
>
> Richard
>
>

I finally submitted the patch, thought it best to wait and patch against
the reorganised repos.

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.