Mageia Bugzilla – Attachment 9675 Details for
Bug 16905
drakguard crashed (undefined value for mandatory argument 'text' encountered at /usr/sbin/drakguard line 230)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch
0001-Don-t-try-to-set-text-in-entry-when-the-file-chooser.patch (text/plain), 1.55 KB, created by
Masanori Kakura
on 2017-09-15 15:59:23 CEST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Masanori Kakura
Created:
2017-09-15 15:59:23 CEST
Size:
1.55 KB
patch
obsolete
>From cf125eb1913179566ba774fa69837c724c189325 Mon Sep 17 00:00:00 2001 >From: Masanori Kakura <kakurasan@gmail.com> >Date: Fri, 15 Sep 2017 22:28:37 +0900 >Subject: [PATCH] Don't try to set text in $entry when the file chooser is > cancelled or closed > >--- > bin/drakguard | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/bin/drakguard b/bin/drakguard >index 506a2e4..d1814cf 100755 >--- a/bin/drakguard >+++ b/bin/drakguard >@@ -227,8 +227,11 @@ gtkadd($w->{window}, > 0, gtknew('HBox', if_($url_list->{tab_title} eq N("Block programs"), sensitive_ref => \$program_control_state), border_width => 5, spacing => 5, children_loose => [ > $entry = gtknew('Entry'), > if_($url_list->{tab_title} eq N("Block programs"), gtknew('Button', text => N("..."), clicked => sub { >- $entry->set_text($in->ask_file(N("Please select the program you want to control"), "/usr/bin")); >- })), >+ my $text = $in->ask_file(N("Please select the program you want to control"), "/usr/bin"); >+ if ($text) { >+ $entry->set_text($text); >+ } >+ })), > 0, gtknew('Button', text => N("Add"), clicked => sub { > my $text = $entry->get_text; > $text =~ s,^[^:]+://,,g; #- strip protocol >-- >2.11.0 >
From cf125eb1913179566ba774fa69837c724c189325 Mon Sep 17 00:00:00 2001 From: Masanori Kakura <kakurasan@gmail.com> Date: Fri, 15 Sep 2017 22:28:37 +0900 Subject: [PATCH] Don't try to set text in $entry when the file chooser is cancelled or closed --- bin/drakguard | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/drakguard b/bin/drakguard index 506a2e4..d1814cf 100755 --- a/bin/drakguard +++ b/bin/drakguard @@ -227,8 +227,11 @@ gtkadd($w->{window}, 0, gtknew('HBox', if_($url_list->{tab_title} eq N("Block programs"), sensitive_ref => \$program_control_state), border_width => 5, spacing => 5, children_loose => [ $entry = gtknew('Entry'), if_($url_list->{tab_title} eq N("Block programs"), gtknew('Button', text => N("..."), clicked => sub { - $entry->set_text($in->ask_file(N("Please select the program you want to control"), "/usr/bin")); - })), + my $text = $in->ask_file(N("Please select the program you want to control"), "/usr/bin"); + if ($text) { + $entry->set_text($text); + } + })), 0, gtknew('Button', text => N("Add"), clicked => sub { my $text = $entry->get_text; $text =~ s,^[^:]+://,,g; #- strip protocol -- 2.11.0
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 16905
: 9675