gtk_object_sink in glade_palette_init

2006-11-27 Thread Philippe Bertin
Hello,

This question could've gone to the glade list. But the explanation may 
help GTK programmers in general (I think), so I rather ask it here.

In glade_palette_init, there's this piece of code :

/* Add items tray (via a scrolled window) */
priv->tray = gtk_vbox_new (FALSE, 0);
g_object_ref (G_OBJECT (priv->tray));
gtk_object_sink (GTK_OBJECT (priv->tray));

What's the goal of this gtk_object_sink ? I thought that after 
glade_palette_init returns, the local references are gone ? Is there a 
subtlety I don't get ?

Kind regards,

PhB

P.S. Looking for the meaning of the gtk_object_sink call, at 
http://developer.gnome.org/doc/API/2.0/gtk/GtkObject.html#gtk-object-sink 
I see it's deprecated. g_object_ref_sink should be called instead 
(according to the gtk help) ?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


RE: Suppressing command window

2006-11-27 Thread Sai Korada
Thanks for your suggestions Jim,
  getenv(), putenv() are returning success as such. But when the application is 
being loaded immediately it will through gtk error, and closes the application. 
The same command, prepending  (./GTK/bin;) to the current path works fine and 
the application launches successfully.
 
I've never tried statically linking the application with GTK libraries and have 
to try it out.
 
It's true that Xilinx ISE tools use QT, our team is developing supporting 
applications for FPGAs. As each QT license costs a higher price, we had to 
choose other tools for Windows GUI development. And for everybodys surprise 
GTK+ came out to be a wonderful tool, though available for free of cost.
 
Thanks and Regards
Sai Laxmi
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Format text in columns

2006-11-27 Thread Donald Malcolm
I am populating a GtkListStore with text that has Pango attributes and
markup. I would like to position the text at given distances from the
left side, arranging it into columns. Is there a way to position the
text as a Pango Attribute? Can the position information be encoded into
each line of text in the GtkListStore?

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


RE: Suppressing command window

2006-11-27 Thread Sai Korada
Thank you very much Daniel, it worked. At the moment I've chosen the first 
option to demonstrate to the customer and later I'll try with other options 
too. Thanks a lot
 
Regards
Sai Laxmi
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


TOP_LEVEL_WINDOWS order of the window messager

2006-11-27 Thread sunzysjzri
hi, 
how to change the TOP_LEVEL_WINDOWS order of the windows manager?
I want reorder the windows stack of Xserver to reliase the function "window 
switch", i got the 
client list of window manager, but how to reorder it ?
send an event or use Xlibs API ? 
sun zhiyong
2006-11-28
[EMAIL PROTECTED]
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: GtkTreeView having nodes with underlined text

2006-11-27 Thread Gian Mario Tagliaretti
2006/11/23, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:

> Wow. Thanks, David, for your concise example.

and for the pythonists:
http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq13.047.htp

thanks David

cheers
-- 
Gian Mario Tagliaretti
http://www.parafernalia.org/pygtk/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


[ANNOUNCE] Browser search plugin for search GNOME developer documentation

2006-11-27 Thread jaap haitsma
Hi,

Often I'm searching on the developer.gnome.org site for API
description of a certain widget I want to use. So I made a search
plugin for it, which I thought people on this list might like. You can
install it from here if you like.

http://www.searchplugins.net/pluginlist.aspx?q=gnome&mode=title

Click on the "I" of I|S|R to install it.

Happy searching

Jaap
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: g_signal_connect_swapped

2006-11-27 Thread Philippe Bertin
Richard,

I'm also, as you are, a rather inexperienced GTK programmer, but I hope 
to still help you by the following, without immediately digging into all 
kinds of technical details :
whereever the _swapped variant is used, that is done to call a callback 
from within a widget, to a procedure that's applicable on another widget 
(or even, in most cases another widget class).

So e.g., a button press that should be calling some callback procedure 
on the window it is in, will use the _swapped variant (passing the 
window pointer as user_data argument). Doing so will make GTK's internal 
mechanics to "convert/abuse" that user_data argument's value, by putting 
it into the callback's call as it's *first* argument), so that the 
window's callback doesn't even realize it used to be the original 
widget's call's user_data argument).

Hope this helps you more than it eventually further confuses you,

Kind regards,

PhB

Richard Riley wrote:

>"Matt Hoosier" <[EMAIL PROTECTED]> writes:
>
>  
>
>>On 11/25/06, Richard <[EMAIL PROTECTED]> wrote:
>>
>>
>>>Could someone explain the reason for this function
>>>
>>>"g_signal_connect_swapped"
>>>
>>>I have read the manual here:
>>>
>>>http://www.gtk.org/tutorial/x159.html
>>>
>>>where it says:
>>>
>>>,
>>>| g_signal_connect_swapped() is the same as g_signal_connect() except that
>>>| the instance on which the signal is emitted and data will be swapped
>>>| when calling the handler. So when using this function to connect
>>>| signals, the callback should be of the form
>>>|
>>>|
>>>| void callback_func( gpointer   callback_data,
>>>| ... /* other signal arguments */
>>>| GtkWidget *widget);
>>>|
>>>| where the object is usually a widget.
>>>`
>>>
>>>Could anyone express this a little clearer? I (as a gtk beginner) can
>>>see no reason for it.
>>>  
>>>
>>This just means that the "widget" and "callback_data" pointers will be
>>pushed onto the call stack in the opposite order from their ordering
>>if hooked up with g_signal_connect(). If you're designing your own
>>callback function, this probably isn't useful; just use
>>g_signal_connnect() with a callback that has GObject* and gpointer
>>parameters [in that order].
>>
>>
>
>I can see the order has changed - it was the reason I was looking for. I
>don't currently see the point. Maybe it will become clearer as I learn
>more.
>___
>gtk-app-devel-list mailing list
>gtk-app-devel-list@gnome.org
>http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
>
>  
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Fullscreen window

2006-11-27 Thread Gabriele Greco
Gabriele Greco wrote:
> I'd like to open my application with the window "expanded", so that it 
> covers all the visible part of the desktop except the kde/gnome/windows 
> taskbar(s).
>
> There is a portable way to do this?
>
> gtk_window_fullscreen does something similar but "removes" both the 
> titlebar and the taskbar, at least on win32, on linux it doesn't do 
> nothing but this is maybe dued to the fact I'm using a remote display 
> for the application.
>   
Sorry gtk_window_maximize() :)

I've found it now, I don't know how I missed it while searching for it 
before posting :)

Bye,
 Gabry


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkTreeview

2006-11-27 Thread Andrea Zagli
Il giorno lun, 27/11/2006 alle 12.03 +0800, sunzysjzri ha scritto:
> a simple question, that which signal of GtkTreeView could i use to catch a 
> mouse clicked event?

the GtkTreeSelection's "changed" signal for a single click; the
GtkTreeView's "row-activated" for a double click
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Fullscreen window

2006-11-27 Thread Gabriele Greco
I'd like to open my application with the window "expanded", so that it 
covers all the visible part of the desktop except the kde/gnome/windows 
taskbar(s).

There is a portable way to do this?

gtk_window_fullscreen does something similar but "removes" both the 
titlebar and the taskbar, at least on win32, on linux it doesn't do 
nothing but this is maybe dued to the fact I'm using a remote display 
for the application.

Bye,
  Gabry

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Suppressing command window

2006-11-27 Thread Daniel Atallah
On 11/27/06, Sai Korada <[EMAIL PROTECTED]> wrote:
>  I've packaged the application along with the required GTK dlls in a zip
> file.
>
>  Created a batch file, which, appends the current gtk\bin path to local
> path and then launch the application.
>
> And the console window, which was opened by the batch file will be
> visible till closed explicitly.
>
> My requirement here is either I shall be in a position to set the path
> through program, hence avoid the .bat requirement or automatically close
> the console was the application is launched.

There are a number of ways to deal with this.

The easiest will be to have your batch file call `start /B
yourprogram.exe` after setting up the environment.  There will be a
console window opened when you launch the batch file and then
immediately closed.

Another relatively easy way is to use an Application Path and then you
can simply run your executable.
http://www.codeguru.com/Cpp/W-P/dll/article.php/c99

Another (probably more elegant) way of doing this is to have a
launcher application that sets up your environment and does any other
prep, then implicitly loads your application (using LoadLibraryEx)
(this is what gaim and GIMP do). See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/setdlldirectory.asp
for more info.

> I tried using getenv() and putenv(), but it is not working as expected.

If you're trying to do this in an executable that depends on GTK+,
then it is too late - unless all of the dependencies are satisfied the
application cannot be run.

-D
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: g_signal_connect_swapped

2006-11-27 Thread Michael 'Mickey' Lauer
Richard Riley wrote:
> "Matt Hoosier" <[EMAIL PROTECTED]> writes:

>> On 11/25/06, Richard <[EMAIL PROTECTED]> wrote:
>>>
>>> Could someone explain the reason for this function
>>>
>>> "g_signal_connect_swapped"
>>>
>>> I have read the manual here:
>>>
>>> http://www.gtk.org/tutorial/x159.html
>>>
>>> where it says:
>>>
>>> ,
>>> | g_signal_connect_swapped() is the same as g_signal_connect() except that
>>> | the instance on which the signal is emitted and data will be swapped
>>> | when calling the handler. So when using this function to connect
>>> | signals, the callback should be of the form
>>> |
>>> |
>>> | void callback_func( gpointer   callback_data,
>>> | ... /* other signal arguments */
>>> | GtkWidget *widget);
>>> |
>>> | where the object is usually a widget.
>>> `
>>>
>>> Could anyone express this a little clearer? I (as a gtk beginner) can
>>> see no reason for it.
>>
>> This just means that the "widget" and "callback_data" pointers will be
>> pushed onto the call stack in the opposite order from their ordering
>> if hooked up with g_signal_connect(). If you're designing your own
>> callback function, this probably isn't useful; just use
>> g_signal_connnect() with a callback that has GObject* and gpointer
>> parameters [in that order].

> I can see the order has changed - it was the reason I was looking for. I
> don't currently see the point. Maybe it will become clearer as I learn
> more.

The point is being able to connect a signal to a method that you
didn't write, but one that's already defined. If you wouldn't have
g_signal_connect_after you'd need to create methods that do nothing
but modify argument order.

-- 
Michael 'Mickey' Lauer | IT-Freelancer | http://www.vanille-media.de

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: g_signal_connect_swapped

2006-11-27 Thread Richard Riley
"Matt Hoosier" <[EMAIL PROTECTED]> writes:

> On 11/25/06, Richard <[EMAIL PROTECTED]> wrote:
>>
>> Could someone explain the reason for this function
>>
>> "g_signal_connect_swapped"
>>
>> I have read the manual here:
>>
>> http://www.gtk.org/tutorial/x159.html
>>
>> where it says:
>>
>> ,
>> | g_signal_connect_swapped() is the same as g_signal_connect() except that
>> | the instance on which the signal is emitted and data will be swapped
>> | when calling the handler. So when using this function to connect
>> | signals, the callback should be of the form
>> |
>> |
>> | void callback_func( gpointer   callback_data,
>> | ... /* other signal arguments */
>> | GtkWidget *widget);
>> |
>> | where the object is usually a widget.
>> `
>>
>> Could anyone express this a little clearer? I (as a gtk beginner) can
>> see no reason for it.
>
> This just means that the "widget" and "callback_data" pointers will be
> pushed onto the call stack in the opposite order from their ordering
> if hooked up with g_signal_connect(). If you're designing your own
> callback function, this probably isn't useful; just use
> g_signal_connnect() with a callback that has GObject* and gpointer
> parameters [in that order].

I can see the order has changed - it was the reason I was looking for. I
don't currently see the point. Maybe it will become clearer as I learn
more.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Suppressing command window

2006-11-27 Thread Jim George
> I tried using getenv() and putenv(), but it is not working as expected.
That would be the right way. Could you give some more details on why
it doesn't work? Or how it fails? Does setenv return -1? What is errno
set to?


> I've packaged the application along with the required GTK dlls in a zip file.
If this is the only reason you're setting the path, a better option
would be to statically link the app with GTK.


As an aside, I thought Xilinx ISE tools use QT, so why the interest in GTK?

-Jim
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


RE: Suppressing command window

2006-11-27 Thread Sai Korada
May be I was not clear in explaining my problem. I have used the
-mwindows, which essentially suppresses all the debugging info(may be my
printfs). But my requirement is different

 I've packaged the application along with the required GTK dlls in a zip
file.

 Created a batch file, which, appends the current gtk\bin path to local
path and then launch the application.

And the console window, which was opened by the batch file will be
visible till closed explicitly. 

My requirement here is either I shall be in a position to set the path
through program, hence avoid the .bat requirement or automatically close
the console was the application is launched.

I tried using getenv() and putenv(), but it is not working as expected.

What's the best way to distribute GTK+ application without batch file.

Thanks and Regards
Laxmi



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tor Lillqvist
Sent: Friday, November 24, 2006 5:57 PM
To: gtk-app-devel-list@gnome.org
Subject: Re: Suppressing command window

Sai Korada writes:
 > I'm developing an application with GTK+ and created a batch file to
set
 > the path, launch the application with command line arguments.

... presumably on Windows?

 > Even after launching the application the command window still
 > appears, which is by default. My requirement is, once the
 > application is launched, is there a way to suppress the command
 > window.

The correct term is console window.

Link the executable with the flag -mwindows (if using the GNU linker)
or /subsystem:windows (if using the Microsoft linker).

If you use the Microsoft linker this also means, I think, your app
should have a WinMain() instead of main().

(This is nothing GTK+-specific, but basic Windows programming stuff.)

--tml

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Libglade application distribution how-to?

2006-11-27 Thread cole-anstey

> - Although Glade can see and draw the pixmaps in "./pixmaps" 
> when I edit the interface files, I found out (after a project directory 
> change) that the pixmaps are not found in runtime. Maybe this is the 
> reason I get those "Failed to read a valid object file image from 
> memory" when running the app from GDB. How can one force libglade to 
> find these pixmaps?

I think the pixmaps need to be in the same directory as the .glade file at 
runtime.  By default the glade designer uses /pixmaps directory.  You can 
change this in the designer via Project->Options...->Pixmap Directory

-
Email sent from www.ntlworld.com
Virus-checked using McAfee(R) Software 
Visit www.ntlworld.com/security for more information

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


drag and drop target style

2006-11-27 Thread Ferenc Gerlits
Hi,

Is there a way of customizing the width and color of the drag and drop 
target marker in a Gtk::TreeView, without writing my own drag and drop 
functions?  I was looking for a style or property which does this, but I 
could not find one.

Ferenc
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Libglade application distribution how-to?

2006-11-27 Thread Fernando ApesteguĂ­a
On 11/27/06, Fabricio Rocha <[EMAIL PROTECTED]> wrote:
> Dearest ones,
>
>I have a working set of .C and .H source files for my
> application, a bunch of Glade files and their icons in a subdirectory
> called "pixmaps", and I can get all this stuff compiled and functional
> through Anjuta. Ok.
>
>But could you please point out a good tutorial of how to put all
> this stuff in a source tarball, so the application can be downloaded and
> tested by other people? I could not find anything like that with Google.

Anjuta generates tarball files for your sources. A good one, without
complications. Go to Build -> build tarball.

> I am sure I am NOT doing it right:
>
> - There is all that EXTREMELY complicated stuff of autoconf,
> automake, makefiles, etc., first of all. Can I presume that just putting
> my Anjuta-generated Makefiles along with the sources in the tarball will
> work? Or what exactly must be done?

No.

>
> - Although Glade can see and draw the pixmaps in "./pixmaps"
> when I edit the interface files, I found out (after a project directory
> change) that the pixmaps are not found in runtime. Maybe this is the
> reason I get those "Failed to read a valid object file image from
> memory" when running the app from GDB. How can one force libglade to
> find these pixmaps?

If you just use the tarball generated by Anjuta, the paths will be
properly configured (for example if you use the ./configure
--prefix=/mydirectory/myapplication)

>
>- I have been using the "config.h" macro PACKAGE_SRC_DIR in the
> sources for loading the Glade files, but what will happen if someone
> wants to build a, for example, Debian binary package with the software?
> I suppose there will be no "source directory" in this case, so what
> would be the correct way of coding this libglade stuff?
>
>
> Thank you all and best regards!
>
> Fabricio Rocha
> Brasilia, Brasil
> The RADiola Project - http://radiola.sourceforge.net
>
>
> ___
> Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. 
> Registre seu aparelho agora!
> http://br.mobile.yahoo.com/mailalertas/
>
>
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list