Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docu-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gerhard Gonter
docu-tools
Commits
deddc8bd
Commit
deddc8bd
authored
10 years ago
by
Gerhard Gonter
Browse files
Options
Downloads
Patches
Plain Diff
allow passing of parameter to start_tb(), e.g. the path of the notes directory
parent
48599497
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
perl/Gnome-Tomboy/lib/Tomboy.pm
+23
-9
23 additions, 9 deletions
perl/Gnome-Tomboy/lib/Tomboy.pm
with
23 additions
and
9 deletions
perl/Gnome-Tomboy/lib/Tomboy.pm
+
23
−
9
View file @
deddc8bd
#!/usr/bin/perl
=head1 NAME
...
...
@@ -25,6 +26,8 @@ use strict;
use
UUID
;
use
POSIX
;
my
%options_passed
=
map
{
$_
=>
1
}
qw(--note-path)
;
# used by start_tb() function
sub
link
{
my
$s
=
shift
;
...
...
@@ -62,18 +65,29 @@ sub get_uuid
sub
start_tb
{
my
$what
=
shift
;
my
$par
=
shift
;
my
%par
=
@_
;
if
(
$what
eq
'
uuid
')
my
@cmd
=
('
tomboy
');
foreach
my
$what
(
keys
%par
)
{
my
@cmd
=
('
tomboy
',
'
--open-note
',
'
note://tomboy/
'
.
$par
);
print
"
>>>
",
join
('
',
@cmd
),
"
\n
";
my
$pid
=
fork
();
if
(
$pid
==
0
)
{
exec
@cmd
;
}
print
"
started pid=[
$pid
]
\n
";
my
$par
=
$par
{
$what
};
if
(
$what
eq
'
uuid
')
{
push
(
@cmd
,
'
--open-note
',
'
note://tomboy/
'
.
$par
);
}
elsif
(
exists
(
$options_passed
{
$what
}))
{
push
(
@cmd
,
$what
,
$par
);
}
}
print
"
>>>
",
join
('
',
@cmd
),
"
\n
";
my
$pid
=
fork
();
if
(
$pid
==
0
)
{
exec
@cmd
;
}
print
"
started pid=[
$pid
]
\n
";
$pid
;
}
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment