Project files ordering, tab colors for files in project

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
luis
Addict
Addict
Posts: 3894
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Project files ordering, tab colors for files in project

Post by luis »

I would like the ability to change the order of the files in the project window, maybe through drag and drop or a simpler move up/move down couple of buttons. At the moment the only way I see to do this is through manual editing of the .pbp file.

Or at least the ability to sort them in ascending order (using appropriate naming I would obtain the grouping characteristics I try to achieve anyway).

Both the possibilities would be the top! :mrgreen:

And talking about projects, I would also like to be able to select the tab color for the files inside a project.
Currently is fixed to a light purple-ish color. Maybe could go together with the other editor colors in files -> preferences -> editor -> coloring.

Thank you.
"Have you tried turning it off and on again ?"
A little PureBasic review
uwekel
Enthusiast
Enthusiast
Posts: 740
Joined: Sat Dec 03, 2011 5:54 pm
Location: Oldenburg (Germany)

Re: Project files ordering, tab colors for files in project

Post by uwekel »

+1!
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
User_Russian
Addict
Addict
Posts: 1520
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: Project files ordering, tab colors for files in project

Post by User_Russian »

luis wrote:I would like the ability to change the order of the files in the project window, maybe through drag and drop or a simpler move up/move down couple of buttons.
Drag and drop items to ListIconGadget(), do quite easily.
I hope that this will be implemented in IDE.

Code: Select all

If OpenWindow(0, 100, 100, 300, 200, "ListIcon Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ListIconGadget(0, 5, 5, 290, 190, "Name", 270, #PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
  
  For i=1 To 10
    AddGadgetItem(0, -1, Str(i))
  Next i
  
  
  EnableGadgetDrop(0, #PB_Drop_Private, #PB_Drag_Move, 2)
  
  
  Repeat
    Event = WaitWindowEvent()
    
    If Event = #PB_Event_Gadget And EventType() = #PB_EventType_DragStart
      Select EventGadget()
        Case 0
          sItem = GetGadgetState( 0)
          If sItem >=0
            DragPrivate( 2, #PB_Drag_Move )
          EndIf
      EndSelect
      
    ElseIf Event = #PB_Event_GadgetDrop
      If EventGadget()=0
        
        tItem = GetGadgetState( 0 )
        
        If sItem <> tItem And tItem>=0 And sItem>=0
          If tItem<CountGadgetItems(0)-1
            NItem=tItem+1
          Else
            NItem=tItem-1
          EndIf
          sText.s = GetGadgetItemText( 0, sItem )
          RemoveGadgetItem(0, sItem)
          AddGadgetItem(0, tItem, sText)
          SetGadgetState(0, tItem)
        EndIf
        
      EndIf
    EndIf
    
  Until Event = #PB_Event_CloseWindow
EndIf
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: Project files ordering, tab colors for files in project

Post by eesau »

The hard-coded purple color for the tabs is an eyesore, so a customizable color would be nice.
uwekel
Enthusiast
Enthusiast
Posts: 740
Joined: Sat Dec 03, 2011 5:54 pm
Location: Oldenburg (Germany)

Re: Project files ordering, tab colors for files in project

Post by uwekel »

Every hard-coded color is a bad habbit, because it depends on the taste of the programmer and not of the user :-(
PB 5.70 LTS (x64) - Debian Testing, Gnome 3.30.2
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Project files ordering, tab colors for files in project

Post by Tenaja »

+1 to the Project Files

+1 to the tab colors
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Project files ordering, tab colors for files in project

Post by davido »

+1
DE AA EB
User_Russian
Addict
Addict
Posts: 1520
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: Project files ordering, tab colors for files in project

Post by User_Russian »

I agree, the color of the tab of the project, to change, because the dark purple, looks bad and it is difficult to consider the names of the files (they are black).

Additionally, Please change color asterisks indicating that contents of file changed but not saved on the disk. It is better if it was a bright red color (bold font) to make it visible.
Post Reply