Re: Migrating away from GtkStock stuff

2019-02-07 Thread Gabriele Greco via gtk-app-devel-list
> > >> If you're using `edit-find` or `document-save` then you're using a named > icon from the icon theme, not the stock identifier. > > For those, you'll have to ship an icon theme like Adwaita. > That's really strange, it seems there is something in my gtk stack that converts GTK_STOCK_XXX to

Migrating away from GtkStock stuff

2019-02-07 Thread Gabriele Greco via gtk-app-devel-list
Hi guys, I'm in the process of migrating a big code base from GTK 2.x to GTK 3.x, I've done most of the work, but I'm facing now some problems with GTK stock stuff. I used stock stuff a lot to reduce the localizable strings needed in my code and to reduce the number of images to ship. From what

GUI size and translations

2017-04-26 Thread Gabriele Greco
I've recently received the localization strings for my application in a few languages and I've found that few translations keep the gui minimum size larger that the screen of many notebook (my target is to make it fit 1280 pixels). I've not found an easy way to understand what string is causing

Re: Input event reduction

2017-03-30 Thread Gabriele Greco
> > > Thanks. While I can remember have read your explanations somewhere > already, I really missed that g_main_context_invoke() function. There is some difference/advantage on calling: g_main_context_invoke(NULL, func, data)? instead of g_idle_add(func, data); As far as I can see from the

Re: gdk_threads_leave is possible to cause segmentation fault?

2017-03-28 Thread Gabriele Greco
> But now this functions aren't running. This is my main thread > void *vGtkMain_Thread(gpointer data) > { > gdk_threads_enter(); > gtk_main(); > gdk_threads_leave(); > return NULL; > } > You should remove everywhere in your code gtk_threads_ calls. You cannot call

Re: gdk_threads_leave is possible to cause segmentation fault?

2017-03-28 Thread Gabriele Greco
> > > In gdk manual i see thath gdk_threads_enter and leave has been > deprecated and alll gdk and gtk+ calls should be made from main thread. > How we do this? Someone have any example? > > You have to call g_idle_add (that is thread safe) every time you need to update one or more widgets from an

Re: Fwd: Resize and place a background image (Expose Event)

2017-03-02 Thread Gabriele Greco
> > > Now, application crash after start, but i think that is because i make > the unref of pixbuf, and in next expose event, fails (i think)... > > GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion 'GDK_IS_PIXBUF > (src)' failed This happens because your original "pixbuf" is a global

Fwd: Resize and place a background image (Expose Event)

2017-03-02 Thread Gabriele Greco
> > This works, but application blocks after a while.. > I'm quite sure the problem is that you are leaking at least 2 pixbuf and a pixmap for every expose event your app receives, and anyway, are you sure you have to do it every time an expose event is thrown and not only when the window is

Re: how shoul I solve error "The Procedure entry Point deflateSetHeader could not be located in the Dynamic link: ...\gtk3.6.4\bin\libgio-2.0-0.dll"

2017-01-12 Thread Gabriele Greco
> > > > "The Procedure entry Point deflateSetHeader could not be located in the > Dynamic link: > ...\gtk3.6.4\bin\libgio-2.0-0.dll". > > You miss libz dll, I find useful to build win32 environment to use "depends.exe" (http://www.dependencywalker.com/) to find similar problems. Please note that

GTK+ 2 and prelight

2016-11-15 Thread Gabriele Greco
... still trying to build from a graphics designer mockup :) There is a way to override the .gtkrc-2.0 file to avoid button prelight state? I want the some widgets (mostly toggle buttons) to keep their actual state (normal or active) also if the cursor is on them. It's a functional behaviour,

GtkEntry placeholder in GTK2

2016-11-14 Thread Gabriele Greco
Hello, I know GTK 3.2+ has a nice gtk_entry_set_placeholder_text() method, but I'm wondering if there is some clever method to do something similar with GTK2, I've not found anything googling around, but placeholder texts are a so common interface concept today that I doubt that someone has not

Re: final gtk+maverick battles

2014-02-14 Thread Gabriele Greco
barely compiled gcc 4.8.2 (make install first failed, then, after ldconfig, it succeeded) The upgraded gcc doesn't seem to have an effect on my gtk+ woes. (!) :-(( (unless make is still using the old gcc, but I don't see an indication of that) Same /bin/sh: --: invalid option error

Re: ScrolledWindow, DrawingArea, and setting step-increment

2013-11-13 Thread Gabriele Greco
Hmm. I used to have something using that, in one of the early tests, but there was either a critical performance problem, or something I couldn't do with it. Can that handle mark-and-copy, clickable URLs, and so on? Or possibly it's that you say thousands there; to me, thousands of lines is

Re: ScrolledWindow, DrawingArea, and setting step-increment

2013-11-12 Thread Gabriele Greco
I'm developing a MUD client in Pike, using GTK2 for the UI, and there's an aspect of scrolling that's bugging me. The display uses discrete lines of text of a fixed height (or, to be more technically accurate, a fixed distance from the start of one line to the start of the next), and I'd

GTK2 + SDL2 (partial fail)

2012-12-13 Thread Gabriele Greco
I've a SDL that on linux uses a gtk2 file chooser, I've just migrated it to SDL2 and I'm finding a strange problem connected with the initialization order of the two libraries: SDL_Init - gtk_init - OK gtk_init - SDL_Init - CRASH Here is a simple program that trigger this behaviour: #include

Re: Re: DLL Hell on Windows..

2012-08-06 Thread Gabriele Greco
I have wondered why we use dlls on windows, we should link statically to the libraries. I think the main reason is to make easier for app developer to be LGPL compliant. -- Ing. Gabriele Greco, DARTS Engineering Tel: +39-0100980150 Fax: +39-0100980184 s-mail: Piazza Della Vittoria 9/3

Re: need help with final callback

2012-07-19 Thread Gabriele Greco
Guys, I need your help with the last piece of my voice-by-computer program. the appended section compiles to the binary xD that lets the user choose the gender, word-per-minute speed, delay-between-words, and pitch of th e voice. Without this 'option'

Re: GTK 2.24.10 memory leak on win32?

2012-07-03 Thread Gabriele Greco
with 2.16.6 (20100207 bundle from gtk.org) -- Ing. Gabriele Greco, DARTS Engineering Tel: +39-0100980150 Fax: +39-0100980184 s-mail: Piazza Della Vittoria 9/3 - 16121 GENOVA (ITALY) ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https

Re: GTK 2.24.10 memory leak on win32?

2012-07-03 Thread Gabriele Greco
... on win32 with gtk 2.24.10 (20120208 bundle from gtk.org) the program leaks about 10kb per sec, and as I said there is no leak also on win32 with 2.16.6 (20100207 bundle from gtk.org) Filed bug 679312 https://bugzilla.gnome.org/show_bug.cgi?id=679312 -- Bye, Gabry

Re: GTK 2.24.10 memory leak on win32?

2012-07-03 Thread Gabriele Greco
Your code looks a bit strange, but I agree it should work with no leaks. Probably a bug. In the real code there are 1 to X (up to 12) GdkImage(s) that are semaphore protected and filled by h264 decoders in different threads. Once the thread fills his GdkImage with the frame data it uses

GTK 2.24.10 memory leak on win32?

2012-07-02 Thread Gabriele Greco
, %f fps\n, frames, secs, (double)frames / secs); } -- Ing. Gabriele Greco, DARTS Engineering Tel: +39-0100980150 Fax: +39-0100980184 s-mail: Piazza Della Vittoria 9/3 - 16121 GENOVA (ITALY) ___ gtk-app-devel-list mailing list gtk-app-devel-list

Re: Can I develop gtk app in Mac OS X ?

2011-12-02 Thread Gabriele Greco
Here is a starting point to install GTK on OSX: http://live.gnome.org/GTK%2B/OSX/ And It can running separately from X in OSX? YES, the build documentation I pointed to is for the native (Quartz) version of GTK, that works quite well (still has some minor bugs here and there). You

Re: GTK+ 2.24.8

2011-11-11 Thread Gabriele Greco
http://download.gnome.org/sources/gtk+/2.24/ ftp://ftp.gnome.org/pub/GNOME/sources/gtk+/2.24/ * Win32 updates: Major update of the win32 backend, it now works at least as well as the old 2.16.x version that a lot of windows applications was forced to use Anyone has a prebuilt package

Tooltip in GtkComboBox

2011-06-08 Thread Gabriele Greco
Is possibile to assign different tooltips to the various elements in the GtkListStore associated to a GtkComboBox? I've added to the model a column with the tooltip but it seems GtkComboBox do not have the API GtkTreeView has to do this (gtk_tree_view_set_tooltip_column), nor anything similar...

g_idle_add source memory leaks

2011-05-09 Thread Gabriele Greco
= gtk_window_new(GTK_WINDOW_TOPLEVEL); l = GTK_LABEL(gtk_label_new(-)); gtk_container_add(GTK_CONTAINER(w), GTK_WIDGET(l)); gtk_widget_show_all(w); gtk_main(); return 0; } -- Ing. Gabriele Greco, DARTS Engineering Tel: +39-0105761240 Fax: +39-0105760224 s-mail: Via G.T. Invrea

Horizontal TreeView?

2011-02-08 Thread Gabriele Greco
can support left-right lists :) Otherwise I fear I'll have to build a custom widget, or try to see if adding widgets that rapresent my elements inside a GtkHBox within a GtkScrollingWindow is good looking enough :) -- Ing. Gabriele Greco, DARTS Engineering Tel: +39-0105761240 Fax: +39-0105760224

Re: Horizontal TreeView?

2011-02-08 Thread Gabriele Greco
u add items they are arranged vertically... also if u configure your scrolling window to resize only horizontally... -- Ing. Gabriele Greco, DARTS Engineering Tel: +39-0105761240 Fax: +39-0105760224 s-mail: Via G.T. Invrea 14 - 16129 GENOVA (ITALY

Re: which gtk-win32 version to use?

2010-09-30 Thread Gabriele Greco
On Tue, Sep 28, 2010 at 2:50 PM, Manu manutm...@gmail.com wrote: Thanks. I have just installed gdb for mingw. Another thing that helps to catch problems that you cannot reproduce easily is Dr.Mingw, you can find it in the mingw-utils package. It's a crash handler to be installed on the

Re: GTK deadlock in gtk_main

2010-08-04 Thread Gabriele Greco
2010/8/3 Tomas Soltys tomas.sol...@range-software.com All right, so at the end it was my bug :) Thank you all for your explanations. Note also that part of the magic of gdk_threads_enter/leave that you can use on unix to use gtk functions in subthreads does not work on win32 (and also on

From GdkPixbuf to GdkImage

2010-07-21 Thread Gabriele Greco
As subject says, what is the correct way to blit from a GdkPixbuf to a GdkImage without passing through a drawable? -- Bye, Gabry ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: From GdkPixbuf to GdkImage

2010-07-21 Thread Gabriele Greco
On 07/21/2010 04:18 PM, Gabriele Greco wrote: As subject says, what is the correct way to blit from a GdkPixbuf to a GdkImage without passing through a drawable? I *know* you asked for GdkImage. That I do not know. My usage has been from GdkPixbuf to GtkImage -- Hope this might help

Re: Setting a Tree View Cell to insensitive and uneditable

2010-04-19 Thread Gabriele Greco
Is it possible to set a cell in a specific column and row to insensitive and uneditable and not affect the rest of the cells in the same column? Yes, you should change your TreeModel to have two additional boolean columns to map the sensitive and editable boolean field for your

gtk_builder_add_from_file error handling

2010-01-13 Thread Gabriele Greco
; if (!gtk_builder_add_from_file(builder_, myfile.xml, erro)) { } -- Ing. Gabriele Greco, DARTS Engineering Tel: +39-0105761240 Fax: +39-0105760224 s-mail: Via G.T. Invrea 14 - 16129 GENOVA (ITALY) ___ gtk-app-devel-list mailing list gtk-app-devel-list

gtk_builder_add_from_file error handling

2010-01-13 Thread Gabriele Greco
Sorry last message was sent by accident pushing an hotkey while editing... This should be the complete version of my question: I just found that with a builder file with a syntax error my app crashed with: *** glibc detected *** ./packager: double free or corruption (out): 0x09aa33d0 *** I

Re: gtk_builder_add_from_file error handling

2010-01-13 Thread Gabriele Greco
GError *err = NULL; if (!gtk_builder_add_from_file(builder_, myfile.xml, err)) { if (err) { g_free(err); // commenting this solves the crash but other gtk apis I don't know gtkmm, but at least in C GErrors are freed with g_error_free(err). You are obviously right. I always

Re: gtk_builder_add_from_file error handling

2010-01-13 Thread Gabriele Greco
The proper handling of GErrors is described in great detail in the GError documentation. I don't think it is reasonable to explain this in the documentation of every function that uses GError to report errors as there are almost 80 of them just in Gtk+ (and over 400 in GLib, and many more

Re: GTK+ 2.16.6 released

2009-09-10 Thread Gabriele Greco
On Sat, Aug 29, 2009 at 4:47 PM, Matthias Clasen mcla...@redhat.com wrote: GTK+ 2.16.6 is now available for download at: ftp://ftp.gtk.org/pub/gtk/2.16/ http://download.gnome.org/sources/gtk+/2.16/ Any chance or problem for the windows binaries on the website/ftp? I'm too used to update

Re: GTK+ 2.16.4 released

2009-07-03 Thread Gabriele Greco
On Thu, Jul 2, 2009 at 5:28 PM, Thomas Stover tho...@wsinnovations.comwrote: There is some official (like Tor Win32 bundles) or unofficial OSX framework released or we have to build from sources? Building an OSX universal binary framework compatible with 10.4+ is not exactly easy like

Re: GTK+ 2.16.4 released

2009-07-02 Thread Gabriele Greco
On Thu, Jul 2, 2009 at 12:58 AM, Matthias Clasen mcla...@redhat.com wrote: GTK+ 2.16.4 is now available for download at: About 2.16 releases: There is some official (like Tor Win32 bundles) or unofficial OSX framework released or we have to build from sources? Building an OSX universal

Re: latest glib and gtk for Windows?

2009-04-21 Thread Gabriele Greco
On Sun, Apr 19, 2009 at 5:53 PM, Tor Lillqvist t...@iki.fi wrote: I don't mean to be a pest, but when might glib 2.20.1 and gtk 2.16.1 become available at http://www.gtk.org/download-windows.html ? Soon... Been a bit busy with other hackinh. About this issue, I've been able to build the

Re: latest glib and gtk for Windows?

2009-04-21 Thread Gabriele Greco
On Tue, Apr 21, 2009 at 11:16 AM, Tor Lillqvist t...@iki.fi wrote: Soon... The binaries are at the usual place (http://ftp.gnome.org/pub/GNOME/binaries/win32/gtk+/2.16/ etc) but the http://www.gtk.org/download-windows.html page has not updated, apparently thanks to some missing git hooks or

Re: GIO channels and connection closed by foreign host on WIN32

2009-03-18 Thread Gabriele Greco
On Tue, Mar 17, 2009 at 6:59 PM, Tor Lillqvist t...@iki.fi wrote: (Yes, it might well be that it should be considerd a bug that one on Windows has to explicitly watch for G_IO_HUP in addition to G_IO_IN to be able to catch EOF. Please file a bug for that. This change made the trick:

GIO channels and connection closed by foreign host on WIN32

2009-03-17 Thread Gabriele Greco
I have a problem with the WIN32 port of a project. I use a GIO channel to wrap the socket, I handle the socket as async (so in case of error I check for EWOULDBLOCK/EINPROGRESS...), the program works ok and the callback is called when there is data on the socket. The problem I have is that on

Re: GIO channels and connection closed by foreign host on WIN32

2009-03-17 Thread Gabriele Greco
On Tue, Mar 17, 2009 at 4:26 PM, Tor Lillqvist t...@iki.fi wrote: Do you have a minimal but complete sample program that exhibits the problem? --tml Here it is, I've made it as minimal as a crossplatform gtk socket program can be, the code may give a pair of warnings and passes the fd as

Re: GIO channels and connection closed by foreign host on WIN32

2009-03-17 Thread Gabriele Greco
Here it is, I've made it as minimal as a crossplatform gtk socket program can be, the code may give a pair of warnings and passes the fd as userdata, this is to mimic the real code that passes a class base pointer that contains also the FD and to specify that the code doesn't use gio channels

Re: Stop text view to scroll on pageup/down (Gabriele Greco)

2008-10-08 Thread Gabriele Greco
On Tue, Oct 7, 2008 at 4:14 PM, Garth's KidStuff [EMAIL PROTECTED]wrote: Thanks for the reply! the scrolledwindow but without results: g_signal_connect(sw, key-press-event, (GCallback)eat_pageupdown, NULL); I just asked a very similar question a few days ago on the list and Murray was

Stop text view to scroll on pageup/down

2008-10-06 Thread Gabriele Greco
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

Re: [semi-OT] dependencies libraries

2008-09-01 Thread Gabriele Greco
On Sun, Aug 31, 2008 at 10:46 AM, Brian J. Tarricone [EMAIL PROTECTED]wrote: for example: if i develop with gtk 2.12 (but i can do the same reasoning with any other library) how can i do to know if i used (or not) new functions/classes introduced on that version? (of course without look

Re: CellRendererToggle with custom pixbuf?

2008-08-19 Thread Gabriele Greco
On Sun, Aug 17, 2008 at 10:52 PM, Jeffrey Barish [EMAIL PROTECTED]wrote: I am using a CellRendererToggle. I would like to be able to specify pixbufs to use to draw the toggle in its two states. Basically, I want to toggle between two images in a TreeView. When I click on one image, it

Re: XML and treeviews

2008-07-25 Thread Gabriele Greco
for each of those events, I can do it but I thought there was a cleaner solution like an attribute of the CellRenderer to change the indent level of a given column item. -- Ing. Gabriele Greco, DARTS Engineering Tel: +39-0105761240 Fax: +39-0105760224 s-mail: Via G.T. Invrea 14 - 16129 GENOVA

Re: Getting a Column Number

2008-07-16 Thread Gabriele Greco
How do you get the column number from a GtkTreeViewColumn pointer? Is there a way to get the previous and/or next Column or column number? Use gtk_tree_view_get_columns() to get a GList of all the column and check the pointer of focus_column against the GList with g_list_index(), this will

Re: Using g_signal_connect in class

2008-07-15 Thread Gabriele Greco
On Tue, Jul 15, 2008 at 12:09 PM, Marco Rocco [EMAIL PROTECTED] wrote: Hello, this is my first post on this mailing list, now i do my request: can i use g_signal_connect in a method of my class, using as c_handler a private function of class? ...and if i can, how i can do ? If you use C++

Trimming GTK+ win32 runtime

2008-07-09 Thread Gabriele Greco
I'm trying to trim down GTK runtime to the minimum possible. I've read a Tor mail in this list of a month ago about this topic and applied its suggestions. My starting point was the bundle. - all the documentation, all the headers, all the link libraries, all the translations... - all immodules

Re: Forking from Gtk

2008-07-08 Thread Gabriele Greco
On Mon, Jul 7, 2008 at 11:03 PM, G Hasse [EMAIL PROTECTED] wrote: Hello, I have a small demo app. This works on FreeBSD but I can't get to work on Linux. I know that in Linux setsid will fail if the child has the same session_id as the parent. So on Linux you must fork twice. But it also

About GTK 2.13.x window redirection

2008-05-30 Thread Gabriele Greco
I've read with much interest the new features of the unstable branch, will the window redirection feature allow to use GTK+ to render to offscreen bitmaps? This will allow a quite easy GTK+ deployment on top of OpenGL, that will be a very useful feature... -- Bye, Gabry

Re: How to make a gtktreeview column flexible?

2008-04-28 Thread Gabriele Greco
); or gtk_tree_view_column_set_expand(column, FALSE); ... for the other columns. -- Ing. Gabriele Greco, DARTS Engineering Tel: +39-0105761240 Fax: +39-0105760224 s-mail: Via G.T. Invrea 14 - 16129 GENOVA (ITALY) ___ gtk-app-devel-list mailing list gtk-app-devel-list

Re: image update

2008-04-23 Thread Gabriele Greco
I am working in images with pifbuf and gtkimage. I want draw other image using the composite method. The problem is when use this method the pifbuf donĀ“t update well. Solved making the widget visible to false and after making the visible true. a better method? What is the type of

function parameters not const

2008-04-15 Thread Gabriele Greco
There is a reason for functions like: gtk_tree_store_iter_depth, gtk_tree_store_iter_is_valid, gtk_list_store_iter_is_valid [large part of all the iterator related api, mostly for GtkTreeIter type] does not use a const GtkTreeIter * but a simple GtkTreeIter *? In C programs is almost the

Re: Gtk::ProgressBar doesn't work synchronously

2008-04-09 Thread Gabriele Greco
Start a complex task Create a Progress Monitor dialog and show it Update the dialog as the task progresses Destroy the dialog Every time you update the dialog (or also more often if you can) you should do something like: while (gtk_events_pending()) gtk_main_iteration(); To let GTK

Re: Video overlay problem

2008-04-04 Thread Gabriele Greco
On 3/30/08, Colm Aengus Murphy [EMAIL PROTECTED] wrote: It looks like the video is being overlayed over all tabs. The only widget that it doesn't get overlayed on is a gtktextview widget. Any ideas on how I can ensure the video is only ever seen in its own tab ? Add a GtkEventBox to the

Re: GTK from assembly

2008-03-27 Thread Gabriele Greco
On 3/26/08, Jason Ward [EMAIL PROTECTED] wrote: It didn't work. was there something else I am supposed to do after I download this bundle. I do have the run-time installed since I installed Pidgin Note that there is at least one version of Pidgin that installs a private copy of GTK inside

Re: Quitting an application

2008-03-27 Thread Gabriele Greco
I am writing a music library manager and I have a small problem when terminating the application. On starting the app, I scan a DB and load the tracks into a treeview. When this is in progress, if the user closes the application, a segfault occurs because gtk_main_quit() has been called and

Re: Problem with references

2008-03-17 Thread Gabriele Greco
After some headache with my gtk C++ classes I've found with a small test program this fact about the gobject references: Sorry, not sure what you're trying to do. Are you trying to do something with gtkmm? Or are you creating your own bindings? I'm doing some experimental header only

Problem with references

2008-03-14 Thread Gabriele Greco
); } -- Ing. Gabriele Greco, DARTS Engineering Tel: +39-0105761240 Fax: +39-0105760224 s-mail: Via G.T. Invrea 14 - 16129 GENOVA (ITALY) ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Signal prototypes

2008-02-21 Thread Gabriele Greco
Given that different signals may have different prototypes: clicked: void (*)(GtkWidget *, void *) keypress: gboolean (*)(GtkWidget *, GdkEvent *, void *) delete_event: gboolean (*)(GtkWidget *, void *) [...] There is a way, from the signal name, to find in ADVANCE what kind of prototype the

GtkBuilder, win32 signals

2008-02-13 Thread Gabriele Greco
I'm doing some tests with GtkBuilder and I've built a simple program that open a window with a pair of buttons with a signal for each button and it works perfectly in linux. I've tried to crosscompile it to win32 with this command line: i586-mingw32msvc-gcc -o main.exe main.c -mno-cygwin

Re: GtkBuilder, win32 signals

2008-02-13 Thread Gabriele Greco
On 2/13/08, Tor Lillqvist [EMAIL PROTECTED] wrote: I'm wondering if the gmodule inspecting feature to link the handlers is broken in win32 or if I have to add some more flag I quote the documentation for gtk_builder_connect_signals() in trunk: * When compiling applications for Windows,

Change interface font in a GTK application at runtime without reopening windows

2007-12-12 Thread Gabriele Greco
A lot of users are asking me for the capability to change the font of an application runtime. I know that the correct answer should be change your gtk theme or edit the application RC file, but while this kind of answer is good with power users, normal users often want to be able to grab a font

Re: Multiple threads and gtk_main()

2007-07-11 Thread Gabriele Greco
Eduardo M KALINOWSKI wrote: Make your threads add stuff to a single GAsyncQueue. Let an idle function (or a timeout function) always run, that checks the GAsyncQueue and does something if there is something to do, or simply returns if it is empty. Wouldn't that work? Yes, but that would

Multiple threads and gtk_main()

2007-07-10 Thread Gabriele Greco
I've a few threads (more than one) doing some work (not accessing GTK functions), I'd like to have a general way to make them notify their work to the main loop. I used the g_idle_add() in the previous context where I had only a thread with this behaviour, but with two or more threads the

Fast animation prototype code

2007-07-09 Thread Gabriele Greco
I've wrote this example code and it seems to work properly both on Linux and Win32, I'm wandering if some GTK guru has some suggestions to improve it, obviously it's only an example, but this will be the structure that will be included in the application, the thread that build the image will

Re: [SPAM] Fast animation prototype code

2007-07-09 Thread Gabriele Greco
Gabriele Greco wrote: The source file as attach was cutted, I'm pasting it inline, it's short :) I've wrote this example code and it seems to work properly both on Linux and Win32, I'm wandering if some GTK guru has some suggestions to improve it, obviously it's only an example

Simple video playing with SDL

2007-07-06 Thread Gabriele Greco
Someone can point me some code that does video playback using *only* GTK? If the code is not available also some directions will be enough: - What kind of widget to use? (GtkDrawingArea, GtkImage...) - How to handle double buffering? (perform a queue_draw after each frame update?) - How to blit

Re: [SPAM] Simple video playing with SDL [- WITHOUT SDL]

2007-07-06 Thread Gabriele Greco
Gabriele Greco wrote: Just correcting the title of my previous post, obviously I intended WITHOUT SDL or any external library (except the one I use to decode the stream :) ). Someone can point me some code that does video playback using *only* GTK? If the code is not available also some

Re: [SPAM] cross compiling and ld auto-import errors

2007-06-07 Thread Gabriele Greco
Bethany Seeger wrote: From what I've read, I need to force (external) constants to be variables, but I'm not sure how I can do that when the errors are coming from the glib library, underneath Gtk/Gdk. (or declare them explicitly with __declspec(dllimport)). I'm relatively new to

Re: [SPAM] Re: cross compiling and ld auto-import errors

2007-06-07 Thread Gabriele Greco
Tor Lillqvist wrote: I would leave out the .dll here to avoid risking confusion. (Somebody might think you are referring to the dll files themselves here.) The Win32-targeted linker looks for also libfoo.dll.a, not just libfoo.a when it encounters -lfoo. At least natively, presumably also when

g_idle_add and thread safety

2007-06-06 Thread Gabriele Greco
I know GTK APIs are not thread safe, I've an app with a thread doing a massive job that wants to update the gui status every few cycles, to do so I remembered an old post speaking about g_idle_add. The question I have and which I didn't find answers both googling, both looking at the sources

Re: [SPAM] Re: How to create a self contained GTK+ Application for Linux

2007-05-23 Thread Gabriele Greco
Michael Ekstrand wrote: You might want to take a look at what the autopackage folks are doing. At the very least, they have a lot of documentation on what's required to prepare relocatable, portable binary packages. Anyway the GTK hardcoded path are not a good thing IMHO. With some care

Re: [SPAM] Portable network layer

2007-05-11 Thread Gabriele Greco
Jonathan Winterflood wrote: I'd like to keep the dependencies to a strict minimum (preferably bundle-able vs installable), free, and I only need basic functionality If you want to avoid new dependencies you can use the sockets directly, the differences between winsock and the standard bsd

Abount the missing gtk_tree_model_iter_prev()

2007-05-08 Thread Gabriele Greco
Is this the optimal way to implement a bi-directional search on a liststore or there is something better that can be done? while(valid) { gchar *body; gtk_tree_model_get(m_model, it, Body, body, -1); if ( (cs strstr(body,

Enable/Disable a button and mouse clicks

2007-01-03 Thread Gabriele Greco
I've found that if I disable a button after a click on it (gtk_widget_set_sensitive(button, FALSE)), and then enable it back after a timed event or something else occurs (...set_sensitive(button, TRUE) ), I'm unable to click on the button with the mouse pointer unless I exit with the pointer

Re: [SPAM] Re: Enable/Disable a button and mouse clicks

2007-01-03 Thread Gabriele Greco
Ed Catmur wrote: You've discovered bug 56070[1]. There are some workarounds at the bug, but we're fairly close to getting it fixed in GTK+. After a complete read of the thread I've implemented the workaround based on the window motion events capture, seems to work correctly both on linux

Change GtkTreeViewColumn header background color

2006-12-18 Thread Gabriele Greco
There is an easy way to do it, a rc option would be very nice but I've not found it! Adding a custom object as column header is not ok, since you get your background only under the label (the border and the arrow keep the old background). Lurking in the sources I've found this way, but it's

How to find custom engines

2006-12-06 Thread Gabriele Greco
I want to use a custom engine in my gtk app, the problem is that I find no way to tell GTK where my engine is located, the app is multiplatform (linux/w32) and it doesn't find the engine except if I put it in the default engine path (Common Files/GTK/lib/gtk-2.0/engines or

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

Theme writing guide/tutorial

2006-11-22 Thread Gabriele Greco
There is a guide not aimed to programmers about theme writing for GTK (I'm mostly intrested in pixbuf themes, but also a generic guide could be useful)? I've to explain a graphic artist how to design a theme for a GTK application and what I've found till now it's too much programmers

Use GtkWidgets inside of a custom cell renderer

2006-11-07 Thread Gabriele Greco
As subject says it's possibile? I've set up a custom cell renderer following the example in the treeview tutorial, now I'd like to use some GTK objects inside it instead of reinvent the wheel to draw lines and texts with GDK. The problem is that what I get in the render method of my subclass

GTK 2.10.x status on WIN32

2006-10-02 Thread Gabriele Greco
I've seen GTK 2.10 is not yet distributed as stable for WIN32 (at least is not in the Gimp website or in the Tor GTk-win32 page). There are still major issues or I can target is as a stable platform for an application due do be released in december? Bye, Gabry

Mockup builder

2006-02-15 Thread Gabriele Greco
It does exist such a thing for GTK? I mean not an interface builder like glade but something that let you create simple mockups to be used in the analysis phase of the project. The problem with a GLADE mockup is that I cannot give for instance any viable hint of the CONTENTS of lists and

Re: Sockets with GTK 2.8.9 on WIN32

2006-02-13 Thread Gabriele Greco
Daniel Atallah wrote: That is one of the changes that were made in Glib 2.8.x. All of the win32 GIOChannel stuff was changed such that it'll leave your sockets in non-blocking mode. See this bug report for more information: http://bugzilla.gnome.org/show_bug.cgi?id=147392 This seems very

Re: Numeric keypad on win32 (GTK 2.6.9)

2005-12-12 Thread Gabriele Greco
Tor Lillqvist wrote: Are you sure the behaviour you see on Linux happens on all important Linux distributions and/or most Linux X server versions? What about other Unixes? I've tested also on OSX 10.3 with the fink gtk 2.2.x and the apple X server, the behaviour of GTK is the same I got in

Numeric keypad on win32 (GTK 2.6.9)

2005-12-06 Thread Gabriele Greco
I've seen that events from numeric keypad are different in win32 and unix. If num lock is selected the linux port give the events: GDK_KP_0 .. GDK_KP_9 while the win32 version gives GDK_0 .. GDK_9. Looking at the sourcecode it seems that in: gdk/win32/gdkkeys-win32.c in the function