GtkDialog3 questions

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
kkevnob
Posts: 10
Joined: Sun 31 Jan 2010, 20:24

GtkDialog3 questions

#1 Post by kkevnob »

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

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

Re: GtkDialog3 questions

#2 Post by seaside »

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

Put

Code: Select all

decorated="false" 
in the window tag [/b]

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]

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#3 Post by 8-bit »

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.

kkevnob
Posts: 10
Joined: Sun 31 Jan 2010, 20:24

#4 Post by kkevnob »

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

file:///root/MSG

Code: Select all

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

Code: Select all

$: ./MSG
Wonderfull tiny programs
$:
jejeje

potong
Posts: 88
Joined: Fri 06 Mar 2009, 04:01

#5 Post by potong »

kkevnob wrote:
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: Select all

<window window-position="2">
Here is the url to study http://library.gnome.org/devel/gtk/stab ... w-position if you follow GtkWindowPosition
it will take you to "enum GtkWindowPosition".

Code: Select all

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: Select all

<window window-position="1">
HTH

Potong

kkevnob
Posts: 10
Joined: Sun 31 Jan 2010, 20:24

#6 Post by kkevnob »

Thanks once again
I'm making an standalone app menu.
I've almost done it.
I started it two days ago :D
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 :?
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 :D

kkevnob
Posts: 10
Joined: Sun 31 Jan 2010, 20:24

#7 Post by kkevnob »

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,

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#8 Post by technosaurus »

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
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply