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 Thu 18 Dec 2014, 06:44
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 Posts_count   Goto page: Previous 1, 2, 3, ..., 28, 29, 30, 31, 32, ..., 53, 54, 55 Next
Author Message
jpeps

Joined: 31 May 2008
Posts: 3220

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: 3220

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: 888

PostPosted: Thu 19 Jan 2012, 13:20    Post_subject: Window Icons
Sub_title: 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: 1287
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: 1287
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: 1509
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Thu 19 Jan 2012, 23:27    Post_subject: Re: Window Icons
Sub_title: 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   1262 Time(s)

shot-1.jpg

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

shot-2.jpg

Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 888

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: 1287
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: 2420
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   1039 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: 1851
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   1015 Time(s)

gtk_window.png


_________________

Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4423

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: 1851
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   878 Time(s)

gtk_stock_icons_test.png


_________________

Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4423

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: 1851
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_website 
technosaurus


Joined: 18 May 2008
Posts: 4423

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:   Sort by:   
Page 30 of 55 Posts_count   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:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1025s ][ Queries: 12 (0.0116s) ][ GZIP on ]