#634 Bottom separator does not correctly remember its position

open
nobody
Interface (176)
5
2014-11-04
2011-02-02
No

geany 0.20 (built on Jan 16 2011 with GTK 2.22.0, GLib 2.26.0, GIO)
on Ubuntu 10.10

Steps to reproduce:
- Move the separator between the main window and the message window to the very bottom (making the message window invisible).
- Quit geany.
- Open geany.
- The separator has moved up by approximately the height of one log line.

I hope this is indeed a bug and not intended as it is a little annoying to move the spearator down each time the application starts.

Discussion

  • Anonymous - 2011-03-16

    For me it stays all the way down. One thought is that it's related to your GTK+ theme/engine maybe?

    I'm not sure if you're aware though, under the View menu you can disable/hide the Message Window, or alternately, assign a keybinding to toggle it between hidden and visible from the Preferences dialog. In both cases it should remember the visibility of the Message Window when you close and reopen the program.

     
  • Jendrik Seipp

    Jendrik Seipp - 2011-03-16

    Hmm, that's strange. It seems to work even with the message window visible. Thanks anyways!

     
  • Jendrik Seipp

    Jendrik Seipp - 2011-03-16
    • status: open --> open-invalid
     
  • Jean-Philippe Fleury

    I confirm this bug with Geany 0.20 on Ubuntu 11.04.

    Say I want to have 30 visible lines in my text area, so I set message window height accordingly, but each time I close Geany and open it again, one more line is used by the message window, so one line is missing for text area. Example:

    - Set text area height to 30 lines.
    - Close Geany and open it again.
    - Text area height is 29 lines.
    - Close Geany and open it again.
    - Texat area height is 28 lines.
    - Close Geany and open it again.
    - Texat area height is 27 lines.
    - Close Geany and open it again.
    - Texat area height is 26 lines.
    - Etc.

    So I must repeatedly adjust height.

     
  • Jean-Philippe Fleury

    I made some investigations and I found that each time I close Geany, the value of "msgwindow_position" in the file "/home/USER/.config/geany/geany.conf" is decreasing. Example:

    - Initial value is msgwindow_position=548
    - Close Geany.
    - Value is now msgwindow_position=531
    - Open Geany and close it.
    - Value is now msgwindow_position=515
    - Open Geany and close it.
    - Value is now msgwindow_position=499
    - Open Geany and close it.
    - Value is now msgwindow_position=484
    - Open Geany and close it.
    - Value is now msgwindow_position=469
    - Etc.

     
  • Nobody/Anonymous

    I still can't reproduce this, using the current SVN version, can you try with the development code (maybe it was fixed already)? Also, just to be sure, have you tried with the stock GTK+ theme, maybe try one or two different ones?

    There is a little bit of "magic" happening between lines 905 and 917 in keyfile.c, perhaps someone more familiar with the code can check this.

     
  • Jean-Philippe Fleury

    I've tested with version 0.21 (svn >= 5759) and I still have the bug.

    By "stock GTK+ theme", do you mean the theme used for my system, set in "System > Preferences > Appearance"? If so, I use Clearlooks. I've tested with a few others, and the bug is still there.

     
  • Colomban Wendling

    I can't reproduce the bug either, neither on my Debian Sid machine or on a Ubuntu 11.04 live CD. I also tried many themes (including Clearlooks) on both machines.

    Have you anything special configured on your machine? Could you try using e.g. a live CD (in the case we just don't understand exactly how to reproduce)?

    > There is a little bit of "magic" happening between lines 905 and 917 in
    > keyfile.c, perhaps someone more familiar with the code can check this.

    Maybe, but not that lines 914-917 are unlikely to be causing the problem since the weird constants are only used as the default value if the config key is not set (e.g. on first startup).

     
  • Jean-Philippe Fleury

    > Could you try using e.g. a live CD (in the case we just don't understand
    > exactly how to reproduce)?

    I tested Geany on a ISO image (Ubuntu 11.04) using Virtualbox. I didn't change any preferences, neither on the system nor on Geany, so all is default stuff. The bug still occurs.

    > Have you anything special configured on your machine?

    I don't think so. I have a Asus EeePC T101MT with Ubuntu 11.04 ("Ubuntu Classic" session, not Unity).

     
  • Colomban Wendling

    Wow. I actually did the exact same thing (launch Ubuntu 11.04 live CD inside VirtualBox from my Debian machine), and didn't see this occur, neither using Unity nor proper GNOME.

    Hum… what's your screen resolution, DPI, etc? I doubt it's related because changing DPIs on my Debian box doesn't change anything, but who knows…

     
  • Jean-Philippe Fleury

    > Hum… what's your screen resolution, DPI, etc?

    I'll attach screenshots of my configuration.

     
  • Jean-Philippe Fleury

    I noted that each time I open and close Geany, "msgwindow_position" is decreased, but to a progressively smaller difference with the last value:

    607
    589: -18px
    571: -18px
    554: -17px
    537: -17px
    521: -16px
    505: -16px
    490: -15px
    475: -15px
    461: -14px
    447: -14px
    433: -14px
    420: -13px
    407: -13px
    395: -12px
    383: -12px
    371: -12px
    360: -11px
    349: -11px
    338: -11px
    328: -10px
    318: -10px
    308: -10px
    299: -9px
    290: -9px
    281: -9px
    272: -9px
    264: -8px
    256: -8px
    248: -8px
    240: -8px
    233: -7px
    226: -7px
    219: -7px
    212: -7px
    206: -6px
    200: -6px
    194: -6px
    188: -6px
    182: -6px
    176: -6px
    171: -5px
    166: -5px
    161: -5px
    156: -5px
    151: -5px
    146: -5px
    142: -4px
    138: -4px
    134: -4px
    130: -4px
    126: -4px
    122: -4px
    118: -4px
    114: -4px
    111: -3px
    108: -3px
    105: -3px
    102: -3px
    99: -3px
    96: -3px
    93: -3px
    90: -3px
    87: -3px
    84: -3px
    81: -3px
    79: -2px
    77: -2px
    75: -2px
    73: -2px
    71: -2px
    69: -2px
    67: -2px
    65: -2px
    63: -2px
    61: -2px
    59: -2px
    57: -2px
    55: -2px
    53: -2px
    51: -2px
    49: -2px
    48: -1px
    47: -1px
    46: -1px
    45: -1px
    44: -1px
    43: -1px
    42: -1px
    41: -1px
    40: -1px
    39: -1px
    38: -1px
    37: -1px
    36: -1px
    35: -1px
    34: -1px
    33: -1px
    32: -1px
    31: -1px
    30: -1px
    29: -1px
    28: -1px
    27: -1px
    26: -1px
    25: -1px
    24: -1px
    23: -1px
    22: -1px
    21: -1px
    20: -1px
    19: -1px
    18: -1px
    17: -1px
    16: -1px
    16: -0px

     
  • Jean-Philippe Fleury

    I made some tests and I think that the problem is with "gtk_paned_set_position" (file "src/keyfile.c", line 1123):

    gtk_paned_set_position(GTK_PANED(ui_lookup_widget(main_widgets.window, "vpaned1")), vpan_position);

    "vpan_position" contains the value get from the config file, but "gtk_paned_set_position" seems to decrease (about 3%) this value. Then, the decreased value is correctly saved in the config file (lines 527-528):

    g_key_file_set_integer(config, PACKAGE, "msgwindow_position",
    gtk_paned_get_position(GTK_PANED(ui_lookup_widget(main_widgets.window, "vpaned1"))));

    The next time Geany opens, the value "589" is correctly get in the config file in lines 915-917:

    vpan_position = utils_get_setting_integer(config, PACKAGE, "msgwindow_position", (geo) ?
    (GEANY_MSGWIN_HEIGHT + geo[3] - 440) :
    (GEANY_MSGWIN_HEIGHT + GEANY_WINDOW_DEFAULT_HEIGHT - 440));

    but "gtk_paned_set_position" decreases again this value, this time to 571. When we close Geany, 571 is saved in the config file. When we open again Geany, 571 is get and "gtk_paned_set_position" decreases it to 554, and so on.

    I think the bug occurs this way because even if I hardcode the value for vpan position in line 1123:

    gtk_paned_set_position(GTK_PANED(ui_lookup_widget(main_widgets.window, "vpaned1")), 607);

    the message window is not positioned to 607px when Geany opens, but to 589px (verified with a screenshot), and 589 is later saved in the config file.

     
  • Nobody/Anonymous

    Does this bug happen when you disconnect the 17" monitor and just use the netbook screen?

     
  • Jean-Philippe Fleury

    > Does this bug happen when you disconnect the 17" monitor and just use the
    > netbook screen?

    Yes, the bug still occurs.

     
  • Colomban Wendling

    Test program

     
  • Colomban Wendling

    This is really weird and looks like a GTK+ bug with a particular detail of your configuration…
    Could you try the attached program and check if it has the same behavior? Just run it, move the separator, quit, restart, etc. The configuration is saved in panedsaving.conf, maybe you can simply check whether the value decreases here too.

    If yes, it's definitely a GTK+ problem, so it should be forwarded to them. If no… oh shit, it's a Geany problem and we then gotta fix it :/

     
  • Jean-Philippe Fleury

    > Could you try the attached program and check if it has the same behavior?

    There's no bug with the attached program.

     
  • Jean-Philippe Fleury

    Good news. I updated to Ubuntu 11.10, and I no longer have this bug. :-)

     
  • Colomban Wendling

    Cool! Though I still don't understand what caused it... maybe a theme or something. Anyway, good you don't suffer of the bug anymore :)

     
  • Jendrik Seipp

    Jendrik Seipp - 2012-01-06

    This bug still occurs in version 0.21. It occurs on Lubuntu 11.10 as well and I can confirm that each time I open and close geany the msgwindow_position value decreases.

    Running your attached program I get the following strange behaviour: When I move the separator all the way down position=570 is saved in the text file, but on the next start the separator is moved to the vertical middle of the screen.
    All positions above the middle are correctly saved and restored, all positions below the middle are correctly stored, but incorrectly reset (to the vertical middle).

     
  • Jendrik Seipp

    Jendrik Seipp - 2012-01-06
    • status: open-invalid --> open
     
  • Jordi Sayol

    Jordi Sayol - 2012-06-08

    The bug is still present with geany 0.21 on Ubuntu 12.04 64-bit.

     

Log in to post a comment.