Author Topic: Feature Request: Full pathname in editors list  (Read 15769 times)

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Feature Request: Full pathname in editors list
« on: August 17, 2005, 03:57:15 pm »
I have a workspace that has several projects on it.  Each of the projects share a common filename among them.  The problem is the tab in the editor only contains the filename, and when I have multiple tabs with the same name, it can get confusing as to which project it belongs to.

As a proposed solution, I'm wondering if one (or more) of the following could be implemented:

  • a tooltip with the full path the file
  • a tooltip with '<ProjectName>:<FileName>' type format
  • have an option to display the format mentioned above in the tab

Other than that I am very impressed!  :)
« Last Edit: August 18, 2005, 06:55:52 pm by rickg22 »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Feature Request
« Reply #1 on: August 17, 2005, 04:03:38 pm »
Are these only identical filenames, or are the pathnames inside the different projects all identical, too?

If it is just the filenames:

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Re: Feature Request
« Reply #2 on: August 17, 2005, 04:48:47 pm »
I have that option selected.  The identical filenames all also happen to be in the same relative location, being the root directory of the projects.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Feature Request
« Reply #3 on: August 17, 2005, 07:39:14 pm »
Someone requested to put the edited file's name in the title bar. I think it can be done trivially, will that suffice?

I also got the request of organizing the editor files just as the project tree, but that might need more work, since it's abou changing the tree's structure. (Right now it's very simple, one branch, just files).

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Feature Request
« Reply #4 on: August 18, 2005, 04:15:35 am »
Someone requested to put the edited file's name in the title bar. I think it can be done trivially, will that suffice?...

i would suggest to show the full path/name of the file in the active editor in the status bar instead of the "Welcome to Code::Blocks"
and to show the active project's name in the title bar, as it is already implemented now.

the status bar already shows Line:, Colums: Info, so it's logically to display the filename there too.
« Last Edit: August 18, 2005, 04:17:48 am by tiwag »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Feature Request
« Reply #5 on: August 18, 2005, 01:48:46 pm »
i would suggest to show the full path/name of the file in the active editor in the status bar instead of the "Welcome to Code::Blocks"
That is where the help texts for the menus are shown, though.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Feature Request
« Reply #6 on: August 18, 2005, 02:00:59 pm »
i would suggest to show the full path/name of the file in the active editor in the status bar instead of the "Welcome to Code::Blocks"
That is where the help texts for the menus are shown, though.

though what ?

i know that there the menu-help-texts are shown, and this should be not affected,
but most of the time we don't crawl around the menus and then we can show the full path&filename in the statusbar.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Feature Request
« Reply #7 on: August 18, 2005, 02:09:49 pm »
Though what? Well, the menu help resets the status bar to wxEmtpyString. Look what happens to "Welcome to Code::Blocks".
So your filename won't be visible for long really (unless you set up a Timer or something and repeatedly set it).
Also the status field might be used by other things to display a current status as well. For example, I use it when running version control transactions that involve several operations, so the user sees what is going on.
This does not mean that it is not possible to show the current editor's filename there, but it may cause conflicts.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Feature Request
« Reply #8 on: August 18, 2005, 02:25:08 pm »
...This does not mean that it is not possible to show the current editor's filename there, but it may cause conflicts.

it's not a big issue

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Re: Feature Request
« Reply #9 on: August 18, 2005, 02:37:13 pm »
What about a hover popup thing?

You hold your mouse over the file in the list/tree thing and after a second, and little tolltip/popup thing shows the fullname.
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Feature Request
« Reply #10 on: August 18, 2005, 02:59:16 pm »
_HEAD\src\src\main.cpp(936):
Code
void MainFrame::DoUpdateStatusBar()
{
#if wxUSE_STATUSBAR
    if (!GetStatusBar())
        return;
    cbEditor* ed = m_pEdMan->GetBuiltinActiveEditor();
    if (ed)
    {
        int pos = ed->GetControl()->GetCurrentPos();
        wxString msg;
        msg.Printf(_("Line %d, Column %d"), ed->GetControl()->GetCurrentLine() + 1, ed->GetControl()->GetColumn(pos) + 1);
        SetStatusText(msg, 1);
        SetStatusText(ed->GetControl()->GetOvertype() ? _("Overwrite") : _("Insert"), 2);
        SetStatusText(ed->GetModified() ? _("Modified") : wxEmptyString, 3);
        SetStatusText(ed->GetControl()->GetReadOnly() ? _("Read only") : _("Read/Write"), 4);
        SetStatusText(ed->GetFilename(), 0); //tiwag 050818
    }
    else
    {
        SetStatusText(_("Welcome to "APP_NAME"!"));  //tiwag 050818
        SetStatusText(wxEmptyString, 1);
        SetStatusText(wxEmptyString, 2);
        SetStatusText(wxEmptyString, 3);
        SetStatusText(wxEmptyString, 4);
    }
#endif // wxUSE_STATUSBAR
}

please don't dream about timers and other complex stuff ...
i just edited two lines, and it works as i proposed...

kiss  (keep it simple stupid)



[update]
here's the patch, if someone wants to try it  ...

Code
Index: src/src/main.cpp
===================================================================
RCS file: /cvsroot/codeblocks/codeblocks/src/src/main.cpp,v
retrieving revision 1.84
diff -u -r1.84 main.cpp
--- src/src/main.cpp    1 Aug 2005 11:28:31 -0000   1.84
+++ src/src/main.cpp    18 Aug 2005 12:54:00 -0000
@@ -948,9 +948,11 @@
         SetStatusText(ed->GetControl()->GetOvertype() ? _("Overwrite") : _("Insert"), 2);
         SetStatusText(ed->GetModified() ? _("Modified") : wxEmptyString, 3);
         SetStatusText(ed->GetControl()->GetReadOnly() ? _("Read only") : _("Read/Write"), 4);
+        SetStatusText(ed->GetFilename(), 0); //tiwag 050818
     }
     else
     {
+        SetStatusText(_("Welcome to "APP_NAME"!"));  //tiwag 050818
         SetStatusText(wxEmptyString, 1);
         SetStatusText(wxEmptyString, 2);
         SetStatusText(wxEmptyString, 3);
« Last Edit: August 18, 2005, 03:06:31 pm by tiwag »

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Feature Request
« Reply #11 on: August 18, 2005, 06:24:08 pm »
btw - i found a small flaw in CodeBlocks CVS-HEAD,
the statusbar (Line, Column) doesn't get updated
when you are only changing between notebooks but don't start edit them

it can be fixed by adding a wxNotebookEvent Handler for PageChanged

here's the code to patch main.cpp
Code
//event table entry
EVT_NOTEBOOK_PAGE_CHANGED(-1, MainFrame::OnEditorUpdateUI_NB)

//handle notebook event
void MainFrame::OnEditorUpdateUI_NB(wxNotebookEvent& event)
{
    if (m_pEdMan ) DoUpdateStatusBar();  //tiwag 050818
    event.Skip();
}

[update] patchfile appended


[attachment deleted by admin]
« Last Edit: August 18, 2005, 06:39:36 pm by tiwag »

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Feature Request
« Reply #12 on: August 18, 2005, 06:45:51 pm »
ARGH!   :x What have we said about SUBMITTING PATCHES IN SOURCEFORGE!?

*Sigh* :cry: why me???

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Feature Request
« Reply #13 on: August 18, 2005, 06:50:59 pm »
hi rick

stay cool please, i don't want call this a patch for committing in cvs, it is more a preview and i would like to know the opinion of the other here in the forum, if they would like such a solution, what i've proposed.
please try it and give me your thoughts about, thanks

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Feature Request
« Reply #14 on: August 18, 2005, 06:54:21 pm »
Oh, ok then. It's just that I got tired of having to submit patches that people post in the forums :(

In any case I've made up my mind: Not the status bar, but the main title bar. It's been already requested and it's expected behavior.