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 Tue 21 Oct 2014, 18:25
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 Posts_count  
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: 887

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: 3380
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: 4353

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:   Sort by:   
Page 1 of 1 Posts_count  
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.0619s ][ Queries: 12 (0.0050s) ][ GZIP on ]