Anyone for CMake?
A couple of weeks ago I started on a build of glib/gtk+ using MSVC++. I haven't been able to devote masses of time to it but the small amount that I've done so far was refreshingly pain-free - thanks mostly to the presence of ".vcproj" files for me to work with. Sadly, the supporting libraries don't seem to be as comprehensive. Pango, Cairo, ATK etc seem to come only with makefiles, from what I can tell. ;( I guess there's a (slim) chance they'll work with Microsoft's Nmake but Nmake isn't noted for such flexibility and I assume that whatever comes with the above libs is primarily intended for Autoconf / Automake etc. I just wondered if there's ever been any discussion in the *nix community about moving away from Autoconf/Automake in favour of CMake? I guess this topic must have come up several times already, so what were considered to be the pros and cons? At first glance, CMake seems to be a lot more modern and certainly a lot friendlier towards the other major platforms, as well as *nix. John ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: cygwin gtk+ eclipse on windows Gtk-WARNING cannot open display
I'm forced to use cygwin for work so I have no choice. I solved the problem. Anyway I thank you for your advice. bye Tor Lillqvist wrote: > >> Hello, i installed cygwin, gtk+(available with cygwin) and eclipse on >> Windows xp. >> "Gtk-WARNING **: cannot open display:" > > Are you aware that the GTK+ for Cygwin is built with the X11 backend, > i.e. software that uses it requires an X server (also know as > "display")? (Either running on the same machine, or remotely.) (Also > note that Cygwin is really a separate Unix-style operating system that > just happens to run on top of Windows.) > > Is that really what you want? If not, forget GTK+ on Cygwin and just > use GTK+ on Windows instead. Be very careful not to confuse and mix > Cygwin libraries and Windows libraries when building something. > > Is the Eclipse you are using also a Cygwin one? > > If your intention is not to build software that runs on Cygwin and > requires an X display, I would suggest you avoid Cygwin completely. > > Instead just install the MinGW compiler, and use that from Eclipse. > For GTK+ on Windows, the simplest is to download the "bundle" from > http://www.gtk.org/download-windows.html and then run pkg-config to > get the appropriate compiler flags to pass the compiler from Eclipse. > I can't help you more with that, I don't use Eclipse. > > In fact, I would suggest that you first learn how to build GTK+ > software directly from the command line without letting Eclipse hide > what is really happening... but this is just my personal opinion. As a > command-line environment I then suggest using MSYS and its bash shell. > > MinGW and MSYS are available from www.mingw.org. > > --tml > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > > -- View this message in context: http://old.nabble.com/cygwin-gtk%2B--eclipse-on-windows-Gtk-WARNING-cannot-open-display-tp28949244p29000102.html Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Anyone for CMake?
On Sat, 26 Jun 2010 10:07:16 +0100 John Emmas wrote: > I just wondered if there's ever been any discussion in the *nix > community about moving away from Autoconf/Automake in favour of CMake? > I guess this topic must have come up several times already, so what > were considered to be the pros and cons? At first glance, CMake seems > to be a lot more modern and certainly a lot friendlier towards the > other major platforms, as well as *nix. Did you read this article? It seems to sum up the issue quite nicely: http://lwn.net/Articles/188693/ The discussions are interesting too. John ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: word wrap in liststore column
On Sat, 26 Jun 2010 02:17:11 -0400 Tristan Van Berkom wrote: > On Fri, Jun 25, 2010 at 8:44 PM, Mick wrote: > > I'm stuck again. > > > > I wish to set word-wrap for a single column in a treeview liststore, > > I've found the options I need to set but can't for the life of me > > find an example of how to do it. > > > > I think the catch is that you need to set an explicit wrap-width > when specifying wrap-mode on the GtkCellRendererText. > I know that, I have searched but not found anything that says "this is how you set the properties of ..." what I'm trying to do is set wrap-width to 60 characters and wrap-mode to word somewhat like this: GtkSomeObscureFunction(list->action, wrap-width = 60, wrap-mode = PANGO_WRAP_WORD); I also wish to set alternate rows backgrounds to white or pale blue, how is this done? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
central 'library' of self-contained real world examples of code for gtkwidgets
In veiw of the nightmare I've had finding non-trivial example code for assembling/implimenting gtk widgets recently I have decided to attempt to assemble a library of functions that impliment a task at a more advanced level than your typical 'Hello world' that abound. Some examples would be: A menubar that uses each type of GtkMenuItem - simple text, stock item, label & icon, check box, radio buttons, a button that calls a dialog, ... A 'command help' dialog, with dismiss button that uses a liststore to show command short form, long form and description. Anyone who follows this list will have seen many of these are beyond my current capabilities so I'm calling on the list to offer up some of their own little gems to make this a worthwhile resource. How about it? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: word wrap in liststore column
On 06/26/2010 07:25 PM, Mick wrote: On Sat, 26 Jun 2010 02:17:11 -0400 Tristan Van Berkom wrote: On Fri, Jun 25, 2010 at 8:44 PM, Mick wrote: I'm stuck again. I wish to set word-wrap for a single column in a treeview liststore, I've found the options I need to set but can't for the life of me find an example of how to do it. I think the catch is that you need to set an explicit wrap-width when specifying wrap-mode on the GtkCellRendererText. I know that, I have searched but not found anything that says "this is how you set the properties of ..." what I'm trying to do is set wrap-width to 60 characters and wrap-mode to word somewhat like this: GtkSomeObscureFunction(list->action, wrap-width = 60, wrap-mode = PANGO_WRAP_WORD); I think the obscure function you want is: gtk_container_child_set_property () (Not to cast aspersions at the developers but some of the function calls are truly convoluted, at least to someone not on the development team. On the other hand the documentation is superb.) I also wish to set alternate rows backgrounds to white or pale blue, how is this done? I don't think there is a really clean way to do this since you can't know where the line will break. My best idea is to set the textview background (using a gdk_draw_rgb_image... () call of course. How could you not know this?). Using the row stride feature it shouldn't be too hard. See the gtk examples (sudo apt-get install gtk2.0-examples) program /usr/bin/gtk-demo and the Pixbufs example. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: word wrap in liststore column
Hi, El dom, 27-06-2010 a las 12:25 +1000, Mick escribió: > I know that, I have searched but not found anything that says "this is > how you set the properties of ..." ... an GObject: http://library.gnome.org/devel/gobject/stable/gobject-The-Base-Object-Type.html#g-object-set > what I'm trying to do is set wrap-width to 60 characters and wrap-mode > to word somewhat like this: > > GtkSomeObscureFunction(list->action, wrap-width = 60, > wrap-mode = PANGO_WRAP_WORD); So GtkSomeObscureFunction becomes: g_object_set (G_OBJECT (cell_renderer), "wrap-width", 60, "wrap-mode", PANGO_WRAP_WORD, NULL); > I also wish to set alternate rows backgrounds to white or pale blue, > how is this done? To enable different background colors for alternate rows, set the rules-hint property of the view to TRUE: gtk_tree_view_set_rules_hint (view, TRUE); This will leave the color choices to the theme, which is generally what you want. Florian ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: word wrap in liststore column
On 06/26/2010 08:19 PM, Florian Müllner wrote: Hi, El dom, 27-06-2010 a las 12:25 +1000, Mick escribió: I know that, I have searched but not found anything that says "this is how you set the properties of ..." ... an GObject: http://library.gnome.org/devel/gobject/stable/gobject-The-Base-Object-Type.html#g-object-set what I'm trying to do is set wrap-width to 60 characters and wrap-mode to word somewhat like this: GtkSomeObscureFunction(list->action, wrap-width = 60, wrap-mode = PANGO_WRAP_WORD); So GtkSomeObscureFunction becomes: g_object_set (G_OBJECT (cell_renderer), "wrap-width", 60, "wrap-mode", PANGO_WRAP_WORD, NULL); This is a frustration I sometimes encounter. How do you know to do this? I see nothing in the documentation for GtkCellRenderer or any of it's antecedents that shows "wrap-width" or "wrap-mode" as a property. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: word wrap in liststore column
El sáb, 26-06-2010 a las 20:35 -0700, Steve Harrington escribió: > This is a frustration I sometimes encounter. How do you know to do > this? I see nothing in the documentation for GtkCellRenderer or any of > it's antecedents that shows "wrap-width" or "wrap-mode" as a property. That's because both are properties of GtkCellRendererText - you just went looking in the wrong direction of the hierarchy :) Florian ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
g_io_scheduler_job_send_to_mainloop How to?
Hello, I use g_io_scheduler_job_send_to_mainloop function for running functiton in another thread: void build_thumbnails(GtkWidget* widget, MainWin* mw) { printf("BUILD!!!"); } I have structure for func parameters: typedef struct _JobParam { GtkWidget* widget; struct MainWin *mw; }JobParam; job func: gboolean job_func(GIOSchedulerJob *job, GSourceFunc func, gpointer user_data, GDestroyNotify notify) { JobParam* job_param = (JobParam*)user_data; build_thumbnails(NULL, job_param->mw); return TRUE; } And try to call: void loading() { g_io_scheduler_job_send_to_mainloop(job,(GSourceFunc)job_func,¶m, g_free); } I get error: g_io_scheduler_job_send_to_mainloop: assertion 'job != NULL' failed What's wrong. How can i fix it? Thank you. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: g_io_scheduler_job_send_to_mainloop How to?
Hi, the code you posted looks a little incomplete, but nevertheless I think you got it a little backwards. From what I see, it should look more or less like this (note: I didn't actually try to compile this): gboolean build_thumbnails (gpointer user_data) { printf ("BUILD!"); } gboolean job_func (GIOSchedulerJob *job, GCancellable*cancellable, gpointer user_data) { g_io_scheduler_job_send_to_mainloop (job, build_thumbnails, user_data, NULL); } void loading () { g_io_scheduler_push_job (job_func, (gpointer)params, free_params, G_PRIORITY_DEFAULT, NULL); } --- Florian ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list