Re: ProgressBar doesn't pulse
- From: muppet <scott asofyet org>
- To: Nik Ogura <nogura uma-mn com>
- Cc: gtk2-perl <gtk-perl-list gnome org>
- Subject: Re: ProgressBar doesn't pulse
- Date: Thu, 18 Jan 2007 08:53:10 -0500
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 ---- */
#include <gtk/gtk.h>
static gboolean
show_progress (GtkProgressBar * pbar)
{
gtk_progress_bar_pulse (pbar);
return TRUE;
}
int
main (int argc,
char *argv[])
{
GtkWidget * window;
GtkWidget * pbar;
GtkWidget * vb;
GtkWidget * b;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
pbar = gtk_progress_bar_new ();
gtk_progress_bar_set_pulse_step (GTK_PROGRESS_BAR (pbar), 0.1);
vb = gtk_vbox_new (FALSE, 0);
b = gtk_button_new_with_label ("Quit");
gtk_container_add (GTK_CONTAINER (window), vb);
gtk_container_add (GTK_CONTAINER (vb), pbar);
gtk_container_add (GTK_CONTAINER (vb), b);
g_signal_connect (b, "clicked", G_CALLBACK (gtk_main_quit), NULL);
g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
gtk_widget_show_all (window);
g_timeout_add (10, (GSourceFunc)show_progress, pbar);
gtk_main ();
return 0;
}
/* --- end progress.c ---- */
--
I hate to break it to you, but magic data pixies don't exist.
-- Simon Cozens
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]