#include <gtk/gtk.h>
-#include "cellareascaffold.h"
/*******************************************************
create_color_pixbuf (const char *color)
{
GdkPixbuf *pixbuf;
- GdkColor col;
+ GdkRGBA rgba;
int x;
int num;
int rowstride;
guchar *pixels, *p;
- if (!gdk_color_parse (color, &col))
+ if (!gdk_rgba_parse (color, &col))
return NULL;
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
gdk_pixbuf_get_height (pixbuf);
for (x = 0; x < num; x++) {
- p[0] = col.red / 65535 * 255;
- p[1] = col.green / 65535 * 255;
- p[2] = col.blue / 65535 * 255;
+ p[0] = col.red * 255;
+ p[1] = col.green * 255;
+ p[2] = col.blue * 255;
p += 3;
}
tree_menu (void)
{
GtkWidget *window, *widget;
- GtkWidget *menu, *menubar, *vbox, *menuitem;
+ GtkWidget *menubar, *vbox;
GtkCellArea *area;
GtkTreeModel *store;
gtk_window_set_title (GTK_WINDOW (window), "GtkTreeMenu");
- vbox = gtk_vbox_new (FALSE, 4);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
gtk_widget_show (vbox);
menubar = gtk_menu_bar_new ();