|
From: CVS C. to T. <the...@li...> - 2011-06-05 14:16:19
|
Revision: 660
http://themis.svn.sourceforge.net/themis/?rev=660&view=rev
Author: mark_hellegers
Date: 2011-06-05 14:16:12 +0000 (Sun, 05 Jun 2011)
Log Message:
-----------
Moved ThemisTabView variables to private and fixed code that broke as a result.
Modified Paths:
--------------
trunk/themis/framework/ThemisTab.cpp
trunk/themis/framework/ThemisTabView.cpp
trunk/themis/framework/ThemisTabView.h
trunk/themis/framework/app.cpp
trunk/themis/framework/win.cpp
Modified: trunk/themis/framework/ThemisTab.cpp
===================================================================
--- trunk/themis/framework/ThemisTab.cpp 2011-06-05 13:58:03 UTC (rev 659)
+++ trunk/themis/framework/ThemisTab.cpp 2011-06-05 14:16:12 UTC (rev 660)
@@ -171,7 +171,7 @@
//cout << "ThemisTab::DrawLabel()" << endl;
/* calculate truncate_length */
- float truncate_length = (( ThemisTabView* )owner)->tab_width - 25 - 5;
+ float truncate_length = (( ThemisTabView* )owner)->GetTabWidth() - 25 - 5;
/* the frame for the FavIcon */
BRect iconframe = frame;
Modified: trunk/themis/framework/ThemisTabView.cpp
===================================================================
--- trunk/themis/framework/ThemisTabView.cpp 2011-06-05 13:58:03 UTC (rev 659)
+++ trunk/themis/framework/ThemisTabView.cpp 2011-06-05 14:16:12 UTC (rev 660)
@@ -813,6 +813,18 @@
fake_single_view = false;
}
+float ThemisTabView :: GetTabWidth() const {
+
+ return tab_width;
+
+}
+
+void ThemisTabView :: DisableFakeSingleView() {
+
+ fake_single_view = false;
+
+}
+
void ThemisTabView :: MessageReceived(BMessage * aMessage) {
switch (aMessage->what) {
Modified: trunk/themis/framework/ThemisTabView.h
===================================================================
--- trunk/themis/framework/ThemisTabView.h 2011-06-05 13:58:03 UTC (rev 659)
+++ trunk/themis/framework/ThemisTabView.h 2011-06-05 14:16:12 UTC (rev 660)
@@ -12,42 +12,41 @@
// Declarations used
class TPictureButton;
-class ThemisTabView : public BTabView
-{
- public:
- ThemisTabView(
- BRect frame,
- const char* name,
- button_width width,
- uint32 resizingmode,
- uint32 flags );
+class ThemisTabView : public BTabView {
- virtual void AttachedToWindow();
- virtual void Draw( BRect updaterect );
- virtual void DrawBox( BRect selTabRect );
- virtual BRect DrawTabs( void );
- virtual void MakeFocus( bool focus );
- virtual void MouseDown( BPoint point );
- virtual void Select( int32 tabindex );
- virtual void SetFocusTab( int32 tab, bool focused );
-
- void CreateCloseTabViewButton();
- void DynamicTabs( bool newtab );
- void SetFakeSingleView();
- void SetNavButtonsByTabHistory();
- void SetNormalTabView();
-
- float tab_width;
- bool fake_single_view;
-
- TPictureButton* close_tabview_button;
- void MessageReceived(BMessage * aMessage);
-
private:
// for doubleclick detection on empty tabview-space
// ( doubleclick opens new tab )
- uint32 lastbutton;
+ uint32 lastbutton;
+ float tab_width;
+ bool fake_single_view;
+ TPictureButton * close_tabview_button;
+ public:
+ ThemisTabView(
+ BRect frame,
+ const char* name,
+ button_width width,
+ uint32 resizingmode,
+ uint32 flags);
+
+ virtual void AttachedToWindow();
+ virtual void Draw(BRect updaterect);
+ virtual void DrawBox(BRect selTabRect);
+ virtual BRect DrawTabs(void);
+ virtual void MakeFocus(bool focus);
+ virtual void MouseDown(BPoint point);
+ virtual void Select(int32 tabindex);
+ virtual void SetFocusTab(int32 tab, bool focused);
+ void CreateCloseTabViewButton();
+ void DynamicTabs(bool newtab);
+ void SetFakeSingleView();
+ void SetNavButtonsByTabHistory();
+ void SetNormalTabView();
+ float GetTabWidth() const;
+ void DisableFakeSingleView();
+ void MessageReceived(BMessage * aMessage);
+
};
#endif
Modified: trunk/themis/framework/app.cpp
===================================================================
--- trunk/themis/framework/app.cpp 2011-06-05 13:58:03 UTC (rev 659)
+++ trunk/themis/framework/app.cpp 2011-06-05 14:16:12 UTC (rev 660)
@@ -469,7 +469,7 @@
if( WindowAt( i )->IsActive() == true )
{
Win* win = ( Win* )WindowAt( i );
- currenturl.SetTo( win->GetNavView()->urlview->Text() );
+ currenturl.SetTo( win->GetNavView()->GetUrl() );
break;
}
}
Modified: trunk/themis/framework/win.cpp
===================================================================
--- trunk/themis/framework/win.cpp 2011-06-05 13:58:03 UTC (rev 659)
+++ trunk/themis/framework/win.cpp 2011-06-05 14:16:12 UTC (rev 660)
@@ -300,7 +300,7 @@
case TAB_ADD: {
// dissallow adding of new tabs, if they wouldnt fit in the
// window anymore, and disable newtab button
- if (tabview->tab_width <= 30) {
+ if (tabview->GetTabWidth() <= 30) {
// calculate if still one tab would fit and not cover
// the closetabview button partially
float width = (tabview->CountTabs() + 1) * 25;
@@ -489,7 +489,7 @@
tabview->DynamicTabs(false);
// enable or disable the newtab button
- if ((tabview->CountTabs() * tabview->tab_width) <= (Bounds().right - 22))
+ if ((tabview->CountTabs() * tabview->GetTabWidth()) <= (Bounds().right - 22))
navview->SetButtonMode(4, 0);
else
navview->SetButtonMode(4, 3);
@@ -567,7 +567,7 @@
// needed already here as DynamicTabs would stop if true
// but we cannot call SetNormalTabView() here
- tabview->fake_single_view = false;
+ tabview->DisableFakeSingleView();
tabview->DynamicTabs(true);
ThemisTab * newtab = new ThemisTab(NULL);
tabview->AddTab(NULL, newtab);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|