Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Xacobeo CPAN distribution.

Report information
The Basics
Id: 41178
Status: resolved
Priority: 0/
Queue: Xacobeo

People
Owner: Nobody in particular
Requestors: jozef [...] kutej.net
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.03
Fixed in: (no value)



Subject: notify user that the xpath is not correct
Attached is a patch that changes text colour to red when the xpath is not valid. Currently if the "XPath:" query is typed the only indicator if it is correct is that the "Evaluate" button is enabled/disabled.
Subject: xpath-red.patch
From a422e89e3d866f0df38bf1f44c81209d9c1c257b Mon Sep 17 00:00:00 2001 From: Jozef Kutej <jozef@kutej.net> Date: Mon, 24 Nov 2008 14:06:10 +0100 Subject: [PATCH] set xpath text in red when not valid --- bin/xacobeo | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/bin/xacobeo b/bin/xacobeo index 2a8e8b4..efa5811 100755 --- a/bin/xacobeo +++ b/bin/xacobeo @@ -702,8 +702,16 @@ sub callback_xpath_entry_changed { # Validate the XPath expression if (! $self->document->validate($xpath) ) { + # disable button $button->set_sensitive(FALSE); + + # set red xpath text color + $widget->modify_text('normal', Gtk2::Gdk::Color->new(65535,0,0)); + return; + } else { + # reset text color + $widget->modify_text('normal', undef); } $button->set_sensitive(TRUE); -- 1.5.6.5
I have to agree that disabling the evalutate button is not the best visual representation. But I was not too crazy about changing the color of the text neither, mainly because no one does it so the application will not be too consistent with the other GTK applications. I always wanted to use Pango markup for this but never took the time to implemented it (I couldn't find the proper documentation). Thanks to your bug I decided to do it as it was intended once and for all. Sorry for the delay. This bug is now fixed in 0.04_01. Thanks for the patch.
I forgot to close the bug.