Author Topic: Permanently remove new file tab?  (Read 2263 times)

jnairb

  • Senior Community Member
  • Posts: 204
  • Hero Points: 11
Permanently remove new file tab?
« on: May 02, 2013, 10:54:48 pm »
Will we be able to permanently remove the new file tab? I run in "Multiple files share window" mode. The file I'm currently editing is in the window title -- I don't need a file tab telling me the same thing. I can Zoom and temporarily get rid of it, but that doesn't always stick. For example, if all files are closed and I open a new file, the file tab comes back. Also, if I split the window with create-tile (I'm ok having the file tabs while the window is split, but I'd also be OK if I didn't have them), then go back to a single window with delete-tile, the file tab is back.

Having to periodically zoom to get rid of the tab is already getting irritating. Maybe I can get used to zoom-window rather than delete-tile to avoid one instance of the irritation, but that doesn't totally solve the problem.

Thanks.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4560
  • Hero Points: 353
Re: Permanently remove new file tab?
« Reply #1 on: May 03, 2013, 01:35:00 am »
It works like this:

* close all windows
* open one window
* zoom it so there is no tab title
* now close the one window
* SlickEdit remembers if the last window closed had a tab title which in this case it does not.

Now, the first window opened will not show the tabs. Go ahead and try open the first window. It should match the last window closed.

However, if you split the window and then use the mouse to close the tab and only have one window left, it will show the tabs anyway. The idea is that if you're clicking on the tabs, you want them. This doesn't change the open first window with/without tabs setting.

jnairb

  • Senior Community Member
  • Posts: 204
  • Hero Points: 11
Re: Permanently remove new file tab?
« Reply #2 on: May 03, 2013, 02:43:12 am »
That's not how it works for me. Maybe I'm misunderstanding you... I'm starting with no files open in SlickEdit. Open one file. It shows a tab. Zoom the window; now there's no tab showing. I was closing the file, but also now tried going to the menu and choosing Window/Close. Now there's no file window. Open the same file again. I again get a file window with a tab showing. I tried exactly the same thing after starting SlickEdit with a new config (-sc junk) and canceling the config wizard. Same results.

Here is my environment:
SlickEdit 2013 (v18.0.0.6 64-bit)

Serial number: FE11502_BETA
License type: Beta License
License expiration: 2013-07-24 11:46:00
License file: C:\ProgramData\slickedit\18\slickedit.lic

Build Date: May 01, 2013
Emulation: CUA

OS: Windows 7 x64
OS Version: 6.01.7601  Service Pack 1
Memory: 22% Load, 3715MB/16374MB Physical, 3711MB/32746MB Page File, 221MB/8388607MB Virtual
Shell Info: C:\Windows\system32\cmd.exe /q
Screen Size: 2560 x 1440

Project Type: No project open
Language: .txt (Plain Text)

Installation Directory: C:\Program Files\SlickEdit\18.0.0 Beta2\ (non-removable drive,NTFS,189496MB free)
Configuration Directory: c:\Users\bej\Documents\junk\18.0.0\ (non-removable drive,NTFS,189496MB free)
Spill File: C:\Users\bej\AppData\Local\Temp\$slk.0 (non-removable drive,NTFS,189496MB free)

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 732
  • Hero Points: 47
Re: Permanently remove new file tab?
« Reply #3 on: May 03, 2013, 03:09:06 am »
There is a "Maximize first window" option that is off by default and is what you need. It is not exposed in the Options panel yet. We should be able to address this for the next beta.

++rodney

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4560
  • Hero Points: 353
Re: Permanently remove new file tab?
« Reply #4 on: May 03, 2013, 11:21:48 am »
v18 changed when we started the beta. Prior to the betas of v18, the "maximize first window" option was automatically set when you performed the steps I previously described. There is some unfinished code here. I think we need to readd the code which automatically sets this option or add the "Maximize first window" option to the options dialog. There may be some issues with automatically setting this.
« Last Edit: May 03, 2013, 11:34:03 am by Clark »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4560
  • Hero Points: 353
Re: Permanently remove new file tab?
« Reply #5 on: May 03, 2013, 11:39:07 am »
If you know how to write a tiny macro, execute the Slick-C code in this function:
Code: [Select]
#include "slick.sh"
void set_maximize_first_window_option() {
     _default_option(VSOPTION_MAXIMIZE_FIRST_MDICHILD,'1');
      _config_modify_flags(CFGMODIFY_OPTION);
}


Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4560
  • Hero Points: 353
Re: Permanently remove new file tab?
« Reply #6 on: May 03, 2013, 02:42:55 pm »
The next beta will automatically set your "Maximize first window" option when you close the last window. In addition, we are adding this option to the Options dialog.

jnairb

  • Senior Community Member
  • Posts: 204
  • Hero Points: 11
Re: Permanently remove new file tab?
« Reply #7 on: May 03, 2013, 03:14:44 pm »
Thanks, that resolves the problem when opening the first window. Maybe I don't know a lot about writing macros... how should I execute the macro you listed? I had to change it to "_command void set_maximize..." to run it from the command line. How else would I have run it without that?

For the issue with leaving the tab after delete-tile leaves me with a single window,  I can't just use the zoom window command instead of delete tile as I initially thought -- if I have 2 tiles, and use zoom window, then create tile, I then have 3 tiled windows. That's not what I want. For now, I wrote my own macro that does what I want:
Code: [Select]
_command void delete_tile_and_zoom_single_window()
{
   delete_tile();

   boolean single_window = false;

   int start_window = p_window_id;
   _next_window("R");
   if (start_window == p_window_id)
      single_window = true;
   _prev_window("R");

   if (single_window)
      zoom_window();
}

Is there better way to determine that I have just a single window? Also, I noticed that delete_tile() usually doesn't return any return code -- despite what the help says. Is that a bug? I was going to check the return code, so if it's cancelled I could just do nothing as far as zooming...

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4560
  • Hero Points: 353
Re: Permanently remove new file tab?
« Reply #8 on: May 03, 2013, 03:22:40 pm »
You can either do what you did which is to add the _command to my function or call it from another command or batch macro. What you did is simple though.

I'll fix delete_tile so it uses the maximize first window option as well as some other commands.