2012-09-03 15:35 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/editor.prg
* contrib/hbide/misc.prg
* contrib/hbide/saveload.prg
* contrib/hbide/setup.ui
% Changed: naming of <Setup><Font> => <Miscellaneous>
% Restored: the source extension on the editor tabs by default.
+ Implemented: to toggle source extension to be removed from
source tabs to get more sources viewable at any given time.
Activation: <Setup><HbIDE Setup><Miscellaneous><Remove File Extension>
This is not in-place activable, restart of HbIDE is required.
+ Implemented: source tabs having closable button.
Activation: <Setup><HbIDE Setup><Miscellaneous><Add Closing Button>
This is not in-place activable, restart of HbIDE is required.
This is not the default, needs to be activated.
This commit is contained in:
@@ -16,6 +16,22 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-09-03 15:35 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbide/editor.prg
|
||||
* contrib/hbide/misc.prg
|
||||
* contrib/hbide/saveload.prg
|
||||
* contrib/hbide/setup.ui
|
||||
% Changed: naming of <Setup><Font> => <Miscellaneous>
|
||||
% Restored: the source extension on the editor tabs by default.
|
||||
+ Implemented: to toggle source extension to be removed from
|
||||
source tabs to get more sources viewable at any given time.
|
||||
Activation: <Setup><HbIDE Setup><Miscellaneous><Remove File Extension>
|
||||
This is not in-place activable, restart of HbIDE is required.
|
||||
+ Implemented: source tabs having closable button.
|
||||
Activation: <Setup><HbIDE Setup><Miscellaneous><Add Closing Button>
|
||||
This is not in-place activable, restart of HbIDE is required.
|
||||
This is not the default, needs to be activated.
|
||||
|
||||
2012-09-03 10:05 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbide/main.prg
|
||||
* contrib/hbxbp/listbox.prg
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
#define __qDocContentsChange__ 2004
|
||||
#define __qTimeSave_timeout__ 2005
|
||||
#define __qTab_contextMenu__ 2006
|
||||
#define __qTabWidget_tabCloseRequested__ 2007
|
||||
|
||||
|
||||
#define __selectionMode_stream__ 1
|
||||
@@ -1749,6 +1750,10 @@ METHOD IdeEditor:execEvent( nEvent, p, p1, p2 )
|
||||
|
||||
SWITCH nEvent
|
||||
|
||||
CASE __qTabWidget_tabCloseRequested__
|
||||
::oSM:closeSource( p + 1 )
|
||||
EXIT
|
||||
|
||||
CASE __qDocModificationChanged__
|
||||
::setTabImage()
|
||||
EXIT
|
||||
@@ -1811,12 +1816,16 @@ METHOD IdeEditor:buildTabPage( cSource )
|
||||
IF Empty( cSource )
|
||||
::oTab:caption := "Untitled " + hb_ntos( hbide_getNextUntitled() )
|
||||
ELSE
|
||||
::oTab:caption := ::cFile // + ::cExt /* to reduce the tab width which eventually leads to good visibility of tabs */
|
||||
::oTab:caption := ::cFile + iif( ::oINI:lTabRemoveExt, "", ::cExt )
|
||||
ENDIF
|
||||
::oTab:minimized := .F.
|
||||
|
||||
::oTab:create()
|
||||
|
||||
IF ::oINI:lTabAddClose
|
||||
::qTabWidget:setTabsClosable( .T. )
|
||||
::qTabWidget:connect( "tabCloseRequested(int)", {|i| ::execEvent( __qTabWidget_tabCloseRequested__, i ) } )
|
||||
ENDIF
|
||||
::qTabWidget:setTabTooltip( ::qTabWidget:indexOf( ::oTab:oWidget ), cSource )
|
||||
::oTab:tabActivate := {|mp1,mp2,oXbp| ::activateTab( mp1, mp2, oXbp ) }
|
||||
|
||||
|
||||
@@ -1966,7 +1966,7 @@ FUNCTION app_image( cName )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION hbide_isCompilerSource( cSource, cIncList )
|
||||
STATIC FUNCTION hbide_isCompilerSource( cSource, cIncList )
|
||||
LOCAL cExt, aExt
|
||||
|
||||
DEFAULT cIncList TO ".c,.cpp,.prg,.hb,.rc,.res,.hbm,.hbc,.qrc,.ui,.hbp"
|
||||
@@ -1974,8 +1974,7 @@ FUNCTION hbide_isCompilerSource( cSource, cIncList )
|
||||
cIncList := lower( cIncList )
|
||||
aExt := hb_aTokens( lower( cIncList ), "," )
|
||||
|
||||
hb_FNameSplit( cSource, , , @cExt )
|
||||
cExt := lower( cExt )
|
||||
cExt := lower( hb_FNameExt( cSource ) )
|
||||
|
||||
RETURN ascan( aExt, {|e| cExt == e } ) > 0
|
||||
|
||||
|
||||
@@ -295,6 +295,9 @@ CLASS IdeINI INHERIT IdeObject
|
||||
DATA cISMethods INIT "new"
|
||||
DATA cISFormat INIT "class:method"
|
||||
|
||||
DATA lTabRemoveExt INIT .F.
|
||||
DATA lTabAddClose INIT .F.
|
||||
|
||||
METHOD new( oIde )
|
||||
METHOD create( oIde )
|
||||
METHOD destroy()
|
||||
@@ -561,6 +564,8 @@ METHOD IdeINI:save( cHbideIni )
|
||||
AAdd( txt_, "ISFormat" + "=" + ::cISFormat )
|
||||
//
|
||||
AAdd( txt_, "SelToolbar" + "=" + iif( ::lSelToolbar , "YES", "NO" ) )
|
||||
AAdd( txt_, "TabRemoveExt" + "=" + iif( ::lTabRemoveExt , "YES", "NO" ) )
|
||||
AAdd( txt_, "TabAddClose" + "=" + iif( ::lTabAddClose , "YES", "NO" ) )
|
||||
|
||||
aadd( txt_, "" )
|
||||
aadd( txt_, "[PROJECTS]" )
|
||||
@@ -925,6 +930,8 @@ METHOD IdeINI:load( cHbideIni )
|
||||
CASE "ISFormat" ; ::cISFormat := cVal ; EXIT
|
||||
//
|
||||
CASE "SelToolbar" ; ::lSelToolbar := !( cVal == "NO" ) ; EXIT
|
||||
CASE "TabRemoveExt" ; ::lTabRemoveExt := !( cVal == "NO" ) ; EXIT
|
||||
CASE "TabAddClose" ; ::lTabAddClose := !( cVal == "NO" ) ; EXIT
|
||||
|
||||
ENDSWITCH
|
||||
ENDIF
|
||||
@@ -1250,7 +1257,7 @@ CLASS IdeSetup INHERIT IdeObject
|
||||
DATA oINI
|
||||
DATA qOrgPalette
|
||||
DATA aItems INIT {}
|
||||
DATA aTree INIT { "General", "Intelli-sense", "Selections", "Font", "Paths", "Variables", "Dictionaries", "Themes", "Formatting", "VSS" }
|
||||
DATA aTree INIT { "General", "Intelli-sense", "Selections", "Miscellaneous", "Paths", "Variables", "Dictionaries", "Themes", "Formatting", "VSS" }
|
||||
DATA aStyles INIT { "cleanlooks", "windows", "windowsxp", ;
|
||||
"windowsvista", "cde", "motif", "plastique", "macintosh" }
|
||||
DATA aKeyItems INIT {}
|
||||
@@ -1612,6 +1619,8 @@ METHOD IdeSetup:retrieve()
|
||||
::oINI:cISData := ::oUI:comboISData : currentText()
|
||||
::oINI:cISMethods := ::oUI:comboISMethods : currentText()
|
||||
::oINI:cISFormat := ::oUI:comboISFormat : currentText()
|
||||
::oINI:lTabRemoveExt := ::oUI:chkTabRemoveExt : isChecked()
|
||||
::oINI:lTabAddClose := ::oUI:chkTabAddClose : isChecked()
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -1743,6 +1752,9 @@ METHOD IdeSetup:populate()
|
||||
::oUI:comboISMethods : setCurrentIndex( AScan( { "new", "new;create", "new;create;destroy" }, {|e| e == ::oINI:cISMethods } ) - 1 )
|
||||
::oUI:comboISFormat : setCurrentIndex( iif( ::oINI:cISFormat == "class:method", 0, 1 ) )
|
||||
|
||||
::oUI:chkTabRemoveExt : setChecked( ::oINI:lTabRemoveExt )
|
||||
::oUI:chkTabAddClose : setChecked( ::oINI:lTabAddClose )
|
||||
|
||||
::connectSlots()
|
||||
|
||||
::pushThemesData()
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageGeneral">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
@@ -1533,6 +1533,45 @@
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_28">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>176</x>
|
||||
<y>236</y>
|
||||
<width>165</width>
|
||||
<height>117</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Source Editor Tabs</string>
|
||||
</property>
|
||||
<widget class="QCheckBox" name="chkTabRemoveExt">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>20</y>
|
||||
<width>137</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove File Extension ?</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkTabAddClose">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>44</y>
|
||||
<width>137</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Closing Button ?</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pagePaths">
|
||||
|
||||
Reference in New Issue
Block a user