Status of the development

Home Forums cherrytree Status of the development

This topic contains 14 replies, has 8 voices, and was last updated by  giuspen 1 day, 17 hours ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #124297

    giuspen
    Moderator

    Dear cherrytree users, this is to update you on what I’m working on and what are the plans for the near future.
    The library that cherrytree is currently using, pygtk (python2 and gtk2 static bindings) is old, unsupported and causing more and more problems as new versions of linux and windows operative systems are released.
    For this reason, after releasing 0.38.0, I put all my efforts to the porting to python3 and gtk3, also known as pygobject or pygi (see https://wiki.gnome.org/Projects/PyGObject/IntrospectionPorting).
    The development is happening on the git branch named ‘pygi’.
    At the moment I’m stuck on a blocking issue that is the lack of availability via python of a key function for cherrytree, gtk_clipboard_set_with_data (), (https://developer.gnome.org/gtk3/stable/gtk3-Clipboards.html#gtk-clipboard-set-with-data)
    I tried to use a binding package from sugarlabs https://github.com/sugarlabs/sugar/commit/b9707272f752a0fda35b3898761ab037fd5f95ac SugarExt.clipboard_set_with_data() but that doesn’t seem to work, or at least I failed to have it working in ubuntu 16.04 LTS and package gir1.2-sugarext-1.0.
    I actually got stuck on the same issue in 2011 (see http://python.6.x6.nabble.com/pygtk2-to-pygobject-introspection-td1941553.html) when for the first time I attempted the porting, and after 6 years still I don’t see a solution.
    Basically without this function available, the copy/paste of rich text doesn’t work and only the plain text is available, all the formatting is lost.
    Any help from developers in the pygi branch would be highly appreciated.

    #124300

    AlanWalker
    Member

    Were you to learn enough C, is information and functionality within Python3 available that would allow you to code your own “gtk_clipboard_set_with_data ()”?

    Is it possible?

    If so, I’d imagine that similar issues in future releases of GTK would be more easily met.

    I also imagine that such an effort would require learning a debugging platform for use in tracing 0.38.0’s execution.

    Elsewhere, I’ve said it before, and I’ll say it again… Thank you for cherrytree.

    • This reply was modified 3 months, 1 week ago by  AlanWalker.
    #124302

    paul
    Member

    Have you ever considered to move from GTK to Qt ?

    PyQT is a popular Python binding for QT. QT seems more stable, have more features and has a lot better cross-platform support.

    The developers of my favorite Linux distribution(Solus OS) are moving Budgie(the desktop environment) from GTK to QT, because of the issue with GTK.

    I read that some time ago even Linus moved his app from GTK to QT and also other important applications.

    I found copy/paste operations in QT: http://doc.qt.io/qt-4.8/qclipboard.html and the python binding: http://pyqt.sourceforge.net/Docs/PyQt4/qclipboard.html

    I never used GTK and also I didn’t do any serious app with QT, my opinion is based only on others experiences and news.

    • This reply was modified 3 months ago by  paul.
    • This reply was modified 3 months ago by  paul.
    • This reply was modified 3 months ago by  paul.
    #124306

    giuspen
    Moderator

    In the last days I’ve indeed been thinking about a migration to PyQt5. I actually know QT since I already worked for years in QT4 via both C++ and Python and I know how good it is.

    I exclude taking care personally of the missing bindings between gtk3 and python because that widens too much the effort, keeping cherrytree up is at the moment all I can take care of in my free time.

    I considered porting to gtkmm3 (so just python to C++) since I already developed in gtkmm3 but then I decided that because of the limited free time I must stick with python or I won’t be able to keep up

    I will update on the forum about the status of the porting…

    #124307

    giuspen
    Moderator

    in the meanwhile here is the bug I raised: https://bugzilla.gnome.org/show_bug.cgi?id=782595

    #124313

    AntiNSA
    Member

    Good luck I believ3e in you. IO have spent hujndreds of hours developing a notebook for my students based on your program, and appreciate everything. https://www.dropbox.com/s/dm6kh773cnr9tol/TEAM%20ALL%20TEACHER%20V10.ctb?dl=0 here is what I am working on…. thanks for everything….

    #124317

    jtlfl
    Member

    On 29 May 2017 at 06:06 ClarkeCC asked if you had a github listing for this project.

    This is just a suggestion. If you move the project to to github there is a good chance you will get a lot more input and help from many experienced programmers, thus accelerating the development of Cherry Tree.

    #124318

    giuspen
    Moderator

    The project is in github as you can read in http://www.giuspen.com/cherrytree/#dev

    #124325

    micar
    Member

    Very good project !
    The only black point for me is that I can’t export to odf file like the pdf export.
    Do you think if it’s will be possible for a next release ?

    #124327

    giuspen
    Moderator

    The next major release will have no new feature (may even have something less) and will just run with different libraries, I’m still experimenting before starting the porting

    #124340

    CherryO
    Member

    Just in case,

    did you consider the possibility of using PySide2 (which is for QT5)?

    It is compatible with Python 2.7 which would allow you to focus exclusively on the library change now and to cross over to Python 3 at another moment.
    https://wiki.qt.io/PySide2_GettingStarted

    #124341

    giuspen
    Moderator

    Actually I prefer python3 to python2 so considering the importance of QScintilla for the syntax highlighting I would go for PyQt5.

    After experimenting with PyQt5 though I didn’t find a solution for the porting of the codeboxes without losing the syntax highlighting.
    With Qt it seems quite complicated to embed objects into the text (I need a Qscintilla box into the rich text) and for this I may stick with GTK3 and port from python to C++ (gtkmm3)

    #124347

    giuspen
    Moderator

    I’m progressing writing c++ code using glibmm, libxml++, sqlite3 so at the moment the gtkmm3 path is the one I’m pursuing

    #124366

    rednixon
    Member

    If major changes are taking place for the next version, have you considered using cefpython and HTML5 rich text as an alternative to the current content section and the rich text format? cef embeds into gtk and qt pretty easily and the clipboards would(I think) be handled by Chromium.

    Pros:

    • Clipboards for free
    • Potentially more advanced styling/embedding possible
    • Easier to implement a web version in the future since the encoder would not have to be juggled
    • GTK3 isn’t exactly cross platform friendly

    Cons:

    • Security? I haven’t though through the implications yet of what data in the current version could do when displayed using something backed by chromium. It should be sanitized enough to not matter but bugs happen
    • A large amount of work needed before the first usable/upgradable version would be functional
    • Upgrades would likely be oneway only
    • This reply was modified 2 weeks, 6 days ago by  rednixon.
    #124376

    giuspen
    Moderator

    @rednixon On the contrary at the beginning there will be no changes or the minimum of changes possible, the goal is that the user will move seamlessly from the Python cherrytree GTK2 to the C++ cherrytree GTK3. For this very reason I’m sticking with GTK rather than moving to Qt where I could not ensure the continuation of some features.

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.