Closed egolus closed 9 years ago
so what do I do here?
previewSignal
that's emitted by the right click action preview
Shelves.previewNotebook
that emits a signal shelves.previewSignal
NoteOrganiser.previewNotebook
(this function allready handles the signal Editing.loadNotebook
)possible changes:
Picbutton
. At the moment both have the right-click-actions but only for notebooks they are handledpreviewSignal
when shift-clicking the notebook in the libraryhere is a way to check for the modifier-keys: (shift-click etc.) http://stackoverflow.com/questions/8772595/how-to-check-if-a-key-modifier-is-pressed-shift-ctrl-alt
Hey @egolus it looks pretty good!
One nitpick would be that, once shift clicked on the notebook to preview it, if I switch back to the editing pane, it is not the correct one loaded. It is a very simple fix, and I think it would improve it nicely. Otherwise, nice job, thank you!
so I need to set the tab in Editing
to the notebook? All right, I'll look into it
Repository health increased by 0.15% when pulling 537dcb5 on 46-RightClickPreview into d499f74 on devel.
ok, I'm switching the tab in the editor now.
Tell me, if I'm doing something stupid with the notebook-path. I'm getting the name, build a full path from it and then have to get the basename back for calling Editing.switchNotebook
and have you seen, what i wrote in gitter about the PicButton
? I was thinking to have a baseclass PicButton
and two classes PicNotebook
and PicFolder
that inherit from the baseclass. So the actions delete
and preview
would be implemented in PicNotebook
.
Ok, I agree, it might become cleanier to separate the two classes. Remove the style
from the argument list, and perform the paintEvent
and specific actions in the daughter classes.
Could you also add a test in tests/test_frames.py
, the function test_shelves
, to try and shift click and see if it opened the library, then going back to editing and checking that the index of the tab is the right one? This way we cover the new preview
function.
Repository health increased by 0.20% when pulling cbb7e2e on 46-RightClickPreview into d499f74 on devel.
Repository health increased by 0.20% when pulling 467c362 on 46-RightClickPreview into d499f74 on devel.
@baudren Do you see any problem with this? The actions are only added for notebooks. If I understand it correctly, even if you would connect something to the signals on a folder, they just wouldn't get emited, right?
(travis seems to have some problems at the moment .. this was the second job today I had to restart manually because it failed and I was sure it shouldn't)
I just implemented a delete
method for folders, since it does make sense - it is very similar to the delete notebook one, but checks if the folder does not contain files, and ask confirmation if it is the case. If it is empty, the delete will be immediate.
Repository health increased by 0.17% when pulling 7600d75 on 46-RightClickPreview into d499f74 on devel.
All right, this looks good
Repository health increased by 0.37% when pulling f4e8a88 on 46-RightClickPreview into d499f74 on devel.
this action directly loads the preview-tab for the selected notebook