Re: compiling g_module plugin on (msvc) win32 [was] on (cygwin) win32

2005-10-15 Thread Iago Rubio
On Sun, 2005-10-16 at 00:54 +0300, Tor Lillqvist wrote:
> Olivier Sessink writes:
>  > How can I fix the linking stage on cygwin/win32 ??
> 
> First, mark the functions in the sources for the main .exe that are to
> be used by other modules with G_MODULE_EXPORT.
> 
> Then you must decide whether you want to 1) restrict your plugins to
> work only with an executable with the *exact* name you specify, or
> whether you want it to be 2) more flexible and work even if you happen
> to rename the main executable.
> 
> In case 1), create an import library for the .exe using dlltool, and
> link the plugin against that import library. 

It seems to me that's using gcc and GNU tools but ...

How can it be done with the MSVC compiler ?


Thanks in advance.
-- 
Iago Rubio

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


g_date_set_time error on folder selection

2005-10-15 Thread Nick Watts
On Windows XP. I've got a GtkFileChooser widget set up with the
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER action. Whenever I go to the My
Pictures directory with the file chooser widget, I get a whole bunch of
identical errors that all say:

Glib-CRITICAL **: g_date_set_time: assertion 'ptm != NULL' failed

Why does this happen for certain directories? Is there a way to fix it? I
think it may be the same error that is causing Inkscape to crash when I try
to look at the My Pictures folder as well.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: compiling g_module plugin on (cygwin) win32

2005-10-15 Thread Tor Lillqvist
Olivier Sessink writes:
 > How can I fix the linking stage on cygwin/win32 ??

First, mark the functions in the sources for the main .exe that are to
be used by other modules with G_MODULE_EXPORT.

Then you must decide whether you want to 1) restrict your plugins to
work only with an executable with the *exact* name you specify, or
whether you want it to be 2) more flexible and work even if you happen
to rename the main executable.

In case 1), create an import library for the .exe using dlltool, and
link the plugin against that import library. 

In case 2), use g_module_open(NULL, 0) to get a GModule handle for the
main executable, and the g_module_find() the function from it, and
call it.

--tml

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


Re: gtk and opnengl

2005-10-15 Thread Zeeshan Ali
Hello,

On 10/15/05, flood <[EMAIL PROTECTED]> wrote:
> Can anyone explain to me how to setup opengl and gtk together? I know there
> is a widget called gtk_gl_area but I have no idea how to use it.

   GtkGLExt (http://gtkglext.sourceforge.net/) is the latest and
recommended way of doing this kind of stuff (AFAIK). You can find the
docs. on the website and also their mailing-lists.

--
Regards,

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


gtk and opnengl

2005-10-15 Thread flood
Can anyone explain to me how to setup opengl and gtk together? I know there
is a widget called gtk_gl_area but I have no idea how to use it.

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


Re: is there an equivalent of sscanf that uses GString as arguments?

2005-10-15 Thread Tim Müller
On Fri, 2005-10-14 at 18:11 +0100, Yiannis wrote:

> is there an equivalent of sscanf that uses GString as arguments?

You could just do

 sscanf (gstring->str, "%04u-%02u-%02u", ..);

Cheers
 -Tim


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


compiling g_module plugin on (cygwin) win32

2005-10-15 Thread Olivier Sessink
Hi all,

slightly off-topic, but I have plugins that work fine on Linux, They are
linked using:

$(LIBTOOL) --mode=link $(CC) -module $(LIBS) -shared -o $@ $(LOBJECTS)

the plugins call functions from the main binary. This is no problem on
Linux.

But on cygwin/win32 the linking stage fails because of unresolved
symbols, and these symbols are the stymbols from the main application.
How can I fix the linking stage on cygwin/win32 ??

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


Re: Problem with glade

2005-10-15 Thread Uzytkownik
Dnia 14-10-2005, pią o godzinie 14:32 -0400, Matthias Clasen napisał(a):
> On Fri, 2005-10-14 at 14:27 -0400, Brian Clark wrote:
> > > (a.out:5100): libglade-WARNING **: could not find signal handler
> > > 'on_bok_clicked'.
> > >
> > > (a.out:5100): libglade-WARNING **: could not find signal handler
> > > 'on_wgtelnet_destroy'.
> > 
> > The symbols for the functions are not being exported in the
> > executable, so glade_xml_signal_autoconnect is not able to find them.
> > 
> > I usually use C++, but this should work for you. I was able to solve
> > this by making sure I had the function declared in a header file, and
> > puttingextern "C"   in front of the return type of the function
> > definition in the C file. (That part is probably C++ specific).  I'm
> > also passing --export-dynamic to gcc for linking.
> > 
> > I hope this helps you out.
> 
> Yes, you need -Wl,--export-dynamic for glade_xml_signal_autoconnect to
> work.
> 
> Matthias
> 
> 
> 

Thanks.
It's now OK.




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


Re: GtkTreeModelFilter problems

2005-10-15 Thread HuamiSoft Hubert Sokolowski


the answer is
gtk_tree_model_filter_convert_path_to_child_path 


On Sat, 15 Oct 2005 09:39:00 +0200
HuamiSoft Hubert Sokolowski <[EMAIL PROTECTED]> wrote:

> 
> Hi!
> 
> I am trying to use GtkTreeModelFilter to filter out some rows. it works
> great, but I have a problem with a cell which is a toggle.
> the code below works for model when all rows are shown, but it does not
> work well when some rows are hiden. it is a list, not a tree.
> what's wrong with it? this code runs in cell_toggled callback.
> gtk+-2.8.6
> 
>  child_path = gtk_tree_path_new_from_string (path_string);
>  path =
> gtk_tree_model_filter_convert_child_path_to_path (filter, child_path);
> // here path is NULL when some rows are hiden
> gtk_tree_path_free (child_path);
>  if (path)
>   {
> gtk_tree_model_get_iter (smodel, &iter, path);
> gtk_tree_path_free (path);
> 
> col = GPOINTER_TO_INT (data);
> gtk_tree_model_get (smodel, &iter,
> col, &bool, -1);
> 
> bool ^= 1;
> gtk_list_store_set (GTK_LIST_STORE (smodel), &iter,
> col, bool, -1);
>   }
> 
> thanks in advance
> -- 
> HuamiSoft Hubert Sokolowski
> http://www.huamisoft.com/
> tel. 501456743
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> 


-- 
HuamiSoft Hubert Sokolowski
http://www.huamisoft.com/
tel. 501456743
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GtkTreeModelFilter problems

2005-10-15 Thread HuamiSoft Hubert Sokolowski

Hi!

I am trying to use GtkTreeModelFilter to filter out some rows. it works
great, but I have a problem with a cell which is a toggle.
the code below works for model when all rows are shown, but it does not
work well when some rows are hiden. it is a list, not a tree.
what's wrong with it? this code runs in cell_toggled callback.
gtk+-2.8.6

 child_path = gtk_tree_path_new_from_string (path_string);
 path =
gtk_tree_model_filter_convert_child_path_to_path (filter, child_path);
// here path is NULL when some rows are hiden
gtk_tree_path_free (child_path);
 if (path)
  {
gtk_tree_model_get_iter (smodel, &iter, path);
gtk_tree_path_free (path);

col = GPOINTER_TO_INT (data);
gtk_tree_model_get (smodel, &iter,
col, &bool, -1);

bool ^= 1;
gtk_list_store_set (GTK_LIST_STORE (smodel), &iter,
col, bool, -1);
  }

thanks in advance
-- 
HuamiSoft Hubert Sokolowski
http://www.huamisoft.com/
tel. 501456743
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list