The time now is Tue 26 Jan 2021, 16:49
All times are UTC - 4 |
Page 39 of 101 [1505 Posts] |
Goto page: Previous 1, 2, 3, ..., 37, 38, 39, 40, 41, ..., 99, 100, 101 Next |
Author |
Message |
mrd
Joined: 27 Nov 2007 Posts: 124
|
Posted: Wed 03 Aug 2011, 21:47 Post subject:
where to find window icons |
|
I can't seem to get a window icon to appear on my apps. Can some tell me where the icon image files needs to be located to work on a dialog as below.
<window title=\"NASViewer\" icon-name=\"NASviewer16.xpm\">
I've tried the full path as well and that didn't work.
Thanks!
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3425 Location: Oregon
|
Posted: Wed 03 Aug 2011, 23:02 Post subject:
|
|
If you click on ROX, the house icon on your desktop and then on Puppy Reference, there will be a number of icon directory links shown.
You can put your icon in any of them although I would suggest /usr/share/mini-icons.
Or you can create a link to it.
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 350 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Thu 04 Aug 2011, 08:58 Post subject:
|
|
8-bit wrote: | When one is writing a gtkdialog script, there seems to be no reference one can refer to as to words that are reserved for gtkdialog.
A list of those words would be nice so one knows not to use them as variables or other areas where they might conflict with reserved words.
Good idea or bad? |
You create a shell script to construct a Gtkdialog XML-like structure which is stored within a shell variable that's passed to the gtkdialog binary. The variable names that Gtkdialog exports to the shell are those that you've instructed it to use e.g. <variable>LABEL1</variable> (widgets containing multiple items also export additional variables with an "_ALL" suffix on exit). Recently I found within an example a Gtkdialog exported shell variable named BUTTON which holds the mouse button id (if applicable) that triggered an action, but I'm not aware of anything else (I searched the code for "setenv" and "putenv"). Therefore other than MAIN_DIALOG, the <variable> names that you store within the XML and BUTTON that Gtkdialog may export, what else is there to conflict with? If you give me an example I can assist you with it.
Dave_G wrote: | I've just started coding with gtkdialog and have to agree 100% with 8-bit.
Unfortunately this lack of documentation is not unique to gtkdialog, it seems
to be pretty common in the Linux world.
A very big stumbling block for newbies like myself.
Dave. |
- Widget Reference - it's not completely populated but it's a good start.
- GTK+ 2 Reference Manual for the GtkEntry Widget - the <entry> widget within Gtkdialog (the GTK+ read/write properties are the Gtkdialog tag attributes).
- Use the GTK+ 2 Reference Manual to find other properties for other widgets or use Gtkdialog's Widget Reference which already includes the links.
- There's a very useful Widget Construction section with links to GTK+ widget properties (tag attributes) within the main post of the Gtkdialog Development thread.
- The same post includes a list of comprehensive examples for the newly added or extended widgets.
- You can browse the original but recently updated examples within the repository or you can checkout the source code; examples included.
- There's a Documentation section on the project page.
If there's something that you think is lacking in documentation then let me know and I'll address the issue
Regards,
Thunor
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 350 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Thu 04 Aug 2011, 09:24 Post subject:
|
|
Issue 8 within the issue tracker (zigberts issues) has a request for "supporting <item stock=gtk-open>coloumn1|coloumn2</item> from an input file". I came across an example named 09.03-tree_icon_columns that supports <input stock_column="0"> which accepts a stock_id as the first column (icon_column="0" also works for theme icons). Therefore the ability to input stock or theme icons into tree rows from a file already exists and you can do it like this:
Code: | #!/bin/sh
GTKDIALOG=gtkdialog
function inputfile() {
echo "gtk-open | | gtk-open | 2
gtk-about | | gtk-about | 2
gtk-add | | gtk-add | 2
gtk-apply | | gtk-apply | 2
gtk-bold | | gtk-bold | 2
gtk-cancel | | gtk-cancel | 2
gtk-cdrom | | gtk-cdrom | 2
gtk-clear | | gtk-clear | 2
gtk-close | | gtk-close | 2
gtk-color-picker | | gtk-color-picker | 2
gtk-convert | | gtk-convert | 2 " > inputfile
ifs="$IFS"
IFS=
echo $(<inputfile)
IFS="$ifs"
}; export -f inputfile
export MAIN_DIALOG='
<vbox>
<frame Stock icons from file via input command>
<tree>
<variable>TREE1</variable>
<label>0 | 1 | 2</label>
<height>300</height><width>250</width>
<input stock_column="0">inputfile</input>
</tree>
</frame>
<button ok></button>
</vbox>
'
$GTKDIALOG --program=MAIN_DIALOG
|
Regards,
Thunor
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4878 Location: Blue Springs, MO
|
Posted: Thu 04 Aug 2011, 11:52 Post subject:
|
|
Jwm will automatically look for an icon with the _same_ name as your program in its icon path (name.png or name.xpm) ... no 16, case must match etc...just make a symlink without the description of size etc... most wm's do the same.
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3425 Location: Oregon
|
Posted: Thu 04 Aug 2011, 12:01 Post subject:
|
|
thunor,
Speaking of examples, what is it with an included example in gtkdialog/examples/09.12-tree-one-column
It is written with an incorrect path to gtkdialog and even though the executable property is set on it, it shows the same as a text file would and not an executable script.
It looks like it is supposed to populate itself with files from the working directory, but does not.
Is it a "fix it yourself" example?
I am just curious as to what it is supposed to display.
Also!! Thank you for the references of documentation for gtkdialog.
It all helps as does this offering by seaside.
|
Back to top
|
|
 |
thunor

Joined: 14 Oct 2010 Posts: 350 Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
|
Posted: Fri 05 Aug 2011, 12:30 Post subject:
|
|
8-bit wrote: | ...what is it with an included example in gtkdialog/examples/09.12-tree-one-column |
Fixed now, and 09.00-tree as well.
They use "ls" to build rows using theme icons but the commands weren't working properly and the icons didn't exist.
Regards,
Thunor
|
Back to top
|
|
 |
8-bit

Joined: 03 Apr 2007 Posts: 3425 Location: Oregon
|
Posted: Fri 05 Aug 2011, 12:53 Post subject:
|
|
Again, I know it has been said many times, but I will say it again.
Thank you thunor!!!
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 3217
|
Posted: Thu 11 Aug 2011, 03:30 Post subject:
|
|
Is there any way to add a filter to gtk-open "fileselect" for specific filetypes?
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 937
|
Posted: Thu 11 Aug 2011, 12:25 Post subject:
|
|
jpeps wrote: | Is there any way to add a filter to gtk-open "fileselect" for specific filetypes? |
Jpeps,
I have not seen any way, although there is the "complete" function, but I don't think it's available.
You could perhaps call Zenity/Yad or maybe Xdialog (not sure about Xdialog) with a "yad --file-selection --file-filter" option.
Regards,
s
EDIT: I suppose you could also do a "ls *.jpg" action to a tmpfile and then pick from there.
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 3217
|
Posted: Wed 17 Aug 2011, 13:19 Post subject:
|
|
I'm sure I must be doing something wrong, but when importing a file to the "list" widget and selecting an item, it wasn't linking with the widget "variable"
|
Back to top
|
|
 |
smokey01

Joined: 30 Dec 2006 Posts: 2820 Location: South Australia :-(
|
Posted: Sun 21 Aug 2011, 21:51 Post subject:
|
|
Is there any way to set a background colour or image in a gtkdialog window?
Thanks
_________________ Software <-> Distros <-> Tips <-> Newsletters
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8787 Location: qld
|
Posted: Mon 22 Aug 2011, 00:27 Post subject:
|
|
smokey01 wrote: | Is there any way to set a background colour or image in a gtkdialog window?
Thanks |
Not image as far as I know but any background colour is possible..
it's a case of running a unique gtk+ theme for that app.
Code: | echo "style \"slideshow\"
{
bg[NORMAL] = \"$COLOUR\"
}
class \"*\" style \"slideshow\"" > /tmp/gtkrc
export GTK2_RC_FILES=/tmp/gtkrc:/root/.gtkrc-2.0 |
Slideshow was a silly little app I wrote ages ago, but that code should give you the gist of it, obviously the COLOUR variable must be set, it can be any defined colour or in the #000000 format
HTH
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 3217
|
Posted: Mon 22 Aug 2011, 05:44 Post subject:
|
|
seaside wrote: | jpeps wrote: | Is there any way to add a filter to gtk-open "fileselect" for specific filetypes? |
Jpeps,
I have not seen any way, although there is the "complete" function, but I don't think it's available.
You could perhaps call Zenity/Yad or maybe Xdialog (not sure about Xdialog) with a "yad --file-selection --file-filter" option.
Regards,
s
EDIT: I suppose you could also do a "ls *.jpg" action to a tmpfile and then pick from there. |
TCL-TK works nicely. I got sick of sloppy work-arounds.
Description |
|
Filesize |
19.35 KB |
Viewed |
1173 Time(s) |

|
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 7024 Location: Auckland, New Zealand
|
Posted: Mon 22 Aug 2011, 06:14 Post subject:
|
|
What about gnocl? Because it would be much nicer to have GTK dialogues etc, as this is the standard for everything in Puppy.
_________________ Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
|
Back to top
|
|
 |
|
Page 39 of 101 [1505 Posts] |
Goto page: Previous 1, 2, 3, ..., 37, 38, 39, 40, 41, ..., 99, 100, 101 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
|