Subject: FVWM: Small fix for fvwmtabs

From: Micha Feigin <[email-masked]>
Date: Mon, 19 Jul 2004 23:57:15 +0300

Attached is a  small fix for fvwmtabs to handle the new CreateNewTab
command in fvwmrc. With the following new syntax

# Create a new Tabber.
DestroyFunc NewTabber
AddToFunc NewTabber I SendToModule FvwmTabs createNewTabber $0

Calling the function without the optional parameter sends a # instead of
nothing (at least on my system) which causes doesn't allow opening more
then one tabber.

There other fix is an extra space that I don't think should be there,
but I could be wrong.
--- /usr/lib/fvwm/2.5.11/FvwmTabs	2004-07-19 23:32:28.000000000 +0300
+++ tmp/fvwmtabs/FvwmTabs-v3.3/FvwmTabs	2004-07-15 16:11:19.000000000 +0300
@@ -406,7 +406,7 @@
 {
 	my $tId = shift();
 
-	if (!defined $tId or $tId eq '#')
+	if (!defined $tId)
 	{
 		for ($tId = 0; ; $tId++)
 		{
@@ -424,7 +424,7 @@
 		return;
 	}
 
-	my $title = $fvwm->name() . "[$tId]";
+	my $title = $fvwm->name() . " [$tId]";
 	my $tl = $TOP->Toplevel(Name => $fvwm->name(),
 							-class => $fvwm->name(),
 							-title => $title);

---

From: Scott Smedley <[email-masked]>
Date: Wed, 21 Jul 2004 10:07:48 +1000

Hi Micha,

> nothing (at least on my system) which causes doesn't allow opening more

Sounds like you've got an out-of-date fvwmtabrc file.

Older versions of fvwmtabrc used to have in-line comments which are
illegal/ignored by FVWM.

> There other fix is an extra space that I don't think should be there,

Ah yes. A bug - thanks.

SCoTT. :)
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Micha Feigin <[email-masked]>
Date: Wed, 21 Jul 2004 05:03:38 +0300

> Older versions of fvwmtabrc used to have in-line comments which are

Latest fvwmtabsrc has a line

# Create a new Tabber.
DestroyFunc NewTabber

Just calling NewTabber (no argument) gives me in FvwmTabs tId = '#' at
the point:

[...]
sub createNewTabber
{
	my $tId = shift();
[...]

Which doesn't let me open multiple unnamed tabs. This is with Fvwm
snapshot from yesterday.

>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
>

---

From: Scott Smedley <[email-masked]>
Date: Wed, 21 Jul 2004 16:29:42 +1000

> Just calling NewTabber (no argument) gives me in FvwmTabs tId = '#' at

How are you invoking the NewTabber function?

I'm sure you're (inadvertantly) passing an argument to it.

ie.

Key T A M Function NewTabber # Alt-t for new tabber.

This invokes the NewTabber function with "#" as the first argument.

I am not getting this problem & can create as many tabbers as I like.

SCoTT. :)

---

From: Micha Feigin <[email-masked]>
Date: Wed, 21 Jul 2004 16:56:42 +0300

> This invokes the NewTabber function with "#" as the first argument.

Thanks, that was the problem.

Personally it seems a very sick behavior passing the comment symbol as
the parameter to the function. I would consider this a bug, but maybe
its supposed to be a feature ;-)