gtk-2.2.1 installation
ok, I found the 'expat' library, installed it successfully and now fontconfig has been installed. But, still pango complains that fontconfig is missing, when i run './configure' for it. Pango also complains that i have not newer version of glib as well. I have recently installed 2.0.6 version of glib, but still pango didn't find it. my LD_LIBRARY_PATH has '/usr/local/lib' in it. i hope somebody out there will really help me in installing gtk-2.2.1 (problems, problems n more problems...!!!). Raheel. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Another bug in gtk+2.2.1
It seems there is another bug in gtk+2.2.1. I 've just compiled gtk+2.2.1 and make a depot file ( depot in hpux is like rpm in linux). It lookslike the install command forgot to relink the libraries!! (See below). What is the point of combining gtk and gdkpixbuf in gtk+2 ?? It seems there is more problem of haveing these two together. __Mehdi mehdi-77 # chatr libgtk-x11-2.0.sl.200.1 libgtk-x11-2.0.sl.200.1: shared library shared library dynamic path search: SHLIB_PATH enabled first embedded path enabled second /usr/local/lib internal name: libgtk-x11-2.0.sl.200 shared library list: static /opt/bintmp/gtk+2-2.2.1/gtk/../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.sl.200 static/opt/bintmp/gtk+2-2.2.1/gtk/../gdk/.libs/libgdk-x11-2.0.sl.200 dynamic /usr/lib/libXext.3 static/usr/local/lib/libpangox-1.0.sl.200 dynamic /usr/lib/libX11.3 static/usr/local/lib/libpango-1.0.sl.200 static/usr/local/lib/libatk-1.0.sl.200 static/usr/local/lib/libgobject-2.0.sl static/usr/local/lib/libgmodule-2.0.sl static/usr/local/lib/libglib-2.0.sl static/usr/local/lib/libiconv.sl dynamic /usr/local/lib/libtiff.sl static/usr/local/lib/libjpeg.sl dynamic /usr/local/lib/libpng.sl dynamic /usr/local/lib/libz.sl dynamic /usr/lib/libm.2 static/usr/local/lib/libintl.sl dynamic /usr/lib/libc.2 shared vtable support disabled static branch prediction disabled executable from stack: D (default) kernel assisted branch prediction enabled lazy swap allocation disabled text segment locking disabled data segment locking disabled third quadrant private data space disabled fourth quadrant private data space disabled data page size: D (default) instruction page size: D (default) ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Deprecation of gtk_progress_bar_set_bar_style()
Hmmm... Some programs just don't fit the default mold. Add Mozilla to that list of programs that use GTK yet don't look at all like it, as should be their right. I can see your point but it's a little too black and white. Why should they have to buy into some big GTK look-and-feel scheme just because that's the graphical toolkit that they choose to use? Using a graphical library doesn't mean you want to look like every other program that has ever used that library, nor should you be coerced to. Perhaps not. Some like consistency. DSL ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Gtk?Scale feature request
Hi - I've never posted to this list, I hope I'm not completely in the wrong place here. Also, I'd appreciate being CC'd on responses, as I'm not a subscriber. I wanted to post a quick question about a potential new feature for GtkHScale and GtkVScale widgets. What about adding a double click response that pops up a spin button or text entry widget under the pointer to allow for precise value entries ? When the popup widget loses focus it would disappear. In some apps that I've seen, particularly in apps like audio mixers, where there are a lot of slider widgets, many GUI authors create a spin box widget (or suchlike) and tie it to the scale widget. I think having a popup would reduce UI clutter and make it easier to design GTK+ GUIs for such apps. I'm mostly wondering if people think this would be feasible and useful. Certainly a disadvantage could be increased user confusion because other GUI toolkits (in my knowledge) don't provide this behavior. In particular, it might be distressing for, eg, audio mixer users who don't immediately see any spin button widgets for precise value entry. But it might be interesting to try this out : If it's a good idea, I don't think it should be dumped just because other toolkits don't do it. Finally, just as a disclaimer, this idea actually comes from seeing another program : I saw this behavior in EMagic's Logic[1] sound software and thought it (a) was really cool, and (b) could be pretty useful for many apps. Ugh, I hope it's not patented. Anyway, just wanted to see what you all thought. Thanks, and cheers ! leif [1] http://www.emagic.de/products/ls/platinum/index.php?lang=EN -- Leif Morgan Johnson . http://ambient.2y.net/leif/ IAESTE trainee . http://www.iaeste.org/ Salomon Automation . http://www.salomon.at/ ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: DrawingArea and Text display.
On Thu, 6 Mar 2003, Tony Denault wrote: Trying to convert some 1.2 gtk code to 2.0. Trying not to use any deprecated functions. I used the DrawingArea to display my own text using different font colors. However documentation is very scarce. Thanks to all who replied. I'll summaried what I learn for the mailing list: 1. Here is a simple example that illustrates some text rendering in a drawing area: Note I pre-allocate some colors and GC for my application, ie: gdk_colormap_alloc_color( CM.colormap, CM.colors[i], FALSE, TRUE ); Nor_gc = gdk_gc_new(base_window-window); /* ** draw_view_2() - Example showing to render text in drawing area ** */ void draw_view_2( GtkWidget *da, int da_wid, int da_hgt ) { PangoFontDescription * font; PangoContext *context; PangoLayout *layout; // obtain pango font object font = pango_font_description_from_string (Courier,Medium 8); // obtain pango layout object context = gtk_widget_create_pango_context (da); layout = pango_layout_new (context); g_object_unref (context); // Draw some text pango_layout_set_font_description (layout, font); pango_layout_set_text (layout, Some UTF-8 text, -1); gdk_gc_set_foreground( Nor_gc, CM.colors[CM_YELLOW] ); gdk_draw_layout (da-window, Nor_gc, 50, 50, layout); // Draw 2nd line pango_layout_set_text (layout, This is more text, -1); gdk_gc_set_foreground( Nor_gc, CM.colors[CM_GREEN] ); gdk_draw_layout (da-window, Nor_gc, 50, 100, layout); // Overwrite part of 2nd line. pango_layout_set_text (layout, overwrite, -1); gdk_draw_layout_with_colors (da-window, Nor_gc, 50, 100, layout, CM.colors[CM_RED], CM.colors[CM_BLACK] ); // 3rd line - gray back ground, Green Text. pango_layout_set_text (layout, overwrite Part II, -1); gdk_draw_layout_with_colors (da-window, Nor_gc, 50, 150, layout, CM.colors[CM_GREEN], CM.colors[CM_GRAY] ); pango_layout_set_text (layout, The End, -1); gdk_draw_layout (da-window, Nor_gc, 50, 200, layout); g_object_unref (layout); g_object_unref (font); } 2. Since my application refreshes my drawing area frequently and I have a lot of text, I actually allocate fonts and a layout. Then used a printf style function to put text on my drawing area. Here is the code: 2.1. Initialize some colors and a GC for my application: gdk_colormap_alloc_color( CM.colormap, CM.colors[i], FALSE, TRUE ); Nor_gc = gdk_gc_new(base_window-window); 2.2. Initalize a font and layout for my application. I save this information in a global variable. struct app_font_info_t Fixed_font; app_font_init( Fixed_font, base_window, Courier,Medium 5) where: struct app_font_info_t// font, pango layout info to render text to drawing area { PangoFontDescription * font;// font reference PangoLayout * layout; // Pango reference int wid; int hgt; int ascent; int descent; }; /*--- ** app_font_init() - fill af with a pango Font and Layout reference. Also **initializes af with some font information (wid, hgt,etc). **--- */ int app_font_init( struct app_font_info_t *af, // O: application font layout information. GtkWidget * gtk_widget, // I: need to reference a widget. ie: base_window char * font_name // I: name of pango font to allocate. ) { PangoContext *context; PangoFontMetrics *metrics; if( (af-font = pango_font_description_from_string (Courier,Medium 5)) == NULL ) { printf(app_font_initialize()-pango_font_description_from_string() error!\n); return ERR_NOT_AVAILABLE; } if( (context = gtk_widget_create_pango_context (gtk_widget)) == NULL ) { printf(app_font_initialize()-gtk_widget_create_pango_context() error!\n); return ERR_NOT_AVAILABLE; } if( (af-layout = pango_layout_new ( context )) == NULL ) { printf(app_font_initialize()-pango_layout_new() error!\n); return ERR_NOT_AVAILABLE; } pango_layout_set_font_description (af-layout, af-font); // determine width height of font. metrics = pango_context_get_metrics (context, af-font, pango_context_get_language(context)); af-wid = PANGO_PIXELS( pango_font_metrics_get_approximate_digit_width(metrics) ); af-ascent = PANGO_PIXELS(