Re: Threads Glade
Hi, Dnia 2005-10-01 13:08, lucapetra (sent by Nabble.com) napisał: Hi, this is my first post here. I have a problem programming an interface, by glade , for a multithread written code(using pthreads.h). The interface is done and works well for a single thread. Calling more than one thread simultaneously gtk aborts the application. See http://www.gtk.org/faq/#AEN482 -- Przemysław Sitek ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Memory question
Dnia 2005-09-29 13:56, Christian Neumair napisał: Am Donnerstag, den 29.09.2005, 13:39 +0200 schrieb Przemysław Sitek: Dnia 2005-09-29 21:41, Colossus napisał: Ok, the correct way is to cast g_strerror to (char *): response = ShowGtkMessageDialog (GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,(char *) g_strerror(errno)); This way i don't get any warning. But it's still incorrect. It should be response = ShowGtkMessageDialog (GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, %s, g_strerror(errno)); printf-like functions shouldn't take random strings as their format string, as they may contain format instructions (such as %s, %d etc) which will cause the function to look for non-existent arguments which will produce segfauls. I wasn't aware that the called method has printf flavor. I wonder which API provides ShowGtkMessageDialog. AAARGH, I was thinking about gtk_message_dialog_new:-) My fault:-) -- Przemys³aw Sitek ___ 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 GTK/GNOME programming
Dnia 2005-09-26 16:05, Lalit Kumar napisał: Hi All, I am using Fedora core 3. I am facing problem with Gnome and Gtk programming. Anyone working on GNOMe/GTK programming , please help me out how to write GNOME/GTK program. There's a tutorial: http://www.gtk.org/tutorial/ API reference can be found here: http://www.gtk.org/api/ -- Przemysław Sitek ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: (no subject)
Dnia 2005-09-26 21:43, [EMAIL PROTECTED] napisał: Assignment operator for GtkWidgets? GTK is written in C, thus it does not overload any operator. Is there such a thing, can we do things like MyGtkWidget = SomeGtkWidget? You can do that provided those are POINTERS to widgets (actually, you never use widget themselves). Unfortunately, as far as I know, there's no way to copy instances. -- Przemysław Sitek ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Border
Hi, Is it possible to tell GTK to draw a border around a container or any other widget, or I must draw it myself, with gdk_draw_rectangle() for example ? Use GtkFrame -- Przemys³aw Sitek ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Box expansion in only one direction?
Hi, Dnia 2005-09-09 07:44, Lachlan Gunn napisał: Hi, I've been developing an app using GTK2, but am having one problem with layout: I have two hboxes and a button in a vbox. Underneath this, there is a TextView. Is there a way that I could make the top VBox expand only horizontally? Could you describe your interface more precise? I made out that you want to get something like: .--. -. | hBox | | |--| | | hBox | | |--| vBox | Button | | |--| | | TextView | | `--' -' and make first hBox have fixed height. If so, try gtk_box_pack_start (vBox, hBox, FALSE, FALSE, 0); That FALSE values cause the child not to expand and not to fill extra space. -- Przemysław Sitek ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Height of a GtkTextView
Hi, How can I get height of a text (in pixels) stored in a GtkTextView? I have looked in the API reference but found nothing relevant:-/ -- Przemysław Sitek ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Colors
Dnia 2005-09-03 18:39, Liam R E Quin napisał: On Sat, 2005-09-03 at 11:08 +0200, Przemysław Sitek wrote: I am writing a widget that draws a custom background under its child. I do this by subclassing GtkEventBox (since it has its own window) and overwriting expose virtual method. How can I get background color (or base color) ina a selected state (I want background to be drawn in that color). Not an answer (sorry) but a caution -- * make sure that a user whose theme has white text on a black background can still read your widget's text. * make sure that a user who needs reduced contrast is not presented with black and white, but the appropriate greys. * remember to handle the case that the window is partially obscured and loses focus I know this - that's why I'm asking how to obtain colors from current theme. I want to invert colors - thus I decided to use colors normally used for selected widgets (selected text, selected row in a treeview). Having said all that, it sounds like really you could just use the widget's style. That's what my question is about:-) But do ask yourself why you are doing this. If it's to draw the user's attention to something maybe it should be an alert box. If it's for decoration, better not to do it :-) If it's for displaying a colour swatch, there's already a widget for that. It'll be some kind of a decoration:-) -- Przemysław Sitek ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list