Author Topic: Some "Log & others" problems  (Read 7689 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12911
    • Travis build status
Some "Log & others" problems
« on: May 14, 2010, 08:24:01 pm »
1. Closing pages in the notebook removes them from the drop down list and they can't be reopened
2. The order and the state of the tabs/pages is not remembered and I've to close the ones I don't need every time I start C::B
3. Build/Build messages are at the end of the notebook, which is very annoying
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Some "Log & others" problems
« Reply #1 on: May 14, 2010, 08:43:30 pm »
1. Closing pages in the notebook removes them from the drop down list and they can't be reopened
2. The order and the state of the tabs/pages is not remembered and I've to close the ones I don't need every time I start C::B
3. Build/Build messages are at the end of the notebook, which is very annoying

1. Yes, they are not in dropdownlist, but can be reopened via context-menu ("Toggle -> ...")
2. Yes, it's not so easy to do this, because many of them are opened by plugins and the load-order can vary, and a closed/toggled logger is mostly automatically reopened if the owner tries to write into it.
3. Here they are the fifth and sixth logger of thirteen, but as written before it depends on load-order of the plugins.

Saving the state and order can be done on shutdown before unloading the plugins and loading the layout in CreateIDE() after CreateMenubar(), because it loads all plugins.
This would fix 2 and 3.
I will see if I find the time to look into it.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Some "Log & others" problems
« Reply #2 on: June 03, 2010, 05:18:18 pm »
I created a patch for 2 (can fix 3 automatically).

See http://forums.codeblocks.org/index.php/topic,12650.msg85768.html#msg85768 for details.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12911
    • Travis build status
Re: Some "Log & others" problems
« Reply #3 on: July 10, 2010, 12:42:47 am »
Jens: The patch (version 1, never tried v2, because I'm too lazy :( ) works very well, probably you could commit it? :)

Also, there is another problem, here are the steps to reproduce it:
1. Switch to "Build messages"
2. Right click and open the context menu
3. Left click and the context menu is opened at the position of the click

or

1. Switch to the "Thread search" tab, Thread search should be in list ctrl mode, have not tested the tree mode
2. Perform a search which should have some results
3. Right click on a result string to open the context menu
4. Click "Delete all items", the general context menu shows up

Tested on gentoo linux 64bit debuggers branch (but it is not related to the changes in it, I think)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Some "Log & others" problems
« Reply #4 on: July 20, 2010, 07:27:35 pm »
It's in trunk now (svn r6406) and will sooner or later be available in the debugger- and the cc-branch also, I think.

I don't have any of them at the moment, so I can not commit the changes soon.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9606
Re: Some "Log & others" problems
« Reply #5 on: July 20, 2010, 08:47:53 pm »
It's in trunk now (svn r6406) and will sooner or later be available in the debugger- and the cc-branch also, I think.
Done that.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12911
    • Travis build status
Re: Some "Log & others" problems
« Reply #6 on: July 21, 2010, 12:56:28 am »
Debugger branch is broken :(

Code: [Select]
/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/src/infopane.cpp: In member function ‘int InfoPane::GetCurrentPage(bool&)’:
/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/src/infopane.cpp:204: error: ‘num_pages’ was not declared in this scope
/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/src/infopane.cpp:206: error: request for member ‘indexInNB’ in ‘((InfoPane*)this)->InfoPane::page.InfoPane::wxArrayOfPage::operator[](((size_t)ii))’, which is of non-class type ‘InfoPane::Page*’
/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/src/infopane.cpp:208: error: request for member ‘islogger’ in ‘((InfoPane*)this)->InfoPane::page.InfoPane::wxArrayOfPage::operator[](((size_t)ii))’, which is of non-class type ‘InfoPane::Page*’
/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/src/infopane.cpp: In member function ‘Logger* InfoPane::GetLogger(int)’:
/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/src/infopane.cpp:217: error: ‘num_pages’ was not declared in this scope
/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/src/infopane.cpp:219: error: request for member ‘islogger’ in ‘((InfoPane*)this)->InfoPane::page.InfoPane::wxArrayOfPage::operator[](((size_t)index))’, which is of non-class type ‘InfoPane::Page*’
/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/src/infopane.cpp:219: error: request for member ‘logger’ in ‘((InfoPane*)this)->InfoPane::page.InfoPane::wxArrayOfPage::operator[](((size_t)index))’, which is of non-class type ‘InfoPane::Page*’
/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/src/infopane.cpp: In member function ‘wxWindow* InfoPane::GetWindow(int)’:
/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/src/infopane.cpp:223: error: ‘num_pages’ was not declared in this scope
/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/src/infopane.cpp:225: error: request for member ‘islogger’ in ‘((InfoPane*)this)->InfoPane::page.InfoPane::wxArrayOfPage::operator[](((size_t)index))’, which is of non-class type ‘InfoPane::Page*’
/home/obfuscated/projects/codeblocks/brances/wxpropgrid_debugger/src/src/infopane.cpp:225: error: request for member ‘window’ in ‘((InfoPane*)this)->InfoPane::page.InfoPane::wxArrayOfPage::operator[](((size_t)index))’, which is of non-class type ‘InfoPane::Page*’
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9606
Re: Some "Log & others" problems
« Reply #7 on: July 21, 2010, 09:01:16 am »
Debugger branch is broken :(
I've a patch for that but cannot commit for a while (no access to SVN).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12911
    • Travis build status
Re: Some "Log & others" problems
« Reply #8 on: July 21, 2010, 09:29:46 am »
Can you post it?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Some "Log & others" problems
« Reply #9 on: July 21, 2010, 11:36:52 am »
Can you post it?
Please test this patch:
Code: [Select]
--- tmp/tmp93xXnj-meld/infopane.cpp
+++ home/jens/codeblocks-build/codeblocks.dbg/src/src/infopane.cpp
@@ -200,29 +200,22 @@
 
 int InfoPane::GetCurrentPage(bool &is_logger)
 {
-    int page_index = GetSelection();
-    for (int ii = 0; ii < num_pages; ++ii)
-    {
-        if (page[ii].indexInNB == page_index)
-        {
-            is_logger = page[ii].islogger;
-            return ii;
-        }
-    }
-    return -1;
+    int i = GetPageIndexByWindow(GetPage(GetSelection()));
+    is_logger = page.Item(i)->islogger;
+    return (is_logger?i:-1);
 }
 
 Logger* InfoPane::GetLogger(int index)
 {
-    if (index < 0 || index > num_pages)
+    if (index < 0 || (size_t)index > page.GetCount())
         return NULL;
-    return page[index].islogger ? page[index].logger : NULL;
+    return page.Item(index)->islogger ? page.Item(index)->logger : NULL;
 }
 wxWindow* InfoPane::GetWindow(int index)
 {
-    if (index < 0 || index > num_pages)
+    if (index < 0 || (size_t)index > page.GetCount())
         return NULL;
-    return !page[index].islogger ? page[index].window : NULL;
+    return !page.Item(index)->islogger ? page.Item(index)->window : NULL;
 }
 
 void InfoPane::Show(size_t i)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12911
    • Travis build status
Re: Some "Log & others" problems
« Reply #10 on: July 21, 2010, 09:19:13 pm »
Applied at my installed version... seems to work
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Some "Log & others" problems
« Reply #11 on: July 21, 2010, 09:44:20 pm »
Applied at my installed version... seems to work
Committed (dbg-branch r6412) , thanks for testing.