The time now is Sat 18 May 2013, 19:46
All times are UTC - 4 |
|
Page 14 of 54 [799 Posts] |
Goto page: Previous 1, 2, 3, ..., 12, 13, 14, 15, 16, ..., 52, 53, 54 Next |
| Author |
Message |
01micko

Joined: 11 Oct 2008 Posts: 7017 Location: qld
|
Posted: Fri 19 Aug 2011, 16:40 Post subject:
|
|
...yes, we are running r220 in Slacko Beta 1,
Thanks for everything Thunor.
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 342 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Fri 19 Aug 2011, 17:41 Post subject:
|
|
Hi guys
Sorry about that: I needed to set the accel_group pointer to NULL after freeing it.
Fixed in r224.
Thanks Sigmund for the helpful example and yes, <togglebutton> is almost finished (actually you can create one in r224 but that's it so far)
Regards,
Thunor
|
|
Back to top
|
|
 |
Dougal

Joined: 19 Oct 2005 Posts: 2505 Location: Hell more grotesque than any medieval woodcut
|
Posted: Sat 20 Aug 2011, 15:46 Post subject:
|
|
| taca0 wrote: | | Maybe this its not the best place to ask , But I want to know how I make that all the windows that I open fits on my 640x480 resolution?? |
What you could try is to go to /usr/bin (/usr/sbin?) and find the gtkdialog binary, rename it gtkdialog.bin, then right-click in the Rox window and select New->Script and create a script named gtkdialog.
Open the script and add to it: | Code: | | exec gtkdialog.bin "$*" --geometry=640x480 |
and see if it helps... I think Thunor fixed it to show scrollbars.
_________________ What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5240 Location: Valåmoen, Norway
|
Posted: Sun 21 Aug 2011, 03:51 Post subject:
|
|
By replacing <progressbar> by <timer> in Pprocess, the pid handling become much better.
Thank you Thunor
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5240 Location: Valåmoen, Norway
|
Posted: Sun 21 Aug 2011, 04:14 Post subject:
|
|
Thunor
There is a misbehavior in the menu widget. I think (really sure) that this has arrived with 0.7.21.
The example should explain it all: | Code: | #!/bin/sh
export MAIN_DIALOG='
<vbox>
<menubar>
<menu>
<menuitem stock="gtk-new"></menuitem>
<menuitem icon="gtk-new">
<label>New - No icon if label is set manually, not from gtk-stock</label>
</menuitem>
<menuitem stock="gtk-open"></menuitem>
<menuitem icon="gtk-open">
<label>Open - YES, Icon if label is set manually, not from gtk-stock</label>
</menuitem>
<label>File</label>
</menu>
</menubar>
<hbox>
<button cancel></button>
<button ok></button>
</hbox>
</vbox>
'
gtkdialog -p MAIN_DIALOG | This happens for icon="gtk-save" and gtk-info as well. I have not checked all, but many works as expected.
A sidenote: The menubar example still uses <seperator> instead of <menuitemseperator>
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7017 Location: qld
|
Posted: Sun 21 Aug 2011, 06:53 Post subject:
|
|
Hi all,
There is a backward compat issue that has surfaced.
This syntax: | Code: | export DLG="<window>
<vbox>
<hbox>
<text><label>Password:</label></text>
<entry invisible_char=\"x\" visibility=\"false\">
<default>\"1234567890\"</default>
<variable>VAR</variable>
</entry>
</hbox>
<hbox>
<button ok></button>
</hbox>
</vbox>
</window>"
gtkdialog -p DLG | was working fine in Pupdial and Pnethood as far as I know. It formerly showed a row of x's (xxxxxxx) to blank the password, now there is no x's and no anything (no visible entry when typing, variable is fine though on exit) I guess though that is the expected result and the old way was a buggy side effect.
There is a syntax I wasn't aware of that shows dots for the password.. | Code: | | <visible>password</visible> | .. that is backward compat, works in old Pupdial. | Code: | export DLG="<window>
<vbox>
<hbox>
<text>
<label>Password</label>
</text>
<entry tooltip-text=\"Enter your password here\">
<default>\"1234567890\"</default>
<visible>password</visible>
<variable>ENCKEY</variable>
</entry>
<button ok></button>
</hbox>
</vbox>
</window>"
gtkdialog -p DLG |
The example in the docs suggests that the behaviour of my first example is as expected.
cheers
01micko
EDIT: '<entry invisible_char=\"x\" visibility=\"false\">' in first example
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 342 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Sun 21 Aug 2011, 07:07 Post subject:
|
|
| zigbert wrote: | | By replacing <progressbar> by <timer> in Pprocess, the pid handling become much better. |
Excellent, and you're welcome.
| zigbert wrote: | There is a misbehavior in the menu widget. I think (really sure) that this has arrived with 0.7.21.
...
This happens for icon="gtk-save" and gtk-info as well. I have not checked all, but many works as expected.
A sidenote: The menubar example still uses <seperator> instead of <menuitemseperator> |
I couldn't see anything wrong with your example. I added entries for gtk-save and gtk-info as well and took and attached a screenshot (I'm using lupu-520 with the GTK+ 2 Crux theme).
[EDIT] I use /usr/sbin/gtkdialog so I still have the /usr/sbin/gtkdialog3 0.7.20 Patriot Edition which I tried and all the icons are present except that originally menuitem theme icons from icon="imagename" were hardcoded to 20px whereas I set them to 16px (the GTK+ function that loads theme icons ultimately chooses the size from the nearest available).
Cheers, I've updated both menubar examples.
Regards,
Thunor
| Description |
|
| Filesize |
11.55 KB |
| Viewed |
796 Time(s) |

|
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 342 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Sun 21 Aug 2011, 09:12 Post subject:
|
|
| 01micko wrote: | There is a backward compat issue that has surfaced.
...
It formerly showed a row of x's (xxxxxxx) to blank the password, now there is no x's and no anything... |
I've found the issue
Firstly I should point out that both "invisible-char" and "visibility" are GTK+ properties and all that Gtkdialog does with them is pass them onto GTK+ to set.
A short while back I fixed some code that was passing variables of type guint (GTK+ unsigned integer) to GTK+ as a gchar, and this was the reason why "border-width" never worked before. Well, "invisible-char" is a guint but because the code was bugged and sending the value to GTK+ as a gchar, the value shown in the examples is "x" when it should've been "120" Therefore the Gtkdialog documented "invisible-char" is wrong.
"invisible-char" isn't even required as GTK+ uses a default asterisk according to the documentation, so the visibility="false" tag attribute or the <sensitive>password</sensitive> directive should suffice.
Yes, the <sensitive>password</sensitive> directive works (I deprecated <visible> but you can still use it).
[EDIT] I've fixed my entry example and updated examples/02.01-entry_attributes.
Regards,
Thunor
Last edited by thunor on Sun 21 Aug 2011, 10:46; edited 1 time in total
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7743 Location: Stratford, Ontario
|
Posted: Sun 21 Aug 2011, 09:24 Post subject:
|
|
| thunor wrote: | | (I deprecated <visible> but you can still use it). |
Hopefully, that's all you plan to do with it. The Samba-TNG client tools have always used the <visible> tag to hide passwords.
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 342 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Sun 21 Aug 2011, 10:06 Post subject:
|
|
| rcrsn51 wrote: | | Hopefully, that's all you plan to do with it. The Samba-TNG client tools have always used the <visible> tag to hide passwords. |
Hello rcrsn51
The <visible> directive is used to hold "enabled" or "disabled" ("password" in your case which is unique) which describes the widget's sensitive state of "true" or "false". This is equivalent to the tag attribute (GTK+ property) of sensitive="true/false" but it makes no sense whatsoever being called <visible> or holding "enabled" or "disabled" (<enabled>true/false</enabled> would be an improvement). Now, part of what I am doing is making things consistent and sensible, therefore removing <visible>enabled/disabled</visible> from the documentation and replacing it with <sensitive>true/false</sensitive> to me seems like a very sensible thing to do -- even more so when you consider that there exists a visible="false" tag attribute to hide a widget! -- but I'd have to be a complete moron to remove support for <visible> as it would break a very high percentage of every Gtkdialog application ever written.
Anyway, thanks for your positive input as I find it very helpful
Kindest regards,
Thunor
|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3012 Location: Oregon
|
Posted: Sun 21 Aug 2011, 12:35 Post subject:
|
|
| 01micko wrote: | Hi all,
There is a backward compat issue that has surfaced.
This syntax: | Code: | export DLG="<window>
<vbox>
<hbox>
<text><label>Password:</label></text>
<entry invisible_char=\"x\" visibility=\"false\">
<default>\"1234567890\"</default>
<variable>VAR</variable>
</entry>
</hbox>
<hbox>
<button ok></button>
</hbox>
</vbox>
</window>"
gtkdialog -p DLG | was working fine in Pupdial and Pnethood as far as I know. It formerly showed a row of x's (xxxxxxx) to blank the password, now there is no x's and no anything (no visible entry when typing, variable is fine though on exit) I guess though that is the expected result and the old way was a buggy side effect.
There is a syntax I wasn't aware of that shows dots for the password.. | Code: | | <visible>password</visible> | .. that is backward compat, works in old Pupdial. | Code: | export DLG="<window>
<vbox>
<hbox>
<text>
<label>Password</label>
</text>
<entry tooltip-text=\"Enter your password here\">
<default>\"1234567890\"</default>
<visible>password</visible>
<variable>ENCKEY</variable>
</entry>
<button ok></button>
</hbox>
</vbox>
</window>"
gtkdialog -p DLG |
The example in the docs suggests that the behaviour of my first example is as expected.
cheers
01micko
EDIT: '<entry invisible_char=\"x\" visibility=\"false\">' in first example |
In your first example, it looks like it is working just like most linux login password prompts as I do not remember any ever echoing any keyboard input.
I checked both from a terminal with an added "echo $ENCKEY" to see what was passed and that was as expected.
In both examples, if the default is set to an empty string, the entry box looks a lot cleaner.
ie <default>\"\"</default>>
The question is if using the second example for password input is being used in existing puppy applications or changes to gtkdialog break them.
Also, one might want to include the "Enter_ok" code so that if the user presses Enter after entering the password, it acts the same as clicking the OK button.
|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3012 Location: Oregon
|
Posted: Sun 21 Aug 2011, 13:12 Post subject:
|
|
I just tried to add the "Enter_OK" code and evidently it does not work with an entry window.
Too bad, unless someone can show me how it could work.
Maybe the entry widget needs to accept the Enter key as an "end_of_entry_input".
Would this cause any problems?
|
|
Back to top
|
|
 |
Moose On The Loose

Joined: 24 Feb 2011 Posts: 278
|
Posted: Sun 21 Aug 2011, 16:12 Post subject:
style addition Subject description: Just an idea that may not apply |
|
I often have to do something like:
| Code: |
echo 'style "specialwarning"
{ fg[NORMAL] = { 1.0, 0, 0 } }
widget "*warning" style "specialwarning"
class "GtkText*" style "specialwarning"
style "specialmono"
{ font = "mono 12" }
widget "*mono" style "specialmono"
class "GtkText*" style "specialmono"' >$GTK_RC_FILE
|
to make a style for something unusual in the dialog boxes. Doing this could be automated. I can do it by putting a wrapper script around gtkdialog that loos for the "<style>" tag and makes the file needed and then removes it again after the dialog is closed. This could also be built into the gtkdialog.
|
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 342 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Sun 21 Aug 2011, 16:53 Post subject:
|
|
8-bit: invisible_char="x" is an error in the original Gtkdialog documentation but it worked because the Gtkdialog C code that passed "x" to GTK+ to set was bugged. In fact ALL guint GTK+ properties would've been affected by this bug, but I don't think that there are many of them.
Fixed code and bug: http://code.google.com/p/gtkdialog/source/browse/trunk/src/tag_attributes.c?spec=svn194&r=194#95
Nothing within the second example is being changed to break anything. <visible>password</visible> has always worked and will always work.
When you say "Enter_OK code", are you describing pressing the Enter key within an entry widget to activate a default OK button? If so the very first entry widget in the entry example does exactly this. I've also connected-up the "activate" signal so that it is emitted when pressing Enter within the widget which can be used to do anything you wish. I recommend that you play with the example.
Regards,
Thunor
|
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3012 Location: Oregon
|
Posted: Sun 21 Aug 2011, 18:29 Post subject:
|
|
Thank you thunor,
With your latest example in hand, I figured out the problem.
Sometimes it takes looking at an example from someone that knows how it all works for a blind man to see the light!
|
|
Back to top
|
|
 |
|
|
Page 14 of 54 [799 Posts] |
Goto page: Previous 1, 2, 3, ..., 12, 13, 14, 15, 16, ..., 52, 53, 54 Next |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|