Pbdict - upgrade

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

Pbdict - upgrade

#1 Post by zigbert »

Just 4 minor changes:
- You can press enter after searchword to activate script.
- Exit button now works.
- Changed to gtkdialog3.
- Added icons to buttons.

Files should be placed in /usr/local/pbdict/.

Sigmund
Attachments
pbdict.tar.gz
(1.2 KiB) Downloaded 1230 times

User avatar
nyu
Posts: 110
Joined: Tue 14 Mar 2006, 15:30
Location: good earth

#2 Post by nyu »

Hi Zigbert,

PBdict doesn't work under UTF-8. I want to use UTF-8 to translate
the menu in Japanese. It seems that you are using ISO-8859-1.
I did a simple experiment. I converted "gui.tpl" and "main.pb" to
UTF-8 by using "iconv". The menu is still in English because I didn't
translate anything but the coding is UTF-8 now. When I execute
the program, it won't generate "finalgui" file.
Can you help? Thanks in advance.

nyu

Henry
Posts: 863
Joined: Sun 30 Jul 2006, 02:28
Location: Oregon USA
Contact:

#3 Post by Henry »

Hi, Zigbert,

Pressing enter after the searchword still eludes me. I attached a screen shot of a search for pbdict to show my folders. When I try your download of course it says the specified folder /usr/local/pbdict/ does not exist, shall I create it" etc. I've tried a number of variations unsuccessfully. Does this work in 3.01?

If I type pbdict into the console (before applying your upgrade) I get:
----------------------------------------------
# pbdict

(gtkdialog3:8325): Gtk-CRITICAL **: gtk_widget_grab_default: assertion `GTK_WIDGET_CAN_DEFAULT (widget)' failed
-----------------------------------------------
although Pbdict does run correctly as usual..

What can I do to make this work? Perhaps one day the same thing will work in Pfind ;-) Your writing of these handy programs is none the less appreciated - thanks.
Attachments
pbdict.png
(66.36 KiB) Downloaded 1333 times

User avatar
alienjeff
Posts: 2265
Joined: Sat 08 Jul 2006, 20:19
Location: Winsted, CT - USA

#4 Post by alienjeff »

Now you know why they call GUIs gooey. Now while we're all at the console, type:

Code: Select all

dict word
and get

Code: Select all

8 definitions found

From The Collaborative International Dictionary of English v.0.48 [gcide]:

  Word \Word\, n. [AS. word; akin to OFries. & OS. word, D. woord,
     G. wort, Icel. or[eth], Sw. & Dan. ord, Goth. wa['u]rd,
     OPruss. wirds, Lith. vardas a name, L. verbum a word; or
     perhaps to Gr. "rh`twr an orator. Cf. {Verb}.]
     [1913 Webster]
     1. The spoken sign of a conception or an idea; an articulate
        or vocal sound, or a combination of articulate and vocal
        sounds, uttered by the human voice, and by custom
        expressing an idea or ideas ... <snip>
Amazing! No fonts, icons or themes to worry about. But there's more. Try:

Code: Select all

dict --h | more
Seems as though there's an awful lot of effort being put into simplifying something that's already quite simple - aka the complication of toast. Whatever happened to K.I.S.S.?
[size=84][i]hangout:[/i] ##b0rked on irc.freenode.net
[i]diversion:[/i] [url]http://alienjeff.net[/url] - visit The Fringe
[i]quote:[/i] "The foundation of authority is based upon the consent of the people." - Thomas Hooker[/size]

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#5 Post by zigbert »

First! Pbdict is not my code. This is puppybasic, so I guess it is MU who has combined these chars. I only fixed some minor gui-stuff.
Henry wrote:Pressing enter after the searchword still eludes me. I attached a screen shot of a search for pbdict to show my folders. When I try your download of course it says the specified folder /usr/local/pbdict/ does not exist, shall I create it" etc. I've tried a number of variations unsuccessfully. Does this work in 3.01?
You guys who got english as your main language are sometimes much harder to understand than guys from somewhere-else-out-there.
Our english sucks, but are simple.......We are just don't good enough. :cry: :oops: :? :) :D

Dear Henry.
I have read this over and over, but still don't figure out what the problem is. What is not working? What is downloaded? What eludes you?

Best wishes
Sigmund

Henry
Posts: 863
Joined: Sun 30 Jul 2006, 02:28
Location: Oregon USA
Contact:

#6 Post by Henry »

Dear Sigmund,

I will try to be very clear. In your opening post you wrote:
"- You can press enter after searchword to activate script."

This does not work for me, although you have written on a couple of occasions that it now should. That's why I wrote. The reason I originally suggested this gui change for Pbdict, Pfind, even PSI is simply user convenience, sometimes called "human factors" in design. When one has typed in a search term, it's preferable to simply continue to type the "enter" key (as in Google, e.g.) than to have to reach for the mouse to enter. I have noted before that this is a small, but annoying thing to the typical user, e.g. a writer like me, who uses it a lot, but certainly in the gui, not the cli.

The reason I included the screen shot and the console output was to possibly help in determining why it doesn't work in my Puppy.

Pdict is a wonderful facility, wherever it came from (as apparently Alienjeff agrees ;-) But I understood this modification came from you.

Henry

User avatar
alienjeff
Posts: 2265
Joined: Sat 08 Jul 2006, 20:19
Location: Winsted, CT - USA

#7 Post by alienjeff »

@Henry:

I prefer "dict" to "PBdict." As a matter of fact, I can't remember the last time I used PBdict, though it must be well over a year ago.

I've got my F4 key assigned to open a console*, so when I need a definition, I hit F4 and type: dict word <enter>. No mouse manipulation or cursor aiming/placement. I can leave my hands on the keyboard where the work gets done. My point is that with PBdict, I have to type the word in anyways, so why needlessly bother with mouse shenanigans and just cut to the chase?

The mouse-GUI thing could be taken to the extreme here with a radio button for each letter of the alphabet. That way we could cater to hunt-and-peckers who refuse to learn touch typing. And think of the boon that would ultimately be down the road for surgeons specializing in carpal tunnel syndrome!

Guess I forgot to tag </sarcasm> to the end of my previous post - or for the emoticon-addicted, :roll:

* F4 console key binding from ~/.jwm/jwmrc-personal:

Code: Select all

<Key key="F4">exec:rxvt</Key>     <!-- start rxvt console -->
[size=84][i]hangout:[/i] ##b0rked on irc.freenode.net
[i]diversion:[/i] [url]http://alienjeff.net[/url] - visit The Fringe
[i]quote:[/i] "The foundation of authority is based upon the consent of the people." - Thomas Hooker[/size]

Henry
Posts: 863
Joined: Sun 30 Jul 2006, 02:28
Location: Oregon USA
Contact:

#8 Post by Henry »

Thanks for the tip, alienjeff.

I like it.

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#9 Post by zigbert »

ok Henry - I got you. :wink:

I made those changes in Puppy 2.17, and it runs gtk 2.8. The new Puppy 3 has upgraded to gtk 2.10, and I guess that is the reason why it doesn't work correct here. I haven't got the time to investigate this issue more. Unfortunatly, there have been some gtkdialog-issues with Puppy 3.

Thanks for clear explanation
Sigmund

User avatar
steve_s
Posts: 1595
Joined: Mon 26 May 2008, 13:29
Location: Austin, TX, USA
Contact:

Re: Pbdict - upgrade

#10 Post by steve_s »

zigbert wrote:Just 4 minor changes:
- You can press enter after searchword to activate script.
- Exit button now works.
- Changed to gtkdialog3.
- Added icons to buttons.

Files should be placed in /usr/local/pbdict/.

Sigmund
Thanks for this, Sigmund! and thanks to MU for the original. 8)

Post Reply