Re: Playing video from within my gtkmm app
On Mon, Sep 29, 2008 at 6:01 PM, Garth's KidStuff [EMAIL PROTECTED] wrote: Does anyone have a good place to learn how to incorporate playing video from within my application? I have a drawable area that I draw all my application stuff on and I'd like to play a .mov file in a subportion of that area. Maybe Kino sources? -- Colossus Xarchiver, a Linux GTK+2 only archive manager - http://xarchiver.xfce.org ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
shared memory queue
Hello. I have a problem that I need an GAsyncQueue shared among multiple processes. If I allocate a structure with shared memory and then allocate the GAsyncQueue with g_async_queue_new() to a structure member, is the queue shared or not? And if not, is there a way to do this? Greets, Luka ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: how to display busy cursor ? and another question
2008/10/4 Allin Cottrell [EMAIL PROTECTED]: Something like this, maybe: I do this with something very similar. In pseudo-code: set_up_my_application(): GdkCursor *busy_cursor = gdk_cursor_new(GDK_WATCH); long_action(): for all windows: gdk_window_set_cursor(GTK_WIDGET(window)-window, busy_cursor); gdk_flush(); do something that takes a while for all windows: gdk_window_set_cursor(GTK_WIDGET(window)-window, NULL); gdk_flush(); In other words, use flush() rather than display_sync() to get the cursor to update, since we can vaoid a round-trip, and make the cursor once when we set up the application and use it for all windows. John ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Stop text view to scroll on pageup/down
I've assigned a global meaning to the PageUp/Down keys in a application and I catch them with a key snooper. The keys are catched and the action performed, but if the window contains a textview also the textview contents are scrolled, so I tried to catch the keys in the textview, and then in the scrolledwindow but without results: g_signal_connect(sw, key-press-event, (GCallback)eat_pageupdown, NULL); g_signal_connect(tv, key-press-event, (GCallback)eat_pageupdown, NULL); g_signal_connect(sw, key-release-event, (GCallback)eat_pageupdown, NULL); g_signal_connect(tv, key-release-event, (GCallback)eat_pageupdown, NULL); Where eat_pageupdown is: gboolean eat_pageupdown(GtkWidget *widget, GdkEventKey *event, gpointer user_data) { return (event-keyval == GDK_Page_Up || event-keyval == GDK_Page_Down); } Obviously this doesn't work... So here is my question: what is the correct way to override the standard paging keys for a TextView? -- 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: shared memory queue
Oops first post missed the list... 2008/10/6 Luka Napotnik [EMAIL PROTECTED]: Hello. I have a problem that I need an GAsyncQueue shared among multiple processes. If I allocate a structure with shared memory and then allocate the GAsyncQueue with g_async_queue_new() to a structure member, is the queue shared or not? And if not, is there a way to do this? No. I guess it would be possible to design an IPC that had a similar api, but the root of the issue is that you need to use sockets/pipes to communicate between processes (while you might use a shared memory slab for the actual data, thats just a detail). BTW I think there is IPC in gnome, you might look into dbus, I'm not exactly sure what IPC is the one to use in gnome right now... Cheers, -Tristan ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
What strategy to use to deal with Glade-3's problem in removing pixbuf directory paths in .glade file!
Hi, I'm trying to find a way to deal with the problem with Glade-3 removing absolute or relative path from pixbuf property. That is, given a .glade file containing: widget class=GtkImage id=image property name=pixbufrelativepath/image.png/property /widget Glade-3 would remove the path and generate this instead: widget class=GtkImage id=image property name=pixbufimage.png/property /widget Isn't it that, in general, when dealing with XML, it is a good idea not to regenerating everything, but to keep all XML tags/blocks that the application/tool doesn't understand? This is desired! In this case, isn't it that Glade-3 shouldn't be discarding data (directory paths) when that relevant tags/blocks in the xml file aren't even modified? The ideal case aside, is there a strategy to deal with the current, following, situation? o Glade-3 insists on removing directory path from pixbufs. (Problem.) o libglade is capable of supporting .glade-file-relative path. (Good.) o gdk-pixbuf's gdk_pixbuf_new_from_file() requires absolute or relative paths without resource resolution based on any environment variables. So, application can't make libglade resolves resources by setting an environment variable. Note that if Glade-3 were to not discard relative paths from pixbuf in .glade file, libglade would have worked. I think one clumsy way I can deal with this is to create a script that post-process .glade file touched by Glade-3 to explicitly restore the pixbuf directory paths. Is there another better way to deal with this problem? Thanks. -- Daniel Yek. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: how to display busy cursor ? and another question
On Sun, 5 Oct 2008, Han wrote: Thanks Allin. I tried your example code and it somehow did not work for me, i.e. the cursor does not show watch. It can be tricky deciding which window(s) should display the watch cursor. See John Cupitt's suggestion. gdk_window_set_cursor(window, cursor); gdk_display_sync(display); gdk_cursor_unref(cursor); [Han] why do we call gdk_cursor_unref here ? Otherwise (as I understand it) we'll leak memory, since a local reference to the newly created cursor will be retained (preventing its being freed), and the relevant pointer will fall out of scope when the enclosing function returns. Allin Cottrell ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list