From ef2830a403152ffb1f850567db77fe57fa9ca331 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sat, 7 Aug 2010 01:50:21 +0000 Subject: [PATCH] 2010-08-06 18:46 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + contrib/hbide/resources/exit3.png + contrib/hbide/resources/gotoline3.png + contrib/hbide/resources/home3.png * contrib/hbide/resources/save3.png * contrib/hbide/hbide.qrc + Added: three more icons. * contrib/hbide/ideactions.prg * contrib/hbide/idebrowse.prg * contrib/hbide/idedocks.prg * contrib/hbide/idemisc.prg ! 2nd round of reforms in icons arrangement and colors. A work-in-progress, please remain patient. --- harbour/ChangeLog | 15 ++ harbour/contrib/hbide/hbide.qrc | 3 + harbour/contrib/hbide/ideactions.prg | 6 +- harbour/contrib/hbide/idebrowse.prg | 39 ++-- harbour/contrib/hbide/idedocks.prg | 200 ++++++------------ harbour/contrib/hbide/idemisc.prg | 28 +++ harbour/contrib/hbide/resources/exit3.png | Bin 0 -> 609 bytes harbour/contrib/hbide/resources/gotoline3.png | Bin 0 -> 418 bytes harbour/contrib/hbide/resources/home3.png | Bin 0 -> 436 bytes harbour/contrib/hbide/resources/save3.png | Bin 520 -> 705 bytes 10 files changed, 133 insertions(+), 158 deletions(-) create mode 100644 harbour/contrib/hbide/resources/exit3.png create mode 100644 harbour/contrib/hbide/resources/gotoline3.png create mode 100644 harbour/contrib/hbide/resources/home3.png diff --git a/harbour/ChangeLog b/harbour/ChangeLog index da931fc9f0..f9f091c10f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,21 @@ The license applies to all entries newer than 2009-04-28. */ +2010-08-06 18:46 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + + contrib/hbide/resources/exit3.png + + contrib/hbide/resources/gotoline3.png + + contrib/hbide/resources/home3.png + * contrib/hbide/resources/save3.png + * contrib/hbide/hbide.qrc + + Added: three more icons. + + * contrib/hbide/ideactions.prg + * contrib/hbide/idebrowse.prg + * contrib/hbide/idedocks.prg + * contrib/hbide/idemisc.prg + ! 2nd round of reforms in icons arrangement and colors. + A work-in-progress, please remain patient. + 2010-08-06 18:55 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * debian/rules + Added LD_LIBRARY_PATH. diff --git a/harbour/contrib/hbide/hbide.qrc b/harbour/contrib/hbide/hbide.qrc index 1115b96173..7d19a9c113 100644 --- a/harbour/contrib/hbide/hbide.qrc +++ b/harbour/contrib/hbide/hbide.qrc @@ -67,6 +67,7 @@ resources/envconfig.png resources/example.png resources/exit.png +resources/exit3.png resources/exporthtml.png resources/ffn.png resources/filec.png @@ -95,6 +96,7 @@ resources/go-top.png resources/go-up.png resources/gotoline.png +resources/gotoline3.png resources/gotomark.png resources/harbour.png resources/harbourhelp.png @@ -107,6 +109,7 @@ resources/help1.png resources/helpdoc.png resources/hilight-all.png +resources/home3.png resources/horzruler.png resources/idepreferences.png resources/increaseindent.png diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index dd4cb9e98e..30f78c23cf 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -175,11 +175,11 @@ METHOD IdeActions:loadActions() // // Name Text Image Shortcut Checkable IconVisInMenu // - aadd( aAct, { "TB_Exit" , "E~xit" , "exit" , "" , "No", "Yes" } ) - aadd( aAct, { "TB_Home" , "~Home" , "dc_home" , "" , "No", "Yes" } ) + aadd( aAct, { "TB_Exit" , "E~xit" , "exit3" , "" , "No", "Yes" } ) + aadd( aAct, { "TB_Home" , "~Home" , "home3"/*"dc_home"*/, "" , "No", "Yes" } ) aadd( aAct, { "TB_New" , "~Source" , "new" , "" , "No", "Yes" } ) aadd( aAct, { "TB_Open" , "~Open" , "open3" , "" , "No", "Yes" } ) - aadd( aAct, { "TB_Save" , "~Save" , "save" , "" , "No", "Yes" } ) + aadd( aAct, { "TB_Save" , "~Save" , "save3" , "" , "No", "Yes" } ) aadd( aAct, { "TB_Close" , "~Close" , "close3" , "" , "No", "Yes" } ) aadd( aAct, { "TB_Print" , "~Print" , "print" , "" , "No", "Yes" } ) aadd( aAct, { "TB_Script" , "Run as script" , "runscript" , "" , "No", "Yes" } ) diff --git a/harbour/contrib/hbide/idebrowse.prg b/harbour/contrib/hbide/idebrowse.prg index 37a766c7fc..7f2eace8cd 100644 --- a/harbour/contrib/hbide/idebrowse.prg +++ b/harbour/contrib/hbide/idebrowse.prg @@ -901,16 +901,8 @@ METHOD IdeBrowseManager:buildToolbar() ::qToolbar:addWidget( sp0 ) ::buildRddsCombo() ::buildConxnCombo() - ::buildToolButton( ::qToolbar, { "Open a table" , "open" , {|| ::execEvent( "buttonOpen_clicked" ) }, .f. } ) + ::buildToolButton( ::qToolbar, { "Open a table" , "open3" , {|| ::execEvent( "buttonOpen_clicked" ) }, .f. } ) ::qToolbar:addWidget( sp1 ) - ::buildToolButton( ::qToolbar, { "Toggle tabbed view" , "view_tabbed" , {|| ::execEvent( "buttonViewTabbed_clicked" ) }, .f. } ) - ::buildToolButton( ::qToolbar, {} ) - ::buildToolButton( ::qToolbar, { "View as arranged" , "view_organized", {|| ::execEvent( "buttonViewOrganized_clicked" ) }, .f. } ) - ::buildToolButton( ::qToolbar, { "View as cascaded" , "view_cascaded" , {|| ::execEvent( "buttonViewCascaded_clicked" ) }, .f. } ) - ::buildToolButton( ::qToolbar, { "View as tiled" , "view_tiled" , {|| ::execEvent( "buttonViewTiled_clicked" ) }, .f. } ) - ::buildToolButton( ::qToolbar, {} ) - ::buildToolButton( ::qToolbar, { "Save layout" , "save" , {|| ::execEvent( "buttonSaveLayout_clicked" ) }, .f. } ) - ::qToolbar:addWidget( sp2 ) ::buildToolButton( ::qToolbar, { "Show/hide form view", "formview" , {|| ::execEvent( "buttonShowForm_clicked" ) }, .t. } ) ::buildToolButton( ::qToolbar, {} ) ::buildToolButton( ::qToolbar, { "Table Structure" , "dbstruct" , {|| ::execEvent( "buttonDbStruct_clicked" ) }, .f. } ) @@ -928,18 +920,34 @@ METHOD IdeBrowseManager:buildToolbar() /*----------------------------------------------------------------------*/ METHOD IdeBrowseManager:buildLeftToolbar() - - STATIC qSize - - //qSize := QSize():new( 20,20 ) - qSize := QSize():new( 16,16 ) + LOCAL qTBar, aBtn ::qToolBarL := QToolbar():new() ::qToolBarL:setOrientation( Qt_Vertical ) - ::qToolbarL:setIconSize( qSize ) + ::qToolbarL:setIconSize( QSize():new( 16,16 ) ) ::qToolbarL:setMaximumWidth( 24 ) ::qToolbarL:setStyleSheet( GetStyleSheet( "QToolBar", ::nAnimantionMode ) ) + qTBar := ::qToolbarL + aBtn := {} + + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Toggle tabbed view" , "view_tabbed" , {|| ::execEvent( "buttonViewTabbed_clicked" ) }, .f. } ) ) + hbide_buildToolbarButton( qTBar, {} ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View as arranged" , "view_organized" , {|| ::execEvent( "buttonViewOrganized_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Save layout" , "save3" , {|| ::execEvent( "buttonSaveLayout_clicked" ) }, .f. } ) ) + hbide_buildToolbarButton( qTBar, {} ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View as cascaded" , "view_cascaded" , {|| ::execEvent( "buttonViewCascaded_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View as tiled" , "view_tiled" , {|| ::execEvent( "buttonViewTiled_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View Maximized" , "fullscreen" , {|| ::execEvent( "buttonViewMaximized_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View Vertically Tiled" , "view_vertstacked", {|| ::execEvent( "buttonViewStackedVert_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View Horizontally Tiled" , "view_horzstacked", {|| ::execEvent( "buttonViewStackedHorz_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View Zoom In" , "view_zoomin" , {|| ::execEvent( "buttonViewZoomedIn_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View Zoom Out" , "view_zoomout" , {|| ::execEvent( "buttonViewZoomedOut_clicked" ) }, .f. } ) ) + hbide_buildToolbarButton( qTBar, {} ) + + aeval( aBtn, {|q| aadd( ::aToolBtns, q ) } ) + +#if 1 ::buildToolButton( ::qToolbarL, { "Append a record" , "database_add" , {|| ::execEvent( "buttonAppendRecord_clicked" ) }, .f. } ) ::buildToolButton( ::qToolbarL, { "Delete a record" , "database_remove" , {|| ::execEvent( "buttonDelRecord_clicked" ) }, .f. } ) ::buildToolButton( ::qToolbarL, { "Lock/Unlock Record" , "database_lock" , {|| ::execEvent( "buttonLockRecord_clicked" ) }, .f. } ) @@ -952,6 +960,7 @@ METHOD IdeBrowseManager:buildLeftToolbar() ::buildToolButton( ::qToolbarL, { "Search in Table" , "database_search" , {|| ::execEvent( "buttonSearchInTable_clicked" ) }, .f. } ) ::buildToolButton( ::qToolbarL, {} ) ::buildToolButton( ::qToolbarL, { "Zap Table" , "database_process" , {|| ::execEvent( "buttonZaptable_clicked" ) }, .f. } ) +#endif RETURN Self diff --git a/harbour/contrib/hbide/idedocks.prg b/harbour/contrib/hbide/idedocks.prg index b3895b481e..67485be1eb 100644 --- a/harbour/contrib/hbide/idedocks.prg +++ b/harbour/contrib/hbide/idedocks.prg @@ -77,13 +77,13 @@ CLASS IdeDocks INHERIT IdeObject DATA nPass INIT 0 DATA aPanels INIT {} + DATA aMdiBtns INIT {} DATA aBtnLines INIT {} DATA aBtnDocks INIT {} DATA oBtnTabClose DATA qMdiToolBar DATA qMdiToolBarL - DATA aMdiToolBtns INIT {} DATA aViewsInfo INIT {} DATA nViewStyle INIT 0 @@ -143,7 +143,6 @@ CLASS IdeDocks INHERIT IdeObject METHOD setViewInitials() METHOD buildMdiToolbar() METHOD buildMdiToolbarLeft() - METHOD buildToolButton( qToolbar, aBtn ) METHOD getEditorPanelsInfo() METHOD restPanelsGeometry() METHOD savePanelsGeometry() @@ -210,7 +209,7 @@ METHOD IdeDocks:destroy() ::disconnect( qTBtn, "clicked()" ) qTBtn := NIL NEXT - FOR EACH qTBtn IN ::aBtnLines + FOR EACH qTBtn IN ::aMdiBtns ::disconnect( qTBtn, "clicked()" ) qTBtn := NIL NEXT @@ -960,67 +959,39 @@ METHOD IdeDocks:buildMdiToolbarLeft() ::qMdiToolbarL := QToolBar():new() ::qMdiToolbarL:setStyleSheet( GetStyleSheet( "QToolBarLR5", ::nAnimantionMode ) ) - ::qMdiToolbarL:setObjectName( "ToolBarL_Lines" ) + ::qMdiToolbarL:setObjectName( "MDI_ToolBarLeft" ) ::qMdiToolbarL:setIconSize( QSize():new( 16,16 ) ) ::qMdiToolbarL:setOrientation( Qt_Vertical ) qTBar := ::qMdiToolbarL aBtn := {} -#if 1 - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle tabbed view" , "view_tabbed" , {|| ::execEvent( "buttonViewTabbed_clicked" ) }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "View as arranged" , "view_organized" , {|| ::execEvent( "buttonViewOrganized_clicked" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Save layout" , "save3" , {|| ::execEvent( "buttonSaveLayout_clicked" ) }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "View as cascaded" , "view_cascaded" , {|| ::execEvent( "buttonViewCascaded_clicked" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "View as tiled" , "view_tiled" , {|| ::execEvent( "buttonViewTiled_clicked" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "View Maximized" , "fullscreen" , {|| ::execEvent( "buttonViewMaximized_clicked" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "View Vertically Tiled" , "view_vertstacked", {|| ::execEvent( "buttonViewStackedVert_clicked" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "View Horizontally Tiled" , "view_horzstacked", {|| ::execEvent( "buttonViewStackedHorz_clicked" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "View Zoom In" , "view_zoomin" , {|| ::execEvent( "buttonViewZoomedIn_clicked" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "View Zoom Out" , "view_zoomout" , {|| ::execEvent( "buttonViewZoomedOut_clicked" ) }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle Line Numbers" , "togglelinenumber", {|| ::oEM:toggleLineNumbers() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle Horizontal Ruler" , "horzruler" , {|| ::oEM:toggleHorzRuler() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle Current Line Hilight", "curlinehilight" , {|| ::oEM:toggleCurrentLineHighlightMode() }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle Code Completion" , "help1" , {|| ::oEM:toggleCodeCompetion() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle Completion Tips" , "infotips" , {|| ::oEM:toggleCompetionTips() }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "Zoom In" , "zoomin" , {|| ::oEM:zoom( +1 ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Zoom Out" , "zoomout" , {|| ::oEM:zoom( -1 ) }, .f. } ) ) - ::buildToolButton( qTBar, {} ) -#else - aadd( aBtn, ::buildToolButton( qTBar, { "Undo" , "undo" , {|| ::oEM:undo() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Redo" , "redo" , {|| ::oEM:redo() }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "Cut" , "cut" , {|| ::oEM:cut() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Copy" , "copy" , {|| ::oEM:copy() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Paste" , "paste" , {|| ::oEM:paste() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Select all" , "selectall" , {|| ::oEM:seletAll() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Selection mode" , "stream" , {|| ::oEM:toggleSelectionMode() }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "Find / Replace" , "find" , {|| ::oEM:find() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle Mark" , "placeremovemark" , {|| ::oEM:setMark() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Goto Line" , "gotoline" , {|| ::oEM:goTo() }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "Move Current Line Up" , "movelineup" , {|| ::oEM:moveLine( -1 ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Move Current Line Down" , "movelinedown" , {|| ::oEM:moveLine( 1 ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Delete Current Line" , "deleteline" , {|| ::oEM:deleteLine() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Duplicate Current Line" , "duplicateline" , {|| ::oEM:duplicateLine() }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "To Upper" , "toupper" , {|| ::oEM:convertSelection( "ToUpper" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "To Lower" , "tolower" , {|| ::oEM:convertSelection( "ToLower" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Invert Case" , "invertcase" , {|| ::oEM:convertSelection( "Invert" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Block Comment" , "blockcomment" , {|| ::oEM:blockComment() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Stream Comment" , "streamcomment" , {|| ::oEM:streamComment() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Indent Right" , "blockindentr" , {|| ::oEM:indent( 1 ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Indent Left" , "blockindentl" , {|| ::oEM:indent( -1 ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Single to Double Quotes" , "sgl2dblquote" , {|| ::oEM:convertDQuotes() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Double to Single Quotes" , "dbl2sglquote" , {|| ::oEM:convertQuotes() }, .f. } ) ) -#endif - ::aBtnLines := aBtn + + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Toggle tabbed view" , "view_tabbed" , {|| ::execEvent( "buttonViewTabbed_clicked" ) }, .f. } ) ) + hbide_buildToolbarButton( qTBar, {} ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View as arranged" , "view_organized" , {|| ::execEvent( "buttonViewOrganized_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Save layout" , "save3" , {|| ::execEvent( "buttonSaveLayout_clicked" ) }, .f. } ) ) + hbide_buildToolbarButton( qTBar, {} ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View as cascaded" , "view_cascaded" , {|| ::execEvent( "buttonViewCascaded_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View as tiled" , "view_tiled" , {|| ::execEvent( "buttonViewTiled_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View Maximized" , "fullscreen" , {|| ::execEvent( "buttonViewMaximized_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View Vertically Tiled" , "view_vertstacked", {|| ::execEvent( "buttonViewStackedVert_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View Horizontally Tiled" , "view_horzstacked", {|| ::execEvent( "buttonViewStackedHorz_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View Zoom In" , "view_zoomin" , {|| ::execEvent( "buttonViewZoomedIn_clicked" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "View Zoom Out" , "view_zoomout" , {|| ::execEvent( "buttonViewZoomedOut_clicked" ) }, .f. } ) ) + hbide_buildToolbarButton( qTBar, {} ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Toggle Line Numbers" , "togglelinenumber", {|| ::oEM:toggleLineNumbers() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Toggle Horizontal Ruler" , "horzruler" , {|| ::oEM:toggleHorzRuler() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Toggle Current Line Hilight", "curlinehilight" , {|| ::oEM:toggleCurrentLineHighlightMode() }, .f. } ) ) + hbide_buildToolbarButton( qTBar, {} ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Toggle Code Completion" , "help1" , {|| ::oEM:toggleCodeCompetion() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Toggle Completion Tips" , "infotips" , {|| ::oEM:toggleCompetionTips() }, .f. } ) ) + hbide_buildToolbarButton( qTBar, {} ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Zoom In" , "zoomin" , {|| ::oEM:zoom( +1 ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Zoom Out" , "zoomout" , {|| ::oEM:zoom( -1 ) }, .f. } ) ) + hbide_buildToolbarButton( qTBar, {} ) + + aeval( aBtn, {|q| aadd( ::aMdiBtns, q ) } ) RETURN Self @@ -1030,7 +1001,6 @@ METHOD IdeDocks:buildMdiToolbar() LOCAL qTBar, aBtn, nW := 25 STATIC sp0,sp1,sp2,sp3 - IF empty( sp0 ) sp0 := QLabel():new(); sp0:setMinimumWidth( nW ) sp1 := QLabel():new(); sp1:setMinimumWidth( nW ) @@ -1049,102 +1019,52 @@ METHOD IdeDocks:buildMdiToolbar() ::qMdiToolbar:addWidget( ::oIde:oTM:buildPanelsButton() ) ::qMdiToolbar:addWidget( sp0 ) -#if 1 - aadd( aBtn, ::buildToolButton( qTBar, { "Undo" , "undo" , {|| ::oEM:undo() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Redo" , "redo" , {|| ::oEM:redo() }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "Cut" , "cut" , {|| ::oEM:cut() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Copy" , "copy" , {|| ::oEM:copy() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Paste" , "paste" , {|| ::oEM:paste() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Select all" , "selectall" , {|| ::oEM:selectAll() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Selection mode" , "stream" , {|| ::oEM:toggleSelectionMode() }, .t. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Undo" , "undo" , {|| ::oEM:undo() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Redo" , "redo" , {|| ::oEM:redo() }, .f. } ) ) + hbide_buildToolbarButton( qTBar, {} ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Cut" , "cut" , {|| ::oEM:cut() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Copy" , "copy" , {|| ::oEM:copy() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Paste" , "paste" , {|| ::oEM:paste() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Select all" , "selectall" , {|| ::oEM:selectAll() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Selection mode" , "stream" , {|| ::oEM:toggleSelectionMode() }, .t. } ) ) ::qMdiToolbar:addWidget( sp1 ) - aadd( aBtn, ::buildToolButton( qTBar, { "Find / Replace" , "find" , {|| ::oEM:find() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle Mark" , "bookmark" , {|| ::oEM:setMark() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Goto Line" , "gotoline" , {|| ::oEM:goTo() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Reload Source" , "view_refresh" , {|| ::oEM:reload() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Find / Replace" , "find" , {|| ::oEM:find() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Toggle Mark" , "bookmark" , {|| ::oEM:setMark() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Goto Line" , "gotoline3" , {|| ::oEM:goTo() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Reload Source" , "view_refresh" , {|| ::oEM:reload() }, .f. } ) ) ::qMdiToolbar:addWidget( sp2 ) - aadd( aBtn, ::buildToolButton( qTBar, { "Move Current Line Up" , "movelineup" , {|| ::oEM:moveLine( -1 ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Move Current Line Down" , "movelinedown" , {|| ::oEM:moveLine( 1 ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Delete Current Line" , "deleteline" , {|| ::oEM:deleteLine() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Duplicate Current Line" , "duplicateline" , {|| ::oEM:duplicateLine() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Move Current Line Up" , "movelineup" , {|| ::oEM:moveLine( -1 ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Move Current Line Down" , "movelinedown" , {|| ::oEM:moveLine( 1 ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Delete Current Line" , "deleteline" , {|| ::oEM:deleteLine() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Duplicate Current Line" , "duplicateline" , {|| ::oEM:duplicateLine() }, .f. } ) ) ::qMdiToolbar:addWidget( sp3 ) - aadd( aBtn, ::buildToolButton( qTBar, { "To Upper" , "toupper" , {|| ::oEM:convertSelection( "ToUpper" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "To Lower" , "tolower" , {|| ::oEM:convertSelection( "ToLower" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Invert Case" , "invertcase" , {|| ::oEM:convertSelection( "Invert" ) }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "Block Comment" , "blockcomment" , {|| ::oEM:blockComment() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Stream Comment" , "streamcomment" , {|| ::oEM:streamComment() }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "Indent Right" , "blockindentr" , {|| ::oEM:indent( 1 ) }, .f. } ) ) - //aadd( aBtn, ::buildToolButton( qTBar, { "Indent Right" , "indent-more" , {|| ::oEM:indent( 1 ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Indent Left" , "blockindentl" , {|| ::oEM:indent( -1 ) }, .f. } ) ) - //aadd( aBtn, ::buildToolButton( qTBar, { "Indent Left" , "indent-less" , {|| ::oEM:indent( -1 ) }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "Single to Double Quotes" , "sgl2dblquote" , {|| ::oEM:convertDQuotes() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Double to Single Quotes" , "dbl2sglquote" , {|| ::oEM:convertQuotes() }, .f. } ) ) -#else - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle tabbed view" , "view_tabbed" , {|| ::execEvent( "buttonViewTabbed_clicked" ) }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "View as arranged" , "view_organized" , {|| ::execEvent( "buttonViewOrganized_clicked" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "View as cascaded" , "view_cascaded" , {|| ::execEvent( "buttonViewCascaded_clicked" ) }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "View as tiled" , "view_tiled" , {|| ::execEvent( "buttonViewTiled_clicked" ) }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "Save layout" , "save" , {|| ::execEvent( "buttonSaveLayout_clicked" ) }, .f. } ) ) - ::qMdiToolbar:addWidget( sp1 ) - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle Line Numbers" , "togglelinenumber", {|| ::oEM:toggleLineNumbers() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle Horizontal Ruler" , "horzruler" , {|| ::oEM:toggleHorzRuler() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle Current Line Hilight", "curlinehilight" , {|| ::oEM:toggleCurrentLineHighlightMode() }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle Code Completion" , "help1" , {|| ::oEM:toggleCodeCompetion() }, .f. } ) ) - aadd( aBtn, ::buildToolButton( qTBar, { "Toggle Completion Tips" , "infotips" , {|| ::oEM:toggleCompetionTips() }, .f. } ) ) - ::qMdiToolbar:addWidget( sp2 ) - aadd( aBtn, ::buildToolButton( qTBar, { "Zoom In" , "zoomin" , {|| ::oEM:zoom( +1 ) }, .f. } ) ) - ::buildToolButton( qTBar, {} ) - aadd( aBtn, ::buildToolButton( qTBar, { "Zoom Out" , "zoomout" , {|| ::oEM:zoom( -1 ) }, .f. } ) ) -#endif + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "To Upper" , "toupper" , {|| ::oEM:convertSelection( "ToUpper" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "To Lower" , "tolower" , {|| ::oEM:convertSelection( "ToLower" ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Invert Case" , "invertcase" , {|| ::oEM:convertSelection( "Invert" ) }, .f. } ) ) + hbide_buildToolbarButton( qTBar, {} ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Block Comment" , "blockcomment" , {|| ::oEM:blockComment() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Stream Comment" , "streamcomment" , {|| ::oEM:streamComment() }, .f. } ) ) + hbide_buildToolbarButton( qTBar, {} ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Indent Right" , "blockindentr" , {|| ::oEM:indent( 1 ) }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Indent Left" , "blockindentl" , {|| ::oEM:indent( -1 ) }, .f. } ) ) + hbide_buildToolbarButton( qTBar, {} ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Single to Double Quotes" , "sgl2dblquote" , {|| ::oEM:convertDQuotes() }, .f. } ) ) + aadd( aBtn, hbide_buildToolbarButton( qTBar, { "Double to Single Quotes" , "dbl2sglquote" , {|| ::oEM:convertQuotes() }, .f. } ) ) - ::aMdiToolBtns := aBtn + aeval( aBtn, {|q| aadd( ::aMdiBtns, q ) } ) RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeDocks:buildToolButton( qToolbar, aBtn ) - LOCAL qBtn - - IF empty( aBtn ) - qToolbar:addSeparator() - ELSE - qBtn := QToolButton():new() - qBtn:setTooltip( aBtn[ BTN_TOOLTIP ] ) - qBtn:setAutoRaise( .t. ) - qBtn:setIcon( hbide_image( aBtn[ BTN_IMAGE ] ) ) - qBtn:setObjectName( aBtn[ BTN_IMAGE ] ) - IF aBtn[ BTN_CHECKABLE ] - qBtn:setCheckable( .t. ) - ENDIF - ::connect( qBtn, "clicked()", aBtn[ BTN_ACTIONBLOCK ] ) - qToolBar:addWidget( qBtn ) - ENDIF - - RETURN qBtn - -/*----------------------------------------------------------------------*/ - METHOD IdeDocks:setButtonState( cAlias, lChecked ) LOCAL n, lOldChecked, qBtn cAlias := lower( cAlias ) - IF ( n := ascan( ::aMdiToolBtns, {|q| q:objectName() == cAlias } ) ) > 0 - qBtn := ::aMdiToolBtns[ n ] - - ELSEIF ( n := ascan( ::aBtnLines, {|q| q:objectName() == cAlias } ) ) > 0 - qBtn := ::aBtnLines[ n ] - + IF ( n := ascan( ::aMdiBtns, {|q| q:objectName() == cAlias } ) ) > 0 + qBtn := ::aMdiBtns[ n ] ENDIF - IF !empty( qBtn ) lOldChecked := qBtn:isChecked() IF hb_isLogical( lChecked ) diff --git a/harbour/contrib/hbide/idemisc.prg b/harbour/contrib/hbide/idemisc.prg index 1ea277e6f7..ee3643387c 100644 --- a/harbour/contrib/hbide/idemisc.prg +++ b/harbour/contrib/hbide/idemisc.prg @@ -2092,3 +2092,31 @@ FUNCTION hbide_getUI( cUI, qParent ) RETURN oUI /*----------------------------------------------------------------------*/ + +#define BTN_TOOLTIP 1 +#define BTN_IMAGE 2 +#define BTN_ACTIONBLOCK 3 +#define BTN_CHECKABLE 4 + +FUNCTION hbide_buildToolbarButton( qToolbar, aBtn ) + LOCAL qBtn + + IF empty( aBtn ) + qToolbar:addSeparator() + ELSE + qBtn := QToolButton():new() + qBtn:setTooltip( aBtn[ BTN_TOOLTIP ] ) + qBtn:setAutoRaise( .t. ) + qBtn:setIcon( hbide_image( aBtn[ BTN_IMAGE ] ) ) + qBtn:setObjectName( aBtn[ BTN_IMAGE ] ) + IF aBtn[ BTN_CHECKABLE ] + qBtn:setCheckable( .t. ) + ENDIF + hbide_setIde():oDK:connect( qBtn, "clicked()", aBtn[ BTN_ACTIONBLOCK ] ) + qToolBar:addWidget( qBtn ) + ENDIF + + RETURN qBtn + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbide/resources/exit3.png b/harbour/contrib/hbide/resources/exit3.png new file mode 100644 index 0000000000000000000000000000000000000000..b1b2a8d8e5b778a4b79aa76ee4c22edfd9847dfc GIT binary patch literal 609 zcmV-n0-pVeP)2 zNoW&M7zgnG*lZLMvDP3dD50puQx1xVhzb=w3Sw_UJO~v<+k;RM^rA%&K|Dw-LZgCU ztGHkUF~KfrP1QC-r^#fpG-+(J8B3z0lVp;NGm%(hC+Yt*kN3VG-&=-&OuBns2)Rt8 z@@=*D5NHrWuCQ6Vr!t-#e*luStPT8Ms8VW?WtZUo_#7rvN8MtnJHl+fE%XnbMmkf* z*JKHaNC8Ve4m9nDd+Hh9xNpJ!%8ss$XDdYltHM2I2G+s8N_RCtDp5pYp@2pDCwz1O zq}YK3NRf~e>Ru4v)Uc#K)CXdb9KLvefboSe`|0Ihpo(;{ef5E4f=6tgL)7~nekKI! z^XnR*nxQ+q93bvLE&}0ShtAR%oMJzt0aJaJ#L&FYm1qDL13*MarC~{?JbPBW@HE8DA(QO!A4M>@r zUIsZ86YoEcl8}d=dXHJ71?9q@y=x6hw5oUD!ZxQo5M0QM2bYG+7DArSiogiSHp|Mh zZ36VV4qV#pss%D^3+@gd7lE93_bE);0^o}*0&`<9pSmIcjH`e&kPwpeRVIwv_d%gl vK>&}S$JyvVS^@seN%Md}kux=m8X>;{8G>dYBwYau00000NkvXXu0mjfCm{=O literal 0 HcmV?d00001 diff --git a/harbour/contrib/hbide/resources/gotoline3.png b/harbour/contrib/hbide/resources/gotoline3.png new file mode 100644 index 0000000000000000000000000000000000000000..edac36510cb9dafa310c224a14032dc38978ea28 GIT binary patch literal 418 zcmV;T0bTxyP)0P$5Qn-_@nf%qv9-$yrq3y1^IG#>%tM^H9U z-ma7(wxWSyu~$EkUxaP|KM+@-8L$k9FGHB7?F_Mv73wlV3^&^?Kn8Dxs#y$j5y${R zAa2Ftg>E2DVTj#U#m~jYz|X_MV6Q97ATQ3x(6a0}P$((ssLTtU(_u`h7bmH|Ip1)fWqJsbj>U*&C>N3%{fQ!?R0IKth%mqe_p182N>TjCc(I zYW4$a-U!mXK5;jLd7&m)9B2RoK?8uA1Av;>!!%3Z+sN=#$sffKoCW|j2Lm;)LDsCL zqr-6R$`uqtL=;3jfnidCVgOLHKTz`qWX(m_A2Q_cZf2P1TFcO>!!`5p@G#iSUkUf;k;HI@FJHc( z7$Rk)Agea>*b~Mto02%E3iW^EI6aTS*4`eh85aN;{ay!7bpCoo-Z!w-)}C9%rpy9^|PSM9aRK0`|vzRfh8_Q__3ndK)FdSvO&@W2t)wS34ah-7HBwYuq?oVS7{)I zL~wo){Ev9ty0B3Z1sV;sVYeAhZ$F%e4Z*Xz-5%Z&mnFB_?KuMw@IT^K)C6cgB0b{hvaXJO{m z8$4*tlL3p7Hh=7|Ma!d`n5Zm?4OI0ZCwVKT$0sn@Q6K|GBQ@n#;;PGm_lEMAK!$Aq zIqD7g?(tyIAp=P@CR)Cy6ip9rV78$qCXi|wKo-9ip^sB=If`YV(nRfrM$G>LYM)+# z((MN{1c(y=fsI$i3L8D z6&QIwiMUT*40WEDfl@Qg-**T;R>3-L0!HsSFx-9}n=*I8ai<&VAkfm)hUugI?lC{ zbJT&`mBkgeNF;TO19wR35|_-}&2TRX-R_#2Wf~xF$k&&=WP)#A6Loug6T>wirManx z5K{L|Onix{&LMrAd;peZp>2U60RB?!AI$UGuKn%0gsmwc%YT*zIGw~`+ZO7YBMj}k zzB6c(n?b7BLWmIo7~^`d z;w5iyz;4$JvzZIY=p*{FsPRKA?U1