GtkDialog - tips
Not image as far as I know but any background colour is possible..smokey01 wrote:Is there any way to set a background colour or image in a gtkdialog window?
Thanks
it's a case of running a unique gtk+ theme for that app.
Code: Select all
echo "style "slideshow"
{
bg[NORMAL] = "$COLOUR"
}
class "*" style "slideshow"" > /tmp/gtkrc
export GTK2_RC_FILES=/tmp/gtkrc:/root/.gtkrc-2.0
HTH
Puppy Linux Blog - contact me for access
TCL-TK works nicely. I got sick of sloppy work-arounds.seaside wrote:Jpeps,jpeps wrote:Is there any way to add a filter to gtk-open "fileselect" for specific filetypes?
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.
- Attachments
-
- petch.png
- (19.35 KiB) Downloaded 1143 times
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
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
That's why I was trying to use Gtkdialog3. Seems like GTK has LOTS of bindings in many languages. Gnocl is one of them (which I don't know much about).disciple wrote:What about gnocl? Because it would be much nicer to have GTK dialogues etc, as this is the standard for everything in Puppy.
Some things I'd be looking for:
Good run-time interaction for widgets; basic properties (like filters, etc); variables I can use for selected items of widgets (lists, etc); active community of developers/extensive documentation. I google searched for a tcltk combobox that a user can update (try this for gtkdialog3):
Code: Select all
#!/usr/bin/env wish
set ff [frame .f]
set label [label $ff.label -text "Name:" ]
set name [ttk::combobox $ff.name -textvariable name]
set addButton [button $ff.addButton -text "+" -width 1 \
-command [list addNameToComboBox $name]]
set removeButton [button $ff.removeButton -text "-" -width 1 \
-command [list removeNameFromComboBox $name]]
grid $label $name
grid $ff.addButton -row 0 -column 2 -sticky w
grid $ff.removeButton -row 0 -column 3 -sticky sw -padx 5
pack $ff -side top -fill both -expand true
proc addNameToComboBox {name} {
set values [$name cget -values]
set current_value [$name get]
if {$current_value ni $values} {
lappend values $current_value
$name configure -values $values
}
}
proc removeNameFromComboBox {name} {
set values [$name cget -values]
set current_value [$name get]
if {$current_value in $values} {
set i [lsearch -exact $values $current_value]
set values [lreplace $values $i $i]
$name configure -values $values
}
}
- Attachments
-
- combobox-tcltk.png
- (9.61 KiB) Downloaded 1095 times
with Xdialog
Here's a combo I found with Xdialog's logbox, which allows text colors. This example shows (potentially) clobbered files in red. (think I'll put the builtins in another color).
(Thunor's fileselect filter got me inspired to experiment a bit)
(Thunor's fileselect filter got me inspired to experiment a bit)
- Attachments
-
- logbox.png
- (61.83 KiB) Downloaded 998 times
jeps,
Do you care to share that script so others can check it out?
It looks interesting and what with installation or removal of a pet package that contains library files that already exist, it would be good to not have those libraries trashed on uninstalling a pet.
And for some reason unknown to us, the library files are not part of /root/.packages/builtin.
That means if a pet is uninstalled that contained library files that already exist they would be removed.
That is not a good thing at all.
Also, if a library file is used by more than one installed PET, and installed by it, uninstalling one PET can break another.
Do you care to share that script so others can check it out?
It looks interesting and what with installation or removal of a pet package that contains library files that already exist, it would be good to not have those libraries trashed on uninstalling a pet.
And for some reason unknown to us, the library files are not part of /root/.packages/builtin.
That means if a pet is uninstalled that contained library files that already exist they would be removed.
That is not a good thing at all.
Also, if a library file is used by more than one installed PET, and installed by it, uninstalling one PET can break another.
I'm having fun making lots of changes. For basic use, probably a cut back version would be suitable. Generating the initial builtin list takes about 9M.. I like it to prioritize (in color! ), but most users just need to see what's installed*. I've always used my own installers/uninstallers, but don't want to step on anyone's toes.8-bit wrote:jeps,
Do you care to share that script so others can check it out?
The other problem is that I'm using Thunor's latest gtkdialog3 with the fileselect filters.
* second thought..most users do NOT want to see what's installed
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
there is an example of how to parse all of the puppy repos (from the files in $HOME/.packages) in my jwm_tools pet
http://www.murga-linux.com/puppy/viewtopic.php?t=70804
the jwm_install_menu_create script builds an install menu for all of the supported repos (puppy2,3,4,5 quirky and wary) in ~2s in a format mirroring the program menu (if only all of linux were that intuitive) ... anyhow modding it for gtkdialog would be pretty straightforward if anyone wants to speed it up (using only shell it is 15x faster than the similar purposed C program, jwm-xdgmenu ... or rather the script that calls it, fixmenus)
I understand about the "stepping on toes", there have been several enhancements that never make it (or at least haven't yet) into ppm... even a few total/partial rewrites The code seems to be overly complex and can be finnicky (as programs 10 yrs in the making tend to be... corner cases and such), so I understand the caution & not wanting to break other chunks.
http://www.murga-linux.com/puppy/viewtopic.php?t=70804
the jwm_install_menu_create script builds an install menu for all of the supported repos (puppy2,3,4,5 quirky and wary) in ~2s in a format mirroring the program menu (if only all of linux were that intuitive) ... anyhow modding it for gtkdialog would be pretty straightforward if anyone wants to speed it up (using only shell it is 15x faster than the similar purposed C program, jwm-xdgmenu ... or rather the script that calls it, fixmenus)
I understand about the "stepping on toes", there have been several enhancements that never make it (or at least haven't yet) into ppm... even a few total/partial rewrites The code seems to be overly complex and can be finnicky (as programs 10 yrs in the making tend to be... corner cases and such), so I understand the caution & not wanting to break other chunks.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
Here's a look with builtins RED, installed BLUE. Notice any potential clobbering issues here? 
Edit: updated to show target files for links that are getting clobbered. The pet in the example was clobbering built-in links, leaving orphaned target libs of no use. Also, installing new target libs without clobbering the links would be useless. The 'install noclobber' button brings up the install list in an editor with "?" in front of clobbered files. Removing the "?" installs the file.

Edit: updated to show target files for links that are getting clobbered. The pet in the example was clobbering built-in links, leaving orphaned target libs of no use. Also, installing new target libs without clobbering the links would be useless. The 'install noclobber' button brings up the install list in an editor with "?" in front of clobbered files. Removing the "?" installs the file.
- Attachments
-
- logbox.png
- (63.96 KiB) Downloaded 968 times
Since I do not have the benefit of having your (jpeps) PETCheck, I rename the downloaded PET with a "tar.gz" extension and open it to see what files the PET contains.
I suppose I could write a script to take those files and do a check to see if they exist in my install of Puppy and act accordingly.
That is basically what PETCheck does with the option to not install some of the files.
If I added all the files I wanted to keep from installing PETs to the /root/.packages/builtin_files directory, it would most likely become huge.
But if I did that, would those files be safe guarded from removal by an uninstall of a PET?
I suppose I could write a script to take those files and do a check to see if they exist in my install of Puppy and act accordingly.
That is basically what PETCheck does with the option to not install some of the files.
If I added all the files I wanted to keep from installing PETs to the /root/.packages/builtin_files directory, it would most likely become huge.
But if I did that, would those files be safe guarded from removal by an uninstall of a PET?
I tried putting the files in a PET into /root/.packages/builtin_files and then installing the same pet.
I then tried removing the PET using Puppy Package Manager.
And I found that files listed as built in are not safe from removal!
So evidently, no files in Puppy are safe from being removed!
The only solution I can see is to back up your pupsave frequently so you have a backup just in case.
Actually, there are two other solutions.
One is called a Remaster.
The other is a rewrite of Puppy Package manager to look at the built in files and not remove any that are there.
I then tried removing the PET using Puppy Package Manager.
And I found that files listed as built in are not safe from removal!
So evidently, no files in Puppy are safe from being removed!
The only solution I can see is to back up your pupsave frequently so you have a backup just in case.
Actually, there are two other solutions.
One is called a Remaster.
The other is a rewrite of Puppy Package manager to look at the built in files and not remove any that are there.
Hi 8-bit,8-bit wrote:I tried putting the files in a PET into /root/.packages/builtin_files and then installing the same pet.
I then tried removing the PET using Puppy Package Manager.
And I found that files listed as built in are not safe from removal!
It's best not to touch the built-ins; it's a constant. The NoClobber install in PetCheck simply gives the option not to include the builtins in the installed package. Since they're not included in the installed package, they won't be deleted.
BTW; this is really getting OT...initially, I was only demoing the fileselect and then the color options for the logbox.
maybe better:
http://murga-linux.com/puppy/viewtopic.php?t=70582
edit: guess it was a good idea not to list an app using updated gtkdialog
until gtkdialog4 is established.
Moderator,
Would it be possible to move a few posts, mine included http://murga-linux.com/puppy/viewtopic. ... 419#559419 and the following one over to the thread here.
It seems they fit better there.
Thanks
Would it be possible to move a few posts, mine included http://murga-linux.com/puppy/viewtopic. ... 419#559419 and the following one over to the thread here.
It seems they fit better there.
Thanks
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
here is a little script that will generate a folder full of 1x1 pixmaps for each color in rgb.txt
Its nice to be able to browse them in alphabetical order in rox with thumbnails and large icons turned on.
Its nice to be able to browse them in alphabetical order in rox with thumbnails and large icons turned on.
Code: Select all
#!/bin/sh
[ ! -d colors ] && mkdir colors
for x in `cat /usr/X11R7/lib/X11/rgb.txt|grep -v Xorg|cut -f3|tr " " "_"`; do
echo '/* XPM */
static char *'${x}'_xpm[] = {
"1 1 1 1",
"0 c '${x//_/ }'",
"0"
};' >colors/${x}.xpm
done
- Attachments
-
- colors.tar.bz2
- here is a tarball of all the pixmaps
it is actually quite small for having 659 images - (6.68 KiB) Downloaded 388 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
I run Puppy Lucid 520 and I do not have the file "/usr/X11R7/lib/X11/rgb.txt".technosaurus wrote:here is a little script that will generate a folder full of 1x1 pixmaps for each color in rgb.txt
Its nice to be able to browse them in alphabetical order in rox with thumbnails and large icons turned on.
Code: Select all
#!/bin/sh [ ! -d colors ] && mkdir colors for x in `cat /usr/X11R7/lib/X11/rgb.txt|grep -v Xorg|cut -f3|tr " " "_"`; do echo '/* XPM */ static char *'${x}'_xpm[] = { "1 1 1 1", "0 c '${x//_/ }'", "0" };' >colors/${x}.xpm done
So I am unable to use your script.
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact: