Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Programming & Scripting
Reload this Page [SOLVED] How do I make a gtk2 application swallowable?
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Programming & Scripting C, Perl, PHP, Bash Scripts, anything programming or script related post in here!

Closed Thread
 
Thread Tools Display Modes
Old 07-05-2008   #1 (permalink)
Linux User
 
hazel's Avatar
 
Join Date: May 2004
Location: Harrow, UK
Posts: 280
[SOLVED] How do I make a gtk2 application swallowable?

What makes an application swallowable/dockable so that it can go in a window manger's dock (e.g. in the fluxbox slit)?

I've tried using an undecorated window but that doesn't seem to do the trick.
__________________
"I'm just a little old lady; don't try to dazzle me with jargon!"
hazel is offline  
Old 07-05-2008   #2 (permalink)
Bigtomrodinator
 
bigtomrodney's Avatar
 
Join Date: Nov 2004
Location: Sunny South-East of Ireland
Posts: 5,194
I think in the case of Gnome you can link to a library called libpanel-applet

http://developer.gnome.org/doc/tutor...let/index.html

How's Barbarella coming along?
__________________
Registered Linux user #378740
New members read here / Forum Rules
#linuxforums on irc.freenode.net
bigtomrodney is offline  
Old 07-06-2008   #3 (permalink)
Linux User
 
hazel's Avatar
 
Join Date: May 2004
Location: Harrow, UK
Posts: 280
Quote:
Originally Posted by bigtomrodney View Post
I think in the case of Gnome you can link to a library called libpanel-applet

http://developer.gnome.org/doc/tutor...let/index.html
This is actually something I'm trying to add to Barbarella - an option to make it swallowable. But I don't want to use anything that belongs to Gnome because I want Barbarella to be independent of its environment. Actually I've just found a gtk/gdk window hint called GDK_WINDOW_TYPE_HINT_DOCK that I hope will make a window "dockable" when set.
Quote:
How's Barbarella coming along?
The beta version is up on Sourceforge now and I've put something on Freshmeat too, but no feedback as yet.
__________________
"I'm just a little old lady; don't try to dazzle me with jargon!"
hazel is offline  
Old 07-06-2008   #4 (permalink)
Bigtomrodinator
 
bigtomrodney's Avatar
 
Join Date: Nov 2004
Location: Sunny South-East of Ireland
Posts: 5,194
I'll go get it now
__________________
Registered Linux user #378740
New members read here / Forum Rules
#linuxforums on irc.freenode.net
bigtomrodney is offline  
Old 07-06-2008   #5 (permalink)
Bigtomrodinator
 
bigtomrodney's Avatar
 
Join Date: Nov 2004
Location: Sunny South-East of Ireland
Posts: 5,194
Downloaded that latest version. It build perfectly and installs. I'm running it now with my own icons and it seems great. It's very fast loading and running. Only one thing. It's not a bug but I thought I'd mention it; it reports its version as 1.0. Just wanted to say it in case
__________________
Registered Linux user #378740
New members read here / Forum Rules
#linuxforums on irc.freenode.net
bigtomrodney is offline  
Old 07-07-2008   #6 (permalink)
Linux User
 
hazel's Avatar
 
Join Date: May 2004
Location: Harrow, UK
Posts: 280
Quote:
Originally Posted by bigtomrodney View Post
Downloaded that latest version. It build perfectly and installs. I'm running it now with my own icons and it seems great. It's very fast loading and running. Only one thing. It's not a bug but I thought I'd mention it; it reports its version as 1.0. Just wanted to say it in case
You'd better explain to me the conventions for version numbers. Remember, this is the first official public program I've ever written (though I've got two other projects half done). Does counting normally start at 1 or 0?

By the way, I tried setting that window type hint that I mentioned in my previous post: still no joy. I think perhaps I should post to the fluxbox application developers list; someone there can probably tell me off the top of his head how it's done.
__________________
"I'm just a little old lady; don't try to dazzle me with jargon!"
hazel is offline  
Old 07-12-2008   #7 (permalink)
Linux User
 
hazel's Avatar
 
Join Date: May 2004
Location: Harrow, UK
Posts: 280
Well, I posted this problem to the gtk-app-developers mailing list and a very nice man replied within 5 minutes with some code that he'd written for a swallowable clock applet. I had to tweak it a bit to get it to compile with my versions of the libraries but then it ran perfectly; it wasn't too difficult to transfer the necessary bits and pieces to my program.

Basically you use low-level Xlib functions to create an empty window of the right size in the dock (Xlib is much more explicit than gtk in giving orders to window managers) and make the top-level widget of your application a gtk plug rather than a gtk window. Then you use another bit of Xlib code to plug it into the dock window that you have made.

What a lovely community this is. Everybody helps his neighbour; it's like the Christian Church ought to be but isn't.
__________________
"I'm just a little old lady; don't try to dazzle me with jargon!"
hazel is offline  
Closed Thread



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 02:38 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0