aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: aMule window resize problems under Mac os x  (Read 3465 times)

greek

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 128
aMule window resize problems under Mac os x
« on: July 12, 2008, 09:30:57 AM »

There is a very amusing problem, when I open aMule its vertical size grows from the previous time it opened.

Explicitly:

1) Reset the size of aMule (start with something small)
2) quit
3) reload, not amule has the same horizontal size but the vertical size is a bit bigger
4) quit
5) reload, now the amule vertical size grows bigger than it was at 3.
6) repeat until it grows out of the screen

It looks that every time you load amule it grows bigger by a constant amount.... Interesting.
Logged

greek

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 128
Re: aMule window resize problems under Mac os x
« Reply #1 on: July 12, 2008, 09:40:52 AM »

There is an extra piece of information that may be useful. The amount by which the vertical direction grows is equal to the height of the tool bar! It looks that aMule remembers correctly the total height of the window including the tool bar, but when it restores it the next time if forgets that it added the toolbar and it adds it again.
To test this, I changed the orientation of the toolbar to vertical and in this case amule does not grow!
I also notice that the vertical toolbar looks different than the horizontal one. The horizontal toolbar seems like the standard osx toolbar which is available in all applications. The vertical toolbar (judging from its color) is like an extra panel in the application. It seems that under macosx those two case need to be handled differently.
I am not sure in which part of the program this occurs, but I think it should be an easy patch for this very annoying bug!!
« Last Edit: July 12, 2008, 09:46:31 AM by greek »
Logged

greek

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 128
Re: aMule window resize problems under Mac os x
« Reply #2 on: July 12, 2008, 02:00:17 PM »

Ok, that was partially resolved: this is a wxMac-2.8.7 bug. There is no problem in wxMac-2.8.8 (however there are compilation problems).
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: aMule window resize problems under Mac os x
« Reply #3 on: July 12, 2008, 04:29:51 PM »

Feel free to fix them ;)
Logged
concordia cum veritate

greek

  • Full Member
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 128
Re: aMule window resize problems under Mac os x
« Reply #4 on: July 13, 2008, 03:13:43 AM »

Actually I lied. wxMac-2.8.8 gives the same behavior, when compiled properly.
What I notice is that the vertical and the horizontal toolbar are drawn fundamentally differently. For some reason the shared version of wxmac draws the horizontal toolbar in the same way as the vertical in which case the problem does not exist.
No, I think it is an amule bug after all.
Logged

xor

  • Approved Newbie
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 11
Re: aMule window resize problems under Mac os x
« Reply #5 on: July 15, 2008, 06:44:49 PM »

Thats easy. Just locate the following:

   if (!LoadGUIPrefs(override_where, override_size)) {
      // Prefs not loaded for some reason, exit
      AddLogLineM( true, wxT("Error! Unable to load Preferences") );
      return;
   }

in amuleDlg.cpp and move it forward just bellow the line with 'm_wndToolbar->ToggleTool(ID_BUTTONTRANSFER, true );'.
This way next time amule save window positions, it will take into account the toolbar.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: aMule window resize problems under Mac os x
« Reply #6 on: July 15, 2008, 07:14:55 PM »

Thanks a lot for this hint, this has been applied now. :)
Logged