Re: What is groupId in GraphicsUi
Jean-Marc Lasgouttes wrote: Pavel Sanda sa...@lyx.org writes: Manveru schreef: I hadn't read this in manual, but from your explanations it seem to be very user not-friendly feature. It is not natural to users entering new name in that field every time they want new group. Without reading the manual, people like I who mostly not read manuals at all cannot understand how this feature works. But that is my private opinion. the group name is just part of the image settings, so filling up the name is similar as filling the 'new' latex parameters for the image. i have removed the confusing Initialize word and enriched the tooltips. another proposals i have seen up to now are not so easy to implement. Could we have an 'editable combox', that allows either to enter a new name or to click on the arrow and pick an already existing name? attached is the patch which implements it. pavel diff --git a/src/frontends/qt4/GuiGraphics.cpp b/src/frontends/qt4/GuiGraphics.cpp index f52c132..423b00a 100644 --- a/src/frontends/qt4/GuiGraphics.cpp +++ b/src/frontends/qt4/GuiGraphics.cpp @@ -243,7 +243,9 @@ GuiGraphics::GuiGraphics(GuiView lv) connect(displayGB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor())); connect(displayscale, SIGNAL(textChanged(const QString)), this, SLOT(change_adaptor())); - connect(groupId, SIGNAL(textChanged(const QString)), + connect(groupId, SIGNAL(currentIndexChanged (const QString)), + this, SLOT(change_group(const QString))); + connect(groupId, SIGNAL(editTextChanged(const QString)), this, SLOT(change_adaptor())); displayscale-setValidator(new QIntValidator(displayscale)); @@ -289,6 +291,24 @@ void GuiGraphics::change_adaptor() } +void GuiGraphics::change_group(const QString text) +{ + if (text.isEmpty()) + return; + + groupId-blockSignals(true); + + string grp = graphics::getGroupParams(buffer(), fromqstr(text)); + InsetGraphicsParams par; + InsetGraphics::string2params(grp, buffer(), par); + par.filename = params_.filename; + params_ = par; + paramsToDialog(par); + + groupId-blockSignals(false); +} + + void GuiGraphics::change_bb() { bbChanged = true; @@ -530,7 +550,20 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const igp) Scale-setEnabled(scaleChecked); displayGB-setEnabled(lyxrc.display_graphics); - groupId-setText(toqstr(igp.groupId)); + setstring grp; + graphics::getGraphicsGroups(buffer(), grp); + setstring::const_iterator it = grp.begin(); + setstring::const_iterator end = grp.end(); + groupId-blockSignals(true); + groupId-clear(); + groupId-addItem(); + for (; it != end; it++) + groupId-addItem(toqstr(*it)); + if (igp.groupId.empty()) + groupId-setCurrentIndex(-1); + else + groupId-setCurrentIndex(groupId-findText(toqstr(igp.groupId), Qt::MatchExactly)); + groupId-blockSignals(false); lengthAutoToWidgets(Width, widthUnit, igp.width, unitDefault); @@ -666,7 +699,7 @@ void GuiGraphics::applyView() // more latex options igp.special = fromqstr(latexoptions-text()); - igp.groupId = fromqstr(groupId-text()); + igp.groupId = fromqstr(groupId-currentText()); } diff --git a/src/frontends/qt4/GuiGraphics.h b/src/frontends/qt4/GuiGraphics.h index a5dd3e6..27e34ac 100644 --- a/src/frontends/qt4/GuiGraphics.h +++ b/src/frontends/qt4/GuiGraphics.h @@ -40,6 +40,7 @@ public: private Q_SLOTS: void change_adaptor(); + void change_group(const QString ); void change_bb(); void on_browsePB_clicked(); void on_getPB_clicked(); diff --git a/src/frontends/qt4/ui/GraphicsUi.ui b/src/frontends/qt4/ui/GraphicsUi.ui index 697d143..704201a 100644 --- a/src/frontends/qt4/ui/GraphicsUi.ui +++ b/src/frontends/qt4/ui/GraphicsUi.ui @@ -5,8 +5,8 @@ rect x0/x y0/y -width480/width -height348/height +width482/width +height383/height /rect /property property name=sizePolicy @@ -124,14 +124,6 @@ number0/number /property widget class=QWidget name=Graphics - property name=geometry - rect -x0/x -y0/y -width458/width -height272/height - /rect - /property attribute name=title stringamp;Graphics/string /attribute @@ -367,14 +359,6 @@ /layout /widget widget class=QWidget name=Clipping - property name=geometry - rect -x0/x -y0/y -width458/width -height272/height - /rect - /property attribute name=title stringamp;Clipping/string /attribute @@ -537,14 +521,6 @@ /layout /widget widget class=QWidget name=ExtraOptions - property
Re: What is groupId in GraphicsUi
Jean-Marc Lasgouttes wrote: Pavel Sanda sa...@lyx.org writes: Manveru schreef: I hadn't read this in manual, but from your explanations it seem to be very user not-friendly feature. It is not natural to users entering new name in that field every time they want new group. Without reading the manual, people like I who mostly not read manuals at all cannot understand how this feature works. But that is my private opinion. the group name is just part of the image settings, so filling up the name is similar as filling the 'new' latex parameters for the image. i have removed the confusing Initialize word and enriched the tooltips. another proposals i have seen up to now are not so easy to implement. Could we have an 'editable combox', that allows either to enter a new name or to click on the arrow and pick an already existing name? attached is the patch which implements it. pavel diff --git a/src/frontends/qt4/GuiGraphics.cpp b/src/frontends/qt4/GuiGraphics.cpp index f52c132..423b00a 100644 --- a/src/frontends/qt4/GuiGraphics.cpp +++ b/src/frontends/qt4/GuiGraphics.cpp @@ -243,7 +243,9 @@ GuiGraphics::GuiGraphics(GuiView lv) connect(displayGB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor())); connect(displayscale, SIGNAL(textChanged(const QString)), this, SLOT(change_adaptor())); - connect(groupId, SIGNAL(textChanged(const QString)), + connect(groupId, SIGNAL(currentIndexChanged (const QString)), + this, SLOT(change_group(const QString))); + connect(groupId, SIGNAL(editTextChanged(const QString)), this, SLOT(change_adaptor())); displayscale-setValidator(new QIntValidator(displayscale)); @@ -289,6 +291,24 @@ void GuiGraphics::change_adaptor() } +void GuiGraphics::change_group(const QString text) +{ + if (text.isEmpty()) + return; + + groupId-blockSignals(true); + + string grp = graphics::getGroupParams(buffer(), fromqstr(text)); + InsetGraphicsParams par; + InsetGraphics::string2params(grp, buffer(), par); + par.filename = params_.filename; + params_ = par; + paramsToDialog(par); + + groupId-blockSignals(false); +} + + void GuiGraphics::change_bb() { bbChanged = true; @@ -530,7 +550,20 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const igp) Scale-setEnabled(scaleChecked); displayGB-setEnabled(lyxrc.display_graphics); - groupId-setText(toqstr(igp.groupId)); + setstring grp; + graphics::getGraphicsGroups(buffer(), grp); + setstring::const_iterator it = grp.begin(); + setstring::const_iterator end = grp.end(); + groupId-blockSignals(true); + groupId-clear(); + groupId-addItem(); + for (; it != end; it++) + groupId-addItem(toqstr(*it)); + if (igp.groupId.empty()) + groupId-setCurrentIndex(-1); + else + groupId-setCurrentIndex(groupId-findText(toqstr(igp.groupId), Qt::MatchExactly)); + groupId-blockSignals(false); lengthAutoToWidgets(Width, widthUnit, igp.width, unitDefault); @@ -666,7 +699,7 @@ void GuiGraphics::applyView() // more latex options igp.special = fromqstr(latexoptions-text()); - igp.groupId = fromqstr(groupId-text()); + igp.groupId = fromqstr(groupId-currentText()); } diff --git a/src/frontends/qt4/GuiGraphics.h b/src/frontends/qt4/GuiGraphics.h index a5dd3e6..27e34ac 100644 --- a/src/frontends/qt4/GuiGraphics.h +++ b/src/frontends/qt4/GuiGraphics.h @@ -40,6 +40,7 @@ public: private Q_SLOTS: void change_adaptor(); + void change_group(const QString ); void change_bb(); void on_browsePB_clicked(); void on_getPB_clicked(); diff --git a/src/frontends/qt4/ui/GraphicsUi.ui b/src/frontends/qt4/ui/GraphicsUi.ui index 697d143..704201a 100644 --- a/src/frontends/qt4/ui/GraphicsUi.ui +++ b/src/frontends/qt4/ui/GraphicsUi.ui @@ -5,8 +5,8 @@ rect x0/x y0/y -width480/width -height348/height +width482/width +height383/height /rect /property property name=sizePolicy @@ -124,14 +124,6 @@ number0/number /property widget class=QWidget name=Graphics - property name=geometry - rect -x0/x -y0/y -width458/width -height272/height - /rect - /property attribute name=title stringamp;Graphics/string /attribute @@ -367,14 +359,6 @@ /layout /widget widget class=QWidget name=Clipping - property name=geometry - rect -x0/x -y0/y -width458/width -height272/height - /rect - /property attribute name=title stringamp;Clipping/string /attribute @@ -537,14 +521,6 @@ /layout /widget widget class=QWidget name=ExtraOptions - property
Re: What is groupId in GraphicsUi
Jean-Marc Lasgouttes wrote: > Pavel Sandawrites: > > Manveru schreef: > >> I hadn't read this in manual, but from your explanations it seem to be > >> very user not-friendly feature. It is not natural to users entering > >> new name in that field every time they want new group. Without reading > >> the manual, people like I who mostly not read manuals at all cannot > >> understand how this feature works. But that is my private opinion. > > > > the group name is just part of the image settings, so filling up the name > > is similar as filling the 'new' latex parameters for the image. i have > > removed the confusing "Initialize" word and enriched the tooltips. > > another proposals i have seen up to now are not so easy to implement. > > Could we have an 'editable combox', that allows either to enter a new > name or to click on the arrow and pick an already existing name? attached is the patch which implements it. pavel diff --git a/src/frontends/qt4/GuiGraphics.cpp b/src/frontends/qt4/GuiGraphics.cpp index f52c132..423b00a 100644 --- a/src/frontends/qt4/GuiGraphics.cpp +++ b/src/frontends/qt4/GuiGraphics.cpp @@ -243,7 +243,9 @@ GuiGraphics::GuiGraphics(GuiView & lv) connect(displayGB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor())); connect(displayscale, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor())); - connect(groupId, SIGNAL(textChanged(const QString&)), + connect(groupId, SIGNAL(currentIndexChanged (const QString&)), + this, SLOT(change_group(const QString&))); + connect(groupId, SIGNAL(editTextChanged(const QString&)), this, SLOT(change_adaptor())); displayscale->setValidator(new QIntValidator(displayscale)); @@ -289,6 +291,24 @@ void GuiGraphics::change_adaptor() } +void GuiGraphics::change_group(const QString ) +{ + if (text.isEmpty()) + return; + + groupId->blockSignals(true); + + string grp = graphics::getGroupParams(buffer(), fromqstr(text)); + InsetGraphicsParams par; + InsetGraphics::string2params(grp, buffer(), par); + par.filename = params_.filename; + params_ = par; + paramsToDialog(par); + + groupId->blockSignals(false); +} + + void GuiGraphics::change_bb() { bbChanged = true; @@ -530,7 +550,20 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp) Scale->setEnabled(scaleChecked); displayGB->setEnabled(lyxrc.display_graphics); - groupId->setText(toqstr(igp.groupId)); + set grp; + graphics::getGraphicsGroups(buffer(), grp); + set::const_iterator it = grp.begin(); + set::const_iterator end = grp.end(); + groupId->blockSignals(true); + groupId->clear(); + groupId->addItem(""); + for (; it != end; it++) + groupId->addItem(toqstr(*it)); + if (igp.groupId.empty()) + groupId->setCurrentIndex(-1); + else + groupId->setCurrentIndex(groupId->findText(toqstr(igp.groupId), Qt::MatchExactly)); + groupId->blockSignals(false); lengthAutoToWidgets(Width, widthUnit, igp.width, unitDefault); @@ -666,7 +699,7 @@ void GuiGraphics::applyView() // more latex options igp.special = fromqstr(latexoptions->text()); - igp.groupId = fromqstr(groupId->text()); + igp.groupId = fromqstr(groupId->currentText()); } diff --git a/src/frontends/qt4/GuiGraphics.h b/src/frontends/qt4/GuiGraphics.h index a5dd3e6..27e34ac 100644 --- a/src/frontends/qt4/GuiGraphics.h +++ b/src/frontends/qt4/GuiGraphics.h @@ -40,6 +40,7 @@ public: private Q_SLOTS: void change_adaptor(); + void change_group(const QString &); void change_bb(); void on_browsePB_clicked(); void on_getPB_clicked(); diff --git a/src/frontends/qt4/ui/GraphicsUi.ui b/src/frontends/qt4/ui/GraphicsUi.ui index 697d143..704201a 100644 --- a/src/frontends/qt4/ui/GraphicsUi.ui +++ b/src/frontends/qt4/ui/GraphicsUi.ui @@ -5,8 +5,8 @@ 0 0 -480 -348 +482 +383 @@ -124,14 +124,6 @@ 0 - - -0 -0 -458 -272 - - Graphics @@ -367,14 +359,6 @@ - - -0 -0 -458 -272 - - Clipping @@ -537,14 +521,6 @@ - - -0 -0 -458 -272 - - LaTeX and LyX options @@ -647,20 +623,7 @@ Group Name: - groupId - - - - - - - - 87 - 0 - - - - Group Name to be set up from the current parameters. Use context
Re: What is groupId in GraphicsUi
Manveru schreef: I hadn't read this in manual, but from your explanations it seem to be very user not-friendly feature. It is not natural to users entering new name in that field every time they want new group. Without reading the manual, people like I who mostly not read manuals at all cannot understand how this feature works. But that is my private opinion. the group name is just part of the image settings, so filling up the name is similar as filling the 'new' latex parameters for the image. i have removed the confusing Initialize word and enriched the tooltips. another proposals i have seen up to now are not so easy to implement. pavel
Re: What is groupId in GraphicsUi
Pavel Sanda sa...@lyx.org writes: Manveru schreef: I hadn't read this in manual, but from your explanations it seem to be very user not-friendly feature. It is not natural to users entering new name in that field every time they want new group. Without reading the manual, people like I who mostly not read manuals at all cannot understand how this feature works. But that is my private opinion. the group name is just part of the image settings, so filling up the name is similar as filling the 'new' latex parameters for the image. i have removed the confusing Initialize word and enriched the tooltips. another proposals i have seen up to now are not so easy to implement. Could we have an 'editable combox', that allows either to enter a new name or to click on the arrow and pick an already existing name? JMarc
Re: What is groupId in GraphicsUi
Pavel Sanda sa...@lyx.org writes: the group name is just part of the image settings, so filling up the name is similar as filling the 'new' latex parameters for the image. i have removed the confusing Initialize word and enriched the tooltips. another proposals i have seen up to now are not so easy to implement. Could we have an 'editable combox', that allows either to enter a new name or to click on the arrow and pick an already existing name? this belongs to those 'another proposals'. you need to fetch the list of groups. in case user clicks on some group you need to fetch all parameters for this group. all this without direct access to buffer, so new lfun machinery would be needed around. pavel
Re: What is groupId in GraphicsUi
Pavel Sanda sa...@lyx.org writes: this belongs to those 'another proposals'. you need to fetch the list of groups. in case user clicks on some group you need to fetch all parameters for this group. all this without direct access to buffer, so new lfun machinery would be needed around. The dialog class gives you access to the buffer. I am not sure what kind of machinery you want. I see it as simple as (see in InsetGraphics.h) graphics::getGraphicsGroups(buffer(), list); But I may miss something. JMarc
Re: What is groupId in GraphicsUi
Pavel Sanda sa...@lyx.org writes: this belongs to those 'another proposals'. you need to fetch the list of groups. in case user clicks on some group you need to fetch all parameters for this group. all this without direct access to buffer, so new lfun machinery would be needed around. The dialog class gives you access to the buffer. I am not sure what kind of machinery you want. i had the feeling that we try to avoid direct touching of kernel from gui, thats why everything in dialogs is passed through lfuns. i wasn't even aware be have direct buffer() inside dialog class and it looks like design flaw. I see it as simple as (see in InsetGraphics.h) graphics::getGraphicsGroups(buffer(), list); But I may miss something. it will work, but it would be bit schizophrenic how we get info for the dialog fields :) another possibility was to make groups its own object/dialog, but its bit late in this phase; i have been asking these questions when it was in design/implementation. pavel
Re: What is groupId in GraphicsUi
Pavel Sanda sa...@lyx.org writes: i had the feeling that we try to avoid direct touching of kernel from gui, thats why everything in dialogs is passed through lfuns. My view is that we avoid to do _actions_ dorectly (so that everything can be reproduced through lfuns), but we can query as much as we want. Then there is this goal of reversing the dependency between core and gui, but I do not remember at all what it entails :) i wasn't even aware be have direct buffer() inside dialog class and it looks like design flaw. It is nice for the Paragraph dialog to be able to disable the Alignments that are not allowed in some layout, for example. This requires access to the textclass. it will work, but it would be bit schizophrenic how we get info for the dialog fields :) What do you mean? another possibility was to make groups its own object/dialog, but its bit late in this phase; i have been asking these questions when it was in design/implementation. Yes, I remember. And nobody had the radically new idea that would make it all feel intuitive :) JMarc
Re: What is groupId in GraphicsUi
Pavel Sanda sa...@lyx.org writes: i had the feeling that we try to avoid direct touching of kernel from gui, thats why everything in dialogs is passed through lfuns. My view is that we avoid to do _actions_ dorectly (so that everything can be reproduced through lfuns), but we can query as much as we want. aha... Then there is this goal of reversing the dependency between core and gui, but I do not remember at all what it entails :) it will work, but it would be bit schizophrenic how we get info for the dialog fields :) What do you mean? i meant that something we get from InsetGraphicsParams and something from direct call. anyway if the kernel - gui separation is only one way, then your proposal makes sense. pavel
Re: What is groupId in GraphicsUi
Pavel Sanda wrote: Pavel Sanda sa...@lyx.org writes: this belongs to those 'another proposals'. you need to fetch the list of groups. in case user clicks on some group you need to fetch all parameters for this group. all this without direct access to buffer, so new lfun machinery would be needed around. The dialog class gives you access to the buffer. I am not sure what kind of machinery you want. i had the feeling that we try to avoid direct touching of kernel from gui, thats why everything in dialogs is passed through lfuns. i wasn't even aware be have direct buffer() inside dialog class and it looks like design flaw. Wrong, it's perfectly fine that the dialog do 'read' access to the buffer. The other way around is strictly forbidden. And it's good practice to avoid direct 'write' access to the buffer from the dialog; we should use an LFUN instead. Guys, are you aware that you are discussing this in the users list? Abdel.
Re: What is groupId in GraphicsUi
Abdelrazak Younes you...@lyx.org writes: Wrong, it's perfectly fine that the dialog do 'read' access to the buffer. The other way around is strictly forbidden. And it's good practice to avoid direct 'write' access to the buffer from the dialog; we should use an LFUN instead. So could the buffer() be const? Guys, are you aware that you are discussing this in the users list? I am sure this will get us a few more developers. Someone? JMarc
Re: What is groupId in GraphicsUi
Jean-Marc Lasgouttes wrote: Abdelrazak Younes you...@lyx.org writes: Wrong, it's perfectly fine that the dialog do 'read' access to the buffer. The other way around is strictly forbidden. And it's good practice to avoid direct 'write' access to the buffer from the dialog; we should use an LFUN instead. So could the buffer() be const? If we fix the two or three dialogs that still need non const access, yes. Abdel.
Re: What is groupId in GraphicsUi
Manveru schreef: I hadn't read this in manual, but from your explanations it seem to be very user not-friendly feature. It is not natural to users entering new name in that field every time they want new group. Without reading the manual, people like I who mostly not read manuals at all cannot understand how this feature works. But that is my private opinion. the group name is just part of the image settings, so filling up the name is similar as filling the 'new' latex parameters for the image. i have removed the confusing Initialize word and enriched the tooltips. another proposals i have seen up to now are not so easy to implement. pavel
Re: What is groupId in GraphicsUi
Pavel Sanda sa...@lyx.org writes: Manveru schreef: I hadn't read this in manual, but from your explanations it seem to be very user not-friendly feature. It is not natural to users entering new name in that field every time they want new group. Without reading the manual, people like I who mostly not read manuals at all cannot understand how this feature works. But that is my private opinion. the group name is just part of the image settings, so filling up the name is similar as filling the 'new' latex parameters for the image. i have removed the confusing Initialize word and enriched the tooltips. another proposals i have seen up to now are not so easy to implement. Could we have an 'editable combox', that allows either to enter a new name or to click on the arrow and pick an already existing name? JMarc
Re: What is groupId in GraphicsUi
Pavel Sanda sa...@lyx.org writes: the group name is just part of the image settings, so filling up the name is similar as filling the 'new' latex parameters for the image. i have removed the confusing Initialize word and enriched the tooltips. another proposals i have seen up to now are not so easy to implement. Could we have an 'editable combox', that allows either to enter a new name or to click on the arrow and pick an already existing name? this belongs to those 'another proposals'. you need to fetch the list of groups. in case user clicks on some group you need to fetch all parameters for this group. all this without direct access to buffer, so new lfun machinery would be needed around. pavel
Re: What is groupId in GraphicsUi
Pavel Sanda sa...@lyx.org writes: this belongs to those 'another proposals'. you need to fetch the list of groups. in case user clicks on some group you need to fetch all parameters for this group. all this without direct access to buffer, so new lfun machinery would be needed around. The dialog class gives you access to the buffer. I am not sure what kind of machinery you want. I see it as simple as (see in InsetGraphics.h) graphics::getGraphicsGroups(buffer(), list); But I may miss something. JMarc
Re: What is groupId in GraphicsUi
Pavel Sanda sa...@lyx.org writes: this belongs to those 'another proposals'. you need to fetch the list of groups. in case user clicks on some group you need to fetch all parameters for this group. all this without direct access to buffer, so new lfun machinery would be needed around. The dialog class gives you access to the buffer. I am not sure what kind of machinery you want. i had the feeling that we try to avoid direct touching of kernel from gui, thats why everything in dialogs is passed through lfuns. i wasn't even aware be have direct buffer() inside dialog class and it looks like design flaw. I see it as simple as (see in InsetGraphics.h) graphics::getGraphicsGroups(buffer(), list); But I may miss something. it will work, but it would be bit schizophrenic how we get info for the dialog fields :) another possibility was to make groups its own object/dialog, but its bit late in this phase; i have been asking these questions when it was in design/implementation. pavel
Re: What is groupId in GraphicsUi
Pavel Sanda sa...@lyx.org writes: i had the feeling that we try to avoid direct touching of kernel from gui, thats why everything in dialogs is passed through lfuns. My view is that we avoid to do _actions_ dorectly (so that everything can be reproduced through lfuns), but we can query as much as we want. Then there is this goal of reversing the dependency between core and gui, but I do not remember at all what it entails :) i wasn't even aware be have direct buffer() inside dialog class and it looks like design flaw. It is nice for the Paragraph dialog to be able to disable the Alignments that are not allowed in some layout, for example. This requires access to the textclass. it will work, but it would be bit schizophrenic how we get info for the dialog fields :) What do you mean? another possibility was to make groups its own object/dialog, but its bit late in this phase; i have been asking these questions when it was in design/implementation. Yes, I remember. And nobody had the radically new idea that would make it all feel intuitive :) JMarc
Re: What is groupId in GraphicsUi
Pavel Sanda sa...@lyx.org writes: i had the feeling that we try to avoid direct touching of kernel from gui, thats why everything in dialogs is passed through lfuns. My view is that we avoid to do _actions_ dorectly (so that everything can be reproduced through lfuns), but we can query as much as we want. aha... Then there is this goal of reversing the dependency between core and gui, but I do not remember at all what it entails :) it will work, but it would be bit schizophrenic how we get info for the dialog fields :) What do you mean? i meant that something we get from InsetGraphicsParams and something from direct call. anyway if the kernel - gui separation is only one way, then your proposal makes sense. pavel
Re: What is groupId in GraphicsUi
Pavel Sanda wrote: Pavel Sanda sa...@lyx.org writes: this belongs to those 'another proposals'. you need to fetch the list of groups. in case user clicks on some group you need to fetch all parameters for this group. all this without direct access to buffer, so new lfun machinery would be needed around. The dialog class gives you access to the buffer. I am not sure what kind of machinery you want. i had the feeling that we try to avoid direct touching of kernel from gui, thats why everything in dialogs is passed through lfuns. i wasn't even aware be have direct buffer() inside dialog class and it looks like design flaw. Wrong, it's perfectly fine that the dialog do 'read' access to the buffer. The other way around is strictly forbidden. And it's good practice to avoid direct 'write' access to the buffer from the dialog; we should use an LFUN instead. Guys, are you aware that you are discussing this in the users list? Abdel.
Re: What is groupId in GraphicsUi
Abdelrazak Younes you...@lyx.org writes: Wrong, it's perfectly fine that the dialog do 'read' access to the buffer. The other way around is strictly forbidden. And it's good practice to avoid direct 'write' access to the buffer from the dialog; we should use an LFUN instead. So could the buffer() be const? Guys, are you aware that you are discussing this in the users list? I am sure this will get us a few more developers. Someone? JMarc
Re: What is groupId in GraphicsUi
Jean-Marc Lasgouttes wrote: Abdelrazak Younes you...@lyx.org writes: Wrong, it's perfectly fine that the dialog do 'read' access to the buffer. The other way around is strictly forbidden. And it's good practice to avoid direct 'write' access to the buffer from the dialog; we should use an LFUN instead. So could the buffer() be const? If we fix the two or three dialogs that still need non const access, yes. Abdel.
Re: What is groupId in GraphicsUi
Manveru schreef: > I hadn't read this in manual, but from your explanations it seem to be > very user not-friendly feature. It is not natural to users entering > new name in that field every time they want new group. Without reading > the manual, people like I who mostly not read manuals at all cannot > understand how this feature works. But that is my private opinion. the group name is just part of the image settings, so filling up the name is similar as filling the 'new' latex parameters for the image. i have removed the confusing "Initialize" word and enriched the tooltips. another proposals i have seen up to now are not so easy to implement. pavel
Re: What is groupId in GraphicsUi
Pavel Sandawrites: > Manveru schreef: >> I hadn't read this in manual, but from your explanations it seem to be >> very user not-friendly feature. It is not natural to users entering >> new name in that field every time they want new group. Without reading >> the manual, people like I who mostly not read manuals at all cannot >> understand how this feature works. But that is my private opinion. > > the group name is just part of the image settings, so filling up the name > is similar as filling the 'new' latex parameters for the image. i have > removed the confusing "Initialize" word and enriched the tooltips. > another proposals i have seen up to now are not so easy to implement. Could we have an 'editable combox', that allows either to enter a new name or to click on the arrow and pick an already existing name? JMarc
Re: What is groupId in GraphicsUi
> Pavel Sandawrites: > > the group name is just part of the image settings, so filling up the name > > is similar as filling the 'new' latex parameters for the image. i have > > removed the confusing "Initialize" word and enriched the tooltips. > > another proposals i have seen up to now are not so easy to implement. > > Could we have an 'editable combox', that allows either to enter a new > name or to click on the arrow and pick an already existing name? this belongs to those 'another proposals'. you need to fetch the list of groups. in case user clicks on some group you need to fetch all parameters for this group. all this without direct access to buffer, so new lfun machinery would be needed around. pavel
Re: What is groupId in GraphicsUi
Pavel Sandawrites: > this belongs to those 'another proposals'. you need to fetch the list of > groups. in case user clicks on some group you need to fetch all parameters for > this group. all this without direct access to buffer, so new lfun machinery > would be needed around. The dialog class gives you access to the buffer. I am not sure what kind of machinery you want. I see it as simple as (see in InsetGraphics.h) graphics::getGraphicsGroups(buffer(), list); But I may miss something. JMarc
Re: What is groupId in GraphicsUi
> Pavel Sandawrites: > > this belongs to those 'another proposals'. you need to fetch the list of > > groups. in case user clicks on some group you need to fetch all parameters > > for > > this group. all this without direct access to buffer, so new lfun machinery > > would be needed around. > > The dialog class gives you access to the buffer. I am not sure what kind > of machinery you want. i had the feeling that we try to avoid direct touching of kernel from gui, thats why everything in dialogs is passed through lfuns. i wasn't even aware be have direct buffer() inside dialog class and it looks like design flaw. > I see it as simple as (see in InsetGraphics.h) > graphics::getGraphicsGroups(buffer(), list); > > But I may miss something. it will work, but it would be bit schizophrenic how we get info for the dialog fields :) another possibility was to make groups its own object/dialog, but its bit late in this phase; i have been asking these questions when it was in design/implementation. pavel
Re: What is groupId in GraphicsUi
Pavel Sandawrites: > i had the feeling that we try to avoid direct touching of kernel from gui, > thats why everything in dialogs is passed through lfuns. My view is that we avoid to do _actions_ dorectly (so that everything can be reproduced through lfuns), but we can query as much as we want. Then there is this goal of reversing the dependency between core and gui, but I do not remember at all what it entails :) > i wasn't even aware be have direct buffer() inside dialog class and it > looks like design flaw. It is nice for the Paragraph dialog to be able to disable the Alignments that are not allowed in some layout, for example. This requires access to the textclass. > it will work, but it would be bit schizophrenic how we get info for the > dialog fields :) What do you mean? > another possibility was to make groups its own object/dialog, but its > bit late in this phase; i have been asking these questions when it was > in design/implementation. Yes, I remember. And nobody had the radically new idea that would make it all feel intuitive :) JMarc
Re: What is groupId in GraphicsUi
> Pavel Sandawrites: > > i had the feeling that we try to avoid direct touching of kernel from gui, > > thats why everything in dialogs is passed through lfuns. > > My view is that we avoid to do _actions_ dorectly (so that everything > can be reproduced through lfuns), but we can query as much as we want. aha... > Then there is this goal of reversing the dependency between core and > gui, but I do not remember at all what it entails :) > > > it will work, but it would be bit schizophrenic how we get info for the > > dialog fields :) > > What do you mean? i meant that something we get from InsetGraphicsParams and something from direct call. anyway if the kernel <-> gui separation is only one way, then your proposal makes sense. pavel
Re: What is groupId in GraphicsUi
Pavel Sanda wrote: Pavel Sandawrites: this belongs to those 'another proposals'. you need to fetch the list of groups. in case user clicks on some group you need to fetch all parameters for this group. all this without direct access to buffer, so new lfun machinery would be needed around. The dialog class gives you access to the buffer. I am not sure what kind of machinery you want. i had the feeling that we try to avoid direct touching of kernel from gui, thats why everything in dialogs is passed through lfuns. i wasn't even aware be have direct buffer() inside dialog class and it looks like design flaw. Wrong, it's perfectly fine that the dialog do 'read' access to the buffer. The other way around is strictly forbidden. And it's good practice to avoid direct 'write' access to the buffer from the dialog; we should use an LFUN instead. Guys, are you aware that you are discussing this in the users list? Abdel.
Re: What is groupId in GraphicsUi
Abdelrazak Youneswrites: > Wrong, it's perfectly fine that the dialog do 'read' access to the > buffer. The other way around is strictly forbidden. And it's good > practice to avoid direct 'write' access to the buffer from the dialog; > we should use an LFUN instead. So could the buffer() be const? > Guys, are you aware that you are discussing this in the users list? I am sure this will get us a few more developers. Someone? JMarc
Re: What is groupId in GraphicsUi
Jean-Marc Lasgouttes wrote: Abdelrazak Youneswrites: Wrong, it's perfectly fine that the dialog do 'read' access to the buffer. The other way around is strictly forbidden. And it's good practice to avoid direct 'write' access to the buffer from the dialog; we should use an LFUN instead. So could the buffer() be const? If we fix the two or three dialogs that still need non const access, yes. Abdel.
Re: What is groupId in GraphicsUi
Manveru schreef: This question is probably to devel list, but I am not subscribed there. Probably I can get good answer here to my question. In 1.6 there in new option in Graphics Ui: Initialize Group Name. I would like to translate it to Polish, but this is not possible without having context on mind. ... Assigning graphics to groups just means that you'd have to enter a string (the name of a group) in the Initialize group name textfield. Entering this same string into this field of a different graphic would put them in the same group. As you do not have to define the groups beforehand, it has probably earned the predicate initialize, but I'm not convinced this is the correct name. A better description would be something like: Assign to group:. the workflow is meant to be different. use the field initialize to create a new group and context menu of another picture to join some already existing group. your procedure will assign, but also destroy the existing group parameters by the new ones. Thanks in advance for any helpful explanation of this new feature. it is described in manual. pavel
Re: What is groupId in GraphicsUi
2009/1/9 Pavel Sanda sa...@lyx.org: Manveru schreef: This question is probably to devel list, but I am not subscribed there. Probably I can get good answer here to my question. In 1.6 there in new option in Graphics Ui: Initialize Group Name. I would like to translate it to Polish, but this is not possible without having context on mind. ... Assigning graphics to groups just means that you'd have to enter a string (the name of a group) in the Initialize group name textfield. Entering this same string into this field of a different graphic would put them in the same group. As you do not have to define the groups beforehand, it has probably earned the predicate initialize, but I'm not convinced this is the correct name. A better description would be something like: Assign to group:. the workflow is meant to be different. use the field initialize to create a new group and context menu of another picture to join some already existing group. your procedure will assign, but also destroy the existing group parameters by the new ones. Thanks in advance for any helpful explanation of this new feature. it is described in manual. I hadn't read this in manual, but from your explanations it seem to be very user not-friendly feature. It is not natural to users entering new name in that field every time they want new group. Without reading the manual, people like I who mostly not read manuals at all cannot understand how this feature works. But that is my private opinion. -- Manveru jabber: manv...@manveru.pl gg: 1624001 http://www.manveru.pl
Re: What is groupId in GraphicsUi
Manveru schreef: This question is probably to devel list, but I am not subscribed there. Probably I can get good answer here to my question. In 1.6 there in new option in Graphics Ui: Initialize Group Name. I would like to translate it to Polish, but this is not possible without having context on mind. ... Assigning graphics to groups just means that you'd have to enter a string (the name of a group) in the Initialize group name textfield. Entering this same string into this field of a different graphic would put them in the same group. As you do not have to define the groups beforehand, it has probably earned the predicate initialize, but I'm not convinced this is the correct name. A better description would be something like: Assign to group:. the workflow is meant to be different. use the field initialize to create a new group and context menu of another picture to join some already existing group. your procedure will assign, but also destroy the existing group parameters by the new ones. Thanks in advance for any helpful explanation of this new feature. it is described in manual. pavel
Re: What is groupId in GraphicsUi
2009/1/9 Pavel Sanda sa...@lyx.org: Manveru schreef: This question is probably to devel list, but I am not subscribed there. Probably I can get good answer here to my question. In 1.6 there in new option in Graphics Ui: Initialize Group Name. I would like to translate it to Polish, but this is not possible without having context on mind. ... Assigning graphics to groups just means that you'd have to enter a string (the name of a group) in the Initialize group name textfield. Entering this same string into this field of a different graphic would put them in the same group. As you do not have to define the groups beforehand, it has probably earned the predicate initialize, but I'm not convinced this is the correct name. A better description would be something like: Assign to group:. the workflow is meant to be different. use the field initialize to create a new group and context menu of another picture to join some already existing group. your procedure will assign, but also destroy the existing group parameters by the new ones. Thanks in advance for any helpful explanation of this new feature. it is described in manual. I hadn't read this in manual, but from your explanations it seem to be very user not-friendly feature. It is not natural to users entering new name in that field every time they want new group. Without reading the manual, people like I who mostly not read manuals at all cannot understand how this feature works. But that is my private opinion. -- Manveru jabber: manv...@manveru.pl gg: 1624001 http://www.manveru.pl
Re: What is groupId in GraphicsUi
> Manveru schreef: >> This question is probably to devel list, but I am not subscribed >> there. Probably I can get good answer here to my question. >> >> In 1.6 there in new option in Graphics Ui: "Initialize Group Name". I >> would like to translate it to Polish, but this is not possible without >> having context on mind. ... > Assigning graphics to groups just means that you'd have to enter a string > (the name of a group) in the "Initialize group name" textfield. Entering > this same string into this field of a different graphic would put them in > the same group. > > As you do not have to define the groups beforehand, it has probably earned > the predicate "initialize", but I'm not convinced this is the correct name. > A better description would be something like: "Assign to group:". the workflow is meant to be different. use the field initialize to create a new group and context menu of another picture to join some already existing group. your procedure will assign, but also destroy the existing group parameters by the new ones. >> Thanks in advance for any helpful explanation of this new feature. it is described in manual. pavel
Re: What is groupId in GraphicsUi
2009/1/9 Pavel Sanda: >> Manveru schreef: >>> This question is probably to devel list, but I am not subscribed >>> there. Probably I can get good answer here to my question. >>> >>> In 1.6 there in new option in Graphics Ui: "Initialize Group Name". I >>> would like to translate it to Polish, but this is not possible without >>> having context on mind. > > ... > >> Assigning graphics to groups just means that you'd have to enter a string >> (the name of a group) in the "Initialize group name" textfield. Entering >> this same string into this field of a different graphic would put them in >> the same group. >> >> As you do not have to define the groups beforehand, it has probably earned >> the predicate "initialize", but I'm not convinced this is the correct name. >> A better description would be something like: "Assign to group:". > > the workflow is meant to be different. use the field initialize to create a > new > group and context menu of another picture to join some already existing group. > > your procedure will assign, but also destroy the existing group parameters by > the new ones. > >>> Thanks in advance for any helpful explanation of this new feature. > > it is described in manual. I hadn't read this in manual, but from your explanations it seem to be very user not-friendly feature. It is not natural to users entering new name in that field every time they want new group. Without reading the manual, people like I who mostly not read manuals at all cannot understand how this feature works. But that is my private opinion. -- Manveru jabber: manv...@manveru.pl gg: 1624001 http://www.manveru.pl
Re: What is groupId in GraphicsUi
Manveru schreef: This question is probably to devel list, but I am not subscribed there. Probably I can get good answer here to my question. In 1.6 there in new option in Graphics Ui: Initialize Group Name. I would like to translate it to Polish, but this is not possible without having context on mind. Thanks in advance for any helpful explanation of this new feature. In LyX 1.6 you can assign graphics to groups. Then, changing the properties of one of the graphics in a certain group, will apply this change to all graphics in the same group. Assigning graphics to groups just means that you'd have to enter a string (the name of a group) in the Initialize group name textfield. Entering this same string into this field of a different graphic would put them in the same group. As you do not have to define the groups beforehand, it has probably earned the predicate initialize, but I'm not convinced this is the correct name. A better description would be something like: Assign to group:. Vincent
Re: What is groupId in GraphicsUi
Manveru schreef: This question is probably to devel list, but I am not subscribed there. Probably I can get good answer here to my question. In 1.6 there in new option in Graphics Ui: Initialize Group Name. I would like to translate it to Polish, but this is not possible without having context on mind. Thanks in advance for any helpful explanation of this new feature. In LyX 1.6 you can assign graphics to groups. Then, changing the properties of one of the graphics in a certain group, will apply this change to all graphics in the same group. Assigning graphics to groups just means that you'd have to enter a string (the name of a group) in the Initialize group name textfield. Entering this same string into this field of a different graphic would put them in the same group. As you do not have to define the groups beforehand, it has probably earned the predicate initialize, but I'm not convinced this is the correct name. A better description would be something like: Assign to group:. Vincent
Re: What is groupId in GraphicsUi
Manveru schreef: This question is probably to devel list, but I am not subscribed there. Probably I can get good answer here to my question. In 1.6 there in new option in Graphics Ui: "Initialize Group Name". I would like to translate it to Polish, but this is not possible without having context on mind. Thanks in advance for any helpful explanation of this new feature. In LyX 1.6 you can assign graphics to groups. Then, changing the properties of one of the graphics in a certain group, will apply this change to all graphics in the same group. Assigning graphics to groups just means that you'd have to enter a string (the name of a group) in the "Initialize group name" textfield. Entering this same string into this field of a different graphic would put them in the same group. As you do not have to define the groups beforehand, it has probably earned the predicate "initialize", but I'm not convinced this is the correct name. A better description would be something like: "Assign to group:". Vincent