Re: No math dialog

2007-05-23 Thread Edwin Leuven

Edwin Leuven wrote:

Leuven, E. wrote:

so then i suggest the attached patch. it

- introduces toolbar_toggle lfun
- adds a "toggle math toolbar" and "toggle table toolbar" buttons to 
the main toolbar

 (i also moved "toggle toc" there)
- adds a "toggle math panels" button to the math toolbar
- reshuffles the Big Operators panel to avoid confusion with the sum 
icon on the math toolbar

- adds some icons



since i consider to have an ok from josé and jürgen i will commit 
tonight (unless someone shouts out real LOUD)


here you go:

http://www.lyx.org/trac/changeset/18478


Re: No math dialog

2007-05-23 Thread Edwin Leuven

Leuven, E. wrote:

so then i suggest the attached patch. it

- introduces toolbar_toggle lfun
- adds a "toggle math toolbar" and "toggle table toolbar" buttons to the main 
toolbar
 (i also moved "toggle toc" there)
- adds a "toggle math panels" button to the math toolbar
- reshuffles the Big Operators panel to avoid confusion with the sum icon on 
the math toolbar
- adds some icons



since i consider to have an ok from josé and jürgen i will commit 
tonight (unless someone shouts out real LOUD)


RE: No math dialog

2007-05-23 Thread Leuven, E.
José Matos wrote:
>> would this be an ok solution for 1.5?
> 
>   Yes.

so then i suggest the attached patch. it

- introduces toolbar_toggle lfun
- adds a "toggle math toolbar" and "toggle table toolbar" buttons to the main 
toolbar
 (i also moved "toggle toc" there)
- adds a "toggle math panels" button to the math toolbar
- reshuffles the Big Operators panel to avoid confusion with the sum icon on 
the math toolbar
- adds some icons


(personally i would ship lyx with the math and table toolbars on to increase 
awareness)

ok?


toolbartoggle5.patch
Description: toolbartoggle5.patch


RE: No math dialog

2007-05-22 Thread Leuven, E.
John Levon wrote:
> Now we have a vastly superior visual way of choosing simples (the 
> toolbar icon menus) but very poor discoverability.

we could simply add this

Index: lib/ui/stdmenus.inc
===
--- lib/ui/stdmenus.inc (revision 18451)
+++ lib/ui/stdmenus.inc (working copy)
@@ -364,6 +364,8 @@
Separator
Item "Delimiters|r" "dialog-show mathdelimiter"
Item "Matrix|x" "dialog-show mathmatrix"
+   Separator
+   Item "Toggle Math Panels" "toolbar-toggle math_panels"


> BTW, is there a real reason that we have "Math Panel" and "Math" 
> toolbars?

as opposed to?

> What does the former even mean ?

i thought you came up with that one? 

now it means "remember math panel? if you're looking for it: click here..."

;-)

better names are of course welcome...


Re: No math dialog

2007-05-22 Thread John Levon
On Tue, May 22, 2007 at 03:15:23PM +0100, José Matos wrote:

> > It makes me wonder somewhat if killing off the dialog was the right
> > thing to do at all...
> 
>   I have no doubts about it, even in terms of user interface it was clumsy, 
> if 
> used the focus would not return to the lyx windows that is what you want most 
> of the time, argh... :-)

Well, I won't deny it was horrible. It was horrible to use and even
worse to program in the first place :) But it was simple and it was
/there/. Familiar enough to new users acquainted with the "insert
symbol" things you get on other programs.

Now we have a vastly superior visual way of choosing simples (the
toolbar icon menus) but very poor discoverability.

Ideally we'd have something like the text menu entries for the toolbar
items that are already text (square root etc.) plus a simple "Insert
Symbol" style dialog for /all/ the other symbols. This plus the toolbar
is optimal in terms of both new and perpetual intermediate users I
think...

BTW, is there a real reason that we have "Math Panel" and "Math"
toolbars? What does the former even mean ?

regards
john


Re: No math dialog

2007-05-22 Thread José Matos
On Tuesday 22 May 2007 3:14:13 pm John Levon wrote:
>
> It makes me wonder somewhat if killing off the dialog was the right
> thing to do at all...

  I have no doubts about it, even in terms of user interface it was clumsy, if 
used the focus would not return to the lyx windows that is what you want most 
of the time, argh... :-)

> regards
> john



-- 
José Abílio


RE: No math dialog

2007-05-22 Thread Leuven, E.
> It makes me wonder somewhat if killing off the dialog was the
> right thing to do at all...

nostalgia is a dangerous sentiment...


RE: Re: No math dialog

2007-05-22 Thread Leuven, E.
> No, the IconPalette support should be added to the
> MenuBackend instead. That's a job for Edwin ;-)

might have a look at that when i have some spare time (ie, probably 2008 ;-)




Re: No math dialog

2007-05-22 Thread John Levon
On Tue, May 22, 2007 at 03:57:25PM +0200, Abdelrazak Younes wrote:

> >>"John" == John Levon <[EMAIL PROTECTED]> writes:
> >
> >John> On Mon, May 21, 2007 at 10:41:14PM +0200, Jean-Marc Lasgouttes
> >John> wrote:
> "John" == John Levon <[EMAIL PROTECTED]> writes:
> >John> This is a somewhat unpleasant workaround to the problem and I
> >John> don't see why it's necessary. We should just add the symbols to
> >John> the menus.
> >>> In which form?
> >
> >John> Do you mean as text or icons? Ideally text...
> >
> >You means add dozens of menu entries? Yuck.
> 
> No, the IconPalette support should be added to the MenuBackend instead. 
> That's a job for Edwin ;-)

It makes me wonder somewhat if killing off the dialog was the right
thing to do at all...

regards
john


Re: No math dialog

2007-05-22 Thread Abdelrazak Younes

Jean-Marc Lasgouttes wrote:

"John" == John Levon <[EMAIL PROTECTED]> writes:


John> On Mon, May 21, 2007 at 10:41:14PM +0200, Jean-Marc Lasgouttes
John> wrote:

"John" == John Levon <[EMAIL PROTECTED]> writes:

John> This is a somewhat unpleasant workaround to the problem and I
John> don't see why it's necessary. We should just add the symbols to
John> the menus.

 In which form?


John> Do you mean as text or icons? Ideally text...

You means add dozens of menu entries? Yuck.


No, the IconPalette support should be added to the MenuBackend instead. 
That's a job for Edwin ;-)


Abdel.



Re: No math dialog

2007-05-22 Thread José Matos
On Tuesday 22 May 2007 1:31:12 pm Leuven, E. wrote:
> translation please!
>
> would this be an ok solution for 1.5?

  Yes.

> (am not in favor of cluttering the menus with loads of symbol entries)

  Neither do I and most of the developers that posted in this thread, AFAIU.

-- 
José Abílio


RE: No math dialog

2007-05-22 Thread Leuven, E.
José Matos wrote:
> On Tuesday 22 May 2007 6:12:17 am Jürgen Spitzmüller wrote:
>> Edwin Leuven wrote:
>>> the attached patch would allow to put a "toggle math toolbar" button on
>>> the main toolbar. we could then add a "toggle math panels" button on the
>>> math toolbar...
>> I like it.
> 
>   OK.

translation please!

would this be an ok solution for 1.5?

(am not in favor of cluttering the menus with loads of symbol entries)



Re: No math dialog

2007-05-22 Thread Andreas K .
Edwin Leuven <[EMAIL PROTECTED]> writes:

> 
> Abdelrazak Younes wrote:
> > Also a Toolbar button to show the two math toolbars in the main toolbar 
> > is very much needed.
> 
> the attached patch would allow to put a "toggle math toolbar" button on 
> the main toolbar. we could then add a "toggle math panels" button on the 
> math toolbar...

Good. At least a step in the right direction.

Andreas



Re: No math dialog

2007-05-22 Thread Andreas K .
Andre Poenitz <[EMAIL PROTECTED]> writes:

> I think we should just set math and table toolbars to 'always on' in the
> default setup. The user can always switch it off afterwards.


I agree, it's the easiest solution in the short run. But in the long run all 
commands short be available from menu entries too.

Andreas






Re: No math dialog

2007-05-22 Thread José Matos
On Tuesday 22 May 2007 6:12:17 am Jürgen Spitzmüller wrote:
> Edwin Leuven wrote:
> > the attached patch would allow to put a "toggle math toolbar" button on
> > the main toolbar. we could then add a "toggle math panels" button on the
> > math toolbar...
>
> I like it.

  OK.

> Jürgen

-- 
José Abílio


Re: No math dialog

2007-05-21 Thread Jürgen Spitzmüller
Edwin Leuven wrote:
> the attached patch would allow to put a "toggle math toolbar" button on
> the main toolbar. we could then add a "toggle math panels" button on the
> math toolbar...

I like it.

Jürgen


Re: No math dialog

2007-05-21 Thread Jean-Marc Lasgouttes
> "John" == John Levon <[EMAIL PROTECTED]> writes:

John> On Mon, May 21, 2007 at 10:41:14PM +0200, Jean-Marc Lasgouttes
John> wrote:
>> > "John" == John Levon <[EMAIL PROTECTED]> writes:
>> 
John> This is a somewhat unpleasant workaround to the problem and I
John> don't see why it's necessary. We should just add the symbols to
John> the menus.
>>  In which form?

John> Do you mean as text or icons? Ideally text...

You means add dozens of menu entries? Yuck.

JMarc



Re: No math dialog

2007-05-21 Thread Edwin Leuven

Abdelrazak Younes wrote:
Also a Toolbar button to show the two math toolbars in the main toolbar 
is very much needed.


the attached patch would allow to put a "toggle math toolbar" button on 
the main toolbar. we could then add a "toggle math panels" button on the 
math toolbar...
Index: src/frontends/qt4/QLToolbar.cpp
===
--- src/frontends/qt4/QLToolbar.cpp (revision 18446)
+++ src/frontends/qt4/QLToolbar.cpp (working copy)
@@ -298,6 +298,12 @@
 }
 
 
+bool QLToolbar::isVisible() const
+{
+   return QToolBar::isVisible();
+}
+
+
 void QLToolbar::saveInfo(ToolbarSection::ToolbarInfo & tbinfo)
 {
// if tbinfo.state == auto *do not* set on/off
Index: src/frontends/qt4/QLToolbar.h
===
--- src/frontends/qt4/QLToolbar.h   (revision 18446)
+++ src/frontends/qt4/QLToolbar.h   (working copy)
@@ -69,6 +69,7 @@
void add(ToolbarItem const & item);
void hide(bool);
void show(bool);
+   bool isVisible() const;
void saveInfo(ToolbarSection::ToolbarInfo & info);
void update();
LayoutBox * layout() const { return layout_.get(); }
Index: src/frontends/Toolbars.cpp
===
--- src/frontends/Toolbars.cpp  (revision 18446)
+++ src/frontends/Toolbars.cpp  (working copy)
@@ -151,14 +151,13 @@
for (; cit != end; ++cit) {
if (cit->name == name) {
unsigned int flags = cit->flags;
+   TurnOffFlag(ON);
+   TurnOffFlag(OFF);
TurnOffFlag(AUTO);
-   if (show) {
+   if (show)
TurnOnFlag(ON);
+   else
TurnOnFlag(OFF);
-   } else {
-   TurnOnFlag(OFF);
-   TurnOnFlag(ON);
-   }
cit->flags = 
static_cast(flags);
displayToolbar(*cit, show);
return;
@@ -248,6 +247,16 @@
 }
 
 
+bool Toolbars::visible(string const & name) const
+{
+   std::map::const_iterator it =
+   toolbars_.find(name);
+   if (it == toolbars_.end())
+   return false;
+   return it->second.get()->isVisible();
+}
+
+
 void Toolbars::saveToolbarInfo()
 {
ToolbarSection & tb = LyX::ref().session().toolbars();
Index: src/frontends/Toolbars.h
===
--- src/frontends/Toolbars.h(revision 18446)
+++ src/frontends/Toolbars.h(working copy)
@@ -70,6 +70,8 @@
*/
virtual void saveInfo(ToolbarSection::ToolbarInfo & tbinfo) = 0;
 
+   /// whether toolbar is visible
+   virtual bool isVisible() const = 0;
/// Refresh the contents of the bar.
virtual void update() = 0;
/// Accessor to the layout combox, if any.
@@ -90,13 +92,16 @@
 
/// get toolbar state (on/off/auto)
ToolbarInfo::Flags getToolbarState(std::string const & name);
-   
+
/// toggle the state of toolbars (on/off/auto)
void toggleToolbarState(std::string const & name);
 
/// Update the state of the toolbars.
void update(bool in_math, bool in_table, bool review);
 
+   /// Is the Toolbar currently visible?
+   bool visible(std::string const & name) const;
+
/// save toolbar information
void saveToolbarInfo();
 
Index: src/lfuns.h
===
--- src/lfuns.h (revision 18446)
+++ src/lfuns.h (working copy)
@@ -381,6 +381,7 @@
LFUN_CLEARDOUBLEPAGE_INSERT, // Ugras 20061125
//290
LFUN_LISTING_INSERT, // Herbert 2000, bpeng 20070502
+   LFUN_TOOLBAR_TOGGLE, // Edwin 20070521
 
LFUN_LASTACTION  // end of the table
 };
Index: src/LyXAction.cpp
===
--- src/LyXAction.cpp   (revision 18446)
+++ src/LyXAction.cpp   (working copy)
@@ -367,6 +367,7 @@
{ LFUN_WINDOW_CLOSE, "window-close", NoBuffer },
{ LFUN_UNICODE_INSERT, "unicode-insert", Noop },
{ LFUN_TOOLBAR_TOGGLE_STATE, "", NoBuffer },
+   { LFUN_TOOLBAR_TOGGLE, "toolbar-toggle", NoBuffer },
{ LFUN_NOMENCL_INSERT, "nomencl-insert", Noop },
{ LFUN_NOMENCL_PRINT, "nomencl-print", Noop },
{ LFUN_CLEARPAGE_INSERT, "clearpage-insert", Noop },
Index: src/LyXFunc.cpp
===
--- src/LyXFunc.cpp (revision 18446)
+++ src/LyXFunc.cpp (working copy)
@@ -623,6 +623,11 @@
break;
}
 
+   case LFUN_TOOLB

Re: No math dialog

2007-05-21 Thread John Levon
On Mon, May 21, 2007 at 10:41:14PM +0200, Jean-Marc Lasgouttes wrote:

> > "John" == John Levon <[EMAIL PROTECTED]> writes:
> 
> John> This is a somewhat unpleasant workaround to the problem and I
> John> don't see why it's necessary. We should just add the symbols to
> John> the menus.
> 
> In which form?

Do you mean as text or icons? Ideally text...

john


Re: No math dialog

2007-05-21 Thread Jean-Marc Lasgouttes
> "John" == John Levon <[EMAIL PROTECTED]> writes:

John> This is a somewhat unpleasant workaround to the problem and I
John> don't see why it's necessary. We should just add the symbols to
John> the menus.

In which form?

JMarc



Re: No math dialog

2007-05-21 Thread John Levon
On Mon, May 21, 2007 at 07:06:47PM +0200, Andre Poenitz wrote:

> > This menu does not allow us to select the "auto" setting (actually we
> > could have done that, but we did not :). The toolbars are accessible
> > in View>Toolbar, though.
> 
> I think we should just set math and table toolbars to 'always on' in the
> default setup. The user can always switch it off afterwards.

This is a somewhat unpleasant workaround to the problem and I don't see
why it's necessary. We should just add the symbols to the menus.

john


Re: No math dialog

2007-05-21 Thread Andre Poenitz
On Mon, May 21, 2007 at 11:09:39AM +0200, Jean-Marc Lasgouttes wrote:
> > "John" == John Levon <[EMAIL PROTECTED]> writes:
> 
> John> I see the Maths dialog has been removed. Am I right in thinking
> John> that the only way to create things such as sum environments etc.
> John> without knowing LaTeX is to turn on the math panel toolbar and
> John> use that?
> 
> Yes, this is indeed a problem of removing the panel. Note however that
> by default, the toolbar appears automatically when you create a math
> inset, so the situation is not that bad.
> 
> John> This really needs to be available in the menus too for
> John> discoverability: it's a basic principle of toolbars that they
> John> are a quicker form of what's available in the menus, not a
> John> replacement, especially when they're not available by default.
> 
> Agreed.
> 
> John> I noticed that right clicking on toolbar space no longer brings
> John> up the menu of available toolbars. Is that a Qt4 thing, or
> John> intentional?
> 
> This menu does not allow us to select the "auto" setting (actually we
> could have done that, but we did not :). The toolbars are accessible
> in View>Toolbar, though.

I think we should just set math and table toolbars to 'always on' in the
default setup. The user can always switch it off afterwards.

Right now it is really to hard to discover. Even with the knowledge that
it is a toolbar one would look in the context menu of the toolbar area.

Andre'


Re: No math dialog

2007-05-21 Thread José Matos
On Monday 21 May 2007 10:19:48 am Jean-Marc Lasgouttes wrote:
> > "Jürgen" == Jürgen Spitzmüller <[EMAIL PROTECTED]> writes:
>
> Jürgen> I do not like it there, because by default, there's nothing on
> Jürgen> the left, and I don't want to decrease screen space just
> Jürgen> because of 4 buttons that fit very well on top.
>
> OK.

  +1

> JMarc

-- 
José Abílio


Re: No math dialog

2007-05-21 Thread John Levon
On Mon, May 21, 2007 at 11:09:39AM +0200, Jean-Marc Lasgouttes wrote:

> > "John" == John Levon <[EMAIL PROTECTED]> writes:
> 
> John> I see the Maths dialog has been removed. Am I right in thinking
> John> that the only way to create things such as sum environments etc.
> John> without knowing LaTeX is to turn on the math panel toolbar and
> John> use that?
> 
> Yes, this is indeed a problem of removing the panel. Note however that
> by default, the toolbar appears automatically when you create a math
> inset, so the situation is not that bad.

This is not the case for me (rm -rf ~/.lyx/ then control-M in a new
document).


It should be relatively easy to add them to Insert->Math right?

regards
john


Re: No math dialog

2007-05-21 Thread Abdelrazak Younes

John Levon wrote:

I see the Maths dialog has been removed. Am I right in thinking that the
only way to create things such as sum environments etc. without knowing
LaTeX is to turn on the math panel toolbar and use that?


View -> Toolbars etc.


This really needs to be available in the menus too for discoverability:
it's a basic principle of toolbars that they are a quicker form of
what's available in the menus, not a replacement, especially when
they're not available by default.


Agreed. But nobody has done it up to now...

I think each of the symbol panels should be available through
"Insert->Symbols->Arrows, Greek, etc". The reason I don't want them in 
"Insert->Math" is that they are needed and useful also in normal text, 
even if a math inset need to be created.


Also a Toolbar button to show the two math toolbars in the main toolbar 
is very much needed.


Anybody up to the task? (I am very out of time).


I noticed that right clicking on toolbar space no longer brings up the
menu of available toolbars. Is that a Qt4 thing, or intentional?


We remove the panel so we removed this "feature" at the same time. I 
know this "feature" is kind of standard in the LyX world but, if we 
implement the above accessibility items, the situation will be better.


Abdel.



Re: No math dialog

2007-05-21 Thread Jean-Marc Lasgouttes
> "Jürgen" == Jürgen Spitzmüller <[EMAIL PROTECTED]> writes:

Jürgen> Jean-Marc Lasgouttes wrote: patch attached. OK to commit?
>>  Or on the left, maybe?

Jürgen> I do not like it there, because by default, there's nothing on
Jürgen> the left, and I don't want to decrease screen space just
Jürgen> because of 4 buttons that fit very well on top.

OK.

JMarc


Re: No math dialog

2007-05-21 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote:
> Jürgen> patch attached. OK to commit?
>
> Or on the left, maybe?

I do not like it there, because by default, there's nothing on the left, and I 
don't want to decrease screen space just because of 4 buttons that fit very 
well on top.

Jürgen


Re: No math dialog

2007-05-21 Thread Jean-Marc Lasgouttes
> "John" == John Levon <[EMAIL PROTECTED]> writes:

John> I see the Maths dialog has been removed. Am I right in thinking
John> that the only way to create things such as sum environments etc.
John> without knowing LaTeX is to turn on the math panel toolbar and
John> use that?

Yes, this is indeed a problem of removing the panel. Note however that
by default, the toolbar appears automatically when you create a math
inset, so the situation is not that bad.

John> This really needs to be available in the menus too for
John> discoverability: it's a basic principle of toolbars that they
John> are a quicker form of what's available in the menus, not a
John> replacement, especially when they're not available by default.

Agreed.

John> I noticed that right clicking on toolbar space no longer brings
John> up the menu of available toolbars. Is that a Qt4 thing, or
John> intentional?

This menu does not allow us to select the "auto" setting (actually we
could have done that, but we did not :). The toolbars are accessible
in View>Toolbar, though.

JMarc


Re: No math dialog

2007-05-21 Thread Jean-Marc Lasgouttes
> "Jürgen" == Jürgen Spitzmüller <[EMAIL PROTECTED]> writes:

Jürgen> John Levon wrote:
>> I see the toolbar on the right is still present :/

Jürgen> patch attached. OK to commit?

Or on the left, maybe?

JMarc



Re: No math dialog

2007-05-21 Thread Andreas K .
John Levon <[EMAIL PROTECTED]> writes:

> I see the Maths dialog has been removed. Am I right in thinking that the
> only way to create things such as sum environments etc. without knowing
> LaTeX is to turn on the math panel toolbar and use that?


Unfortunately, the answer is yes.


> This really needs to be available in the menus too for discoverability:
> it's a basic principle of toolbars that they are a quicker form of
> what's available in the menus, not a replacement, especially when
> they're not available by default.


I agree wholeheartedly. This will cause much confusion, especially for new 
users, and will drive away new users. In particular since the math toolbars 
are not available by default, it is hard for a new user to find them.

It will also result in many confused users writing to the user's list with 
questions about this. In fact, they have already started to appear: 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg55989.html

Regards,
Andreas



Re: No math dialog

2007-05-20 Thread Jürgen Spitzmüller
John Levon wrote:
> I see the toolbar on the right is still present :/

patch attached. OK to commit?

Jürgen
Index: lib/ui/default.ui
===
--- lib/ui/default.ui	(Revision 18428)
+++ lib/ui/default.ui	(Arbeitskopie)
@@ -33,8 +33,8 @@
 #
 Toolbars
 	"standard" "on,top"
+	"view/update" "on,top"
 	"extra" "on,top"
-	"view/update" "on,right"
 	"review" "review,top"
 	"table" "table,bottom"
 	"math_panels" "math,bottom"