584,857 active members*
4,645 visitors online*
Register for free
Login
Page 1 of 3 123
Results 1 to 20 of 53
  1. #1
    Join Date
    Oct 2005
    Posts
    1145

    PathPilot and GLADE

    While I was searching thu code to work on the ATC screens I thought I would give GLADE a whirl and work on the screenset. First the install had teh worng version of glade so I removed the version installed and installed the correct version. Then that version complained it could not find GTKsourceview whatever that is. I looked on the machine and there was gtksourceview. Actually 2 versions 2 and 3.

    Does anyone know what you have to do for GLADE to be able to use either one of teh GTKSourceView versions. I tried using GLADE on teh screenset but nothing seems to work. I cannot add anything or move anything or copy paste anything. IS there a decent video on how to use GLADE. I do not want to be a Glade master just know how to do a few things to modify the screenset. It seems the screenset is made up of 2 components. 1 is teh actual physical design layout. That is in XML format. 2 is teh function side which appears to be in Python.

    So I guess first thing is to get GLADE to actually work with PathPilot. ANY ideas on how to do that ??

    (;-) TP

  2. #2
    Join Date
    Nov 2012
    Posts
    591

    Re: PathPilot and GLADE

    Is there a GTK/GTK+ package available upstream for version 2 of GTK? I would expect those packages to do the trick, assuming the glade tool you got was also from a versioned upstream package.
    Perhaps do something like `apt search gtk` or somesuch to see everything you could possible install (and, unfortunately, tons of unrelated stuff ...)

  3. #3
    Join Date
    Oct 2005
    Posts
    1145

    Re: PathPilot and GLADE

    The strange thing is when you do an install of GTK 2 it actually installs GTK 3 there is also GTKsourceview in both v 2 and v 3 on teh drive but it does not see that part I assume.. I can get Glade to load the file IF I comment out 1 line of code in teh XML that points to the version. But in Glade I cannot get it to do much of anything. When I try to simply copy and paste a button it says it cannot paste to that parent ??

    It woul dbe nice if someone that knows how this works were to post a simple short youtbe video on a simple project like copy and paste a button then associate the Code to run the button.

    (;-) TP

  4. #4
    Join Date
    Apr 2012
    Posts
    63

    Re: PathPilot and GLADE

    Some time ago there was this thread at LinuxCNC: https://forum.linuxcnc.org/pathpilot...e-idiots-guide. I recall the experience iof installing Glade being typical Linux, lots of choices, nothing clear :-(

    I know I had some trivial success, I will give it a try again to see if I can add anything useful. (In meantime I had re-imaged my Pathpilot install)

    Gerrit

  5. #5
    Join Date
    Apr 2012
    Posts
    63

    Re: PathPilot and GLADE

    Ok, success. I downloaded gtksourceview-catalog from https://opensuse.pkgs.org/tumbleweed...86_64.rpm.html Mint can't handle RPM files plus you really don't want to open up the pandoras box of updating anything on your machine with 'apt' commands.
    Therefor I unpacked it on Windows 10 Ubuntu using 'zstd'. The resulting file was sent to Pathpilot via Samba and placed in /usr/share/glade3/catalogs.

    To save you a bunch of grief I attached the catalog file.

    You will have to 'sudo cp gtksourceview.xml /usr/share/glade3/catalogs' as that directory is protected.

    Enjoy :-)

    Gerrit

  6. #6
    Join Date
    Oct 2005
    Posts
    1145

    Re: PathPilot and GLADE

    You are assuming that everyone understand what any of that means (;-)

    (;-) TP

  7. #7
    Join Date
    Oct 2005
    Posts
    1145

    Re: PathPilot and GLADE

    OK took teh file unzipped it and tried to copy into that directory. It will not copy to teh folder so I am assuming that the SUDO thingy is what gets it into the folder. SO I copied teh file to the desktop then applied that sudo thingy including the path to from the desktop. Now the gtksourceveiw file is in the folder. Opened Glade and nothing has changed I cannot copy paste a button. It says it cannot paste to the selected parent. I am simply selecting a button then copy then paste it back next to the original button. NADA.

    (;-) TP

  8. #8
    Join Date
    Apr 2012
    Posts
    63

    Re: PathPilot and GLADE

    Are you starting from a blank Glade project or editing an existing .glade file?
    If you are starting from a blank sheet then perhaps start here? https://wiki.gnome.org/Apps/Glade/Tutorials It is for Glade 3 but I doubt the basics are any different.
    Or, specifically which file are you starting with and how are you opening it?

    I am no expert on this part, but somewhat interested in learning so that I can enhance PP for my machine (non-Tormach)

    Gerrit

  9. #9
    Join Date
    Nov 2012
    Posts
    591

    Re: PathPilot and GLADE

    I think he's trying to edit the PathPilot glade files to edit the UI window screen layouts.

  10. #10
    Join Date
    Oct 2005
    Posts
    1145

    Re: PathPilot and GLADE

    Yes just trying to edit teh PP screen to make a few simple mods. Nothing major. Interesting adventure. I did manage to add a tooltip to a button. saved and reloading PP.. PP crashed on reload. Part of teh error was PP was looking for GTKSourceView2 to get data from to initialize the screen. BUT seening how the Glade instal used another GTKSouceView it corrupted teh load and nothing I did could make it open. SO reload PP from scratch and reapply all teh other changesto the INI and oether things and it came back up. Lucky there was a backup for those other files.

    So it looks as if one would be wise to download the exact same version of Glade AND teh exact same version of GTKSourceView2 that was used to create teh screen. Problem so far is finding the same version of Glade and teh Sourceveiw and then getting it loaded to where PP thinks it should be.

    This Should be a fairly simple process. At least it is for every other controller I have worked with. But I guess I don't know teh secret handshake yet. (;-)

    Just a thought (;-) TP

  11. #11
    Join Date
    Oct 2005
    Posts
    1145

    Re: PathPilot and GLADE

    Hi All . OK i found teh GTKsourceview2 on teh machine. It is there in the usr/share area so I assume that that is where it should be but it appears that GLADE3 uses a diffent sourceview placed into a different fold usr/share/glade3/catalogs. I don't see where you can change teh sourceview version used in Glade .

    I did find a You tube video on using Glade with LinuxCNC but it was a programmer talking to other programmers not to an end user trying to learn it. It did explain how to make a new button and assign a function code to the button event BUT that did not work in PP (;-)

    So untill someone actually makes it work in PP and can explain how it is done I am stuck with what PP has to offer screenwise. And that leaves a lot of functions on teh table and not in teh machine. Now that is just my opinion your mileage may vary due to local conditions and experience in CNC machining.

    (;-) TP

  12. #12
    Join Date
    Apr 2013
    Posts
    1788

    Re: PathPilot and GLADE


  13. #13
    Join Date
    Apr 2012
    Posts
    63

    Re: PathPilot and GLADE

    Just in time for Christmas I have figured it out.

    The gtksourceview catalog file I posted earlier has to be copied into /usr/share/glade3/catalogs (/usr/share/glade is for Glade versions > 3.10 are are of no use to us). Then edit the file and replace gtksourceview-3 with gtksourceview-2 in 2 places near start of file.

    Run glade-gtk2 (you should have installed that already of course) on the .glade file of your choosing and you should be golden. Note that just opening and saving the file will result in diffs, but they appear to be a matter of sequence of entries rather than actual differences.


    Gerrit

  14. #14
    Join Date
    Oct 2005
    Posts
    1145

    Re: PathPilot and GLADE

    Could you put that all in proper order of things to do to get it to work.

    (;-) TP

  15. #15
    Join Date
    Apr 2012
    Posts
    63

    Re: PathPilot and GLADE

    Install glade-gtk2
    Do the steps outlined above.
    I'm not really into making howto videos, this part is pretty straight forward IMO, even for linux. I already have more than a few frustrating hours into this to get this far.
    ?

    For help with Glade itself there must be better places than here for guidance.

    Gerrit

  16. #16
    Join Date
    Oct 2005
    Posts
    1145

    Re: PathPilot and GLADE

    The reason I asked for specifics is when I installed Glade GTK2 it installed glade 3.8.0 is this normal ??? I had copied the gtksourceview catalog file to teh correct folder . Glade did load teh file but nothing was doable as far as mods to teh screen.

    So where you able to actually mod a PP screen and it load and run correctly ??

    (;-) TP

  17. #17
    Join Date
    Apr 2012
    Posts
    63

    Re: PathPilot and GLADE

    Welcome to Linux, where nothing is quite what it seems.
    Glade-gtk2=3.8.x, anything > 3.8 is not directly compatible.
    Go to where you placed the catalog file (/usr/share/glade3/catalogs) and edit that file to replace gtksourceview-3 with gtksourceview-2 in 2 places (2 and 3rd -3's in the file).

    To edit a file go to ~/tmc in a Terminal and use glade-gtk2 ~/tmc/python/images/tormach_mill_ui.glade or other file to edit. I suggest you make a copy of the file first. Once poen if you click on the gcode window it should show gtksourceview widget in rh pane.

    Gerrit

    As far as using glade itself to add widgeets etc. I have no idea yet. There are better places to find that out, search for gkt glade gui or something like that.

  18. #18
    Join Date
    Oct 2005
    Posts
    1145

    Re: PathPilot and GLADE

    I have redone teh glade setup following your guide BUT it still will not allow me to mod teh PP screenset (;-) I have also searched the WEB for resources on how to use GladeGTK and nothing I find really relates to working with the PP screenset directly. I have even tried following the WEB guide and simply add a new button. NOPE I cannot make it work even following teh web guides. Something about teh PP screen. Obviously Turbo has it figured out as his screenshots show he had added stuff to the screenset. But he is not talking about how he did it or sharing any info about it . (;-)

    (;-) TP

  19. #19
    Join Date
    Apr 2012
    Posts
    63

    Re: PathPilot and GLADE

    What does it say in the Terminal window where you started Glade? Some hints would help us help you.
    Try something simple such as changing the text in a tooltip. Or even simpler, open the file with glade-gtk2 and save it without editing. Then start PP.

    I started glade, edited the tool tip for the Gcode window (a gtksourcview widget), saved the file and started pathpilot. The file loaded and showed the modified tool tip. So I know this works.
    The second attachment shows what the Catalog file looks like after editing using "sudo vim /usr/share/glade3/catalogs/gtksourceview.xml " and my previous instructions.

  20. #20
    Join Date
    Dec 2008
    Posts
    740

    Re: PathPilot and GLADE

    Quote Originally Posted by gerritv View Post
    Install glade-gtk2 ... Do the steps outlined above.
    Thanks, it worked great for me! Up to now I've just been using the installed Glade by simply entering ok and working with what it gives.

    Nevertheless, I've only used the glade tool to help identify the widget IDs. All my changes are hand coded and that won't change. Importing the xml nukes all my comments and I noticed that a couple of other features are not parsed, not much, but it will almost certainly screw up PP.

    Quote Originally Posted by vmax549 View Post
    Obviously Turbo has it figured out as his screenshots show he had added stuff to the screenset. But he is not talking about how he did it or sharing any info about it.
    Well, yes and no. I have figured out enough to make quite a few changes but in another of your threads I said "I think you've found the best starting point - looking in the code! You'll find all the answers to all the questions you've asked so far in the code. Yes, it requires some work, but that's unavoidable if you want to integrate your ATC this way.". This is valid for almost all changes I've made. If you think a button can simply be added to PP and it automatically knows what it should do then I have to disappoint you. Normally significant programming is needed behind the scenes, which requires a knowledge of how PP works internally and also benefits from a few cool tricks in order to successfully integrate the new functionality. Then there are the GUI elements like the WCS tables that are fully coded in Python and not configured by Glade via xml at all.
    Don't forget when Tormach release a new version they may well break your wonderful code and you'll have to go over the books again.

    Like Gerrit I'm not into making "how to" videos. The code is your best teacher - and Python.org.
    Step

Page 1 of 3 123

Similar Threads

  1. Glade for pathPilot
    By vmax549 in forum Tormach PathPilot™
    Replies: 1
    Last Post: 12-04-2020, 07:07 AM
  2. PathPilot 2.x and PathPilot Simulator
    By draper-ballou in forum Tormach PathPilot™
    Replies: 117
    Last Post: 01-01-2019, 01:42 AM
  3. PathPilot fix?
    By bradlyw1 in forum Tormach Personal CNC Mill
    Replies: 2
    Last Post: 11-16-2018, 06:26 AM
  4. Replies: 2
    Last Post: 12-03-2017, 12:02 AM
  5. Glade demo files missing
    By wl888 in forum LinuxCNC (formerly EMC2)
    Replies: 0
    Last Post: 01-08-2016, 01:40 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •