Re: Change label text color in Gtk 1+

2005-04-16 Thread Dov Grobgeld
Another option which I used in my Gtk days is to declare the styles in a normal rc-string and declare a style with a symbolic name e.g. "title" as follows: Gtk::Rc->parse_string(<<__); style "title" { font = "-itc-zapfchancery-medium-i-normal-*-*-300-*-*-p-*-iso8859-1" }

Re: no WM decorations with fvwm2

2005-04-24 Thread Dov Grobgeld
The following almost works for me under fvwm2: if (!$do_windowed) { $mw->realize; my(@geom) = $mw->window->get_geometry(); $mw->window->set_override_redirect(1); $mw->window->move($win_pos_x-$geom[0], $win_pos_y-$geom[1]); } Unfortunately it still pops up a

L10n in Gtk2-perl with Locale::Maketext::Lexicon

2005-05-07 Thread Dov Grobgeld
# Locale::Maketext::Lexicon documentation. # # All translations are in .po files and are encoded in UTF-8. # # Dov Grobgeld # 2005-03-08 # # This example is in the Public Domain ## use

Re: L10n in Gtk2-perl with Locale::Maketext::Lexicon

2005-05-09 Thread Dov Grobgeld
Hi Gavin, I'm quite a novice when it comes to l10n, so I appreciate the input. Actually, I am using Locale::Maketext::Lexicon::Gettext , so I am able to use the same .mo files that are generated by the GNU gettext system. So what does it matter whether I read these files with Locale::Gettext or

Re: imagmap

2005-08-27 Thread Dov Grobgeld
The mapping of a coordinate to a callback may be easily done by creating a so called label image that has the following properties: * It has the same size as the image map being displayed * For each pixel it contains either 0 if there is no callback associated with that pixel or a callback

Re: imagmap

2005-08-28 Thread Dov Grobgeld
example of how to get rgb value in a motion callback of # the image shown in Gtk2::Image. # # Dov Grobgeld <[EMAIL PROTECTED]> # 2005-08-28 # # This code is in the public domain. ## use strict; use Gtk2 '-init

Re: 'fill' justification does nothing

2006-03-15 Thread Dov Grobgeld
Yes that behaviour is unfortunately expected. The fill option has never been implemented in the GtkTextView nor in Pango on which it depends. Dov On 3/15/06, Fabrizio Lanza <[EMAIL PROTECTED]> wrote: > Hello, > I'm developing an application in GTK2::Perl. I noticed a possible bug. Maybe > someb

Re: Correct use of pixbuf, pixmap, and image?

2006-03-15 Thread Dov Grobgeld
For a much simpler example than gimp you may want to have a look at my two projects gtk_image_viewer and giv, both which currently are available only through the gnome cvs. They are an example of how to do very efficient pixel display and manipulation. The server holding the perl binding for the Gt

Re: drawing shapes with color

2006-03-30 Thread Dov Grobgeld
Here's what I use: #!/usr/bin/perl use Gtk2 '-init'; { my %allocated_colors; sub get_color { my ($colormap, $name) = @_; my $ret; if ($ret = $allocated_colors{$name}) { return $ret; } my $color = Gtk2::Gdk::Color->parse($name); $colormap->alloc_color($color,TRUE

Re: Unicode Pages Missing?

2006-03-31 Thread Dov Grobgeld
Sorry, the imagic.weizmann.ac.il server on which they were hosted crashed recently. If I get write permission to the gtk2-perl project on sourceforge, I'd be happy to host the pages there. muppet, could you please add dov-g as a developer for gtk2-perl? I promise not to commit anything to cvs with

Re: Support for graphs/charts in gtk?

2009-03-05 Thread Dov Grobgeld
Plotting is one area where Gtk lacks behind Qt with one exception, and that is if your using python, where you have available matplotlib ( http://matplotlib.sourceforge.net/) . There are a few C-based graph libraries for gtk, but they are quite feature-weak: - GtkPlot - part of GtkExtra (Get th

Re: Execute associated image viewer or media player on button click

2009-12-08 Thread Dov Grobgeld
You don't say under what system you need this. On windows you would simply do: system("foo.png") and you would call the viewer associated with .png files. (This works for url's as well as just running it through system, runs the prefered user browser). On Linux there is no such system defa

Re: How to apply a theme to a perl gtk program

2010-04-11 Thread Dov Grobgeld
Search for "Styles" in: http://gtk2-perl.sourceforge.net/doc/yapc-2004-perl-gtk2/slides.html Regards, Dov 2010/4/12 Xi Yang > In platforms running in Gnome desktop, a perl Gtk program will have the > native look, using the theme currently used by Gnome. However, while the > script is running

Re: Spinning the main loop

2010-09-15 Thread Dov Grobgeld
For an example of how to use an additional thread and have it communicate with the mainloop thread see my example at: http://www.mail-archive.com/gtk-app-devel-l...@gnome.org/msg14213.html This is the correct way of doing anything time consuming without interrupting the gui flow. There is no cont

Re: Spinning the main loop

2010-09-15 Thread Dov Grobgeld
duced > by it events during my heavy calculations in the first place ? > > Thanks, > Sergei. > > > --- On Wed, 9/15/10, Dov Grobgeld wrote: > > From: Dov Grobgeld > Subject: Re: Spinning the main loop > To: "Sergei Steshenko" > Cc: gtk-perl-list@gn

Re: Spinning the main loop

2010-09-15 Thread Dov Grobgeld
; the calculations. > > Regards, > Sergei. > > > --- On Wed, 9/15/10, Dov Grobgeld wrote: > > From: Dov Grobgeld > Subject: Re: Spinning the main loop > To: "Sergei Steshenko" > Cc: gtk-perl-list@gnome.org, "Emmanuele Bassi" > Date: W

Re: Goo::Canvas versus Gnome2::Canvas

2012-02-16 Thread Dov Grobgeld
I've used both from perl, and I would say, use Goo::Canvas for a few reasons. One, is that it has less dependencies, GnomeCanvas depends, as it name says, on some Gnome libraries, where as Goo::Canvas does not. A second difference is that the Cairo support of Goo::Canvas is superior to the Gnome::C

Re: Scaling an image with Gtk2::Gdk::Pixbuf->scale

2017-10-26 Thread Dov Grobgeld
Try creating a new (empty) image of the required size and then use cairo to fill it with the desired contents. The following link may help you (though it is in C and not perl, but the API is the same): https://gist.github.com/bert/985903 Regards, Dov On Thu, Oct 26, 2017 at 11:18 AM, Les Trol