Menu

#1084 Geany 1.24.1 - Keeps Moving Text In XML File...

None
open
nobody
None
Unknown
5
2015-01-26
2015-01-22
SourceBugs
No

Hi,

My system specs;

Slackware 14.1 x86_64
Nvidia Geforce 660GTX
nvidia driver 340.65
17" laptop 1920x1080
Geany 1.24.1
Openbox 3.5.2

I have an xml file from Openbox, rc.xml that I am trying to create some keyboard
shortcuts. Everytime I create this particular ruleset for tiling windows, I don't
know why, but Geany keeps changing the layout.

Geany by default had the indentation at 4 in the Preferences and I changed it to 8,
so I don't know if it would cause this, but I don't see why it should, since the
text doesn't even take up 25% of the width of the UI.

I'm attaching 2 screen shots, the first one geany_1.jpg shows how the text should look,
then later when I reopen the file the screen shot, geany_2.jpg is how it ends up
looking.

I'm also attaching the rc.xml for anyone to look at to see if they can find out why
this is happening.

This seems really odd and driving me crazy.

I'll also go back and re change the text over with the indention on 4 and see if it
makes any difference and report back.

1 Attachments

Discussion

  • SourceBugs

    SourceBugs - 2015-01-22

    Oops forgot the other attachements...

     
  • SourceBugs

    SourceBugs - 2015-01-22

    Errr; Post awaiting moderation, so I couldn't edit it after posting to add another attachement, this time I'm adding the rc.xml...

    thanks

     
  • Lex Trotman

    Lex Trotman - 2015-01-22

    Looking at your images, the first seems to be on a different version
    of Geany or a different system?

    The file you posted looks the same in Geany and Gedit and matches the
    second image, and that is the correct display it for the contents of
    the file. The only line ends are after the </action> tag.

    So the question comes back to what is different about the first one?
    Is it running some plugin that does stuff with xml? How are you making
    it laid out like that given the only line ends are after the
    </action>?

     
  • SourceBugs

    SourceBugs - 2015-01-22

    Hi Lex,

    That is the same version of Geany 1.24.1. I see what you are noticing, the theme and icons is different. I had changed the theme and icons when I took the second screen shot is all, later in the day. :)

    So the screen shots are not different and running anything differnet, and it's the same rc.xml file I posted here.

    The only thing I changed in Geany too is;

    Preferences > Editor > Identation > 8

    The default for Identation is 4, so somehow it doesn't like 8 and causes this text to shift...

    Not sure what you mean by </action>? The end of the line for every keyboard shortcut is </keybind> and the syntax is correct....

    <keybind key="W-c">                # CenterScreen 
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <x>384</x>
        <y>235</y>
        <height>60%</height>
        <width>60%</width>
      </action>
      </keybind>
    <keybind key="W-Left">             # HalfLeftScreen 
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <height>100%</height>
        <width>50%</width>
      </action>
      </keybind>
    <keybind key="W-Right">            # HalfRightScreen   
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <x>-0</x>
        <y>0</y>
        <height>100%</height>
        <width>50%</width>
      </action>
      </keybind>
    <keybind key="W-Up">               # HalfUpperScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <width>100%</width>
        <height>50%</height>
      </action>
      </keybind>
    <keybind key="W-Down">             # HalfLowerScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo">
        <x>0</x>
        <y>-0</y>
        <width>100%</width>
        <height>50%</height>
      </action>
      </keybind>
    <!-- Aero Snap for Openbox End Code-->
    
     
  • SourceBugs

    SourceBugs - 2015-01-24

    Ahhh darn it changed again on me, and the only thing I've done is just changed GTK themes and icons.

    I can't believe that changing the theme and icon is going to make geany mess up the text/layout...

    Here it is now messed up again...

    <!-- Aero Snap for Openbox Begin Code-->
    <keybind key="W-c">                # CenterScreen 
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>384</x><y>235</y><height>60%</height><width>60%</width></action>
      </keybind>
    <keybind key="W-Left">             # HalfLeftScreen 
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>0</y><height>100%</height><width>50%</width></action>
      </keybind>
    <keybind key="W-Right">            # HalfRightScreen   
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>-0</x><y>0</y><height>100%</height><width>50%</width></action>
      </keybind>
    <keybind key="W-Up">               # HalfUpperScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>0</y><width>100%</width><height>50%</height></action>
      </keybind>
    <keybind key="W-Down">             # HalfLowerScreen
      <action name="UnmaximizeFull"/>
      <action name="MoveResizeTo"><x>0</x><y>-0</y><width>100%</width><height>50%</height></action>
      </keybind>
    <!-- Aero Snap for Openbox End Code-->
    
     

    Last edit: Colomban Wendling 2015-01-24
  • Colomban Wendling

    The rc.xml file attached has your "messed up" formatting, so displaying it the way you don't like is the expected behavior.

    I wonder, couldn't it be Openbox (or whatever touches that file) that re-saves it with a different layout?

    Also, and although it's not strictly wrong for XML, there are strange things that look like they are expected to be comments but actually would be just data in XML syntax: # CenterScreen and friends. If interpreted as XML, this would be data inside the <keybiding> node, not a comment. Maybe it confuses some tool and leads it to write the file with a weird layout?

    Anyway, I don't see how Geany itself would change that, we do not have anything that would automatically reformat your XML. However, maybe it can be a plugin, maybe XML Pretty Printer? maybe try disabling those -- or try a completely clean configuration with something like geany -c /tmp/geany_conf_tmp.
    Also, as I doubt it's Geany at all, could you try to reproduce your problem with a copy of your Openbox's rc.xml somewhere it's not used? Because again, my best bet is that the file gets externally modified and you reloaded it in some way, and then notice the changes.

     
  • SourceBugs

    SourceBugs - 2015-01-26

    Well I found a gap I removed, and I also took out the comments that were listed to the right.

    Maybe Openbox doesn't like these #comments in the xml, because I doubt one small gap would throw this off...

    Anyhow it seems to be ok for now, sorry for the report. :(

     

Log in to post a comment.