Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 21 Apr 2014, 08:37
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Gtkdialog Development
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 30 of 55 [821 Posts]   Goto page: Previous 1, 2, 3, ..., 28, 29, 30, 31, 32, ..., 53, 54, 55 Next
Author Message
jpeps

Joined: 31 May 2008
Posts: 3219

PostPosted: Tue 17 Jan 2012, 22:35    Post subject:  

Yeah...it's almost there. It would also be an improvement with selection involving a simple on/off toggle. Presently selection works like a text editor. The icon refresh would have to work in runtime. Probably just a variation of a checkbox widget...
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3219

PostPosted: Wed 18 Jan 2012, 03:24    Post subject:  

Found a way to do it; a createchecklist function within a scrollable vbox.

http://murga-linux.com/puppy/viewtopic.php?t=74113&start=56


I would have liked to use an array with the variable, but couldn't find a way. A hack like STAT$i isn't as clean. To read it later, I needed something like

Code:

  eval echo "\$STAT${i}"
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 878

PostPosted: Thu 19 Jan 2012, 13:20    Post subject: Window Icons
Subject description: Provide for pixmap window icons
 

Right now you can only set a gtkdialog's window dialog icon with a "gtk-stock-item" such as this-

Code:
<window title="Example Window" icon-name="gtk-dialog-warning">


It would be really great to provide a customized icon with any pixmap that would show as the window icon as well as minimized in a tray.

Having this feature would give gtkdialog programs a nice professional and polished look.

Cheers,
s
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Thu 19 Jan 2012, 14:23    Post subject:  

Dear seaside,

I agree with you fully. I requested that from thunor a while back and he has kindly listed that feature for inclusion (http://code.google.com/p/gtkdialog/issues/detail?id=48). It's pretty easy to do.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Thu 19 Jan 2012, 14:24    Post subject:  

Sorry - the mail system on the forum had a hiccough and double posted.
Back to top
View user's profile Send private message 
Geoffrey


Joined: 30 May 2010
Posts: 1218
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Thu 19 Jan 2012, 23:27    Post subject: Re: Window Icons
Subject description: Provide for pixmap window icons
 

seaside wrote:
Right now you can only set a gtkdialog's window dialog icon with a "gtk-stock-item" such as this-

Code:
<window title="Example Window" icon-name="gtk-dialog-warning">


It would be really great to provide a customized icon with any pixmap that would show as the window icon as well as minimized in a tray.

Having this feature would give gtkdialog programs a nice professional and polished look.

Cheers,
s


Hi seaside,

You can add your own icon, vovchik and I discussed it a few post back, if you have the icon you wish to use, place it in any of the folders in /usr/share/icons/hicolor/.

System links also work, then run this command in the terminal to refresh the icon cache,
Code:
gtk-update-icon-cache -f -i /usr/share/icons/hicolor

I've since found that petget refreshes the cache when a pet is installed
Example:
Code:
<window title="A GTKDialog" icon-name="games48" resizable="false" decorated="true">


I placed a system link from /usr/local/lib/X11/themes/Ethereal/games48.png to /usr/share/icons/hicolor/48x48/apps, refreshed the cache and this is the result.

Geoffrey
shot-1.jpg
 Description   icon on the GUI
 Filesize   5.41 KB
 Viewed   1064 Time(s)

shot-1.jpg

shot-2.jpg
 Description   icon on taskbar
 Filesize   3.5 KB
 Viewed   1047 Time(s)

shot-2.jpg

Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 878

PostPosted: Fri 20 Jan 2012, 19:42    Post subject:  

Geoffrey,

Just a great find. Idea Idea Many, many thanks.

Yes, I see you had this discussion over the holidays and I must have just missed it,

Since installing pets updates the cache, it would seem that (for Puppy at least) including that gtkdialog feature implementation of
Quote:
gtk_window_set_icon(GTK_WINDOW(window), create_pixbuf("pixname.ext"));

isn't necessary.

Vovchik would have to comment on the merits between the two ways of showing icons, as I have no clue.

Regards,
s
(This should definitely be in the gtkdialog tips and tricks section) Exclamation
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Fri 20 Jan 2012, 19:49    Post subject:  

Dear seaside,

The advantage of:

Code:
gtk_window_set_icon(GTK_WINDOW(window), create_pixbuf("pixname.ext"));


is that you can use any old pixmap - a special one for instance - that isn't registered in the GTK icon system. But Geoffrey's workaround is also very useful. I think the user-selected window pixmap will be implemented in due course. I also like the idea of a tray item. Yad does that very nicely, and I have done that with an unreleased radio stream player in BaCon. It's also not hard to implement, and it's nice to be able to choose the pixmap.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
RSH


Joined: 05 Sep 2011
Posts: 2036
Location: Germany

PostPosted: Fri 20 Jan 2012, 22:41    Post subject:  

GtkDialog-Feature? !

I would like to refer to the following.
http://murga-linux.com/puppy/viewtopic.php?p=596119#596119

My thought would be to create something in the style of <tree "selection_mode="3"> that gives back a tree like shown in the attached image.

Perhaps it could be tree also, but with selection_mode="5" (f.e.). I know, it seems to be easy to "hack" things like that (if you are familiar with bash), but it would be very useful for all non-bash-familiar-users/programmers, to handle this one just as easy as <tree selection_mode="3">

I am very familiar with pascal programming (older version, another OS) and I would surely be able to code stuff like that - if i could use "my" pascal system! Unfortunately, i can't.

As i see the code, you do have already everything to set this up.

Would you please "hack" this out to easy use for all non-bash-familiar-users/programmers?

Thank you!

RSH
checkbox-tree.jpg
 Description   
 Filesize   66.63 KB
 Viewed   999 Time(s)

checkbox-tree.jpg


_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1780
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sat 10 Mar 2012, 12:58    Post subject:  

Hello,
Am I silly? Shocked Very Happy
These are the code lines: Cool
Code:
#!/bin/sh

GTKDIALOG=gtkdialog

export MAIN_DIALOG='
<window title="Example Window" icon-name="gtk-dialog-warning">
  <vbox>
    <frame Question:>
      <text>
        <label>How could I get stock icons ("gtk-dialog-warning" for example) and... others working?</label>
      </text>
    </frame>
    <hbox>
      <button ok></button>
      <button cancel></button>
    </hbox>
  </vbox>
</window>
'

case $1 in
   -d | --dump) echo "$MAIN_DIALOG" ;;
   *) $GTKDIALOG --program=MAIN_DIALOG ;;
esac


Cordialement.
This is what I get! Confused
gtk_window.png
 Description   
 Filesize   9.19 KB
 Viewed   844 Time(s)

gtk_window.png


_________________

Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Sat 10 Mar 2012, 14:38    Post subject:  

You'll find that and a lot more here:
http://www.murga-linux.com/puppy/viewtopic.php?t=38608

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1780
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sat 10 Mar 2012, 20:55    Post subject:  

Hello,
Thank you for replying.
I already know this great topic, and learned a lot while looking at zigbert tips!!! But I didn't find the answer to my question. I know how to display my own icon in the window title bar but don't how to display some gtk stock icons like gtk-dialog-info or gtk-dialog-warning for example (which could be useful and used without having to add copies manually to /usr/share/icons/hicolor) though it curiously works quite well with gtk-preferences...

I was wondering if something like icon-stock-name=... would exist?
This was just a question...

Cordialement.
gtk_stock_icons_test.png
 Description   
 Filesize   8.05 KB
 Viewed   817 Time(s)

gtk_stock_icons_test.png


_________________

Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Sun 11 Mar 2012, 00:24    Post subject:  

It's in zigbert's first post, just search for stock
http://www.murga-linux.com/puppy/viewtopic.php?p=274035#274035

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1780
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sun 11 Mar 2012, 06:23    Post subject:  

Hello,
Thank you for your patience.
I red the topic as seriously as I could: nada! Embarassed For menuitem and buttons icons, no problem, solutions are there, and I know them...
But for window title bar icon, I tried to adapt several things... without success and din't see anything directly telling about! Confused

No matter.
Have a good Sunday!

Regards.

_________________

Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Sun 11 Mar 2012, 09:40    Post subject:  

yeah sorry, I was misreading your post, the way I have always hacked it was make a symlink of my program to the name of the icon with no extension

Code:
ln -s gtkdialog gtk-dialog-warning
#need an icon in jwm's icon path named gtk-dialog-warning.png (or xpm)
gtk-dialog-warning -P ....

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 30 of 55 [821 Posts]   Goto page: Previous 1, 2, 3, ..., 28, 29, 30, 31, 32, ..., 53, 54, 55 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

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
[ Time: 0.0964s ][ Queries: 12 (0.0187s) ][ GZIP on ]