Re: DrawingArea and Text display.
Hi, Neil Hodgson [EMAIL PROTECTED] writes: Tony Denault: Fixed_font = pango_font_description_from_string (Fixed); GC = gdk_gc_new(base_window-window); stuck on how to display string in Drawing area using pango PangoContext *pcontext = gtk_widget_create_pango_context(widget); PangoLayout *layout = pango_layout_new(pcontext); char *utfForm = Some UTF-8 text; pango_layout_set_text(layout, utfForm, strlen(utfForm)); pango_layout_set_font_description(layout, Fixed_font); PangoLayoutLine *pll = pango_layout_get_line(layout,0); gdk_draw_layout_line(drawable, gc, x, ybase, pll); or slightly simpler and good for multi-line strings as well: PangoContext *context = gtk_widget_create_pango_context (widget); PangoLayout *layout = pango_layout_new (context); g_object_unref (context); pango_layout_set_font_description (layout, font_desc); pango_layout_set_text (layout, Some UTF-8 text, -1); gdk_draw_layout (drawable, gc, x, y, layout); g_object_unref (layout); however you probably want to save the context and the layout between exposures to speed things up a bit. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
One model, different rows in different views
Hello all. It the subj possible ? Like having a model with, say, a list of objects. At start all objects are in a view and the other is empty. When a cell changes, that object is moved to the other view. An example could be a chooser: VIEW1 VIEW2 item1 item2 - item3 - item4 (model contains {Item1, 1}, {Item2, 1}, {Item3, 1}, {Item4, 1}) After selecting item3 and clicking - : VIEW1 VIEW2 item1 Item3 item2 - item4 - (model now contains {Item1, 1}, {Item2, 1}, {Item3, 2}, {Item4, 1}) Tks, Diego. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Taking control of a remote program
James Drabb wrote: I'd need to take control of a RUNNING app from another machine. For example, when my mother locks my program, I'd like to ssh to that machine (already possible) and then mirror on my machine what she sees, so to unlock it in a couple of clicks instead of having to phisically go to that machine for the same two clicks... I think it's possible with VNC, but since it's lot of overhead I'd like to know if there's some other way ... There is TightVNC, which is a little better/faster. You can I know. But it's still slow :-( also just connect to her X server. Export your DISPLAY to point to her: export DISPLAY=mymoms-ip:0 That's not good. This way I can't take control of a RUNNING program, just run a new one... BYtE, Diego. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: DrawingArea and Text display.
On Fri, Mar 07, 2003 at 12:45:51PM +0100, Sven Neumann wrote: or slightly simpler and good for multi-line strings as well: PangoContext *context = gtk_widget_create_pango_context (widget); PangoLayout *layout = pango_layout_new (context); g_object_unref (context); pango_layout_set_font_description (layout, font_desc); pango_layout_set_text (layout, Some UTF-8 text, -1); Even better: layout = gtk_widget_create_pango_layout (drawing_area, Some text); pango_layout_set_font_description (layout, font_desc); Also, be sure to check out the porting docs: http://developer.gnome.org/dotplan/porting/ http://developer.gnome.org/doc/API/2.0/gtk/gtk-changes-2-0.html Havoc ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
using predefined classes in php w/ a php-gtk application
My friend and I developed a bunch of database interface classes that simplifies the process. I would really like to go ahead and use it, but I have not found any examples of how it would be used or even if it can be used in gtk? Is this possible? Thanks! ~~~* Shila N. Summers QA/Graphic Designer/Support Matrix Registration 480.443.4058x122 480.443.8767 fax 602.299.8041 cell [EMAIL PROTECTED] ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Draw on the root window?
Hi all, I'm trying to draw several widgets on the root window. I've been trying to get this to work for a while now. Someone pointed me (and I seem to end up everytime) at this thread: http://mail.gnome.org/archives/gtk-list/2000-August/msg00227.html However that seems to be gtk+ 1.x related. I've tried to modify the code to work with gtk+ 2.x, but all it seems to do right now is draw all the widgets in a seperate window (managed seperately by the window manager and they won't even accept input properly) Currently the code looks like this: // Create the window GdkWindow *gdkRootWindow = gdk_get_default_root_window(); topLevelWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_realize(topLevelWindow); gdk_window_unref(topLevelWindow-window); topLevelWindow-window = gdk_window_ref(gdkRootWindow); gdk_window_set_user_data(gdkRootWindow, browser-topLevelWindow); // Create the other widgets topLevelVBox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(topLevelWindow), topLevelVBox); ... As said above this doesn't seem to work. The thread mentioned above also includes some calls to catch expose events, I probably don't need those though, I want to have it act like a normal window. Help would really be appreciated, I've looked all over but I have no idea how to do it. :) -- G-LiTe ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
GTK apps with valgrind
Hi all, I've just recently started running my GTK program (2.0) through valgrind (http://developer.kde.org/~sewardj/) and I noticed many problems (or repeated occurrences of the same problem). The problems are mainly minor ones such as use of an uninitialised values, as opposed to a seg fault. The program runs fine but the sample programs that are part of the GTK installation have the same problem, too. I'm wondering if anyone has had success with programs made with 2.2 and if not, whether there are any future plans to fix up these minor problems (i.e., by initialising values, etc. in the GTK code). While they are minor problems, it would be good if there are less of them so that I can be sure that the problems that come up are mine and I can go ahead and debug those. Thanks! Ray ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Draw on the root window?
* [rSu]G-LiTe ([EMAIL PROTECTED]) wrote: Hi all, I'm trying to draw several widgets on the root window. I've been trying to get this to work for a while now. Someone pointed me (and I seem to end up everytime) at this thread: http://mail.gnome.org/archives/gtk-list/2000-August/msg00227.html However that seems to be gtk+ 1.x related. I've tried to modify the code to work with gtk+ 2.x, but all it seems to do right now is draw all the widgets in a seperate window (managed seperately by the window manager and they won't even accept input properly) Have you checked out the Wheelbarrow example in the examples directory? I think it *might* answer some of your questions. -- .''`. Carl B. Constantine : :' : [EMAIL PROTECTED] `. `'GnuPG: 135F FC30 7A02 B0EB 61DB 34E3 3AF1 DC6C 9F7A 3FF8 `- Debian GNU/Linux -- The power of freedom pgp0.pgp Description: PGP signature
Re: How to remove multiple selected rows fromGtkTreeView/GtkListStore?
Is the reason there are no replies here because: a) this is an FAQ? b) of the crappy wrapping in my message? c) no-one knows the answer? In the case of a) and/or b) I do apologise. I did search the net and found nothing relating to this subject. As for the wrapping, sorry about that too, I know it sucks, but I had just started using Sylpheed-claws and it had experimental wrapping turned on. Either way please let me know as I really need to find a solution to my problem. Thanks. -- Francois Kritzinger KRTFRA002 ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Draw on the root window?
Well, the wheelbarrow is just a normal, but shaped, window. It's not exactly what I want, I'm trying to draw on the root window. What I'm writing is going to cover the entire root window and should always be in the background. I could use a normal window but not all window managers support keeping a window in the background as far as I know. That's why I'm using this approach. It'd be very nice if I could get it to work. Carl B. Constantine wrote: * [rSu]G-LiTe ([EMAIL PROTECTED]) wrote: Hi all, I'm trying to draw several widgets on the root window. I've been trying to get this to work for a while now. Someone pointed me (and I seem to end up everytime) at this thread: http://mail.gnome.org/archives/gtk-list/2000-August/msg00227.html However that seems to be gtk+ 1.x related. I've tried to modify the code to work with gtk+ 2.x, but all it seems to do right now is draw all the widgets in a seperate window (managed seperately by the window manager and they won't even accept input properly) Have you checked out the Wheelbarrow example in the examples directory? I think it *might* answer some of your questions. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Draw on the root window?
Most blackbox based window managers don't. ;) Ah well. I sortof thought the same. I'll just try to use one big window and see if I can get it to go in the background anyways. If anyone however knows how to do this, please reply, as in my opinion it's the best way to do it and I'd like to do it that way if possible. Havoc Pennington wrote: You're way better off just creating a big background window as Nautilus and kdesktop do. Both GNOME and KDE use that approach, the root window approach is quite hard to do (and has unfixable issues) even if you know a heck of a lot about X and GDK. Most WMs that are actively developed support it these days. Havoc ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list