Author Topic: History++ : unsaved settings  (Read 5182 times)

0 Members and 1 Guest are viewing this topic.

Offline SpinalBlood

History++ : unsaved settings
« on: 16 04 2014, 12:26:52 »
Hi, I have a problem with this plugin;

I have tested it with both the latest stable and development Miranda and plugin versions:

Quote
Miranda NG version: 0.95.1 alpha build #8978 x64
Build time: 15 Apr 2014 5:51:28

  HistoryPP.dll v.1.5.1.5 [22 Mar 2014 14:31:46] - History++
Quote
Miranda NG version: 0.94.9 final build #8010 x64
Build time: 2 Feb 2014 18:53:08
  HistoryPP.dll v.1.5.1.5 [2 Feb 2014 1:26:28] - History++

When I open the history, the Conversation and Bookmarks sections are always opened.

In the database editor I found these settings that should be related:

ShowSessions - 0x01 (1)
ShowBookmarks - 0x01 (1)

If I try to disable in the history++ window the two sections and close, the value automatically changes to 0x00 (after I re-enter the database), but when I open again the history, the 2 settings are enabled again (and by closing the window the database settings are reset to 0x01).
I also tried to edit the settings manually changing into 0x00, but it doesn't work.
This is strange, especially considering it worked in Miranda IM: although there isn't a specific setting in Miranda options, when I used the old Miranda IM plugin, the settings of the buttons inside the history++ window was saved.

Could it be fixed? Despite not vital, it's a bit annoying.

Thanks
 

Offline Mataes

Re: History++ : unsaved settings
« Reply #1 on: 16 04 2014, 13:25:17 »
just test this options and both of them saved normally.
 

Offline White-Tiger

  • Developer
  • *****
  • Posts: 182
  • Country: 00
  • SendSS maintainer
Re: History++ : unsaved settings
« Reply #2 on: 16 04 2014, 13:51:23 »
For me it also works (trunk)... tried a bit and couldn't reproduce it.
The source also did look ok to me....

Anyway.. here's a patch which at last unifies the way we "normally" set those values.
Code: (patch) [Select]
Index: HistoryForm.pas
===================================================================
--- HistoryForm.pas (revision 8983)
+++ HistoryForm.pas (working copy)
@@ -2604,8 +2604,6 @@
 end;
 
 procedure THistoryFrm.PostLoadHistory;
-var
-  tPanel: THistoryPanels;
 begin
   LoadPosition;
   ToggleMainMenu(GetDBBool(hppDBName, 'Accessability', False));
@@ -2624,11 +2622,10 @@
   end
   else
   begin
-    if GetDBBool(hppDBName, 'ShowSessions', False) then
-      include(tPanel, hpSessions);
-    if GetDBBool(hppDBName, 'ShowBookmarks', False) then
-      include(tPanel, hpBookmarks);
-    Panel := tPanel;
+    if GetDBBool(hppDBName, 'ShowSessions', False) and not(hpSessions in Panel) then
+      Panel := Panel + [hpSessions];
+    if GetDBBool(hppDBName, 'ShowBookmarks', False) and not(hpBookmarks in Panel) then
+      Panel := Panel + [hpBookmarks];
   end;
 
   CreateEventsFilterMenu;
« Last Edit: 16 04 2014, 13:53:52 by White-Tiger »

 

Offline SpinalBlood

Re: History++ : unsaved settings
« Reply #3 on: 16 04 2014, 19:33:14 »
It should be compiled I guess, I'm not familiar with these operations :-\

Btw in the meanwhile I have tested the 32bit version: in this case, there are no problems; so I might use this version instead for the moment.

Thanks
 

Offline White-Tiger

  • Developer
  • *****
  • Posts: 182
  • Country: 00
  • SendSS maintainer
Re: History++ : unsaved settings
« Reply #4 on: 16 04 2014, 19:46:05 »
hmm.. 64bit problem... interesting... I have no idea why that could be a problem with pascal though^^
While I guess we aren't using Free Pascal and thus there might be problems... Maybe time to move to Free Pascal xD