Official eMule-Board: Better Code For Prefs-dlg Page Index - Official eMule-Board

Jump to content


Page 1 of 1

Better Code For Prefs-dlg Page Index

#1 User is offline   Avi-3k 

  • hebMule [retired] dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1127
  • Joined: 25-June 03

Posted 08 September 2005 - 10:32 AM

i think there was an old topic about this issue
(eMule using numbers in the localization of prefs-dlg tree items)
and i changed the code in my mod...

old code:

Quote

...
    pTree->SetItemText(GetPageTreeItem(0), RemoveAmbersand(GetResString(IDS_PW_GENERAL)));
...
    pTree->SetItemText(GetPageTreeItem(10), RemoveAmbersand(GetResString(IDS_SECURITY)));
...

new code:

Quote

...
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndGeneral)), RemoveAmbersand(GetResString(IDS_PW_GENERAL)));
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndDisplay)), RemoveAmbersand(GetResString(IDS_PW_DISPLAY)));
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndConnection)), RemoveAmbersand(GetResString(IDS_PW_CONNECTION)));
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndProxy)), RemoveAmbersand(GetResString(IDS_PW_PROXY)));
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndServer)), RemoveAmbersand(GetResString(IDS_PW_SERVER)));
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndDirectories)), RemoveAmbersand(GetResString(IDS_PW_DIR)));
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndFiles)), RemoveAmbersand(GetResString(IDS_PW_FILES)));
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndNotify)), RemoveAmbersand(GetResString(IDS_PW_EKDEV_OPTIONS)));
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndStats)), RemoveAmbersand(GetResString(IDS_STATSSETUPINFO)));
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndIRC)), RemoveAmbersand(GetResString(IDS_IRC)));
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndSecurity)), RemoveAmbersand(GetResString(IDS_SECURITY)));
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndScheduler)), RemoveAmbersand(GetResString(IDS_SCHEDULER)));
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndWebServer)), RemoveAmbersand(GetResString(IDS_PW_WS)));
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndTweaks)), RemoveAmbersand(GetResString(IDS_PW_TWEAK)));
  #if defined(_DEBUG) || defined(USE_DEBUG_DEVICE)
    pTree->SetItemText(GetPageTreeItem(GetPageIndex(&m_wndDebug)), _T("Debug"));
  #endif
...


i didn't compile the code yet, but it should work fine
(since GetPageIndex() is a member of CPropertySheet class)

Avi3k
retired developer of hebMule and eMule Skinner...
hebMule site and topic.
hebMule2 unique features: AntiLeech, AntiVirus, Fake Check, ServerFilter, WebSearches, Export Searches, Relative Priority, ModID and much much more...

eMule Skinner is an application to create/edit skins for eMule,
it's multilingual, supports mods, easy-to-use design, integrates to hebMule & Windows and lots more...

code fixes/improvements: #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11 (to check/verify: #12, #13).
0

#2 User is offline   CiccioBastardo 

  • Doomsday Executor
  • PipPipPipPipPipPipPip
  • Group: Italian Moderators
  • Posts: 5541
  • Joined: 22-November 03

Posted 08 September 2005 - 11:26 AM

Are you on a kiling spree? ;)
Nice to see you so active.

This post has been edited by CiccioBastardo: 08 September 2005 - 11:27 AM

The problem is not the client, it's the user
0

#3 User is offline   Tuxman 

  • lizzie and prog-rock fanatic
  • PipPipPipPipPipPipPip
  • Group: Validating
  • Posts: 2707
  • Joined: 26-July 04

Posted 08 September 2005 - 01:26 PM

:lol: if it continues this way, beba v0.4 will be delayed a few weeks :lol:
[ eMule beba ] :: v2.72 released, v3.00 in the works ...
- feel the lightweight! - featuring Snarl support, the Client Analyzer and tits!
Coded by a Golden eMule Award winner and most people's favorite modder!
..........................................
Music, not muzak:
Progressive Rock :: my last.fm profile
..........................................
eMule user since 0.28 ...
-[ ... and thanks for all the fish! ]-
0

#4 User is offline   Avi-3k 

  • hebMule [retired] dev
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1127
  • Joined: 25-June 03

Posted 08 September 2005 - 01:41 PM

@CB
i guess i am :lol:
it's nice being active (coding like crazy, lol)

@Tuxman
don't wait, or u will never release a new version :P

btw, both of ur posts made me laugh alot :respect:

Avi3k
retired developer of hebMule and eMule Skinner...
hebMule site and topic.
hebMule2 unique features: AntiLeech, AntiVirus, Fake Check, ServerFilter, WebSearches, Export Searches, Relative Priority, ModID and much much more...

eMule Skinner is an application to create/edit skins for eMule,
it's multilingual, supports mods, easy-to-use design, integrates to hebMule & Windows and lots more...

code fixes/improvements: #1, #2, #3, #4, #5, #6, #7, #8, #9, #10, #11 (to check/verify: #12, #13).
0

#5 User is offline   Tuxman 

  • lizzie and prog-rock fanatic
  • PipPipPipPipPipPipPip
  • Group: Validating
  • Posts: 2707
  • Joined: 26-July 04

Posted 08 September 2005 - 01:49 PM

Whenever I don't wait, an important hotfix will be published only a few hours after my release.

:lol:

Whatever...

:flowers:
[ eMule beba ] :: v2.72 released, v3.00 in the works ...
- feel the lightweight! - featuring Snarl support, the Client Analyzer and tits!
Coded by a Golden eMule Award winner and most people's favorite modder!
..........................................
Music, not muzak:
Progressive Rock :: my last.fm profile
..........................................
eMule user since 0.28 ...
-[ ... and thanks for all the fish! ]-
0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users