Page 3 of 3

Posted: Thu 31 Jan 2013, 19:39
by SFR
Hey, thanks a lot for confirmation, Rolf. :D

But it still bugs me I can't recreate this. :?
Anyway, before I replace v1.6 with v1.6.1 in the first post officially, I'd like to test one more thing.

Rolf, if you have a couple of minutes to spare - could you check out this piece of code?
First dialog (taken from v1.6) should produce the above error...but how about subsequent ones..?
Also, there's official spinbutton example script which also works fine for me.

Code: Select all

#!/bin/bash

# This one should invoke GTK error
export MAIN_1='
<window>
  <vbox>
    <text><label>FIRST DIALOG</label></text>
    <hbox>
      <spinbutton range-max="100" range-step="1">
        <variable>SW</variable>
        <default>1</default>
      </spinbutton>        

      <spinbutton range-max="1.0" range-step="0.01">
         <variable>OPAC</variable>
         <default>1.0</default>
      </spinbutton>
    </hbox>
  
    <button><label>Next one please</label></button>
  </vbox>
</window>'

# How about this one?
export MAIN_2='
<window>
  <vbox>
    <text><label>SECOND DIALOG</label></text>
    <hbox>
      <spinbutton range-max="100" range-step="1">
        <variable>SW</variable>
        <default>1</default>
      </spinbutton>        

      <spinbutton range-max="1.00" range-step="0.01">
         <variable>OPAC</variable>
         <default>1.00</default>
      </spinbutton>
    </hbox>
  
    <button><label>Next one please</label></button>
  </vbox>
</window>'

# And finally how about that one...
export MAIN_3='
<window>
  <vbox>
    <text><label>THIRD DIALOG</label></text>
    <hbox>
      <spinbutton range-value="1" range-min="0" range-max="100" range-step="1">
        <variable>SW</variable>
      </spinbutton>        

      <spinbutton range-value="1.00" range-min="0.00" range-max="1.00" range-step="0.01">
         <variable>OPAC</variable>
      </spinbutton>
    </hbox>
    <button ok></button>
  </vbox>
</window>'

gtkdialog -p MAIN_1
gtkdialog -p MAIN_2
gtkdialog -p MAIN_3
Thanks again & Greetings!

Posted: Fri 01 Feb 2013, 09:21
by rhadon
Hi SFR,

it seems to be a general problem. spinbutton_advanced also doesn't work for me. Error code:

Code: Select all

# ./spinbutton_advanced

(gtkdialog:15952): Gtk-CRITICAL **: IA__gtk_spin_button_new_with_range: assertion `step != 0.0' failed

(gtkdialog:15952): Gtk-CRITICAL **: IA__gtk_spin_button_set_value: assertion `GTK_IS_SPIN_BUTTON (spin_button)' failed
**
ERROR:variables.c:189:variables_new_with_widget: assertion failed: (widget != NULL)
./spinbutton_advanced: line 89: 15952 Aborted                 $GTKDIALOG --program=MAIN_DIALOG
#
Error code from your snippet:

Code: Select all

# ./tst-bdraw

(gtkdialog:1920): Gtk-CRITICAL **: IA__gtk_spin_button_new_with_range: assertion `step != 0.0' failed

(gtkdialog:1920): Gtk-CRITICAL **: IA__gtk_spin_button_set_value: assertion `GTK_IS_SPIN_BUTTON (spin_button)' failed
**
ERROR:variables.c:189:variables_new_with_widget: assertion failed: (widget != NULL)
./tst-bdraw: line 63:  1920 Aborted                 gtkdialog -p MAIN_1

(gtkdialog:1929): Gtk-CRITICAL **: IA__gtk_spin_button_new_with_range: assertion `step != 0.0' failed

(gtkdialog:1929): Gtk-CRITICAL **: IA__gtk_spin_button_set_value: assertion `GTK_IS_SPIN_BUTTON (spin_button)' failed
**
ERROR:variables.c:189:variables_new_with_widget: assertion failed: (widget != NULL)
./tst-bdraw: line 64:  1929 Aborted                 gtkdialog -p MAIN_2

(gtkdialog:1950): Gtk-CRITICAL **: IA__gtk_spin_button_new_with_range: assertion `step != 0.0' failed

(gtkdialog:1950): Gtk-CRITICAL **: IA__gtk_spin_button_set_value: assertion `GTK_IS_SPIN_BUTTON (spin_button)' failed
**
ERROR:variables.c:189:variables_new_with_widget: assertion failed: (widget != NULL)
./tst-bdraw: line 65:  1950 Aborted                 gtkdialog -p MAIN_3
# 
Hope this helps,

Rolf

Posted: Fri 01 Feb 2013, 10:08
by SFR
Thank you Rolf!

Looks like there's nothing I can do about it at the moment...

Ok, I have attached v1.6.1 in the first post.

Greetings!

gtkdialog output

Posted: Fri 01 Feb 2013, 10:33
by Dromeno
Here they are:

sh-4.1# gtkdialog --version
gtkdialog version 0.8.2 release (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor
Built with additional support for: Glade.
sh-4.1# gtkdialog4 --version
gtkdialog version 0.8.0 (C) 2003-2007 Laszlo Pere, 2011 Thunor
sh-4.1# gtkdialog5 --version
gtkdialog version 0.8.2 release (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor
Built with additional support for: Glade.
sh-4.1#

Posted: Fri 01 Feb 2013, 10:46
by SFR
Thanks for the info Dromeno

Looks ok...I have no idea why doesn't it work for you and Rolf, even with pfix=ram...
Hope v1.6.1 runs ok for you as well.

Greetings!

Posted: Fri 28 Jun 2013, 15:29
by SFR
Since v1.6.1 I've been dabbling in it from time to time, improving this and that, so here's version 1.7:
- removed 'preview' icon - preview is now always enabled;
- automatically detects Gtkdialog version and sets <button> or <pixmap> as drawing area;
- due to massive internal improvements and therefore much better performance, refresh interval has been lowered from 1000ms to 333ms;
Actually, on quite decent HW, it's okay even with 200-250ms (for example: my low-end Acer with AMD-C60 @ 1GHz is not such a hardware, but Toshiba with Intel i3 M330 @ 2.13GHz is).

This app is really a great training ground for learning how to optimize the code, lol.

First post updated!

Greetings!