Can button in popup be disabled with Ruby script?

edited August 2012 in General
Hi All

I am a newbee to Ruby scripting as well as Klayout.

I have a scenario in which I need to disable a particular button in a popup when it comes up. To be precise I need to disable the 'File ...' button in Marker Database Browser popup which is triggered by selecting Marker Browser from Tools menu. Kindly guide me on the same. Thanks a zillion.

Comments

  • edited August 2012

    Hallo,

    right now it is not possible to modify built-in dialogs in Ruby. Or at least not to the extent you wish that to happen. Under certain circumstances you might be able use qt4ruby for that purpose but I that's a stony path to walk ..

    If you definitely want to disable that button, the only reasonable solution right now is to modify the sourcecode accordingly and recompile.

    Best regards,

    Matthias

  • edited 12:01AM
    Hi Matthias...

    Thanks a zillion for your kind reply!!

    Even I feel it is a stony path to walk and infact I tried out a few options with my limited knowledge of Qt and Ruby; but nothing worked.

    So I think modifying the code is the best option as I have no conditions to check but to disable the button permanently.

    Kindly tell me anytime you have a magical solution for this function as changing the source code demands changing it each time we get updated to the newest version.

    Thanks again for your timely reply.

    Warm Regards,
    Jisha
  • edited 12:01AM

    Hi Jisha,

    I'd suggest you create a patch with your changes. That should simplify the task of applying your changes to KLayout's current code base.

    Best regards,

    Matthias

  • edited September 2012

    Hi Jisha,

    I'd suggest you create a patch with your changes. That should simplify the task of applying your changes to KLayout's current code base.

    One (elaborate) way of doing so is for example to employ the Subversion configuration management system and it's "vendor branch" concept (for a detailed description see http://svnbook.red-bean.com/en/1.1/ch07s05.html). The advantage of using a configuration management system is that you are able to track you own changes in parallel to KLayout's history and make use of such a system's refined merging and patching methods.

    Best regards,

    Matthias

  • edited 12:01AM
    Hello Matthias..

    Thanks a zillion for your wonderful suggestion.

    I have already done the change, since it was a single line code change; but was wondering how to maintain this.

    Configuration control branching seems to be the best option; especially since more customization is expected on the current version.I was going through the link you have suggested.

    I am still a bit unclear on how vendor branching is different from the usual project branching. As far as I understood, it looks the same :) Unless we give the repository to be linked directly to the third party repo. If that is the case our company policy does not allow that. So I will have to copy the latest version to a specific intra-company location to which SVN can link to. That should be fine as we can still have the benefits of branching.

    Thanks again. You really have a wonderful app here and is well-maintained. Hatsoff bosss!! :)

    Warm Regards,
    Jisha
Sign In or Register to comment.