Re: word wrap in liststore column

2010-06-26 Thread Tristan Van Berkom
On Fri, Jun 25, 2010 at 8:44 PM, Mick bare...@tpg.com.au 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.

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


Anyone for CMake?

2010-06-26 Thread John Emmas
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

2010-06-26 Thread newusergtk+

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?

2010-06-26 Thread John Coppens
On Sat, 26 Jun 2010 10:07:16 +0100
John Emmas john...@tiscali.co.uk 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

2010-06-26 Thread Steve Harrington

On 06/26/2010 07:25 PM, Mick wrote:

On Sat, 26 Jun 2010 02:17:11 -0400
Tristan Van Berkomt...@gnome.org  wrote:

   

On Fri, Jun 25, 2010 at 8:44 PM, Mickbare...@tpg.com.au  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

2010-06-26 Thread Florian Müllner
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

2010-06-26 Thread Steve Harrington

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

2010-06-26 Thread Florian Müllner
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?

2010-06-26 Thread Alexander Kuleshov
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,param, 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?

2010-06-26 Thread Florian Müllner
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

Re: gdk-pixbuf now standalone again

2010-06-26 Thread Bastien Nocera
On Sat, 2010-06-26 at 01:23 -0400, Matthias Clasen wrote:
 Following some recent irc discussions, I have done the necessary work
 to split out gdk-pixbuf as a standalone module again. This is how it
 started out, in the distant past, before it spent most of the GTK+ 2.x
 era inside GTK+. The main reason for splitting it out again are that
 we avoid breaking the gdk-pixbuf ABI, which makes live easier for
 modules like librsvg or clutter, which use gdk-pixbuf as an image
 loader, but don't have other GTK+ dependencies.
 
 The gdk-pixbuf sources can now be found here:
 
 http://git.gnome.org/browse/gdk-pixbuf
 
 I have just done a gdk-pixbuf-2.21.3 release, and GTK+ 2.22/2.90
 releases depending on an external gdk-pixbuf will follow soon.

Does this mean we'll have to undo the work on pixbuf loaders?

Cheers

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


Re: dconf 0.4.1 is out

2010-06-26 Thread Robert Schwebel
Ryan,

On Thu, Jun 24, 2010 at 01:55:27PM -0400, Ryan Lortie wrote:
 dconf 0.4.1 is released.

This version brings in the dconf-editor, which adds an unconditional
dependency on gtk, gio and vala.

Is it possible that we make this conditional, like in

--{en,dis}able-dconf-editor

and add the dependencies only if necessary? I'm trying to use dconf in a
deeply embedded scenario (without any GUI at all), and it would be a
showstopper if these dependencies would all be necessary.

If you are interested, I can create the patches.

rsc
-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: gdk-pixbuf now standalone again

2010-06-26 Thread Matthias Clasen
On Sat, Jun 26, 2010 at 7:52 AM, Bastien Nocera had...@hadess.net wrote:
 On Sat, 2010-06-26 at 01:23 -0400, Matthias Clasen wrote:
 Following some recent irc discussions, I have done the necessary work
 to split out gdk-pixbuf as a standalone module again. This is how it
 started out, in the distant past, before it spent most of the GTK+ 2.x
 era inside GTK+. The main reason for splitting it out again are that
 we avoid breaking the gdk-pixbuf ABI, which makes live easier for
 modules like librsvg or clutter, which use gdk-pixbuf as an image
 loader, but don't have other GTK+ dependencies.

 The gdk-pixbuf sources can now be found here:

 http://git.gnome.org/browse/gdk-pixbuf

 I have just done a gdk-pixbuf-2.21.3 release, and GTK+ 2.22/2.90
 releases depending on an external gdk-pixbuf will follow soon.

 Does this mean we'll have to undo the work on pixbuf loaders?

It means that there is no need anymore to install pixbuf loaders twice.
So the librsvg split can be undone, yes.
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: dconf 0.4.1 is out

2010-06-26 Thread Ryan Lortie
hi Robert,

On Sat, 2010-06-26 at 14:43 +0200, Robert Schwebel wrote:
 Is it possible that we make this conditional, like in
 
   --{en,dis}able-dconf-editor

Yes.  Of course.  I'll do this soon.

The plan is for the dependency on Vala to increase (to be used in the
core parts of dconf, for example), but since that's only needed for
'make dist' (or compiling directly from git) I guess it's okay for your
embedded use case?

Cheers


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


Re: dconf 0.4.1 is out

2010-06-26 Thread Robert Schwebel
On Sat, Jun 26, 2010 at 10:37:18AM -0400, Ryan Lortie wrote:
 On Sat, 2010-06-26 at 14:43 +0200, Robert Schwebel wrote:
  Is it possible that we make this conditional, like in
 
  --{en,dis}able-dconf-editor

 Yes.  Of course.  I'll do this soon.

 The plan is for the dependency on Vala to increase (to be used in the
 core parts of dconf, for example),

Hmm, dconf is low level infrastructure, so from the scalability point of
view, it should have as less dependencies as possible.

If it's only for tests / developer convenience / anything which isn't
needed in a runtime environment and can be configured away, it's just
fine.

We have application scenarios which consist just of glib, dbus,
json-dbus-bridge and some other small libraries and make it for example
possible to build a web based heating controller with about 8 MB of
flash footprint, while still being in an IT-like environment. Any
assumption of a normal desktop Linux system (such as 'just add gtk' or
'vala') leads to  N * 100% system size increase.

 but since that's only needed for 'make dist' (or compiling directly
 from git) I guess it's okay for your embedded use case?

Why do you need vala on make dist? But in general, yes: that would be
ok.

rsc
-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: dconf 0.4.1 is out

2010-06-26 Thread Tadej Borovšak
Hi.

 but since that's only needed for 'make dist' (or compiling directly
 from git) I guess it's okay for your embedded use case?

 Why do you need vala on make dist? But in general, yes: that would be
 ok.

When using autotools with vala, end-user that only consumes
application doesn't need to have vala installed, since generated C
files are also distributed inside tarball. From user's perspective,
distributed vala applications are just normal C applications.

This is how normal flow looks like:

.-.
| ..  valac   .-. | compiler/linker   .-.
| | vala files | --- | C files | -- | app |
| ''  '-' |   '-'
| |
| This is dstributed inside tarball.  |
'-'

Tadej

-- 
Tadej Borovšak
00386 (0)40 613 131
tadeboro.blogspot.com
tadeb...@gmail.com
tadej.borov...@gmail.com
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: dconf 0.4.1 is out

2010-06-26 Thread Robert Schwebel
On Sat, Jun 26, 2010 at 07:01:22PM +0200, Tadej Borovšak wrote:
 When using autotools with vala, end-user that only consumes
 application doesn't need to have vala installed, since generated C
 files are also distributed inside tarball.

That's great then.

rsc
-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: dconf 0.4.1 is out

2010-06-26 Thread Ryan Lortie
On Sat, 2010-06-26 at 19:01 +0200, Tadej Borovšak wrote:
 This is how normal flow looks like:

Quite accurate, and exactly how it will work with dconf.

Thanks for the explanation, Tadej :)

Cheers

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