[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Time Variable Format
From:       Thomas Zander <zander () planescape ! com>
Date:       2001-12-28 9:31:11
[Download RAW message or body]

On Fri, Dec 28, 2001 at 02:17:47AM +0100, Tomasz Grobelny wrote:
> Here is the next patch. It causes my dialog to use kofficerc to store last 
> used values. 

Great! :)
> It also allows the user to define his custom items in kofficerc 
> file. 
Well, I don't think any of our users are going to edit that file by hand..

> Please review. Maybe I should write a small help file?
Hmm, I believe in the good design replaces a help file.

> Can text value of a variable be stored in "text" attribute of TYPE tag? Is it 
> acceptable to update it each time we refresh variable?

I think storing it there is fine, yes.
I don't really understand your other question as the only time this attribute will
be created is in the save method of the variable. You just use the output of 
the variable to fill it...
Something like this:

--- koVariable.cc       2001/12/24 09:25:48     1.6
+++ koVariable.cc       2001/12/28 09:29:35
@@ -270,6 +277,7 @@ void KoVariable::save( QDomElement &form
     formatElem.appendChild( typeElem );
     typeElem.setAttribute( "type", static_cast<int>( type() ) );
     typeElem.setAttribute( "key", m_varFormat->key() );
+    typeElem.setAttribute( "text", text() );
 }

> 
> Tomasz Grobelny
> 

I have a couple of little things;

The time 10:04 is displayed as "10:4" I think this is wrong.

The variables "h", "m", "s", "AP","ap" are not clear to the user, perhaps
you can use the same method the find dialog uses to insert these. It uses
a button which triggers a popup menu with the full names of the variables. 
This button would have a popup menu like:
    [insert variable]
        [Hour of day]
        [Minute]
        [Second]
        [AM/PM]
        [am/pm]

Selecting the [Minute] would then insert "m"

This would make the am/pm/24h area unneeded. And would keep the format
editable since now you disable the am/pm box most of the time; or is that
a bug? I see that the AP variable is attached every time the widget is updated;
this means that 2 AM's can be displayed..

I think I found one bug (TimeFormatWidget::updateLabel):
    if(combo->currentText().lower()==i18n("locale"))
should be:
    if(combo->currentText().lower()==i18n("Locale").lower())
right?

In there (the locale stuff) you set the time to be 24h but the Locale also 
has a am/pm setting. I think you should use that.

Could you look at this and then send a new patch?
Thanx!
-- 
Thomas Zander                                            zander@earthling.net
The only thing worse than failure is the fear of trying something new

[Attachment #3 (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic