Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GtkBuilder opinion #12

Open
lucianolorenti opened this issue Apr 16, 2016 · 3 comments
Open

GtkBuilder opinion #12

lucianolorenti opened this issue Apr 16, 2016 · 3 comments

Comments

@lucianolorenti
Copy link
Contributor

lucianolorenti commented Apr 16, 2016

What do you think of using Gtk Builder to build the interface? I have not much experience with Gtk but I'm not a big fan of building GUIs using code.
In the devel branch of my fork I have an implementation that uses a .glade file to load the application interface. It looks like this:
gtkide

If you like it I can refactor and make a pull request:

@jonathanBieler
Copy link
Owner

jonathanBieler commented Apr 17, 2016

I usually prefer to do everything by code, but it's true that the main layout is a bit of a mess. For things like buttons and menu I would still use code (I just added a main menu file: https://github.com/jonathanBieler/GtkIDE.jl/blob/master/src/MainMenu.jl),

Glade also has some issues, for example it doesn't seem to be possible to reorder widgets (I was trying to put the editor on the right). That said we should probably have an option for that (I added basic user settings : https://github.com/jonathanBieler/GtkIDE.jl/blob/master/src/config/default_settings.ini, note you need to add ConfParser).

Can you check if you can reorder them at runtime when using GtkBuilder ? I guess you have to reparent them or something or the sort.

Another issue is that if I remember correctly the |> operator is going to be deprecated, so I need to make sure I can still use it in the future if I wan to stick with that syntax.

@lucianolorenti
Copy link
Contributor Author

I'm using this to swap the panels order

function swapPanelMenuItemActivated_cb(widgetptr::Ptr, user_data)
    editorAtRight = getindex(mainPan,1) == rightPan

    delete!(mainPan,rightPan)
    delete!(mainPan,editorVBox)
    if editorAtRight
        setindex!(mainPan,rightPan,2)
        setindex!(mainPan,editorVBox,1)
    else
        setindex!(mainPan,rightPan,1)
        setindex!(mainPan,editorVBox,2)
    end
    return nothing
end

@jonathanBieler
Copy link
Owner

jonathanBieler commented Sep 16, 2016

I haven't much time to work on this currently. I did a big refactor of the completion system to make it more flexible, and I started making some changes for 0.5 but I haven't pushed those. I think at this point refactoring a bit and fixing bugs would be the way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants