Results 1 to 7 of 7

Thread: writing ¨gtk¨ changes any text file in a Glade Project

  1. #1
    Join Date
    Nov 2011
    Beans
    4

    writing ¨gtk¨ changes any text file in a Glade Project

    Excuse my bad,bad,bad english, please. I hope you can understand me.

    My problem is simple: if I write ¨gtk¨ (or sdfslkjsdifjgtksfsfkls) in a text file it automatically changes to a Glade Project in XML format, and I can't change to sh or simple text. My scripts don't work because this.
    This happens after a clean installation using 12.04, with no previous configuration.

    Somebody can help me?

    Thank you.

  2. #2
    Join Date
    Jun 2007
    Beans
    17,337

    Re: writing ¨gtk¨ changes any text file in a Glade Project

    I noticed that also during 12.04 dev, was wondering why some text files changed their icon, mimetype ect. Eventually traced to gtk
    Never did file a bug on, probably because couldn't figure out what package to file against, guess I will now (will start against nautilus
    Also If I remember not all files change, though most do..?


    https://bugs.launchpad.net/ubuntu/+s...us/+bug/995067

    As far as your curent issue - not sure, here I just set the default from Firefox to gedit
    application/x-glade=gedit.desktop
    Last edited by mc4man; May 5th, 2012 at 03:43 PM.

  3. #3
    Join Date
    Nov 2011
    Beans
    4

    Re: writing ¨gtk¨ changes any text file in a Glade Project

    Thanks for your answer and for open a new bug.

    I'm running Ubunt 12.04 3.2.0-24-generic x86_64

    I was beginning to think that this happens just with me. I'm not alone at least

  4. #4
    Join Date
    Dec 2007
    Beans
    12,521

    Re: writing ¨gtk¨ changes any text file in a Glade Project

    Quote Originally Posted by mc4man View Post
    Thanks! Marked "it affects me too".

  5. #5
    Join Date
    Jun 2007
    Beans
    17,337

    Re: writing ¨gtk¨ changes any text file in a Glade Project

    So this is caused by shared-mime-info, specifically if "gtk" is the 1st. 256 bytes then it's a glade file

    So if needed you could pad the file so the 1st gtk is 257/8 in, wait to see if adjusted in a new package release or
    it's likely you could adjust the value in
    /usr/share/mime/packages/freedesktop.org.xml (lines 10804,10805
    Then update the mime-database

  6. #6
    Join Date
    Mar 2011
    Beans
    183

    Re: writing ¨gtk¨ changes any text file in a Glade Project

    I had a text file containing "##" - a pretty common string! - and it became a "MATLAB script/function".

    The culprit again is /usr/share/mime/packages/freedesktop.org.xml:

    <match value="##" type="string" offset="0"/>

  7. #7
    Join Date
    Nov 2011
    Beans
    4

    Re: writing ¨gtk¨ changes any text file in a Glade Project

    it's likely you could adjust the value in
    /usr/share/mime/packages/freedesktop.org.xml (lines 10804,10805
    Then update the mime-database
    This solved the problem with my scripts.

    thanks.

Bookmarks

Posting Permissions

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