quidgets.prompts.yes_no() works like this:
response = quidgets.prompts.yes_no("I need some info","Do you want to give me a yes or no?")
if response == gtk.RESPONSE_YES:
print "they said yes"
elif response == gtk.RESPONSE_NO:
print "they said no"
else:
print "they dismissed the dialog"
This is a little different than the other functions in the namespace in that in that the responses are gtk.RESPONSE_YES or gtk.RESPONSE_NO, rather than gtk.RESPONSE_OK, or gtk.RESPONSE_CANCEL. Of course, there is no "value", as you are just looking for a yes or no from the user.Warning, Error, and Info are similar, but you don't even check the return value, as you are not seeking any feedback. You just supply a title and some text that you are trying to tell the user.
So:
I hope that folks find this useful, and that it saves writing lots of lines of code. I've pushed the branch, and should get it into my PPA in the next few days.quidgets.prompts.warning("Title goes here","Warning")
quidgets.prompts.
error("Title goes here","Error")
quidgets.prompts.
info("Title goes here","Info")
About Quidgets
Quickly + Widgets = Quidgets
There is a Launchpad Project for Quidgets
The most up to date changes are in the Quidgets Trunk Branch
Quidgets is starting to look a lot like zenity, which is great. Perhaps you could look at the ones zenity offers for ideas on things people use often.
ReplyDeleteThanks for your awesome work,
Daniel
The Raving Rick: More Quidget One-Liners: Yes/No, Warnings, Info, Errors >>>>> Download Now
Delete>>>>> Download Full
The Raving Rick: More Quidget One-Liners: Yes/No, Warnings, Info, Errors >>>>> Download LINK
>>>>> Download Now
The Raving Rick: More Quidget One-Liners: Yes/No, Warnings, Info, Errors >>>>> Download Full
>>>>> Download LINK TE
added bug 501804
ReplyDeletehttps://bugs.edge.launchpad.net/quidgets/+bug/501804
Yay that solves my blog post from a week ago thanks rick :D
ReplyDeleteDon't use Yes/No - that is a bad, bad Windows paradigm. Use VERBS on buttons instead of asking Yes/No questions.
ReplyDeleteI agree with Rich. "Close without saving", "Continue editing" and "Save as" are much better buttons then Yes/No/Cancel.
ReplyDeletePerhaps adding a default minium width will improve the layout of the smaller dialogs. The examples look to me a little squashed.
ReplyDeleteNice, though I don't really see how this is useful given that gtk.MessageDialog does the same and is already quite simple.
ReplyDeleteI also agreed with Rich and flimm in that Yes/No dialogues really suck. Further, I believe dialogues should be avoided whenever possible (by using morphing windows, embeded messages like gedit/Firefox do, etc.), but I suppose those one-liners are intended for people writing little scripts for personal usage, so this isn't really applicable anyway.
By the way Rick, please poke me when you're on IRC, I'd like to talk to you about something else related to Quidgets :).
Thanks for sharing nice post.
ReplyDeletehttps://proscrack.co/any-video-converter-ultimate-crack/
You done an excellent job.
ReplyDeletehttps://crackvip.com/simlab-composer-keygen/
ReplyDeletethis is Brother Printer Drivers Support and brother printer drivers download , update brother printer driver and brother drivers printer
ReplyDeletethis is Brother Printer Support Assistant and brother printer software
this is Brother Printer Troubleshooting Guide and brother printer troubleshooting
ReplyDelete
ReplyDeletethis is Brother Printer Support Assistant and brother printer software
this is Brother Printer Wireless Setup as well as brother printer wireless setup wizard
ReplyDelete
ReplyDeletethis is Brother Printer Offline Fix and brother printer offline fix windows 10
this is Brother Airprint Printer Not Found as well as brother printer airprint not working
ReplyDeleteThe Raving Rick: More Quidget One-Liners: Yes/No, Warnings, Info, Errors >>>>> Download Now
ReplyDelete>>>>> Download Full
The Raving Rick: More Quidget One-Liners: Yes/No, Warnings, Info, Errors >>>>> Download LINK
>>>>> Download Now
The Raving Rick: More Quidget One-Liners: Yes/No, Warnings, Info, Errors >>>>> Download Full
>>>>> Download LINK gd