Main window refreshing

2007-06-25 Thread omar . crea
I write a little application for an embedded system (Nokia N800)
using GTK+ and GStreamer and I need refreshing of the window.
When I iconize the application window and then put it in foreground again,
the gstreamer flow disappears.
I implemented this flow in a drawing area inside the main window.
How can I refresh my application after putting it in foreground again?

Thanks for the answer. Best regards.


This message was sent using IMP, the Internet Messaging Program.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Changing the style properties?

2007-06-25 Thread Felipe
Hi,

I want to remove the horizontal separators of a tree view, but the 
corresponding property is read only[1]. I assume that this style 
property can be changed in some way, but how?


Thanks in advance,



Felipe



[1] http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html#id3104240
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Help requested - Gtk::CellRendererCombo, c++

2007-06-25 Thread Farooq Khan
Hello

I am using Gtk::CellRendererCombo class for text view (c++). I ve
successfully created the model and have shown the combo options in textview.
However, I dont know how to display a default value for text view combo
column. i.e. when the text view loads the model, it doesnt display any value
in combo column as the model only shows the combo options. Any help or
suggestion would be appreciated!!!

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


Re: g_spawn_async_with_pipes and WIN32

2007-06-25 Thread Alan M. Evans
On Sat, 2007-06-23 at 12:35 +0300, Tor Lillqvist wrote:
 Alan M. Evans writes:
   I created the minimal sample program, and it works! The working example
   is virtually copy/pasted out of the non-working code.
 
 That's so typical;) Could your problem then simply be caused by some
 dynamic memory management bug or similar in the full program that
 corrupts some data structures, maybe even GLib's own?

Well, I can't rule anything out yet, but I doubt it. It's just that I do
embedded programming for a living; odd failure modes are familiar
territory. But this one has me scratching my head.

   g_spawn_async_with_pipes();
   WaitForSingleObject();
 
 BTW, why do you use g_spawn_async_with_pipes() if you then immediately
 wait for the process to finish? Wouldn't g_spawn_sync() be simpler?

A sensible suggestion. In fact I probably would have arrived at that
eventually. This was the first iteration, and I was using the async
version somewhere else and just copied that block for this purpose. I'll
try that now in hopes of getting the code rolling and off to the guy
waiting for this functionality.

Still, I think I'm going to produce a minimal program/DLL project and
post a link when I get a chance. Hopefully you or someone else will be
able to simply see where I went wrong and I can go sheepishly back to my
hole.

Thanks so much for your help, Tor!


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


use of GdkBitmap in gtk_widget_shape_combine_mask()

2007-06-25 Thread Stéphane Charette
Disclaimer:  I'm very new to Gdk, Gtk, and X.

In gtk_widget_shape_combine_mask(), I need to pass in a GdkBitmap to
use as the mask.  All of the examples I've found create the
GdkBitmap/GdkPixmap from static XPM or XBM data.

Question #1:
How do I create a GdkBitmap dynamically at runtime?  That is, not from XPM/XBM?

Question #2:
To be even more specific, can I create a GdkBitmap from what I get
using Cairo?  For example, can I call cairo_arc() or cairo_rectangle()
to do some drawing for me into something that results in me having a
GdkBitmap?

Thanks!

Stéphane Charette
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Getting a GDK_CONFIGURE event from a GtkImage

2007-06-25 Thread Jim George
Is there some way I can obtain a GDK_CONFIGURE event from a GtkImage
widget? I tried putting the GtkImage inside a GtkEventBox and
connecting a handler to configure-event, without success. I also
manually enabled GDK_STRUCTURE_MASK, even though GTK is supposed to do
that by default. I would like to know when the image size has changed,
so that I can assign a new GdkPixbuf to the GtkImage and draw to the
GdkPixbuf.

TIA

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


Re: Getting a GDK_CONFIGURE event from a GtkImage

2007-06-25 Thread Jim George
On 6/25/07, Brian J. Tarricone [EMAIL PROTECTED] wrote:
 On Mon, 25 Jun 2007 15:13:30 -0600 Jim George wrote:

 Is there some way I can obtain a GDK_CONFIGURE event from a GtkImage
 widget? I tried putting the GtkImage inside a GtkEventBox and
 connecting a handler to configure-event, without success. I also
 manually enabled GDK_STRUCTURE_MASK, even though GTK is supposed to do
 that by default. I would like to know when the image size has changed,
 so that I can assign a new GdkPixbuf to the GtkImage and draw to the
 GdkPixbuf.

 AFAIR, configure events are only useful for toplevel windows.  You'll
 probably want to look at the size-request and/or size-allocate signals
 (on GtkWidget).

 -brian

That's true (although GtkDrawingArea will emit it too). I tried using
size-request, and nothing happened (callback never got called).
size-allocate, however, caused an infinite loop, because I'm trying to
do the following:

gboolean solar_cal_pixbuf_resize(GtkWidget *widget, GtkAllocation
*alloc, gpointer user_data)
{
  GtkImage *img_widget = user_data;
  GdkPixbuf *pixbuf = gtk_image_get_pixbuf(img_widget);
  if (pixbuf) g_object_unref(pixbuf);
  pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, alloc-width,
alloc-height);
  gtk_image_set_from_pixbuf(img_widget, pixbuf);
}

The call to gtk_image_set_from_pixbuf causes a size-alloc to be
emitted, leading to the infinite loop. I don't see why the
size-request signal is not being emitted.

Baah, maybe I should just stick to using a GtkDrawingArea instead...

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