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 Wed 01 Oct 2014, 08:15
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
gtk2desklet 3.1
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 4 of 5 [70 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
Argolance


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

PostPosted: Mon 23 Apr 2012, 06:44    Post subject:  

Hello,
Example:
Quote:
#!/bin/sh

export test="
<window>
<button image-position=\"2\" can-focus=\"no\" relief=\"2\">
<input file>/usr/local/lib/X11/pixmaps/home48.png</input>
<label>Filer</label>
<action>rox &</action>
</button>
</window>
"
gtkdialog --program=test --gtk-module=gtk2desklet --center

Console:
Quote:
(gtkdialog:1301): Gtk-CRITICAL **: IA__gtk_widget_set_default_colormap: assertion `GDK_IS_COLORMAP (colormap)' failed


Please, what's wrong in this test script?

EDIT
While testing (Racy 5.3), I noticed:
    - my wm is jwm and the script above finally works only after restarting jwm!
    - when translucency effects activated (kcompmgr), taskbar disappears and system freezes => restart X

Cordialement.

_________________


Last edited by Argolance on Mon 23 Apr 2012, 09:27; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Mon 23 Apr 2012, 07:44    Post subject:  

Dear Argolance,

Your script works with ICEWM except that it is always on top....

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


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

PostPosted: Mon 23 Apr 2012, 09:32    Post subject:  

Argolance,

The script works fine after I changed rox to Thunar in Saluki xfce with true transparency, no errors when run from the terminal.

I'm sure this is what it should look like.

Geoffrey
Screenshot-2.png
 Description   
 Filesize   28.83 KB
 Viewed   961 Time(s)

Screenshot-2.png

Screenshot.png
 Description   
 Filesize   24.51 KB
 Viewed   968 Time(s)

Screenshot.png

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


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

PostPosted: Mon 23 Apr 2012, 13:51    Post subject:  

Hello,
Thank you for testing/replying...
This is exactly what I was expecting for!
But my final script (build on the test script model above) has necessarily to work with jwm and x/kcompmgr... Crying or Very sad
This unfortunately seems not to be possible?

Cordialement.

_________________

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

Joined: 25 Aug 2010
Posts: 232
Location: ISM Dhanbad, Jharkhand, India

PostPosted: Mon 02 Jul 2012, 14:54    Post subject:  

Upgraded to version 3.1

Changelog:

  • Window searching code replaced by a crazy hack in GObject class structure.
  • Fixed broken compatibility with jwm
Back to top
View user's profile Send private message 
brokenman

Joined: 20 Oct 2011
Posts: 25

PostPosted: Sat 21 Jul 2012, 17:11    Post subject:  

Is it possible to get the transparency even during the mouseover?
Back to top
View user's profile Send private message 
akash_rawal

Joined: 25 Aug 2010
Posts: 232
Location: ISM Dhanbad, Jharkhand, India

PostPosted: Sun 22 Jul 2012, 05:57    Post subject:  

brokenman wrote:
Is it possible to get the transparency even during the mouseover?

It's possible, but you have to do extra hardwork of writing gtkrc files and use them using DESKLET_GTKRC_FILES environment variable.
Quote:

DESKLET_GTKRC_FILES

    This variable can contain extra GTK resource files (many people call these
    theme files) without affecting any subprocesses. File names are separated
    by a pipe character '|'.



The trick is to use transparent images as widget background.
Back to top
View user's profile Send private message 
Argolance


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

PostPosted: Sun 22 Jul 2012, 06:15    Post subject:  

Hello,
Great!
Quote:
- my wm is jwm and the script above finally works only after restarting jwm!
- when translucency effects activated (kcompmgr), taskbar disappears and system freezes => restart X

Now, this works without restarting jwm and system doesn't freeze anymore: scripts windows are just not displayed at all till translucency/shadow effects are deactivated.

I well understand that window full transparency cannot be "married" with translucency and shadow effects but perhaps this could be by-passed this way:
Create a little script called "gtk2desklet" and rename the original into gtkdesklet_ for example. gtk2desklet looks if x/kcompmgr is currently running or not, then calls gtkdesklet_ or not according to the result?

Don't know if this could work and be useful?

Cordialement.

_________________


Last edited by Argolance on Sun 22 Jul 2012, 06:59; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
Argolance


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

PostPosted: Sun 22 Jul 2012, 06:58    Post subject:  

Hello,
Quote:
I well understand that window full transparency cannot be "married" with translucency and shadow effects but perhaps this could be by-passed this way:
Create a little script called "gtk2desklet" and rename the original into gtkdesklet_ for example. gtk2desklet looks if x/kcompmgr is currently running or not, then calls gtkdesklet_ or not according to the result?

I guess I didn't well understand Embarassed ... Things are much more complex: gtk2desklet works even when x/kcompmgr is running but scripts window disappear as soon as a new window (application or rox filer window) is opened... on the same virtual desk... This doesn't happen if script is launched on an other empty one.
I was wondering if gtk2desklet could not get extra options (gtk2desklet -option) that could let user choose if script is visible or not inside the taskbar, if it is displayed at the top or bottom level of the screen and on all virtual desktops or not. So, your application could perhaps be used for something else than "desklets" too? I think for example of splash windows for applications, progress bars and so on...

Cordialement.

_________________

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

Joined: 25 Aug 2010
Posts: 232
Location: ISM Dhanbad, Jharkhand, India

PostPosted: Sun 22 Jul 2012, 13:17    Post subject:  

Maybe it will work with xcompmgr if you force use of pseudotransparency with xcompmgr by exporting variable DISABLE_RGBA_TRANS something like this:
Code:

export DISABLE_RGBA_TRANS="1"
gtkdialog --program=test --gtk-module=gtk2desklet --center


With jwm you should ensure that rox-filer options > compatibility > Override window manager control of pinboard and panel is enabled.
Back to top
View user's profile Send private message 
brokenman

Joined: 20 Oct 2011
Posts: 25

PostPosted: Mon 23 Jul 2012, 08:45    Post subject:  

Thanks. Looks like i was on the right track with a gtkrc file ... however i wasn't aware of the gtk2desklet variable. Will plug away at it.
Back to top
View user's profile Send private message 
brokenman

Joined: 20 Oct 2011
Posts: 25

PostPosted: Tue 24 Jul 2012, 21:49    Post subject:  

Ok maybe i'm missing something or my mother dropped me on my head when i was little.

I managed to get gtk2desklet to use a gtkrc file by exporting the environment variable DESKLET_GTKRC_FILES. The following is the only combination of launching the app that worked and used the gtkrc file.

gtkdialog -p MAIN_SCREEN -c --gtk-module=gtk2desklet

Using gtkdialog-desklet -p MAINSCREEN --gtkrc-file=./gtkrc launched the app without error but did not honour the gtkrc file.

The problem is it won't use an image for the button background in the NORMAL or PRELIGHT state. It doesn't matter if the bg_pixmap file is transparent or not. Here is my gtkrc file.

Code:
pixmap_path "/mnt/sda7/sandpit/gtkapps"
style "rescue_button" = "fedora-wider"
{
   #bg[NORMAL]   =  shade (1.02,@bg_color)
    #bg[ACTIVE]   =  shade (0.85,@bg_color)
   #bg[PRELIGHT] ="./transparent.png"
   bg[PRELIGHT] =  mix(1.90, shade (1.35,@bg_color), @selected_bg_color)
   #bg_pixmap[NORMAL] = "bg.png"
}
widget_class "*GtkButton*" style "rescue_button"


The PRELIGHT shading line works fine. The bg_pixmap does not. Anyone have any ideas why this won't work?

EDIT: I should note that bg_pixmap[PRELIGHT] = "bg.png" also does not work for me.
Back to top
View user's profile Send private message 
akash_rawal

Joined: 25 Aug 2010
Posts: 232
Location: ISM Dhanbad, Jharkhand, India

PostPosted: Wed 25 Jul 2012, 11:11    Post subject:  

You can use pixmap engine.
trans-buttons.tar.gz
Description  An example
gz

 Download 
Filename  trans-buttons.tar.gz 
Filesize  1.29 KB 
Downloaded  433 Time(s) 
Back to top
View user's profile Send private message 
brokenman

Joined: 20 Oct 2011
Posts: 25

PostPosted: Wed 25 Jul 2012, 14:12    Post subject:  

Thanks. This works for me.
Back to top
View user's profile Send private message 
recobayu


Joined: 15 Sep 2010
Posts: 112
Location: indonesia

PostPosted: Sun 25 Aug 2013, 12:25    Post subject:  

Hi Akash, thank you for your gtk2desklet. I make a start metro like wdz8 and I use your gtk2desklet.
You can see the screenshot at here:
http://dl.dropboxusercontent.com/s/g38l401kfu05ltp/mukstart.png
and the script is in here:
http://murga-linux.com/puppy/viewtopic.php?p=721062#721062
I want to ask a question.
1. Can gtk2desklet do the transparent in vbox when i use scrollable="true"? how?
2. Can gtk2desklet do the blur transparent? so it's like unity in ubuntu.
Thank you.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 4 of 5 [70 Posts]   Goto page: Previous 1, 2, 3, 4, 5 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.0935s ][ Queries: 13 (0.0118s) ][ GZIP on ]