Author Topic: 3 simple thoughts  (Read 23234 times)

thomas.gilray

  • Guest
3 simple thoughts
« on: November 29, 2006, 05:36:07 am »
I have been using RC2 for probably about a year now and really like code blocks. I just updated to a nightly build from late october and had a few thoughts on the changes and lack of them, 3 commends and a suggestion to be precise:

First, I would like to say that in RC2, the autofillin box that suggests methods and types to fill in never really worked for me. It was slow to come up, almost always only comming up once the entire method name had already been typed and usually not at all. When it would, it sometimes came up with incorrect suggestions. The newest version comes up immidiatly after typing a couple characters and provides relevant possibilities which are easy to enter or ignore. Nice work making this feature perfect!

Second, overall im not a big fan of eclipse but one thing i think it does a great job with is folding. A folded function becomes just the signature with a small [...] box and if you hold your cursor over the box a hint pops up to display the first 4-5 lines of the function. In code::blocks the folding option is IMO more annoying then helpful. I was hoping there would be some improvement in CB's folding but i dont see any improvement. Only a "{" and a long "------------" is displayed. When all my functions are folded the constant horizontal lines make it more difficult to read, and if im not mistaken the primary purpose of folding is to make it easier for a coder to see a high level view of a large file without as much panning.

Third, Just a small comment. The old tabs at the top were easier to see while the new tabs look great when active, but the tabs in the background are only separated with a "|" and are written in a gray that blends in with the background too much.

Lastly, I have a suggestion. I personally keep lots of tabs up most times and the "< >" tab scrolling buttons are difficult to use because i would like to be able to see all my tabs at once. What about an option to have the tabs stack on top of eachother. Similar to how it is done in windows' options dialogs when there are too many tabs to fit. A new row of tabs could just be created below the first.

I was just thinking about what could make C::B a better IDE and since i have an account on the forums i thought i would post my thoughts. Dispite the really minor "problems" above, IMO CodeBlocks is really the best IDE i've ever used!

Great work.

Offline joubertdj

  • Multiple posting newcomer
  • *
  • Posts: 120
Re: 3 simple thoughts
« Reply #1 on: November 29, 2006, 07:15:19 am »
Quote
Only a "{" and a long "------------" is displayed.

Yeah, I have to admit, I am using the source code formatter, that works brilliantly, but the "{" when the code is folded is kind of a pain. Shouldn't the source code formatter be linked with the code folding that when you write:
Code
void procedure{
}
It will fold it that way and when you write
Code
void procedure
{

}
It will fold it a different way?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: 3 simple thoughts
« Reply #2 on: November 29, 2006, 07:23:49 am »
Quote
Lastly, I have a suggestion. I personally keep lots of tabs up most times and the "< >" tab scrolling buttons are difficult to use because i would like to be able to see all my tabs at once. What about an option to have the tabs stack on top of eachother. Similar to how it is done in windows' options dialogs when there are too many tabs to fit. A new row of tabs could just be created below the first.

ctrl-tab

thomas.gilray

  • Guest
Re: 3 simple thoughts
« Reply #3 on: November 29, 2006, 07:39:41 am »
Yeah,

Now that you mention it, the folding was probably meant for

Code
function(){
}

instead of

Code
function()
{
}

in which case it works great, but it should detect this.

My bigest concern was actually the horizontal bar though, wherever it is. Wouldn't a soft small tan colored rectangle be better?

Quote
ctrl-tab

Yeah, thats cool. Havent been using that. My concern was more that i couldn't see all the files on one screen, but its really not a big deal. I was just nitpicking there...  :)

bnilsson

  • Guest
Re: 3 simple thoughts
« Reply #4 on: November 29, 2006, 08:50:35 am »
Sorry coming in late in this thread, but I would like to second on the comment that the (text on the) incative tabs is more or less invisible. Is it technically possible to adjust this?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: 3 simple thoughts
« Reply #5 on: November 29, 2006, 09:04:08 am »
Sorry coming in late in this thread, but I would like to second on the comment that the (text on the) incative tabs is more or less invisible. Is it technically possible to adjust this?

"Settings->Environment->Notebooks appearence"

Keep in mind though that the colours used are provided by the OS theme, they are not hardcoded.
Be patient!
This bug will be fixed soon...

Offline Phatency

  • Multiple posting newcomer
  • *
  • Posts: 65
Re: 3 simple thoughts
« Reply #6 on: November 29, 2006, 09:34:50 am »
Sorry coming in late in this thread, but I would like to second on the comment that the (text on the) incative tabs is more or less invisible. Is it technically possible to adjust this?

"Settings->Environment->Notebooks appearence"

Keep in mind though that the colours used are provided by the OS theme, they are not hardcoded.
I had to adjust my windows theme to see them. Could't you provide some kind of ability to NOT use OS colours when you don't want to? Seems to me that now _some_ of the colours are provided by the OS and some are not. I don't have this visibility problem in any other application anyway.

Btw, is it possible to remove the relative path from tabs? I have my headers & sources in separate directories, so they take quite alot of useless space.
For examble, my tabs show now:
src\main.cpp | include\main.h
When it could just show the filename.

Other thing I've noticed about tabs is that sometimes there IS space for them all to be shown in one row, but it won't be updated untill I manually click the arrows.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: 3 simple thoughts
« Reply #7 on: November 29, 2006, 10:36:16 am »
Quote
Btw, is it possible to remove the relative path from tabs? I have my headers & sources in separate directories, so they take quite alot of useless space.
For examble, my tabs show now:
src\main.cpp | include\main.h
When it could just show the filename.

Go to "Settings->Editor" and change the last option in "General settings". Why can't you just check the available options first?

Quote
Other thing I've noticed about tabs is that sometimes there IS space for them all to be shown in one row, but it won't be updated untill I manually click the arrows.

Known bug of wxFNB, hopefully eran will fix it in the next release.
Be patient!
This bug will be fixed soon...

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: 3 simple thoughts
« Reply #8 on: November 29, 2006, 10:39:45 am »
Where is the development subject as specified in C::B DEVELOPMENT STRICTLY ??

Offline Phatency

  • Multiple posting newcomer
  • *
  • Posts: 65
Re: 3 simple thoughts
« Reply #9 on: November 29, 2006, 10:54:16 am »
Quote
Btw, is it possible to remove the relative path from tabs? I have my headers & sources in separate directories, so they take quite alot of useless space.
For examble, my tabs show now:
src\main.cpp | include\main.h
When it could just show the filename.

Go to "Settings->Editor" and change the last option in "General settings". Why can't you just check the available options first?
Because I've been struggling with this for months, and I trust too much my in my ability in remembering all the options the first few times I browse through them. My bad, I just assumed it isn't there, because I hadn't found it.

Where is the development subject as specified in C::B DEVELOPMENT STRICTLY ??
Because there's no board for feature-discussions, they tend to end up on all of them.
« Last Edit: November 29, 2006, 11:00:06 am by Phatency »

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: 3 simple thoughts
« Reply #10 on: November 29, 2006, 01:35:10 pm »
What about an option to have the tabs stack on top of eachother. Similar to how it is done in windows' options dialogs when there are too many tabs to fit. A new row of tabs could just be created below the first.
Wow, i never thought about this one. What about it?

About the editor features, C::B is using scintilla, you should post these feature request to scintilla's dev, since i don't think C::B devs will make any major change to the scintilla's source code to achieve what you've said...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: 3 simple thoughts
« Reply #11 on: November 29, 2006, 01:40:28 pm »
What about an option to have the tabs stack on top of eachother. Similar to how it is done in windows' options dialogs when there are too many tabs to fit. A new row of tabs could just be created below the first.
Wow, i never thought about this one. What about it?

This is how it used to be at older times. wxFNB doesn't support this (and I 'm glad it doesn't too).
Anyway, enable smart-tabbing in "Settings->Environment->Notebooks appearence". This displays a list of all the open files (by pressing Alt-Tab) and then you can click on a file (or release Alt). It also rotates between open files based on the order you visited them...
Be patient!
This bug will be fixed soon...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2773
Re: 3 simple thoughts
« Reply #12 on: November 29, 2006, 03:08:44 pm »
Anyway, enable smart-tabbing in "Settings->Environment->Notebooks appearence". This displays a list of all the open files (by pressing Alt-Tab) and then you can click on a file (or release Alt). It also rotates between open files based on the order you visited them...

Do you mean "Ctrl-Tab"? On my XP system Alt-Tab always switches between process windows; not CB windows.

SmileyMan

  • Guest
Re: 3 simple thoughts
« Reply #13 on: November 29, 2006, 03:47:27 pm »
Quote
Go to "Settings->Editor" and change the last option in "General settings". Why can't you just check the available options first?
I wish I'd known about that too.  Any chance of making it a Tip of the Day?

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: 3 simple thoughts
« Reply #14 on: November 29, 2006, 03:51:13 pm »
This is how it used to be at older times. wxFNB doesn't support this (and I 'm glad it doesn't too).
Anyway, enable smart-tabbing in "Settings->Environment->Notebooks appearence". This displays a list of all the open files ...

wxFNB does support a drop-down list of tabs as a replacement for the navigation arrows. How difficult would it be to make that an option?



Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: 3 simple thoughts
« Reply #15 on: November 29, 2006, 03:59:33 pm »
wxFNB does support a drop-down list of tabs as a replacement for the navigation arrows. How difficult would it be to make that an option?

Depends on killerbot's mood and free time :).
He 's the one that worked with wxFNB recently so, if he wanted (hint, hint ;)), he could add this feature...
Be patient!
This bug will be fixed soon...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: 3 simple thoughts
« Reply #16 on: November 29, 2006, 05:29:40 pm »
wxFNB does support a drop-down list of tabs as a replacement for the navigation arrows. How difficult would it be to make that an option?

Depends on killerbot's mood and free time :).
He 's the one that worked with wxFNB recently so, if he wanted (hint, hint ;)), he could add this feature...

ok, I will implement this, but the earliest might be this weekend. It will have to be an option since not everyone likes it like that !!!

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: 3 simple thoughts
« Reply #17 on: November 29, 2006, 05:55:40 pm »
wxFNB does support a drop-down list of tabs as a replacement for the navigation arrows. How difficult would it be to make that an option?

Depends on killerbot's mood and free time :).
He 's the one that worked with wxFNB recently so, if he wanted (hint, hint ;)), he could add this feature...

ok, I will implement this, but the earliest might be this weekend. It will have to be an option since not everyone likes it like that !!!

That sounds fantastic!
Thanks!
:mrgreen:

sethjackson

  • Guest
Re: 3 simple thoughts
« Reply #18 on: November 29, 2006, 07:18:25 pm »
Ok here is the patch, but there is a nasty side affect. :P

Code
Index: src/src/environmentsettingsdlg.cpp
===================================================================
--- src/src/environmentsettingsdlg.cpp (revision 3309)
+++ src/src/environmentsettingsdlg.cpp (working copy)
@@ -157,6 +157,7 @@
     // tab "Notebook"
     XRCCTRL(*this, "cmbEditorTabs", wxComboBox)->SetSelection(cfg->ReadInt(_T("/environment/tabs_style"), 0));
     XRCCTRL(*this, "chkSmartTabs", wxCheckBox)->SetValue(cfg->ReadBool(_T("/environment/tabs_smart"), 0));
+    XRCCTRL(*this, "chkListTabs", wxCheckBox)->SetValue(cfg->ReadBool(_T("/environment/tabs_list"), 0));
     XRCCTRL(*this, "btnFNBorder", wxButton)->SetBackgroundColour(cfg->ReadColour(_T("/environment/gradient_border"), wxColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW))));
     XRCCTRL(*this, "btnFNFrom", wxButton)->SetBackgroundColour(cfg->ReadColour(_T("/environment/gradient_from"), wxColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE))));
     XRCCTRL(*this, "btnFNTo", wxButton)->SetBackgroundColour(cfg->ReadColour(_T("/environment/gradient_to"), *wxWHITE));
@@ -382,6 +383,7 @@
         // tab "Appearence"
         cfg->Write(_T("/environment/tabs_style"),           (int)XRCCTRL(*this, "cmbEditorTabs", wxComboBox)->GetSelection());
         cfg->Write(_T("/environment/tabs_smart"),           (bool)XRCCTRL(*this, "chkSmartTabs", wxCheckBox)->GetValue());
+        cfg->Write(_T("/environment/tabs_list"),           (bool)XRCCTRL(*this, "chkListTabs", wxCheckBox)->GetValue());
         cfg->Write(_T("/environment/gradient_border"),      XRCCTRL(*this, "btnFNBorder", wxButton)->GetBackgroundColour());
         cfg->Write(_T("/environment/gradient_from"),        XRCCTRL(*this, "btnFNFrom", wxButton)->GetBackgroundColour());
         cfg->Write(_T("/environment/gradient_to"),          XRCCTRL(*this, "btnFNTo", wxButton)->GetBackgroundColour());
Index: src/src/main.cpp
===================================================================
--- src/src/main.cpp (revision 3309)
+++ src/src/main.cpp (working copy)
@@ -1457,13 +1457,21 @@
             nbstyle = 0;
             break;
     }
+
     nbstyle |= defaultStyle;
+
     if (cfg->ReadBool(_T("/environment/") + prefix + _T("_tabs_bottom")))
         nbstyle |= wxFNB_BOTTOM;
 
     if (cfg->ReadBool(_T("/environment/tabs_smart")))
         nbstyle |= wxFNB_SMART_TABS;
 
+    if (cfg->ReadBool(_T("/environment/tabs_list")))
+    {
+        nbstyle |= wxFNB_DROPDOWN_TABS_LIST;
+        nbstyle |= wxFNB_NO_NAV_BUTTONS;
+    }
+
     target->SetWindowStyleFlag(nbstyle);
     target->SetGradientColorBorder(cfg->ReadColour(_T("/environment/gradient_border"), wxColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW))));
     target->SetGradientColorFrom(cfg->ReadColour(_T("/environment/gradient_from"), wxColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE))));
Index: src/src/resources/env_settings.xrc
===================================================================
--- src/src/resources/env_settings.xrc (revision 3309)
+++ src/src/resources/env_settings.xrc (working copy)
@@ -439,6 +439,13 @@
                     <label>Use Smart Tab-switching scheme</label>
                   </object>
                 </object>
+                <object class="sizeritem">
+                  <border>8</border>
+                  <flag>wxALL|wxALIGN_LEFT|wxALIGN_TOP</flag>
+                  <object class="wxCheckBox" name="chkListTabs">
+                    <label>Use drop-down tab list</label>
+                  </object>
+                </object>
               </object>
             </object>
           </object>
@@ -658,4 +665,4 @@
       </object>
     </object>
   </object>
-</resource>
\ No newline at end of file
+</resource>


Now to the screenshots....


« Last Edit: November 29, 2006, 08:39:24 pm by sethjackson »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2773
Re: 3 simple thoughts
« Reply #19 on: November 29, 2006, 08:29:25 pm »
Seth, could you edit/repost those images so they enlarge when clicked?
 I can't see what your talking about.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: 3 simple thoughts
« Reply #21 on: November 29, 2006, 08:43:40 pm »
The drop-down arrow is not drawn correctly if the wxFNB_NO_X_BUTTON style is used.

I looked at the source, and it seems that the same bitmap (m_xBgBmp) is used to draw the background for both the drop-down arrow and the x button, and if the x button is not drawn, then the background bitmap is not initialized correctly, thus the background is all black. (I think, eran will know for sure).

sethjackson

  • Guest
Re: 3 simple thoughts
« Reply #22 on: November 29, 2006, 08:46:56 pm »
So it is a bug in wxFNB?

Offline rjmyst3

  • Multiple posting newcomer
  • *
  • Posts: 117
    • wxFormBuilder
Re: 3 simple thoughts
« Reply #23 on: November 29, 2006, 09:01:02 pm »
yes, it is a bug in wxFNB

here is a patch to fix it:
Code
Index: renderer.cpp
===================================================================
--- renderer.cpp (revision 3)
+++ renderer.cpp (working copy)
@@ -205,7 +205,7 @@
  xbmp.SetMask(new wxMask(xbmp, MASK_COLOR));
  // erase old bitmap
  int posx = GetDropArrowButtonPos( pc );
- dc.DrawBitmap(m_xBgBmp, posx, 6);
+ dc.DrawBitmap(m_rightBgBmp, posx, 6);
 
  // Draw the new bitmap
  dc.DrawBitmap(xbmp, posx, 6, true);

Offline Belgabor

  • Multiple posting newcomer
  • *
  • Posts: 91
Re: 3 simple thoughts
« Reply #24 on: November 29, 2006, 10:25:38 pm »
While we're collecting things for eran to fix/add, why not add a rightclick menu to the arrows like Firefox 2 has?
(For those who don't know, Firefox 2 shows a list of the tabs hidden in the respective direction if you right-click an arrow)

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: 3 simple thoughts
« Reply #25 on: November 29, 2006, 11:13:22 pm »
Quote
(For those who don't know, Firefox 2 shows a list of the tabs hidden in the respective direction if you right-click an arrow)
If
If I understand you correctly, this is doable with wxFNB as well, instead of the <> arrows, you can choose to use a drop down button '\/' which will popup a menu with all hidden tabs.

I am not sure if C::B team as added this as an option, but it does exist.

Eran

« Last Edit: November 29, 2006, 11:15:02 pm by eranif »

Offline Belgabor

  • Multiple posting newcomer
  • *
  • Posts: 91
Re: 3 simple thoughts
« Reply #26 on: November 30, 2006, 04:12:21 am »
Quote
(For those who don't know, Firefox 2 shows a list of the tabs hidden in the respective direction if you right-click an arrow)
If
If I understand you correctly, this is doable with wxFNB as well, instead of the <> arrows, you can choose to use a drop down button '\/' which will popup a menu with all hidden tabs.

I am not sure if C::B team as added this as an option, but it does exist.


Yep, that was suggested earlier in this thread. The difference to Firefox 2 is that the right click on the arrows there shows only the tabs hidden in that direction, not all tabs, and you can still use the arrows, so it gives the best of both worlds :)
It's not terribly important, but as a matter of fact I got so used to it in Firefox that I find myself right-clicking on the arrows in C::B more and more often :p

thomas.gilray

  • Guest
Re: 3 simple thoughts
« Reply #27 on: November 30, 2006, 08:44:54 am »
Where is the development subject as specified in C::B DEVELOPMENT STRICTLY ??

Oh, sorry if i put this in the wrong forum...

I thought that general was more about using CB while this topic is about what could be added, changed, fixed in CB...

Seems relevant to me but if not, sorry.

thomas.gilray

  • Guest
Re: 3 simple thoughts
« Reply #28 on: November 30, 2006, 11:09:55 am »
wxFNB does support a drop-down list of tabs as a replacement for the navigation arrows. How difficult would it be to make that an option?

Depends on killerbot's mood and free time :).
He 's the one that worked with wxFNB recently so, if he wanted (hint, hint ;)), he could add this feature...

ok, I will implement this, but the earliest might be this weekend. It will have to be an option since not everyone likes it like that !!!

That sounds fantastic!
Thanks!
:mrgreen:

Yeah, That'd Be awsome!

sethjackson

  • Guest
Re: 3 simple thoughts
« Reply #29 on: November 30, 2006, 06:28:06 pm »
<snipped>

Yeah, That'd Be awsome!

Already in. Killerbot applied my patch, and rjmyst3's. ;)

Offline Belgabor

  • Multiple posting newcomer
  • *
  • Posts: 91
Re: 3 simple thoughts
« Reply #30 on: November 30, 2006, 08:58:21 pm »
Thanks for the feature =)
I have to admit that there is a flaw in using it. There is absolutely no visual feedback of the control that shows you there are more tabs than visible. This is especially inconvenient as the shifting-off-too-early bug is still present :(

Offline Darck

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: 3 simple thoughts
« Reply #31 on: December 08, 2006, 10:56:10 pm »
I support idea of signature with a small [...] instead of horizontal lines, which imho aren't the best solution.