Add xpmimg widget to makegdesc.
authorFredrik Tolf <fredrik@dolda2000.com>
Mon, 13 Aug 2007 13:27:58 +0000 (15:27 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Mon, 13 Aug 2007 13:27:58 +0000 (15:27 +0200)
common/makegdesc

index cfcb6f1..e8fd6f5 100755 (executable)
@@ -119,6 +119,9 @@ sub printwidgets
            $widget->{"stock"} || die("Can't have image without stock\n");
            $widget->{"size"} || die("Can't have image without size\n");
            print "${p}stack[$sl] = gtk_image_new_from_stock(GTK_STOCK_" . $widget->{"stock"} . ", GTK_ICON_SIZE_" . $widget->{"size"} . ");\n";
+       } elsif($widget->{"type"} eq "xpmimg") {
+           $widget->{"data"} || die("Can't have XPM image without data\n");
+           print "${p}stack[$sl] = gtk_image_new_from_pixbuf(gdk_pixbuf_new_from_xpm_data((const char **)" . $widget->{"data"} . "));\n";
        } elsif($widget->{"type"} eq "lbl") {
            $widget->{"label"} || $widget->{"markup"} || die("Can't have label without label\n");
            if($widget->{"label"}) {