Re: Libraries and Mingw

2007-03-05 Thread Olivier Delhomme
2007/3/6, Chris Sparks <[EMAIL PROTECTED]>:
>
> Are you sure it isn't a path problem?



I thought It was such a problem. But in such a case It would give me an
error saying that a library is missing or something wouldn't it ? Anyway,
i'll try to add some paths to the default one.

I am thinking of a hard path written in the library or while linking to the
library. As the program crashes badly it might look somewhere that does not
exist (/usr/local/lib/ for instance). But I don't know where I should look
to correct this ... . I'm using autotools and libtool and I'm completly
lost. BTW the whole library+program works fine with Linux !

I welcome any ideas.

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


Re: Libraries and Mingw

2007-03-05 Thread Chris Sparks
Are you sure it isn't a path problem?

Chris
> Hello,
>
> Altought I know this is not a glib/gtk problem, I also know that
> there is valuable people on this list that are used to compile with the
> autotools and mingw that might point my errors.
>
> As I use the same code for my programs, I created a library with this code.
> I managed to create a .dll with automake and libtool. I also created a .pc
> to simplify things for the programs.
>
> I managed to link this library to my program. If I execute the program from
> the mingw environment "./myprogram.exe" (for instance) all is fine and the
> program just do what it is meant to do. If I just click on the Icon named
> "myprogram.exe" I get a typical microsoft window telling me that the program
> has crashed !!
>
> I suspect that there is a problem in the linking process. May be is there
> something special with the mingw environment ?
>
> Please if you know any pointers or have any ideas tell me.
>
> Thanks,
>
> Olivier.
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
>   

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


Getting Keyboard Events In GtkPlug

2007-03-05 Thread Mike Melanson
Hi,

I have an app contained inside of a GtkPlug widget that's communicating
with hosting app via the Xembed protocol. This seems to be working
pretty well except that my app never gets any key up/down events. The
hosting app hogs them all. What's the policy for the GtkPlug application
receiving keyboard events? Is it entirely up to the hosting app?

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


Re: Problem to open a new window using libglade

2007-03-05 Thread patrick
Great! Thank you very much, this works.
But how can I make something during gtk_dialog_run?
I'd like to do somthing like this.

g_timeout_add(1000, update_pbar, dialog);
result = gtk_dialog_run(GTK_DIALOG(dialog));
...my process which progressbar should show
g_spawn...
progress = 0.2
other work
gtk_widget_destroy(dialog);
dialog = NULL;


update_pbar (gpointer dialog)
{
...
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(probar), progress);
...
}

Thank you


2007/3/2, Karl H. Beckers <[EMAIL PROTECTED]>:
> Well,
>
> there's prolly several ways of doing it, but smth. along the following
> lines should work:
>
> GladeXML *gxml = glade_xml_new (GLADE_FILE, "dialog1", NULL);
> GtkWidget *dialog = glade_xml_get_widget(gxml, "dialog1");
> g_assert(dialog);
> GtkResponseType result;
>
> // register function to be executed in intervals
> g_timeout_add(1000, update_pbar, dialog);
> result = gtk_dialog_run(GTK_DIALOG(dialog));
>
> if (result == GTK_RESPONSE_OK)
> {
> }
>
> gtk_widget_destroy(dialog);
> dialog = NULL;
>
> then you need the timeout function:
>
> gboolean
> update_pbar (gpointer dialog)
> {
> // stop executing and unregister this function if dialog has
> // been set to NULL
> if (!dialog) return 0;
> // if dialog has not been displayed yet, don't bother updating
> // the progress bar
> if (!GTK_WIDGET_VISIBLE(GTK_WIDGET(dialog))) return 1;
>
> ...
> do whatever needs to be done to update the progressbar here
>
> return 1;
> }
>
> HTH,
>
> Karl.
>
>
>
> Am Freitag, den 02.03.2007, 23:32 +0100 schrieb patrick:
> > Thanks for your answer.
> >
> > > if I'm not completely mistaken here, this has nothing to do with glade.
> > > The thing just is, that you need to return to the main loop from the
> > > callback for the widgets to be drawn properly.
> > > That is prolly why you put in your gtk_main_iteration though I doubt
> > > there is a guaranteed way to make this work.
> > I think this is my problem.
> > So I made a new dialog:
> >
> > GladeXML *gxml = glade_xml_new (GLADE_FILE, "dialog1", NULL);
> > GtkWidget *dialog = glade_xml_get_widget(gxml, "dialog1");
> > GtkResponseType result;
> >
> > result = gtk_dialog_run(GTK_DIALOG(dialog));
> >
> > if (result == GTK_RESPONSE_OK)
> > {
> > }
> > gtk_widget_destroy(dialog);
> >
> > The window (dialog) now appears, but I want a "progress window", with
> > a progressbar and a label for the description. But how can I make
> > somthing while the dialog is visible so that I can show the progress
> > to the user?
> >
> > Thanks for the help.
> >
> >
> > 2007/3/2, Karl H. Beckers <[EMAIL PROTECTED]>:
> > > Am Freitag, den 02.03.2007, 11:33 -0500 schrieb
> > > [EMAIL PROTECTED]:
> > > > >>> void
> > > > >>> on_button1_clicked(GtkButton *button, gpointer data)
> > > > >>> {
> > > > >>>   /* the button was clicked */
> > > > >>>   //Print out to console
> > > > >>>   g_print("Beginn break\n");
> > > > >>>
> > > > >>>   //Create the new "progress" window
> > > > >>>   GladeXML*gxml_progress = NULL;
> > > > >>>   gxml_progress = glade_xml_new (GLADE_FILE, "window2", NULL);
> > > > >>>
> > > > >>>   //show the window
> > > > >>>   GtkWidget *window2 = glade_xml_get_widget(gxml_progress,
> > > > "window2");
> > > > >>>   gtk_widget_show_all(window2);
> > > > >>>
> > > > >>>   while (gtk_events_pending())
> > > > >>>   gtk_main_iteration();
> > > > >>>
> > > > >>>   //Make 5 sec. break
> > > > >>>   g_usleep(500);
> > > > >>>   g_print("End break\n");
> > > > >>> }
> > >
> > > Hi there,
> > >
> > > if I'm not completely mistaken here, this has nothing to do with glade.
> > > The thing just is, that you need to return to the main loop from the
> > > callback for the widgets to be drawn properly.
> > > That is prolly why you put in your gtk_main_iteration though I doubt
> > > there is a guaranteed way to make this work.
> > >
> > > So the complicated version would probably involve having hooking up a
> > > callback to the configure event for the second window that starts smth.
> > > and then automatically deregisters itself after the first run.
> > >
> > > The other thing I've found to work is use a GTK_DIALOG rather than a
> > > generic window and then do smth. along the lines of:
> > >
> > > result = gtk_dialog_run (GTK_DIALOG (dialog));
> > >
> > > if (result == GTK_RESPONSE_OK) {
> > > got_file_name =
> > > gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
> > >
> > > xml = NULL;
> > > xml = glade_get_widget_tree (GTK_WIDGET (xvc_pref_main_window));
> > > g_assert (xml);
> > >
> > > w = NULL;
> > > w = glade_xml_get_widget (xml, "xvc_pref_sf_filename_entry");
> > > g_assert (w);
> > >

Libraries and Mingw

2007-03-05 Thread Olivier Delhomme
Hello,

Altought I know this is not a glib/gtk problem, I also know that
there is valuable people on this list that are used to compile with the
autotools and mingw that might point my errors.

As I use the same code for my programs, I created a library with this code.
I managed to create a .dll with automake and libtool. I also created a .pc
to simplify things for the programs.

I managed to link this library to my program. If I execute the program from
the mingw environment "./myprogram.exe" (for instance) all is fine and the
program just do what it is meant to do. If I just click on the Icon named
"myprogram.exe" I get a typical microsoft window telling me that the program
has crashed !!

I suspect that there is a problem in the linking process. May be is there
something special with the mingw environment ?

Please if you know any pointers or have any ideas tell me.

Thanks,

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


Question about gtkhtml

2007-03-05 Thread MD Tsai
Dear all,

I'm tring to embed gtkhtml3 in instant messager, but there are something
confuse me.

First, is there any method to append context to an existing gtkhtml widget?
When there are many messages to show, it seems not so effective to render
every time. Is it ok to write to gtkhtmlstream and flush gtkhtml or
htmlengine?

Second, if I embed a GtkWidget, the only way to remove it from gtkhtml is
reload without add ""? Is there any proper or easy way to do this?

Thanks in advance,

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