News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

3 simple thoughts

Started by thomas.gilray, November 29, 2006, 05:36:07 AM

Previous topic - Next topic

mandrav

Quote from: rjmyst3 on November 29, 2006, 03:51:13 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...

killerbot

Quote from: mandrav on November 29, 2006, 03:59:33 PM
Quote from: rjmyst3 on November 29, 2006, 03:51:13 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 !!!

rjmyst3

Quote from: killerbot on November 29, 2006, 05:29:40 PM
Quote from: mandrav on November 29, 2006, 03:59:33 PM
Quote from: rjmyst3 on November 29, 2006, 03:51:13 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:
[url="http://wxformbuilder.org"]http://wxformbuilder.org[/url]

sethjackson

#18
Ok here is the patch, but there is a nasty side affect. :P


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....



Pecan

Seth, could you edit/repost those images so they enlarge when clicked?
I can't see what your talking about.


rjmyst3

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).
[url="http://wxformbuilder.org"]http://wxformbuilder.org[/url]

sethjackson


rjmyst3

yes, it is a bug in wxFNB

here is a patch to fix it:

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);
[url="http://wxformbuilder.org"]http://wxformbuilder.org[/url]

Belgabor

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)

eranif

#25
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


Belgabor

Quote from: eranif 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.


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

Quote from: dje on November 29, 2006, 10:39:45 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

Quote from: rjmyst3 on November 29, 2006, 05:55:40 PM
Quote from: killerbot on November 29, 2006, 05:29:40 PM
Quote from: mandrav on November 29, 2006, 03:59:33 PM
Quote from: rjmyst3 on November 29, 2006, 03:51:13 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:

Yeah, That'd Be awsome!

sethjackson

Quote from: thomas.gilray on November 30, 2006, 11:09:55 AM
<snipped>

Yeah, That'd Be awsome!

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