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 Sat 25 Oct 2014, 10:57
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
How to add app icons to GtkDialog MenuBar?
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Sun 29 Apr 2012, 22:40    Post_subject:  How to add app icons to GtkDialog MenuBar?  

I made an auto. menu for Tiny Core Linux`s SCM app. files.
http://murga-linux.com/puppy/viewtopic.php?p=624016#624016

It would be really nice if the app. icons could be put on the menu.
All I`ve ever got to work was GTK+ stock icons on anything.
Back to top
View user's profile Send_private_message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Mon 30 Apr 2012, 02:06    Post_subject: Re: How to add app icons to GtkDialog MenuBar?  

sunburnt wrote:
I made an auto. menu for Tiny Core Linux`s SCM app. files.
http://murga-linux.com/puppy/viewtopic.php?p=624016#624016

It would be really nice if the app. icons could be put on the menu.
All I`ve ever got to work was GTK+ stock icons on anything.

I do use my own icons in gtkdialog applications. I did create symbolic links of each and every icon of LazY Puppy in /usr/share/icons/hicolor/48x48/apps. After this i call gtk-update-icon-cache -f /usr/share/icons/hicolor/ (after this i did make a remaster). This function is ALWAYS Laughing called after installing a .pet that contains icons or symbolic links in this directory. So if you put a symbolic link of the wanted icon inside your pet in /usr/share/icons/hicolor/48x48/apps, then you can use it in your own gtkdialog application.

Example: the name of your icon is my-icon.png - do use my-icon in gtkdialog. Works for me and should also work for you. (I did read this long time ago somewhere in the gtkdialog section. Was a post of shinobar (iirc)).
quickinstall-lazy-puppy.png
 Description   
 Filesize   173.74 KB
 Viewed   958 Time(s)

quickinstall-lazy-puppy.png


_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Mon 30 Apr 2012, 23:23    Post_subject:  

RHS; In thinking about this, I`m not sure your fix is usable.
I`m intending on copying icons from SCM and SqApp files.

So if I`m correct... Each time a file is mounted and an icon is copied:
A link for it is made in: /usr/share/icons/hicolor/48x48/apps
( I assume other dirs. would work also? Like: /apps/ico )

And then run: gtk-update-icon-cache -f /usr/share/icons/hicolor/

Edited_time_total
Back to top
View user's profile Send_private_message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Mon 30 Apr 2012, 23:39    Post_subject:  

I did never try another directory, because for me it works well. I don't know how SqApp is acting and what SCM is. But on sfs files it works also. If an sfs does contain a file that is already in the running system, it will not be loaded and also not removed on unloading the sfs.

I did found this on a problem using a .pet of ardour 286 that i'd build. The installed .pet did work fine, the sfs version (all the same files) did not work and gave me "segmentation fault" in terminal. So i did reboot, copied all files of ardour sfs manually into the running system and had a special look on existing files that would be overwritten. I found librdf.so.0.0.0 which was installed on an earlier installation of abiword 2.9. Removed librdf.so.0.0.0, loaded the ardour sfs and it works perfectly.

Every written by myself gtkdialog application now uses its own icons and none of them did never lost any of the icons.

I don't know, how SqApp is acting...

EDIT:

Tonight i did a hack on gtkdialog application using object tree. Automatically setting of each and every icon related to its application.
image-2.jpg
 Description   
 Filesize   16.34 KB
 Viewed   934 Time(s)

image-2.jpg


_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Tue 01 May 2012, 00:55    Post_subject:  

### I`ll let you know about using other dirs. for icons or links to them.


An SCM is Tiny Core Linux`s mount only Squash app. file. Works in Puppy.
SqApp is my own mount only Squash app. file type. Better in some ways.
My post with myAutoMenu app. for SCM files:
http://murga-linux.com/puppy/viewtopic.php?t=77944

The problem you spoke of with Puppy`s SFS files is common. And no fix.
That`s union file systems... That`s why I`ve tried hard to rid Puppy of it.
But people are slow to understand, and even slower to respond to change.

Tiny Core Linux does not use a union file system. Much better!
It`s TCZ files use a brute force method of using Squash files.
But it now has SCM files that don`t have to resort to brute force to work.
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Tue 01 May 2012, 02:38    Post_subject:  

# UPDATE: Tried to get it to work, no icon...
When the command is run, it says:
gtk-update-icon-cache: No theme index file.
Command gives same report no matter what path it`s given.

Error running menu: (gtkdialog3:14855): GLib-GObject-CRITICAL

The GtkDialog file section looks like this:
Code:
   <menuitem icon="avidemux-png">
      <label>avidemux</label>
      <action>avidemux</action>
   </menuitem>
   <menuitem icon="gnome-mplayer.png">
      <label>gnome-mplayer</label>
      <action>gnome-mplayer</action>
   </menuitem>
   <menuitem icon="xfe.png">
      <label>xfe</label>
      <action>xfe</action>
   </menuitem>
   <menuitem icon="xmms.png">
      <label>xmms</label>
      <action>xmms</action>
   </menuitem>
Back to top
View user's profile Send_private_message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Tue 01 May 2012, 03:23    Post_subject:  

Hi.

First picture shows one of my own special icon directories containing 25 images (LazY Puppy SFS files) and one sub-directory with smaller versions.



Second picture shows symbolic links in /usr/share/icons/hicolor/48x48/apps. There are 525 symbolic links to each and every icon inside LazY Puppy. Exactly the same way i did it with the icon directory of wbar, so i can also use each and every icon on the wbar - and they are changing if the system icons are changing. Very Happy



Code from LazY Puppy QuickInstall (Menu)

Code:
    <menu>
         <menuitem icon=\"lazy528devx\" tooltip-text=\"$LTTDEVX\">
           <label>$LSFSDEVX</label>
           <action>defaultbrowser $WLDEVX &</action>
         </menuitem>
         
         <menuitem icon=\"lazy528devxgambas\" tooltip-text=\"$LTTDEVXGMB\">
           <label>$LSFSDEVXGMB</label>
           <action>defaultbrowser $WLDEVXGMB &</action>
         </menuitem>
         
         <menuitem icon=\"lazy528-kernel\" tooltip-text=\"$LTTKERNEL\">
           <label>$LSFSKERNEL</label>
           <action>defaultbrowser $WLKERNEL &</action>
         </menuitem>
         
         <separator></separator>
         
         <menuitem icon=\"lazy528amedit\" tooltip-text=\"$LTTAMEDIT\">
           <label>$LSFSAMEDIT</label>
           <action>defaultbrowser $WLAMEDIT &</action>
         </menuitem>
         
         <menuitem icon=\"lazy528avplay\" tooltip-text=\"$LTTAVPLAY\">
           <label>$LSFSAVPLAY</label>
           <action>defaultbrowser $WLAVPLAY &</action>
         </menuitem>
         
         <menuitem icon=\"lazy528grafik\" tooltip-text=\"$LTTGRAFIK\">
           <label>$LSFSGRAFIK</label>
           <action>defaultbrowser $WLGRAFIK &</action>
         </menuitem>
         
         <menuitem icon=\"lazy528www\" tooltip-text=\"$LTTNETWORK\">
           <label>$LSFSNETWORK</label>
           <action>defaultbrowser $WLNETWORK &</action>
         </menuitem>
         
         <menuitem icon=\"lazy528office\" tooltip-text=\"$LTTOFFICEKDE\">
           <label>$LSFSOFFICEKDE</label>
           <action>defaultbrowser $WLOFFICEKDE &</action>
         </menuitem>
         
         <menuitem icon=\"lazy528office\" tooltip-text=\"$LTTOFFICEOO\">
           <label>$LSFSOFFICEOO</label>
           <action>defaultbrowser $WLOFFICEOO &</action>
         </menuitem>
         
         <menuitem icon=\"lazy528office\" tooltip-text=\"$LTTOFFICE\">
           <label>$LSFSOFFICE</label>
           <action>defaultbrowser $WLOFFICESTD &</action>
         </menuitem>
         
         <menuitem icon=\"lazy528tools\" tooltip-text=\"$LTTTOOLS\">
           <label>$LSFSTOOLS</label>
           <action>defaultbrowser $WLTOOLS &</action>
         </menuitem>
         
         <menuitem icon=\"lazy528vedit\" tooltip-text=\"$LTTVIDEOEDIT\">
           <label>$LSFSVIDEOEDIT</label>
           <action>defaultbrowser $WLVIDEOEDIT &</action>
         </menuitem>
         
         <menuitem icon=\"lazy528wine\" tooltip-text=\"$LTTWINE\">
           <label>$LSFSWINE</label>
           <action>defaultbrowser $WLWINE &</action>
         </menuitem>
         
        <label>$LAZYMSFSTITLE</label>
       
      </menu>   


Code is for this menu: http://murga-linux.com/puppy/viewtopic.php?p=624064#624064
As you can see: do NOT use the .png and/or .xpm file extension.

I do use gtkdialog-0.8 (gtkdialog4)

EDIT:

Please note: as far as i know, gtkdialog4 applications using menus do need the following code at the end of the gui:
Code:
 <action signal=\"hide\">exit:Exit</action>
 
</window>"

I can't remember exactly but i think it has got something to do with right upper cross (close window) and the GUI results... Question

I attached my index.theme file - may be it can help? You surely know, not to try this using your fav... Laughing

Or might try to install a package, to see if this file is generated by petget (/usr/local)
index.theme.gz
Description  remove .gz
gz

 Download 
Filename  index.theme.gz 
Filesize  23.72 KB 
Downloaded  203 Time(s) 
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Tue 01 May 2012, 04:02    Post_subject:  

Puppy only has gtkdialog3, that could easily be the problem.
I`m not going to modify other folks Puppies to make my menu work...
It has to install alone without dependencies to make it work.

gtk-dialog`s syntax changes completely from one version to the next.
That`s partly why I gave up on gtk-dialog. That and only Puppy uses it.

Edited_time_total
Back to top
View user's profile Send_private_message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Tue 01 May 2012, 14:25    Post_subject:  

jpeps wrote:
Yes, I'm writing with updated gtkdialog, although it has limited backward compatibility. There are a lot of important revisions in gtkdialog, like file selection filters, etc. It takes under 10 seconds to update. I have no idea why anyone wouldn't include it in their distro.

He wrote this in the gnewpet thread.

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Tue 01 May 2012, 16:41    Post_subject:  

I agree, why doesn`t the latest Puppies have gtkdialog4 ?
I`m guessing like many folks, they`re just getting tired of the nasty old
tread mill of constant upgrading all of Puppy`s GUIs over and over.
Still they could include it and slowly migrate to using it ( As always...).

I`ve suggested a wrapper for GTK+ that always keeps the same syntax.
A maintainer would keep it working, freeing the rest of us from slavery.


# I just tried to gunzip your file and it errors:
Code:
gzip: ./index.theme.gz: not in gzip format

If I knew where it goes I could try a blank file to see if that`d work...

# Anyway... Try posting it again, but Zipped:
Code:
zip -9 index.theme.zip index.theme

# And I need to know where the file goes.
.
Back to top
View user's profile Send_private_message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Wed 02 May 2012, 00:12    Post_subject:  

Sorry, my fault.

I thought you would see it, if i note it at the description of the attached file. It is not a .gz file. Just rename it (remove the .gz).

The file goes to /usr/share/icons/hicolor/ and there is another file (icon-theme.cache) in my System. I can not open this file.

Is GTK+ a GUI-Tool like GtkDialog? Where can i get this and can you tell me something about GTK+?
image-2.jpg
 Description   
 Filesize   17.84 KB
 Viewed   842 Time(s)

image-2.jpg


_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Wed 02 May 2012, 12:17    Post_subject:  

Duh.......... I did not catch your note, sorry. Clever way of forcing your attachment!

GTK+ ( Gimp Tool Kit ) is the main windowing graphics used in Linux.
gtkdialog is a wrapper for GTK+, and a poor one I might add...
GTK+ was written for the Gimp graphical editor app.
It can also be used in WinBlows, it`s the most common GUI kit.
http://www.gtk.org/
Back to top
View user's profile Send_private_message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Wed 02 May 2012, 13:26    Post_subject:  

I have downloaded the sources but compiling failed (as always)

Code:
configure: error: Package requirements (glib-2.0 >= 2.31.20    atk >= 2.1.5    pango >= 1.29.0    cairo >= 1.10.0    cairo-gobject >= 1.10.0    gdk-pixbuf-2.0 >= 2.25.2) were not met:


Lot of stuff missing... Sad

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Wed 02 May 2012, 14:45    Post_subject:  

### I`m assuming that you`re trying to compile GTK+?
Puppy already has it, it`s what makes your graphical desktop...
All GUI Linuxes have it, or QT ( the other big graphical kit ).
There`s libgtkxxxx, libgdk, and others along with libpango and libcairo.

Edited_times_total
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Wed 02 May 2012, 14:51    Post_subject:  

I looked in /usr/share/icons/hicolor and both files are there!
index.theme and icon-theme.cache
So now I`m really puzzled about why your command is saying what it says.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
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.1126s ][ Queries: 12 (0.0113s) ][ GZIP on ]