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 Sun 21 Sep 2014, 06:22
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
GtkDialog3 questions
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
kkevnob

Joined: 31 Jan 2010
Posts: 10

PostPosted: Thu 18 Mar 2010, 15:09    Post subject:  GtkDialog3 questions  

I need help.
How do I make an undecorated window with gtkdialog?
Is there any way of making the gtkdialog window appearing where the mouse is?
I thought about a program that tells you where the pointer is and giving gtkdialog that position.
Another thing:
Can I put icons in a table? like in trees
thanks and sorry about my bad english
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Thu 18 Mar 2010, 16:53    Post subject: Re: GtkDialog3 questions  

kkevnob wrote:
I need help.
How do I make an undecorated window with gtkdialog?

Put
Code:
decorated="false"
in the window tag

Is there any way of making the gtkdialog window appearing where the mouse is?
I thought about a program that tells you where the pointer is and giving gtkdialog that position.

You can use the command "getcurpos" and assign the X Y position to the "Geometry" variables


Another thing:
Can I put icons in a table? like in trees

Yes, see the Gtk examples and lots more info in the "Gtk tips" section and other posts with gtkdialog in the heading

thanks and sorry about my bad english


Cheers,
s
[EDIT: sorry - not sure about Tables and icons]
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Thu 18 Mar 2010, 18:10    Post subject:  

If you have not installed devx for your version of Puppy, do so.
Then navigate to /usr/share/doc/gtgdialog3/examples.
There you will find a lot of example programs including a table type on gtk-icons.
Back to top
View user's profile Send private message 
kkevnob

Joined: 31 Jan 2010
Posts: 10

PostPosted: Thu 18 Mar 2010, 19:55    Post subject:  

Thanks!
I don't know yet if the tables support icons. If I know I'll edit this post Wink

file:///root/MSG
Code:

#!/bin/bash
MSG=`expr GtkDialog + Bash`
echo $MSG
exit 0


Term
Code:

$: ./MSG
Wonderfull tiny programs
$:


jejeje
Back to top
View user's profile Send private message 
potong

Joined: 06 Mar 2009
Posts: 88

PostPosted: Thu 18 Mar 2010, 20:02    Post subject:  

kkevnob wrote:
Quote:
Is there any way of making the gtkdialog window appearing where the mouse is?

Yes, again its an attribute tag for the windows directive:
Code:
<window window-position="2">

Here is the url to study http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--window-position if you follow GtkWindowPosition
it will take you to "enum GtkWindowPosition".
Code:
typedef enum
{
  GTK_WIN_POS_NONE,
  GTK_WIN_POS_CENTER,
  GTK_WIN_POS_MOUSE,
  GTK_WIN_POS_CENTER_ALWAYS,
  GTK_WIN_POS_CENTER_ON_PARENT
} GtkWindowPosition;

Window placement can be influenced using this enumeration. Note that using GTK_WIN_POS_CENTER_ALWAYS is almost always a bad idea. It won't necessarily work well with all window managers or on all windowing systems.

GTK_WIN_POS_NONE
   No influence is made on placement.

GTK_WIN_POS_CENTER
   Windows should be placed in the center of the screen.

GTK_WIN_POS_MOUSE
   Windows should be placed at the current mouse position.

GTK_WIN_POS_CENTER_ALWAYS
   Keep window centered as it changes size, etc.

GTK_WIN_POS_CENTER_ON_PARENT
   Center the window on its transient parent (see gtk_window_set_transient_for()).

Any enum can be replaced by an integer number (starting from zero) in the attribute tag
So an alternative way to center the window (gtkdialog3 -c) is to use
Code:
<window window-position="1">

HTH

Potong
Back to top
View user's profile Send private message 
kkevnob

Joined: 31 Jan 2010
Posts: 10

PostPosted: Thu 18 Mar 2010, 20:13    Post subject:  

Thanks once again
I'm making an standalone app menu.
I've almost done it.
I started it two days ago Very Happy
Now it shows all the apps subdivided in categories.
One of the problems I've is that tree is not as fast as table.
But I still don't know how to put icons on it Confused
Also not all icons are shown.
It only recognizes the icons that are in the current gtk icon theme.
If you know a way of choosing diferents icons (for ex. from a file that is in /usr/share/pixmaps) from a list that is getted from an <input> tag, please tell me.
Anyway, thanks for your answers Very Happy
Back to top
View user's profile Send private message 
kkevnob

Joined: 31 Jan 2010
Posts: 10

PostPosted: Thu 18 Mar 2010, 20:15    Post subject:  

Oh I almost forgott
How can I make the window dissapear if it loses focus?
I'm reading something about "gtk_window_get_focus ()"
but I don't know how to call gtk functions from gtkdialog + bash.. is it posible?
Thanks,
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4351

PostPosted: Tue 06 Apr 2010, 16:20    Post subject:  

almost all of your questions are answered here: http://www.murga-linux.com/puppy/viewtopic.php?t=38608

there is also gtk-server if you prefer

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0647s ][ Queries: 11 (0.0048s) ][ GZIP on ]