|
|
Patch Set 1 #
Total comments: 4
Patch Set 2 : Fix test similar to wizard/main.py #Patch Set 3 : Change the default button when changing the tab #
MessagesTotal messages: 15
http://codereview.appspot.com/3744044/diff/1/tryton/gui/window/wizard.py File tryton/gui/window/wizard.py (right): http://codereview.appspot.com/3744044/diff/1/tryton/gui/window/wizard.py#newc... tryton/gui/window/wizard.py:170: if i[3] is True: Should use the same test as in wizard/main.py http://codereview.appspot.com/3744044/diff/1/tryton/gui/window/wizard.py#newc... tryton/gui/window/wizard.py:172: self.window.set_default(but) Is it well limited to the current tab?
Sign in to reply to this message.
http://codereview.appspot.com/3744044/diff/1/tryton/gui/window/wizard.py File tryton/gui/window/wizard.py (right): http://codereview.appspot.com/3744044/diff/1/tryton/gui/window/wizard.py#newc... tryton/gui/window/wizard.py:170: if i[3] is True: On 2011/01/05 19:24:16, ced wrote: > Should use the same test as in wizard/main.py Done. http://codereview.appspot.com/3744044/diff/1/tryton/gui/window/wizard.py#newc... tryton/gui/window/wizard.py:172: self.window.set_default(but) On 2011/01/05 19:24:16, ced wrote: > Is it well limited to the current tab? It seems to work so far. Pressing Enter is always evaluated in the open tab only. When a dialog raises, then the dialogs default Button is evaluated on Enter. Do you have another test in mind, which I can try? But there is one issue I detect. When having two full screen wizards open in two tabs, the first opened tab looses the behavior of default. I searched the pygtk docs for an alternative use of set_default on other widgets then window, but have not found one. Do you have an idea?
Sign in to reply to this message.
On 2011/01/06 10:10:42, udono wrote: > http://codereview.appspot.com/3744044/diff/1/tryton/gui/window/wizard.py#newc... > tryton/gui/window/wizard.py:172: self.window.set_default(but) > On 2011/01/05 19:24:16, ced wrote: > > Is it well limited to the current tab? > It seems to work so far. Pressing Enter is always evaluated in the open tab > only. When a dialog raises, then the dialogs default Button is evaluated on > Enter. Do you have another test in mind, which I can try? > > But there is one issue I detect. When having two full screen wizards open in two > tabs, the first opened tab looses the behavior of default. > > I searched the pygtk docs for an alternative use of set_default on other widgets > then window, but have not found one. Do you have an idea? I'm not sure but listen to tab focus change and re-enable the set_default.
Sign in to reply to this message.
[ping] The last changeset did work for me. Please test.
Sign in to reply to this message.
I don't like very much to store on the main window the default buttons. Also it will not work correctly on a board that contains wizards. We should search if there is no proper way to manage that with GTK.
Sign in to reply to this message.
On 2011/01/30 14:18:26, ced wrote: > I don't like very much to store on the main window the default buttons. I can not see how to solve the problem in another way, when window wizards can exist on several tabs? > Also it will not work correctly on a board that contains wizards. Yes, this is true. But what is the correct behavoir for boards with many window wizawrds? > We should search if there is no proper way to manage that with GTK. I searched a whole day but found no better solution. Maybe you have an idea/hint?
Sign in to reply to this message.
On 2011/01/31 16:02:54, udono wrote: > On 2011/01/30 14:18:26, ced wrote: > > Also it will not work correctly on a board that contains wizards. > Yes, this is true. But what is the correct behavoir for boards with many window > wizawrds? I don't know. But it is something that can happen. > > We should search if there is no proper way to manage that with GTK. > I searched a whole day but found no better solution. Maybe you have an > idea/hint? Did you ask to pyGTK or GTK devs?
Sign in to reply to this message.
On 2011/01/31 16:06:14, ced wrote: > On 2011/01/31 16:02:54, udono wrote: > > On 2011/01/30 14:18:26, ced wrote: > > > Also it will not work correctly on a board that contains wizards. > > Yes, this is true. But what is the correct behavoir for boards with many > window > > wizawrds? > > I don't know. But it is something that can happen. > > > > We should search if there is no proper way to manage that with GTK. > > I searched a whole day but found no better solution. Maybe you have an > > idea/hint? > > Did you ask to pyGTK or GTK devs? Did you try by listening at the level of the tab the event "activate" ? http://www.pygtk.org/docs/pygtk/class-gtkentry.html#signal-gtkentry--activate
Sign in to reply to this message.
I requested for help on pygtk[1]. For this I created a small testapp which shows the status quo and invites for easy playing around[2]. [1] http://www.daa.com.au/pipermail/pygtk/2011-February/019376.html [2] http://paste.pocoo.org/show/333211/
Sign in to reply to this message.
On 2011/02/02 12:35:51, ced wrote: > On 2011/01/31 16:06:14, ced wrote: > > On 2011/01/31 16:02:54, udono wrote: > > > On 2011/01/30 14:18:26, ced wrote: > > > > Also it will not work correctly on a board that contains wizards. > > > Yes, this is true. But what is the correct behavoir for boards with many > > window > > > wizawrds? > > > > I don't know. But it is something that can happen. > > > > > > We should search if there is no proper way to manage that with GTK. > > > I searched a whole day but found no better solution. Maybe you have an > > > idea/hint? > > > > Did you ask to pyGTK or GTK devs? > Did you try by listening at the level of the tab the event "activate" ? I try it on this level, but have not found results. BTW the "activate" you mentioned is a signal for entry widgets. And not every notebook tab must have an entry widgets. The notebook tab in Tryton is represented by a VBox()[3]. I try around to get a signal when the VBox is shown on opening a tab, but I did not found any. [3] http://www.pygtk.org/docs/pygtk/class-gtkvbox.html
Sign in to reply to this message.
On 2011/02/08 09:24:54, udono wrote: > On 2011/02/02 12:35:51, ced wrote: > > On 2011/01/31 16:06:14, ced wrote: > > > On 2011/01/31 16:02:54, udono wrote: > > > > On 2011/01/30 14:18:26, ced wrote: > > > > > Also it will not work correctly on a board that contains wizards. > > > > Yes, this is true. But what is the correct behavoir for boards with many > > > window > > > > wizawrds? > > > > > > I don't know. But it is something that can happen. > > > > > > > > We should search if there is no proper way to manage that with GTK. > > > > I searched a whole day but found no better solution. Maybe you have an > > > > idea/hint? > > > > > > Did you ask to pyGTK or GTK devs? > > Did you try by listening at the level of the tab the event "activate" ? > I try it on this level, but have not found results. BTW the > "activate" you mentioned is a signal for entry widgets. And not every notebook > tab must have an entry widgets. > The notebook tab in Tryton is represented by a VBox()[3]. > I try around to get a signal when the VBox is shown on opening a tab, but I did > not found any. > > [3] http://www.pygtk.org/docs/pygtk/class-gtkvbox.html But as I think about your idea, it could be a viable way, to catch any 'activate' Signal on a Notebook page and set the default button for the parent widget. With this we maybe could handle window wizards inside boards?
Sign in to reply to this message.
On 2011/02/08 09:55:07, udono wrote: > On 2011/02/08 09:24:54, udono wrote: > > On 2011/02/02 12:35:51, ced wrote: > > > On 2011/01/31 16:06:14, ced wrote: > > > > On 2011/01/31 16:02:54, udono wrote: > > > > > On 2011/01/30 14:18:26, ced wrote: > > > > > > Also it will not work correctly on a board that contains wizards. > > > > > Yes, this is true. But what is the correct behavoir for boards with many > > > > window > > > > > wizawrds? > > > > > > > > I don't know. But it is something that can happen. > > > > > > > > > > We should search if there is no proper way to manage that with GTK. > > > > > I searched a whole day but found no better solution. Maybe you have an > > > > > idea/hint? > > > > > > > > Did you ask to pyGTK or GTK devs? > > > Did you try by listening at the level of the tab the event "activate" ? > > I try it on this level, but have not found results. BTW the > > "activate" you mentioned is a signal for entry widgets. And not every notebook > > tab must have an entry widgets. > > The notebook tab in Tryton is represented by a VBox()[3]. > > I try around to get a signal when the VBox is shown on opening a tab, but I > did > > not found any. > > > > [3] http://www.pygtk.org/docs/pygtk/class-gtkvbox.html > But as I think about your idea, it could be a viable way, to catch any > 'activate' Signal on a Notebook page and set the default button for the parent > widget. With this we maybe could handle window wizards inside boards? Yes. I'm concern about this because I would like to have clean separation between main windows and tabs to be able to DnD tabs in other windows.
Sign in to reply to this message.
On 2011/02/08 10:17:32, ced wrote: > On 2011/02/08 09:55:07, udono wrote: > > On 2011/02/08 09:24:54, udono wrote: > > > On 2011/02/02 12:35:51, ced wrote: > > > > On 2011/01/31 16:06:14, ced wrote: > > > > > On 2011/01/31 16:02:54, udono wrote: > > > > > > On 2011/01/30 14:18:26, ced wrote: > > > > > > > Also it will not work correctly on a board that contains wizards. > > > > > > Yes, this is true. But what is the correct behavoir for boards with > many > > > > > window > > > > > > wizawrds? > > > > > > > > > > I don't know. But it is something that can happen. > > > > > > > > > > > > We should search if there is no proper way to manage that with GTK. > > > > > > I searched a whole day but found no better solution. Maybe you have an > > > > > > idea/hint? > > > > > > > > > > Did you ask to pyGTK or GTK devs? > > > > Did you try by listening at the level of the tab the event "activate" ? > > > I try it on this level, but have not found results. BTW the > > > "activate" you mentioned is a signal for entry widgets. And not every > notebook > > > tab must have an entry widgets. > > > The notebook tab in Tryton is represented by a VBox()[3]. > > > I try around to get a signal when the VBox is shown on opening a tab, but I > > did > > > not found any. > > > > > > [3] http://www.pygtk.org/docs/pygtk/class-gtkvbox.html > > But as I think about your idea, it could be a viable way, to catch any > > 'activate' Signal on a Notebook page and set the default button for the parent > > widget. With this we maybe could handle window wizards inside boards? > > Yes. I'm concern about this because I would like to have clean separation > between main windows and tabs to be able to DnD tabs in other windows. But for DnD we have the drag and drop signals. On drag we can delete the entry in self.pages_default_button of client1 and on drop we create a new entry in self.pages_default_button of client2. I can not see a problem on this. As far as I understand, we need two mechanisms to handle default buttons: one for view type 'form' and another for 'board'. The one for form is given by this patch, the one for board needed to be done.
Sign in to reply to this message.
On 2011/02/08 10:34:23, udono wrote: > On 2011/02/08 10:17:32, ced wrote: > > On 2011/02/08 09:55:07, udono wrote: > > > On 2011/02/08 09:24:54, udono wrote: > > > > On 2011/02/02 12:35:51, ced wrote: > > > > > On 2011/01/31 16:06:14, ced wrote: > > > > > > On 2011/01/31 16:02:54, udono wrote: > > > > > > > On 2011/01/30 14:18:26, ced wrote: > > > > > > > > Also it will not work correctly on a board that contains wizards. > > > > > > > Yes, this is true. But what is the correct behavoir for boards with > > many > > > > > > window > > > > > > > wizawrds? > > > > > > > > > > > > I don't know. But it is something that can happen. > > > > > > > > > > > > > > We should search if there is no proper way to manage that with > GTK. > > > > > > > I searched a whole day but found no better solution. Maybe you have > an > > > > > > > idea/hint? > > > > > > > > > > > > Did you ask to pyGTK or GTK devs? > > > > > Did you try by listening at the level of the tab the event "activate" ? > > > > I try it on this level, but have not found results. BTW the > > > > "activate" you mentioned is a signal for entry widgets. And not every > > notebook > > > > tab must have an entry widgets. > > > > The notebook tab in Tryton is represented by a VBox()[3]. > > > > I try around to get a signal when the VBox is shown on opening a tab, but > I > > > did > > > > not found any. > > > > > > > > [3] http://www.pygtk.org/docs/pygtk/class-gtkvbox.html > > > But as I think about your idea, it could be a viable way, to catch any > > > 'activate' Signal on a Notebook page and set the default button for the > parent > > > widget. With this we maybe could handle window wizards inside boards? > > > > Yes. I'm concern about this because I would like to have clean separation > > between main windows and tabs to be able to DnD tabs in other windows. > But for DnD we have the drag and drop signals. On drag we can delete the entry > in self.pages_default_button of client1 and on drop we create a new entry in > self.pages_default_button of client2. I can not see a problem on this. > > As far as I understand, we need two mechanisms to handle default buttons: one > for view type 'form' and another for 'board'. The one for form is given by this > patch, the one for board needed to be done. No, this is about separation of code. You want to manage behavior of tab content from outside the tab. If you can have inside the tab then you got both behavior (tab and board).
Sign in to reply to this message.
|