Re: whats the purpose of quark

2008-01-23 Thread Binary Chen
在 2008-01-23三的 22:09 -0500,Matthias Clasen写道: > On Jan 23, 2008 9:54 PM, Bin Chen <[EMAIL PROTECTED]> wrote: > > Hi, > > > > In glib there is a primitive named quark, it relates a ID with a > > string, but whats the advantage for this? Can we use a string instead, > > just to save some bytes for du

gtk im switch

2008-01-02 Thread Binary Chen
Hi, I have a GTK IM input method, the regular way to use it is right-click the text window, and select the input method. But if there is anyway other than this to select the desired GTK input method? I mean can I use a hot-key to activate the desired IM module? I can change the code to apply the

Re: Can I make a not aligned gtk treeview?

2007-12-17 Thread Binary Chen
Hi Michael, Finally I solved the problem by this way! Thanks. Bin On Mon, 2007-12-17 at 11:44 +0100, Mikael Hallendal wrote: > 17 dec 2007 kl. 08.29 skrev Binary Chen: > > Hi, > > A TreeView will always align the columns. However, to achieve the > behavior you look for you

Can I make a not aligned gtk treeview?

2007-12-16 Thread Binary Chen
Hi, I have a gtktreeview with two column, the first one is pixbuf, the second one is a string. something happen bad if in a row the first pixbuf is NULL, so it doesn't occupy any place, but in the following row there is a pixbuf and occupy some place. the default behavior of gtktreeview will align

make a window without the title bar

2007-12-14 Thread Binary Chen
I know it is a feature of window manager, but is there any portable way in GTK+ to do this? Thanks. Bin ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

can GtkWindow be a child of another GtkWindow?

2007-12-13 Thread Binary Chen
Hi, I have a GtkWindow with type GTK_WINDOW_POPUP, I want it to be a child of a GtkWindow, the effect will be the pop up window can only move within the scope of the parent window. And if I invoke the position function for the popup window, the coordinat parameters is relative to the parent window

GTK button doesn't send signal repeatedly

2007-12-12 Thread Binary Chen
Hi, When I keep presssing the button, it doesn't emit the signal repeatedly as time goes, it only emit one. How can I enable it to send the signal repeatedly in a specified interval? Thanks. Bin ___ gtk-app-devel-list mailing list gtk-app-devel-list@gn

take a snapshot of a window

2007-12-09 Thread Binary Chen
Hi, I just want to develop a feature to take a snapshot of a gtk widget, is it easy to do? It should be saved into a pixbuf. Thanks. Bin ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-dev

Re: I can't understand the difference output of only a line differ

2007-12-06 Thread Binary Chen
On Thu, 2007-12-06 at 13:59 +, Emmanuele Bassi wrote: > again: no need to reply to me directly. > > On Thu, 2007-12-06 at 20:29 +0800, Binary Chen wrote: > > > > > > what's happening is that you are blocking the main loop from ever > > > runni

Re: I can't understand the difference output of only a line differ

2007-12-06 Thread Binary Chen
On Thu, 2007-12-06 at 11:53 +, Emmanuele Bassi wrote: > On Thu, 2007-12-06 at 19:40 +0800, Binary Chen wrote: > > > > > gdk_draw_image() forces a flush. but that is not the problem: you should > > > never use a while() loop inside a GTK+ application, becaus

Re: I can't understand the difference output of only a line differ

2007-12-06 Thread Binary Chen
On Thu, 2007-12-06 at 11:33 +, Emmanuele Bassi wrote: > there's no need to reply to me: I'm subscribe to the list, so reply > there. > > On Thu, 2007-12-06 at 18:54 +0800, Binary Chen wrote: > > On Thu, 2007-12-06 at 10:41 +, Emmanuele Bassi wrote: > > &

Re: I can't understand the difference output of only a line differ

2007-12-06 Thread Binary Chen
On Thu, 2007-12-06 at 06:01 -0500, Behdad Esfahbod wrote: > On Thu, 2007-12-06 at 18:54 +0800, Binary Chen wrote: > > > > But without the sleep() I will also not reach gtk_main(), but the > > window shows, why? What I am asking is this. > > I'm guessing that

Re: I can't understand the difference output of only a line differ

2007-12-06 Thread Binary Chen
On Thu, 2007-12-06 at 10:41 +, Emmanuele Bassi wrote: > On Thu, 2007-12-06 at 17:40 +0800, Binary Chen wrote: > > > while (1) { > > sleep(1); > > gdk_draw_image(drawing->window, gc, img, 0, 0, 0, 0, 200, 200); > > } > &

Can gdk image attach to a window?

2007-12-06 Thread Binary Chen
Hi, I am writing a video player using a commercial codec library. The library will callback my function when one frame of video has been decoded. The decoded frame is placed in a memory which is set by me. And the callback is started in another thead different from main thread. I know xlib has bi

I can't understand the difference output of only a line differ

2007-12-06 Thread Binary Chen
Hi, I tried gdk_draw_image with a small program, but the behavior is very confusing, please help me find out whats happening. With the sleep(1) the program shows nothing, but without it the window will show, why? Thanks. Bin #include main(int argc, char **argv) { int ret; gtk

Re: write a media player using gtk+

2007-12-02 Thread Binary Chen
On Sun, 2007-12-02 at 09:45 +, [EMAIL PROTECTED] wrote: > On Dec 2, 2007 3:51 AM, Binary Chen <[EMAIL PROTECTED]> wrote: > > Do you know how you get the video memory address of the gdk drawable? I > > want to use memcpy to do the copying, because the gdk-draw-rgb-image

Re: write a media player using gtk+

2007-12-01 Thread Binary Chen
On Fri, 2007-11-30 at 11:31 +, [EMAIL PROTECTED] wrote: > On Nov 30, 2007 2:45 AM, Bin Chen <[EMAIL PROTECTED]> wrote: > > image, but I am not familiar with XLib, so I want to know if it is > > possible to use pure GTK+ API to achieve this? What about the > > performance comparing to use XLib d

Re: write a media player using gtk+

2007-12-01 Thread Binary Chen
On Fri, 2007-11-30 at 11:31 +, [EMAIL PROTECTED] wrote: > On Nov 30, 2007 2:45 AM, Bin Chen <[EMAIL PROTECTED]> wrote: > > image, but I am not familiar with XLib, so I want to know if it is > > possible to use pure GTK+ API to achieve this? What about the > > performance comparing to use XLib d

Re: Profiling GTK within an application

2007-10-29 Thread Binary Chen
On Sat, 2007-10-27 at 11:06 +0300, Stefan Kost wrote: > Chris Rorvick schrieb: > > I'm attempting to profile GTK in an application and I'm wondering what > > methodology others use to accomplish this. Is there any documentation > > that addresses this topic that I should refer to? Any caveats w

Re: Tooltips on GtkTreeView

2007-10-15 Thread Binary Chen
On Mon, 2007-10-15 at 09:08 -0600, Kevin DeKorte wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi All, > > Is there an easy way to set a tooltip on a GtkTreeView for the row that > the user is hovering their cursor over. It is not guaranteed that the > row the user is over is the s

GTK+ window startup notification

2007-10-15 Thread Binary Chen
Hi, I know in X there is a machnism called startup notification, one "launcher" can listen to the various windowing message to draw a task list window accordingly. But I now use GTK+ on a different backend(directfb) which seems no startup notification implemented, so I seek if the GTK+ has built

Re: Add a Scrollbar

2007-10-12 Thread Binary Chen
You can simple make a vbox and then add the vbox to the tab's window, then reparent all the frames to vbox. On Thu, 2007-10-04 at 18:24 +0200, [EMAIL PROTECTED] wrote: > A simple question: > what is the best way to add a vertical scrollbar to a widget? > In my case the widget is a notebook tab con

gtkfb

2007-09-23 Thread Binary Chen
Hi, Is gtkfb still developed? I want to use it instead of directfb, is this idea viable? And is there any window manager based on gtkfb? Thanks. Bin ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinf

Change the mouse pointer to sandglass

2007-09-20 Thread Binary Chen
Hi, I want change to mouse pointer to sandglass to indicate the system is busy, how can i do it? Thanks. Bin ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Gobject constructor question

2007-09-04 Thread Binary Chen
Hi, I have a doubt of GObject's constructor machnism, do i need to explicit to invoke the parent's constructor in a chiild constructor? Thanks. Bin ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo

GTK treeview very slow?

2007-09-02 Thread Binary Chen
Hi, I am running GTK treeview in a slow machine, say, with a 200MHz CPU, I am using a treeview with about 20 nodes as total. When I scroll the treeview scroll bar, the image get to freeze for a while... I then try with a simpler table with 1 column, the speed is quite fast, I can aware the freeze

Re: pixbuf in event box in treeview

2007-08-30 Thread Binary Chen
On Thu, 2007-08-30 at 19:06 +0200, David Nečas (Yeti) wrote: > On Thu, Aug 30, 2007 at 09:59:33PM +0800, Binary Chen wrote: > > I want to put a event box in a treeview column, with a pixbuf in the > > event box, how to set the column render? > > Cell renderers are no

Re: pixbuf in event box in treeview

2007-08-30 Thread Binary Chen
On Thu, 2007-08-30 at 19:06 +0200, David Nečas (Yeti) wrote: > On Thu, Aug 30, 2007 at 09:59:33PM +0800, Binary Chen wrote: > > I want to put a event box in a treeview column, with a pixbuf in the > > event box, how to set the column render? > > Cell renderers are no

pixbuf in event box in treeview

2007-08-30 Thread Binary Chen
Hi, I want to put a event box in a treeview column, with a pixbuf in the event box, how to set the column render? I am confusing... Thanks. Bin ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk

Setting treeview column width

2007-08-29 Thread Binary Chen
Hi, With following code, I still can't make a fixed sized treeview column, the column's width is large even after I have set its size, whats wrong with it? Any other thing affect it? column = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(column, _("Name")); gt

Change double click activate to single click in treeview

2007-08-29 Thread Binary Chen
Hi, Currently treeview treat double-click mouse event as activation event for a row, I want to change it to single-click, how can I do this? Thanks. Bin ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/list