How can I have a progressbar inside a statusbar ?



Hi,

I searched into the archive and played with the various gtk_container_add and gtk_box_pack_start but without success.
My progress bar is always displaye next to the second statusbar:

hbox1 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox1);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (hbox1), 2);
  gtk_widget_set_sensitive (hbox1, FALSE);

  statusbar1 = gtk_statusbar_new ();
  gtk_widget_show (statusbar1);
  gtk_box_pack_start (GTK_BOX (hbox1), statusbar1, TRUE, TRUE, 0);
  //gtk_widget_set_size_request (statusbar1, 422, -1);
  gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar1), FALSE);

  statusbar2 = gtk_statusbar_new ();
  gtk_widget_show (statusbar2);
  gtk_box_pack_start (GTK_BOX (hbox1), statusbar2, FALSE, TRUE, 0);
  //gtk_widget_set_size_request (statusbar2, 160, -1);
  gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar2), FALSE);

  progressbar = gtk_progress_bar_new();
  gtk_widget_set_size_request(progressbar, 160, -1);
  gtk_container_add (GTK_CONTAINER (statusbar2), progressbar);
  gtk_widget_show (progressbar);

  statusbar3 = gtk_statusbar_new ();
  gtk_widget_show (statusbar3);
  gtk_box_pack_end (GTK_BOX (hbox1), statusbar3, FALSE, TRUE, 0);
  gtk_widget_set_size_request (statusbar3, 25, -1);
  gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar3), FALSE);

Can anyone post some code to allow putting a progressbar inside a status bar inside as ThunderBird's email client window (when you download your email ) ?

Thanks,
--
Colossus
Xarchiver, a GTK2 only archive manager - http://xarchiver.sourceforge.net
Cpsed, a Linux OpenGL 3D scene editor - http://cpsed.sourceforge.net
Mizio, a QT proxy hunter scanner tool - http://mizio.sourceforge.net



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]