Re: Encoding problem in Gtk2::Ex::PodViewer
Hi Gavin, Roderich, I will take a look at Roderich's patch and see what can be done to correct this bug without affecting the original bugfix. *Thank you very much* to both of you for investigating and explaining the behaviour and now fixing it. I very much appreciate this work, especially as the encoding stuff isn't (at least, for me) the most fun part in programming. Ben ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Encoding problem in Gtk2::Ex::PodViewer
Hi all, using the PodViewer widget to display help, I have an encoding problem: I cannot get the widget to correctly display utf8 text. I load the pod from a file which is in utf-8, but it is displayed as iso-8859-1. I also loaded the file into perl first and used $podviewer-load_string($string) but it didn't help. If I display the string (loaded from the pod file) in a regular TextBuffer / TextView, it's correctly displayed; also if I use it as label text or similar. ### Sample script use Gtk2 -init; use Gtk2::Ex::PodViewer; my $viewer = Gtk2::Ex::PodViewer-new; # find mypod.pod attached, hope it's still utf8 after mailing it $viewer-load('mypod.pod'); $viewer-show; my $window = Gtk2::Window-new; $window-add($viewer); $window-show; Gtk2-main; ### Any ideas? Thanks Ben =pod =head1 Hello World! The world is a better place since there's utf8. We no longer have problems with the euro sign (€) or german umlauts like ae (ä), ue (ü) and so on. =cut ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Re: ProgressBar doesn't pulse
Am Donnerstag 18 Januar 2007 14:53 schrieb muppet: On Jan 18, 2007, at 12:56 AM, Nik Ogura wrote: I ran the example on my Ubuntu 6.06 system. She pulsed like a bat out of hell. Don't know if that helps zero in on the problem, but hey I figured I'd mention it. It makes it sound like much less of a binding problem. Please compile and run the following C code (transliterated from your previously posted perl code) with $ gcc -o progress progress.c `pkg-config --cflags --libs gtk+-2.0` $ ./progress on your test systems. If the same behavior manifests, it is a gtk+ or theme issue. /* begin progress.c */ [ snip ] /* --- end progress.c */ Thanks for the code and the commandline! As I kind of expected, the C version of the test also does not work on my machine (kubuntu). After this test, I played around a bit and found some settings in the system configurations panel that's about GTK styles and fonts. There you can decide whether to use my KDE style in GTK applications or use another style and choose between Qt or Raleigh. When I set it to use another style and select Raleigh, the progress bar *does* pulse (of course, it's no more a KDE progressbar). So it's now traced down to some KDE/GTK/theme interaction. Is there anything more I / we can do about it, or just file a bug? Is Kubuntu the only distribution allowing KDE styles for GTK applications? I'm not sure who should get the bug assigned -- kubuntu, kde or gtk... I actually don't even know whether there's any KDE application with a pulse progressbar, or if they only use the fraction ones and it simply doesn't know how to pulse at all:) Thanks, ben ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Re: ProgressBar doesn't pulse
Am Dienstag 16 Januar 2007 18:35 schrieb zentara: On Mon, 15 Jan 2007 18:21:30 +0100 Ben Staude [EMAIL PROTECTED] wrote: Am Sonntag 14 Januar 2007 04:21 schrieb muppet: On Jan 13, 2007, at 5:54 PM, Ben Staude wrote: Any ideas why it doesn't work? Is this related to some Gtk/KDE interaction? This typically happens when you don't return control the main loop. Does your program respond at all while it's supposed to be pulsing? I am using this as test code (was posted by zentara here: http://www.mail-archive.com/gtk-perl-list@gnome.org/msg00854.html): [ snip code ] This test script does work as expected on another Linux machine (running Debian Sarge with KDE), but the progressbar looks different (more like gnome, whereas on Kubuntu (where it doesn't work), they have some KDE integration of gtk and therefor a KDE progressbar). You might also try setting the pulse step. The default is 0.1, but you may need a different value for some reason or another. Difficult to tell without more information. Maybe the code above helps sorting out programming issues (as the test script isn't mine:-)). Besides this, I don't know in which direction to search for the cause or provide information? Maybe someone on the list can run the test script on their Kubuntu to find out whether it's related to that? Thanks a lot, Ben I just ran the example, on my linux box, and it pulses very fast. If I set the timer interval to 1 (very fast), it seems to sputter. So my thought is that with all the KDE bloat in kbuntu, running the timer at 10, is too fast for the system to update the screen, so it appears not to work. I agree that there might be some KDE bloat, but it's not *that* bad;-) Try setting the timer to 100, 500, or even 1000 and see if kbuntu can keep up. I set the timer to different values (from 5 to 5000), it still doesn't work. The CPU is idle, the system is completely reactive. This is including the test dialog, where the Quit-button has the same hover-effect as the other kde buttons. Only the progressbar does not seem to do anything at all... zentara Ben ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Re: ProgressBar doesn't pulse
Am Sonntag 14 Januar 2007 04:21 schrieb muppet: On Jan 13, 2007, at 5:54 PM, Ben Staude wrote: Any ideas why it doesn't work? Is this related to some Gtk/KDE interaction? This typically happens when you don't return control the main loop. Does your program respond at all while it's supposed to be pulsing? I am using this as test code (was posted by zentara here: http://www.mail-archive.com/gtk-perl-list@gnome.org/msg00854.html): #!/usr/bin/perl use warnings; use strict; use Gtk2; Gtk2-init(); my $window = new Gtk2::Window; my $pbar = new Gtk2::ProgressBar; $pbar-set_pulse_step(.1); # set_text not allowed in pulser # ! $pbar-set_text('foobar'); my $vb = new Gtk2::VBox(0, 0); my $b = new Gtk2::Button('Quit'); $window-add($vb); $vb-add($pbar); $vb-add($b); $b-signal_connect('clicked', sub {Gtk2-main_quit}); $window-signal_connect('destroy', sub {Gtk2-main_quit}); $window-show_all(); my $timer = Glib::Timeout-add (10,\show_progress); # timer will run until callback returns false Gtk2-main; sub show_progress{ $pbar-pulse(); return 1; } This test script does work as expected on another Linux machine (running Debian Sarge with KDE), but the progressbar looks different (more like gnome, whereas on Kubuntu (where it doesn't work), they have some KDE integration of gtk and therefor a KDE progressbar). You might also try setting the pulse step. The default is 0.1, but you may need a different value for some reason or another. Difficult to tell without more information. Maybe the code above helps sorting out programming issues (as the test script isn't mine:-)). Besides this, I don't know in which direction to search for the cause or provide information? Maybe someone on the list can run the test script on their Kubuntu to find out whether it's related to that? Thanks a lot, Ben ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
ProgressBar doesn't pulse
Hi list, I'm trying to make a ProgressBar pulse, but it doesn't. After searching a while for the error in my code, I found that even the small example posted here http://www.mail-archive.com/gtk-perl-list@gnome.org/msg00854.html doesn't work on my machine (kubuntu 6.06, libgtk2-perl 1.102). $pbar-set_fraction(...) does work, but using $pbar-pulse, the bar does not move out of the very left corner. Any ideas why it doesn't work? Is this related to some Gtk/KDE interaction? Thanks, ben ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list