In System Settings / Regional / Date & Time we allow users to customise the Date and Time fomats used throughout KDE, a handy feature. Problem is the configuration is not very user-friendly, have a look at what I mean:
So we have some editable combo's allowing the user to either select from a few standard layouts or to type in their own layout. But what are the valid componants of a layout that the user can type in? It's not immediately obvious, and there's no help available I can find. I had to go look at the source code to find out. OK, we could fix that with some tool-tips and help doco, but it's a process still prone to error, the user is allowed to type in anything no matter how invalid or incomplete and it just gets treated as display text. It's how Windows still does it, surely we can come up with something simpler and more usable?
Well, as you might guess, Apple did. Have a look at their Date format 'editor':
All you do is drag some Elements around (those blue 'bubbles'), type any text you want in between and you're done, no knowledge of format codes required. They have something similar for time formats.
I would love to have a generic widget that does this in KDE for use in the Date and Time formats in System Settings and in the panel clock settings. Where else could we use something like this, any ideas? Problem is, I haven't a clue how to do the gui for this, I'm a plumber, not a painter, if you catch my drift. So anyone want to have a crack, or at least give me some pointers where to start? Anyone know of an existing widget I could adapt? We already have the KWin buttons editor which does something similar, but it lacks the line edit functionality.
The generic widget would combine a special Line Edit widget and a Pallette widget. The Line Edit would allow any text to be entered and edited and validated exactly as a standard KLineEdit. The Line Edit could also be a combo if we wanted standard formats available for easy selection. Element 'Bubbles' can be dragged from the Pallette onto the Line Edit and dropped in position, or dragged off to remove them. Once in place in the Line Edit, the Element Bubble would be treated exactly as any other glyph, i.e the cursor moves around them and they can be deleted or backspaced to remove them. API would allow the client to add Elements to the Pallette as required, setting the Element Label text, Element Example text (as goes in the Bubble), and Element Format text. Calling text() would return the contents of the Line Edit with the Element Bubbles replaced by their Element Format text equivalent. Accessability would require that either each Element has a key shortcut to insert it in-line, or that typing in the Element Format magically changes it into the Element Bubble. This makes me think that what the Line Edit requires is code to recognise when a particular text substring has been entered and replace that textual display with a graphical 'Bubble', and an API to give it the Example and Format text pairs. The drag-and-drop action would then be simply to insert the required format text and the Line Edit would convert it itself. I'm guessing the hard part is displaying the Bubble in place of the text and getting the cursor to treat it has a single entity.
In System Settings and the Clock widget, we could then simply have the current format displayed read-only with a little Wizard button next to it to launch the widget, keeping the config guis nice and clean and simple too.
Any suggestions / volunteers?
Or can someone come up with an even more user-friendly way than Apple?
Comments
existing widget
Amarok has a similar widget to edit the way it parse tags from path
you can access it using:
Edit Tags -> Guess Tags from Filename -> Basic...
agreed
I was going to post the same thing
Amarok has a nice widget, you can probably borrow some ideas there !
Ah! I did have a nagging
Ah! I did have a nagging feeling I'd seen something like it somewhere... Hmm, close, but not quite, it's either full graphical or full text and I'd like a mixed mode. Audex does something similar. I'll have a look at the code and see whats possible.
Please don't force drag'n'drop
If possible, please don't force drag'n'drop. I hate it. It's slow and I have to use the mouse. I prefer to keep my hands on the keyboard...
Full ack, which is why I
Full ack, which is why I made the point in the post about accesability and being able to type text in instead of drag-and-drop.
Text?
But if using the Apple example, how would a user wishing to type in their preferred date/time setup know what to type in?
As stated in your post, the current (or older) way of doing things was with DD MM YYYY? Would that be the "standard" to continue on from or would the PHP standard get used instead, like the LXDE developers are using? Or perhaps one I don't know about right now?
Personally, I have no preference to whether I'd have to use Ymd.Hi or YYYYMMDD.HHMM, if not for aesthetic reasons.
Shorter Formats?
I think this is a good idea. Does Apple allow the user to switch to a "bubble" to its shorter format, e.g., "Saturday" -> "Sat" or "05" -> "5"?
Shorter Formats?
yes it's possible to set short formats [url=http://skitch.com/seanmateus/ndhrq/bildschirmfoto-2009-10-20-um-11.07.54][img]http://img.skitch.com/20091020-cjkyummkdtb2643khrnx48sp2t.preview.jpg[/img][/url][url=http://skitch.com/seanmateus/ndhrq/bildschirmfoto-2009-10-20-um-11.07.54]Click for full size[/url] - [color=#A7A7A7]Uploaded with [url=http://plasq.com]plasq[/url]'s [url=http://skitch.com]Skitch[/url][/color] you can do that better in MHO ; but they solved it quite well!
Other possible uses
This could be useful in a find and replace UI, to use placeholders (see Coda editor).I could also use this in Gwenview importer to create folders based on image date or event name. Think of something like "Import destination: /home/me/Pictures/(year)/(event)/" where the Elements are (year) and (event).
Excellent post.I want to
Excellent post.I want to thank you for this informative read, I really appreciate sharing this great post. Keep up your work. at post.thanks helps a lot.sazky
breitling tourbillion watches
As the business grows, <a href="http://www.excelwatch.com/13-replica-breitling-watches">breitling watches</a> has also jumped into an international brand. It is worth mentioning that,<a href="http://www.excelwatch.com/13-replica-breitling-watches">breitling replica</a> is the ancestor of today's brand-oriented, in order to protect the quality and brand name will be printed on their products, the history of fashion in the world, is the first one first.<a href="http://www.excelwatch.com/13-replica-breitling-watches">breitling watch</a>, <a href="http://www.excelwatch.com/13-replica-breitling-watches">replica breitling</a>, <a href="http://www.excelwatch.com/13-replica-breitling-watches">fake breitling</a>,<a href="http://www.excelwatch.com/13-replica-breitling-watches">breitling tourbillion watches</a>.
breitling tourbillion watches
As the business grows, breitling watches has also jumped into an international brand. It is worth mentioning that,breitling replica is the ancestor of today's brand-oriented, in order to protect the quality and brand name will be printed on their products, the history of fashion in the world, is the first one first.breitling watch, replica breitling, fake breitling,breitling tourbillion watches.
omega moon watch
As the business grows, omega watches has also jumped into an international brand. It is worth mentioning that, omega moon watchis the ancestor of today's brand-oriented, in order to protect the quality and brand name will be printed on their products, the history of fashion in the world, is the first one first. ,replica watches,vintage omega watches、fake omega watches、replica omega watches、
omega watches、 omega moon watch
While I assume both error
While I assume both error screens would look the same, the timestamps on the pictures obviously indicate that "The Wrestler" was loading after the screen with the error message had been displayed. Architecture diploma AND master degree Architecture
One of the main advantages
One of the main advantages to LEED over other certifications is that it begins in the design phase. Before plans are drawn up the owners, architects, builder and key sub contractors like HVAC, plumbing and electrical, meet to discuss the design and ways to make the home more efficient and livable. The synergy created in this type of process produces a home that is very livable, healthy, sustainable, and has less impact on the environment Promotional gifts.
associate degree Architecture AND bachelor degree Architecture AND doctorate degree Architecture
Post new comment