示例#1
0
static void linphone_gtk_in_call_set_animation_image(GtkWidget *callview, const char *image_name, gboolean is_stock){
	GtkWidget *container=linphone_gtk_get_widget(callview,"in_call_animation");
	GList *elem=gtk_container_get_children(GTK_CONTAINER(container));
	GtkWidget *image;

	if (!is_stock){
		if (image_name==NULL){
			gtk_widget_hide(container);
		}
		image=create_pixmap(image_name);
	}else
		image=gtk_image_new_from_stock(image_name,GTK_ICON_SIZE_DND);
	if (elem)
		gtk_widget_destroy((GtkWidget*)elem->data);
	gtk_widget_show(image);
	gtk_container_add(GTK_CONTAINER(container),image);
	gtk_widget_show_all(container);
}
示例#2
0
文件: chat.c 项目: mjpak0109/linphone
GtkWidget *create_tab_chat_header(LinphoneChatRoom *cr,const LinphoneAddress *uri){
	GtkWidget *w=gtk_hbox_new (FALSE,0);
	GtkWidget *i=create_pixmap ("chat.png");
	GtkWidget *l;
	GtkWidget *image=gtk_image_new_from_stock(GTK_STOCK_CLOSE,GTK_ICON_SIZE_MENU);
	GtkWidget *b=gtk_button_new();

	gtk_button_set_image(GTK_BUTTON(b),image);
	gtk_button_set_relief(GTK_BUTTON(b),GTK_RELIEF_NONE);
	gtk_widget_set_size_request(b,25,20);
	g_signal_connect_swapped(G_OBJECT(b),"clicked",G_CALLBACK(linphone_gtk_quit_chatroom),cr);
	l=gtk_label_new(get_display_name(uri));
	gtk_box_pack_start (GTK_BOX(w),i,FALSE,FALSE,0);
	gtk_box_pack_start (GTK_BOX(w),l,FALSE,FALSE,0);
	gtk_box_pack_end(GTK_BOX(w),b,TRUE,TRUE,0);
	gtk_widget_show_all(w);
	return w;
}
示例#3
0
void linphone_gtk_create_in_call_view(LinphoneCall *call){
	GtkWidget *call_view=linphone_gtk_create_widget("main","in_call_frame");
	GtkWidget *main_window=linphone_gtk_get_main_window ();
	GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(main_window,"viewswitch");
	static int call_index=1;
	int idx;

	if (ms_list_size(linphone_core_get_calls(linphone_gtk_get_core()))==1){
		/*this is the only call at this time */
		call_index=1;
	}
	g_object_set_data(G_OBJECT(call_view),"call",call);
	g_object_set_data(G_OBJECT(call_view),"call_index",GINT_TO_POINTER(call_index));

	linphone_call_set_user_pointer (call,call_view);
	linphone_call_ref(call);
	gtk_notebook_append_page (notebook,call_view,make_tab_header(call_index));
	gtk_widget_show(call_view);
	idx = gtk_notebook_page_num(notebook, call_view);
	gtk_notebook_set_current_page(notebook, idx);
	call_index++;
	linphone_gtk_enable_hold_button (call,FALSE,TRUE);
	linphone_gtk_enable_video_button (call,FALSE,TRUE);
	linphone_gtk_enable_mute_button(
					GTK_BUTTON(linphone_gtk_get_widget(call_view,"incall_mute")),FALSE);

	GtkWidget *transfer = linphone_gtk_get_widget(call_view,"transfer_button");
	gtk_button_set_image(GTK_BUTTON(transfer),gtk_image_new_from_stock
							 (GTK_STOCK_GO_FORWARD,GTK_ICON_SIZE_BUTTON));
	g_signal_connect(G_OBJECT(transfer),"clicked",(GCallback)transfer_button_clicked,call);
	gtk_widget_hide(transfer);

	GtkWidget *conf = linphone_gtk_get_widget(call_view,"conference_button");
	gtk_button_set_image(GTK_BUTTON(conf),gtk_image_new_from_stock (GTK_STOCK_ADD,GTK_ICON_SIZE_BUTTON));
	g_signal_connect(G_OBJECT(conf),"clicked",(GCallback)conference_button_clicked,call);
	gtk_widget_hide(conf);

	GtkWidget *button=linphone_gtk_get_widget(call_view,"terminate_call");
	GtkWidget *image=create_pixmap("stopcall-small.png");
	gtk_button_set_label(GTK_BUTTON(button),_("Hang up"));
	gtk_button_set_image(GTK_BUTTON(button),image);
	gtk_widget_show(image);
	g_signal_connect_swapped(G_OBJECT(linphone_gtk_get_widget(call_view,"quality_indicator")),"button-press-event",(GCallback)linphone_gtk_show_call_stats,call);
}
示例#4
0
void udpate_tab_chat_header(GtkWidget *chat_view,const LinphoneAddress *uri,LinphoneChatRoom *cr){
	GtkWidget *main_window=linphone_gtk_get_main_window();
	GtkNotebook *notebook=GTK_NOTEBOOK(linphone_gtk_get_widget(main_window,"viewswitch"));
	GtkWidget *w=gtk_hbox_new (FALSE,0);
	GtkWidget *i=create_pixmap ("chat.png");
	GtkWidget *l;
	GtkWidget *image=gtk_image_new_from_stock(GTK_STOCK_CLOSE,GTK_ICON_SIZE_MENU);
	GtkWidget *b=gtk_button_new();

	gtk_button_set_image(GTK_BUTTON(b),image);
	gtk_button_set_relief(GTK_BUTTON(b),GTK_RELIEF_NONE);
	gtk_widget_set_size_request(b,25,20);
	g_signal_connect_swapped(G_OBJECT(b),"clicked",G_CALLBACK(linphone_gtk_quit_chatroom),cr);
	l=gtk_label_new (get_display_name(uri));
	gtk_box_pack_start (GTK_BOX(w),i,FALSE,FALSE,0);
	gtk_box_pack_start (GTK_BOX(w),l,FALSE,FALSE,0);
	gtk_box_pack_end(GTK_BOX(w),b,TRUE,TRUE,0);
	gtk_notebook_set_tab_label(notebook,chat_view,w);
	gtk_widget_show_all(w);
}
示例#5
0
void test_fill(uint32_t w, uint32_t h, uint32_t format, unsigned long phys)
{
	PixmapPtr dest;
	C2D_RECT rect;
	c2d_ts_handle curTimestamp;

	DEBUG_MSG("fb: %04dx%04d-%08x", w, h, format);
	RD_START("fb", "%dx%d-%08x", w, h, format);

	if (phys) {
		dest = create_pixmap_phys(w, h, format, phys);
	} else {
		dest = create_pixmap(w, h, format);
	}


	rect.x = 1 + (w / 64);
	rect.y = 2 + (w / 32);
	rect.width = w - 2 * rect.x;
	rect.height = h - 2 * rect.y;

	// note: look for pattern 0xff556677 in memory to find cmdstream:
	CHK(c2dFillSurface(dest->id, 0xff556677, &rect));
	CHK(c2dFlush(dest->id, &curTimestamp));
	CHK(c2dWaitTimestamp(curTimestamp));

	// second blit.. fill a sub-rect in center of surface:
	rect.x = (w - 10) / 2;
	rect.y = (h - 16) / 2;
	rect.width = 10;
	rect.height = 16;
	CHK(c2dFillSurface(dest->id, 0xff223344, &rect));
	CHK(c2dFlush(dest->id, &curTimestamp));
	CHK(c2dWaitTimestamp(curTimestamp));

	sleep(5);

	RD_END();

//	dump_pixmap(dest, "fill-%04dx%04d-%08x.bmp", w, h, format);
}
示例#6
0
int main(int argc, char **argv)
{
	/* create dummy pixmap to get initialization out of the way */
	c2d_ts_handle curTimestamp;
	PixmapPtr tmp = create_pixmap(64, 64, xRGB);
	CHK(c2dFlush(tmp->id, &curTimestamp));
	CHK(c2dWaitTimestamp(curTimestamp));

	test_fill(1920, 1080, xRGB, 0, 0, 1920, 1080);
	test_fill(1920, 1080, xRGB, 717, 395, 718, 685);

	/* test limits of x, y */
	test_fill(1920, 1080, xRGB, 0x100, 0, 0x101, 0);
	test_fill(1920, 1080, xRGB, 0, 0x100, 0, 0x101);

	/* test limits of width, height */
	test_fill(1920, 1080, xRGB, 0, 0, 0x100, 0);
	test_fill(1920, 1080, xRGB, 0, 0, 0, 0x100);

	return 0;
}
int main(int argc, char **argv)
{
	/* create dummy pixmap to get initialization out of the way */
	c2d_ts_handle curTimestamp;
	PixmapPtr tmp = create_pixmap(64, 64, xRGB);
	CHK(c2dFlush(tmp->id, &curTimestamp));
	CHK(c2dWaitTimestamp(curTimestamp));

/*
[  1340.257] (II) freedreno(0): MSMCheckComposite:590 op:12: 0x2eb268 {20028888, 0} <- 0x2eb3a8 {08018000, 0} ((nil) {00000000, 0})
[  1340.257] (II) freedreno(0): MSMPrepareComposite:694 0x2eb178 {35x8,256} <- 0x2eb2c8 {1024x320,1024} ((nil) {0x0,0})
[  1340.258] (II) freedreno(0): MSMComposite:766 srcX=0 srcY=0  maskX=0 maskY=0 dstX=0  dstY=2  width=7 height=6
 */

	test_composite(C2D_ALPHA_BLEND_ADDITIVE,
			ARGB, 35,   8,
			A8,   1024, 320,
			0,    0,    0,
			0, 0, 0, 0, 0, 2, 7, 6);

	return 0;
}
示例#8
0
static PixmapPtr get_pixmap(int fd)
{
	static struct {
		uint32_t ptr;
		PixmapPtr pix;
	} pixmaps[256];
	static int npixmaps = 0;

	char *line = readline(fd);
	if ((line == strstr(line, "EXA: SRC:")) ||
			(line == strstr(line, "EXA: DST:"))) {
		uint32_t ptr;
		int w, h, p, d, i;

		DEBUG_MSG("line: %s", line);

		line += 10;

		sscanf(line, "0x%x, %dx%d,%d,%d", &ptr, &w, &h, &p, &d);
		DEBUG_MSG("GOT: 0x%x, %dx%d,%d,%d", ptr, w, h, p, d);

		/* see if we can find the pixmap: */
		for (i = 0; i < npixmaps; i++)
			if (ptr == pixmaps[i].ptr)
				return pixmaps[i].pix;

		/* ok, then we need to create a new one: */
		DEBUG_MSG("creating pixmap: %dx%d (0x%x)", w, h, ptr);
		pixmaps[npixmaps].ptr = ptr;
		pixmaps[npixmaps].pix = create_pixmap(w, h, xRGB);

		return pixmaps[npixmaps++].pix;
	}

	ERROR_MSG("unexpected line: %s", line);
	end();

	return NULL;
}
示例#9
0
GdkPixmap *
pixmap_new_from_pixbuf (GdkPixbuf *pixbuf, GtkWidget *parent)
{
    GdkPixmap *pixmap;
    guint     width, height;
    cairo_t   *cr;

    width  = gdk_pixbuf_get_width (pixbuf);
    height = gdk_pixbuf_get_height (pixbuf);

    pixmap = create_pixmap (width, height, parent);
    if (!pixmap)
	return NULL;

    cr = (cairo_t *) gdk_cairo_create (GDK_DRAWABLE (pixmap));
    gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
    cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
    cairo_paint (cr);
    cairo_destroy (cr);

    return pixmap;
}
示例#10
0
void linphone_gtk_call_update_tab_header(LinphoneCall *call,gboolean pause){
	GtkWidget *w=(GtkWidget*)linphone_call_get_user_pointer(call);
	GtkWidget *main_window=linphone_gtk_get_main_window();
	GtkNotebook *notebook=GTK_NOTEBOOK(linphone_gtk_get_widget(main_window,"viewswitch"));
	gint call_index=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"call_index"));
	GtkWidget *new_label=gtk_hbox_new (FALSE,0);
	GtkWidget *i=NULL;
	GtkWidget *l;
	gchar *text;
	
	if(pause){
		i=gtk_image_new_from_stock(GTK_STOCK_MEDIA_PAUSE,GTK_ICON_SIZE_SMALL_TOOLBAR);
	} else {
		i=create_pixmap ("startcall-small.png");
	}
	
	text=g_strdup_printf(_("Call #%i"),call_index);
	l=gtk_label_new (text);
	gtk_box_pack_start (GTK_BOX(new_label),i,FALSE,FALSE,0);
	gtk_box_pack_end(GTK_BOX(new_label),l,TRUE,TRUE,0);

	gtk_notebook_set_tab_label(notebook,w,new_label);
	gtk_widget_show_all(new_label);
}
示例#11
0
文件: ifr_sgraph.c 项目: clemej/ifrac
int graph_start(void)
{
        int i;
  PIXMAP_INFO  *xpm;
        unsigned char   bw_colours[6];

/*      xmode = (vminfo->flags & IS_MODEX) ? 1: 0; */

/*  cm_pixels = (unsigned char *) malloc(StaticColours * BytesPerPixel); */
        if (BytesPerPixel > 1) i = 256; else i = 1 << ScrDepth;
  cm_pixels = (unsigned char *) malloc(i * BytesPerPixel);
  if (cm_pixels == NULL) return 0;

        for (i=0; i<PaneCount; i++)
                all_panes[i] = NULL;

        for(i=0; i<3; i++)
        {  bw_colours[i] = 0;
           bw_colours[i+3] = 255;
        }

        if (!set_static_colours(0, 2, bw_colours))
                                return 0;

        all_stipples[ST_NO_STIPPLE] = NULL;
        all_stipples[ST_DARK_STIPPLE] = quarter_bmp_bits;
        all_stipples[ST_LIGHT_STIPPLE] = half_bmp_bits;

        for (i=0; i<PaneCount; i++)
        {  xpm = create_pixmap(WndWidth, WndHeight, i+1);
           if(xpm == NULL) break;
           all_panes[i] = xpm;
        }

        return (i>=PaneCount);
}
示例#12
0
static void
on_session_duplicate (GSQLSession *session, gpointer user_data)
{
	GSQL_TRACE_FUNC;
	
	GSQLSession *new_session;
	GSQLEOracleSession *new_spec, *spec;
	gchar *username, *database, *password;
	GSQLWorkspace *new_workspace, *workspace;
	GSQLNavigation *navigation;
	gchar buffer[256], info[32];
	GSQLCursor *cursor;
	GSQLVariable *variable;
	GSQLCursorState c_state;
	GtkWidget   *sessions;
	gchar *session_name;
	GList *lst;
	GtkWidget	*header;
	gint ret;
	gchar *sql = "select version from product_component_version "
	 			 "where instr(lower(product),'oracle') >0  "
				 "and rownum <2 ";
	
	GSQL_FIXME;
	/* Do rework this function, not yet, later. It seems like a hack :) */
	
	spec = session->spec;
	
	new_spec = g_malloc0 (sizeof (GSQLEOracleSession));
	new_spec->mode = spec->mode;
	
	username = (gchar *) gsql_session_get_username (session);
	password = (gchar *) gsql_session_get_password (session);
	database = (gchar *) gsql_session_get_database_name (session);

	workspace = gsql_session_get_workspace (session);
	
	if (!oracle_session_open (new_spec, username, password, database, buffer)) 
	{	
		g_free (spec);
		gsql_message_add (workspace, GSQL_MESSAGE_ERROR, buffer);
		
		return;
	}
	
	new_session = gsql_session_new_with_attrs ("session-username", 
										   username,
										   "session-password",
										   password,
										   "session-database",
										   database,
										   NULL);
	new_session->spec = new_spec;	
	new_session->engine = session->engine;

	cursor = gsql_cursor_new (session, sql);
	c_state = gsql_cursor_open (cursor, FALSE); 
	
	memset ((void *) info, 0, 32);
	
	if ((c_state == GSQL_CURSOR_STATE_OPEN) && (gsql_cursor_fetch (cursor, 1)))
	{
		lst = g_list_first (cursor->var_list);
		variable = GSQL_VARIABLE (lst->data);
		g_snprintf (info, 32, "%s", (gchar *) variable->value);
		
	} else {
		g_snprintf (info, 32, "%s", "0.0.0.0");
	}
	
	gsql_cursor_close (cursor);
	
	gsql_session_set_attrs (new_session, "session-info",
							info,
							NULL);	 
	
	new_workspace = gsql_workspace_new (new_session);
	navigation = gsql_workspace_get_navigation (new_workspace);
	
	nav_tree_set_root (navigation, (gchar *) username);
	
	
	
	g_signal_connect (G_OBJECT (new_session), "close",
					  G_CALLBACK (on_session_close), new_session);
	g_signal_connect (G_OBJECT (new_session), "reopen",
					  G_CALLBACK (on_session_reopen), new_session);
	g_signal_connect (G_OBJECT (new_session), "duplicate",
					  G_CALLBACK (on_session_duplicate), new_session);
	g_signal_connect (G_OBJECT (new_session), "commit",
					  G_CALLBACK (on_session_commit), new_session);
	g_signal_connect (G_OBJECT (new_session), "rollback",
					  G_CALLBACK (on_session_rollback), new_session);
	g_signal_connect (G_OBJECT (new_session), "switch",
					  G_CALLBACK (on_session_switch), new_session);
	
	g_snprintf(buffer, 256,
			   _("Connect to the Oracle database \"<b>%s</b>\" succesfully\n"
				 "<small>(%s)</small>"), 
			   g_utf8_strup (database, g_utf8_strlen (database, 128)),
			   new_spec->server_version);
	
	gsql_message_add (new_workspace, GSQL_MESSAGE_NORMAL, buffer);
	
	GSQL_DEBUG ("New session created with name [%s]", gsql_session_get_name (new_session));
	
	sessions = g_object_get_data(G_OBJECT(gsql_window), "sessions");
	
	session_name = gsql_session_get_name (new_session);
	header = gsql_utils_header_new (create_pixmap(new_session->engine->file_logo),
									   session_name, NULL,
									   FALSE, (gint) 1);
	
	gtk_widget_show (GTK_WIDGET (new_session));
	
	ret = gtk_notebook_append_page (GTK_NOTEBOOK(sessions),
							  GTK_WIDGET (new_session), 
							  header);

	gtk_notebook_set_current_page (GTK_NOTEBOOK(sessions), ret);
	gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK(sessions),
							  GTK_WIDGET (new_session), TRUE);
	
}
示例#13
0
static GtkWidget *my_create_pixmap (GtkWidget *Window, const char *Name)
{
  return (create_pixmap (Window, Name));
}
示例#14
0
void test_composite(const char *name, const struct blend_mode *blend,
		const struct format_mode *dst_format,
		uint32_t bw, uint32_t bh,
		const struct format_mode *src_format,
		uint32_t src_repeat, uint32_t sw, uint32_t sh,
		const struct format_mode *mask_format,
		uint32_t mask_repeat, uint32_t mw, uint32_t mh)
{
	PixmapPtr src, dest, mask = NULL;
	C2D_OBJECT blit = {};
	c2d_ts_handle curTimestamp;

	DEBUG_MSG("%s: op:%s src:%s (repeat:%d) mask=%s (repeat:%d) dst:%s",
			name, blend->name, src_format->name, src_repeat,
			mask_format ? mask_format->name : "none", mask_repeat,
			dst_format->name);
	RD_START(name, "op:%s src:%s (repeat:%d) mask=%s (repeat:%d) dst:%s",
			blend->name, src_format->name, src_repeat,
			mask_format ? mask_format->name : "none", mask_repeat,
			dst_format->name);

	blit.config_mask = DEFAULT_BLEND_MASK | blend->mode;

	dest = create_pixmap(1033, 1077, dst_format->format);

	if (src_repeat) {
		src  = create_pixmap(1, 1, src_format->format);
		blit.config_mask |= C2D_SOURCE_TILE_BIT;
	} else {
		src = create_pixmap(sw, sh, src_format->format);
	}

	blit.config_mask |= C2D_SOURCE_RECT_BIT;
	blit.surface_id = src->id;

	if (mask_format) {
		/* TODO not clear if mask repeat is really supported.. msm-exa-c2d2.c
		 * seems to reject it but C2D_MASK_TILE_BIT??
		 *
		 * Also, for src format, msm-exa-c2d2.c seems to encode fgcolor (like
		 * a solid fill) for repeats.. not really clear if TILE_BIT does what
		 * we expect or not??
		 *
		 * Seems like libC2D2 doesn't actually give any way to specify the
		 * maskX/maskY!!!  The previous c2d API does, so I'd have to assume
		 * this is actually supported by the hardware and this is just C2D2
		 * retardation
		 */
		if (mask_repeat) {
			mask = create_pixmap(1, 1, mask_format->format);
			blit.config_mask |= C2D_MASK_TILE_BIT;
		} else {
			mask = create_pixmap(mw, mh, mask_format->format);
		}

		blit.config_mask |= C2D_MASK_SURFACE_BIT;
		blit.mask_surface_id = mask->id;
	} else {
		// TODO make redump not confused when one column has extra rows
		mask = create_pixmap(1, 1, ARGB);
	}

	blit.next = NULL;

	blit.source_rect.x = FIXED(1);
	blit.source_rect.y = FIXED(2);
	blit.source_rect.width = FIXED(bw - blit.source_rect.x - 1);
	blit.source_rect.height = FIXED(bh - blit.source_rect.y - 2);

	blit.target_rect.x = FIXED((dest->width - sw) / 2);
	blit.target_rect.y = FIXED((dest->height - sh) / 2);
	blit.target_rect.width = blit.source_rect.width;
	blit.target_rect.height = blit.source_rect.height;
	CHK(c2dDraw(dest->id, 0, NULL, 0, 0, &blit, 1));
	CHK(c2dFlush(dest->id, &curTimestamp));
	CHK(c2dWaitTimestamp(curTimestamp));

	free_pixmap(src);
	free_pixmap(dest);
	if (mask)
		free_pixmap(mask);

	RD_END();

//	dump_pixmap(dest, "copy-%04dx%04d-%08x.bmp", w, h, format);
}
示例#15
0
int main(int argc, char **argv)
{
	uint32_t i, j;

	/* create dummy pixmap to get initialization out of the way */
	c2d_ts_handle curTimestamp;
	PixmapPtr tmp = create_pixmap(64, 64, xRGB);
	CHK(c2dFlush(tmp->id, &curTimestamp));
	CHK(c2dWaitTimestamp(curTimestamp));

	/* NOTE: my assumption here is that repeat, op, and color formats
	 * are rather independent, so we don't need to dump every possible
	 * combination (which would be a huge list)..  possibly need to
	 * sanity check this assumption, though..
	 */

	/* test composite ops: */
	for (i = 0; i < ARRAY_SIZE(blend_modes); i++) {
		test_composite("composite-op", &blend_modes[i],
				&format_modes[2],
				&format_modes[0], FALSE,
				NULL, FALSE);
	}

	/* test formats, by dst: */
	for (i = 0; i < ARRAY_SIZE(format_modes); i++) {
		char name[32];
		sprintf(name, "composite-dst-%s", format_modes[i].name);
		for (j = 0; j < ARRAY_SIZE(format_modes); j++) {
			// TODO add mask:
			test_composite(name, &blend_modes[4],
					&format_modes[i],
					&format_modes[j], FALSE,
					NULL, FALSE);
		}
	}

	/* test formats, by src: */
	for (i = 0; i < ARRAY_SIZE(format_modes); i++) {
		char name[32];
		sprintf(name, "composite-src-%s", format_modes[i].name);
		for (j = 0; j < ARRAY_SIZE(format_modes); j++) {
			// TODO add mask:
			test_composite(name, &blend_modes[4],
					&format_modes[j],
					&format_modes[i], FALSE,
					NULL, FALSE);
		}
	}

	/* test with/without mask: */
	test_composite("composite-mask", &blend_modes[3],
			&format_modes[0],
			&format_modes[0], FALSE,
			NULL, FALSE);
	for (i = 0; i < ARRAY_SIZE(format_modes); i++) {
		test_composite("composite-mask", &blend_modes[3],
				&format_modes[0],
				&format_modes[0], FALSE,
				&format_modes[i], FALSE);
	}

	/* test repeat: */
	// TODO add mask:
	test_composite("composite-repeat", &blend_modes[4],
			&format_modes[0],
			&format_modes[0], FALSE,
			NULL, FALSE);
	test_composite("composite-repeat", &blend_modes[4],
			&format_modes[0],
			&format_modes[0], TRUE,
			NULL, FALSE);

	return 0;
}
示例#16
0
GtkWidget*
create_MainWindow (void)
{
  GtkWidget *MainWindow;
  GtkWidget *fixed1;
  GtkWidget *image42;
  GtkWidget *image40;
  GtkWidget *DigitTop1;
  GtkWidget *DigitTop2;
  GtkWidget *DigitTop3;
  GtkWidget *image38;
  GtkWidget *image41;
  GtkWidget *IndicatorOprErr;
  GtkWidget *image31;
  GtkWidget *image35;
  GtkWidget *image32;
  GtkWidget *Sign;
  GtkWidget *image36;
  GtkWidget *image44;
  GtkWidget *image43;
  GtkWidget *DigitBottom1;
  GtkWidget *DigitBottom2;
  GtkWidget *DigitBottom3;
  GtkWidget *DigitBottom4;
  GtkWidget *DigitBottom5;
  GtkWidget *KeyPlus;
  GtkWidget *image45;
  GtkWidget *Key7;
  GtkWidget *image46;
  GtkWidget *Key8;
  GtkWidget *image47;
  GtkWidget *Key9;
  GtkWidget *image48;
  GtkWidget *KeyClr;
  GtkWidget *image49;
  GtkWidget *KeyMinus;
  GtkWidget *image50;
  GtkWidget *Key4;
  GtkWidget *image51;
  GtkWidget *Key5;
  GtkWidget *image52;
  GtkWidget *Key6;
  GtkWidget *image53;
  GtkWidget *KeyReadOut;
  GtkWidget *image54;
  GtkWidget *Key0;
  GtkWidget *image55;
  GtkWidget *Key1;
  GtkWidget *image56;
  GtkWidget *Key2;
  GtkWidget *image57;
  GtkWidget *KeyEntr;
  GtkWidget *image59;
  GtkWidget *KeyHold;
  GtkWidget *KeyHoldImage;
  GtkWidget *Key3;
  GtkWidget *image58;
  GtkWidget *image37;
  GtkWidget *image39;

  MainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_size_request (MainWindow, 424, 504);
  gtk_window_set_title (GTK_WINDOW (MainWindow), _("yaDEDA by Ron Burkey"));
  gtk_window_set_resizable (GTK_WINDOW (MainWindow), FALSE);
  gtk_window_set_destroy_with_parent (GTK_WINDOW (MainWindow), TRUE);

  fixed1 = gtk_fixed_new ();
  gtk_widget_show (fixed1);
  gtk_container_add (GTK_CONTAINER (MainWindow), fixed1);

  image42 = create_pixmap (MainWindow, "BorderHorizontal158.xpm");
  gtk_widget_show (image42);
  gtk_fixed_put (GTK_FIXED (fixed1), image42, 138, 16);
  gtk_widget_set_size_request (image42, 158, 4);

  image40 = create_pixmap (MainWindow, "BorderVertical48.xpm");
  gtk_widget_show (image40);
  gtk_fixed_put (GTK_FIXED (fixed1), image40, 138, 18);
  gtk_widget_set_size_request (image40, 4, 48);

  DigitTop1 = create_pixmap (MainWindow, "7SegOff.xpm");
  gtk_widget_show (DigitTop1);
  gtk_fixed_put (GTK_FIXED (fixed1), DigitTop1, 142, 20);
  gtk_widget_set_size_request (DigitTop1, 50, 45);

  DigitTop2 = create_pixmap (MainWindow, "7SegOff.xpm");
  gtk_widget_show (DigitTop2);
  gtk_fixed_put (GTK_FIXED (fixed1), DigitTop2, 192, 20);
  gtk_widget_set_size_request (DigitTop2, 50, 45);

  DigitTop3 = create_pixmap (MainWindow, "7SegOff.xpm");
  gtk_widget_show (DigitTop3);
  gtk_fixed_put (GTK_FIXED (fixed1), DigitTop3, 242, 20);
  gtk_widget_set_size_request (DigitTop3, 50, 45);

  image38 = create_pixmap (MainWindow, "BorderVertical48.xpm");
  gtk_widget_show (image38);
  gtk_fixed_put (GTK_FIXED (fixed1), image38, 292, 18);
  gtk_widget_set_size_request (image38, 4, 48);

  image41 = create_pixmap (MainWindow, "BorderHorizontal158.xpm");
  gtk_widget_show (image41);
  gtk_fixed_put (GTK_FIXED (fixed1), image41, 138, 65);
  gtk_widget_set_size_request (image41, 158, 4);

  IndicatorOprErr = create_pixmap (MainWindow, "OprErrOff.xpm");
  gtk_widget_show (IndicatorOprErr);
  gtk_fixed_put (GTK_FIXED (fixed1), IndicatorOprErr, 12, 114);
  gtk_widget_set_size_request (IndicatorOprErr, 84, 40);

  image31 = create_pixmap (MainWindow, "BorderHorizontal88.xpm");
  gtk_widget_show (image31);
  gtk_fixed_put (GTK_FIXED (fixed1), image31, 8, 109);
  gtk_widget_set_size_request (image31, 88, 4);

  image35 = create_pixmap (MainWindow, "BorderVertical48.xpm");
  gtk_widget_show (image35);
  gtk_fixed_put (GTK_FIXED (fixed1), image35, 96, 109);
  gtk_widget_set_size_request (image35, 4, 48);

  image32 = create_pixmap (MainWindow, "BorderHorizontal88.xpm");
  gtk_widget_show (image32);
  gtk_fixed_put (GTK_FIXED (fixed1), image32, 10, 154);
  gtk_widget_set_size_request (image32, 88, 4);

  Sign = create_pixmap (MainWindow, "PlusMinusOff.xpm");
  gtk_widget_show (Sign);
  gtk_fixed_put (GTK_FIXED (fixed1), Sign, 130, 111);
  gtk_widget_set_size_request (Sign, 32, 45);

  image36 = create_pixmap (MainWindow, "BorderVertical48.xpm");
  gtk_widget_show (image36);
  gtk_fixed_put (GTK_FIXED (fixed1), image36, 126, 110);
  gtk_widget_set_size_request (image36, 4, 48);

  image44 = create_pixmap (MainWindow, "BorderHorizontal290.xpm");
  gtk_widget_show (image44);
  gtk_fixed_put (GTK_FIXED (fixed1), image44, 126, 107);
  gtk_widget_set_size_request (image44, 290, 4);

  image43 = create_pixmap (MainWindow, "BorderHorizontal290.xpm");
  gtk_widget_show (image43);
  gtk_fixed_put (GTK_FIXED (fixed1), image43, 126, 156);
  gtk_widget_set_size_request (image43, 290, 4);

  DigitBottom1 = create_pixmap (MainWindow, "7SegOff.xpm");
  gtk_widget_show (DigitBottom1);
  gtk_fixed_put (GTK_FIXED (fixed1), DigitBottom1, 162, 111);
  gtk_widget_set_size_request (DigitBottom1, 50, 45);

  DigitBottom2 = create_pixmap (MainWindow, "7SegOff.xpm");
  gtk_widget_show (DigitBottom2);
  gtk_fixed_put (GTK_FIXED (fixed1), DigitBottom2, 212, 111);
  gtk_widget_set_size_request (DigitBottom2, 50, 45);

  DigitBottom3 = create_pixmap (MainWindow, "7SegOff.xpm");
  gtk_widget_show (DigitBottom3);
  gtk_fixed_put (GTK_FIXED (fixed1), DigitBottom3, 262, 111);
  gtk_widget_set_size_request (DigitBottom3, 50, 45);

  DigitBottom4 = create_pixmap (MainWindow, "7SegOff.xpm");
  gtk_widget_show (DigitBottom4);
  gtk_fixed_put (GTK_FIXED (fixed1), DigitBottom4, 312, 111);
  gtk_widget_set_size_request (DigitBottom4, 50, 45);

  DigitBottom5 = create_pixmap (MainWindow, "7SegOff.xpm");
  gtk_widget_show (DigitBottom5);
  gtk_fixed_put (GTK_FIXED (fixed1), DigitBottom5, 362, 111);
  gtk_widget_set_size_request (DigitBottom5, 50, 45);

  KeyPlus = gtk_button_new ();
  gtk_widget_show (KeyPlus);
  gtk_fixed_put (GTK_FIXED (fixed1), KeyPlus, 14, 177);
  gtk_widget_set_size_request (KeyPlus, 75, 75);

  image45 = create_pixmap (MainWindow, "PlusUp.xpm");
  gtk_widget_show (image45);
  gtk_container_add (GTK_CONTAINER (KeyPlus), image45);

  Key7 = gtk_button_new ();
  gtk_widget_show (Key7);
  gtk_fixed_put (GTK_FIXED (fixed1), Key7, 94, 177);
  gtk_widget_set_size_request (Key7, 75, 75);

  image46 = create_pixmap (MainWindow, "7Up.xpm");
  gtk_widget_show (image46);
  gtk_container_add (GTK_CONTAINER (Key7), image46);

  Key8 = gtk_button_new ();
  gtk_widget_show (Key8);
  gtk_fixed_put (GTK_FIXED (fixed1), Key8, 174, 177);
  gtk_widget_set_size_request (Key8, 75, 75);

  image47 = create_pixmap (MainWindow, "8Up.xpm");
  gtk_widget_show (image47);
  gtk_container_add (GTK_CONTAINER (Key8), image47);

  Key9 = gtk_button_new ();
  gtk_widget_show (Key9);
  gtk_fixed_put (GTK_FIXED (fixed1), Key9, 254, 177);
  gtk_widget_set_size_request (Key9, 75, 75);

  image48 = create_pixmap (MainWindow, "9Up.xpm");
  gtk_widget_show (image48);
  gtk_container_add (GTK_CONTAINER (Key9), image48);

  KeyClr = gtk_button_new ();
  gtk_widget_show (KeyClr);
  gtk_fixed_put (GTK_FIXED (fixed1), KeyClr, 334, 177);
  gtk_widget_set_size_request (KeyClr, 75, 75);

  image49 = create_pixmap (MainWindow, "ClrUp.xpm");
  gtk_widget_show (image49);
  gtk_container_add (GTK_CONTAINER (KeyClr), image49);

  KeyMinus = gtk_button_new ();
  gtk_widget_show (KeyMinus);
  gtk_fixed_put (GTK_FIXED (fixed1), KeyMinus, 14, 257);
  gtk_widget_set_size_request (KeyMinus, 75, 75);

  image50 = create_pixmap (MainWindow, "MinusUp.xpm");
  gtk_widget_show (image50);
  gtk_container_add (GTK_CONTAINER (KeyMinus), image50);

  Key4 = gtk_button_new ();
  gtk_widget_show (Key4);
  gtk_fixed_put (GTK_FIXED (fixed1), Key4, 94, 257);
  gtk_widget_set_size_request (Key4, 75, 75);

  image51 = create_pixmap (MainWindow, "4Up.xpm");
  gtk_widget_show (image51);
  gtk_container_add (GTK_CONTAINER (Key4), image51);

  Key5 = gtk_button_new ();
  gtk_widget_show (Key5);
  gtk_fixed_put (GTK_FIXED (fixed1), Key5, 174, 257);
  gtk_widget_set_size_request (Key5, 75, 75);

  image52 = create_pixmap (MainWindow, "5Up.xpm");
  gtk_widget_show (image52);
  gtk_container_add (GTK_CONTAINER (Key5), image52);

  Key6 = gtk_button_new ();
  gtk_widget_show (Key6);
  gtk_fixed_put (GTK_FIXED (fixed1), Key6, 254, 257);
  gtk_widget_set_size_request (Key6, 75, 75);

  image53 = create_pixmap (MainWindow, "6Up.xpm");
  gtk_widget_show (image53);
  gtk_container_add (GTK_CONTAINER (Key6), image53);

  KeyReadOut = gtk_button_new ();
  gtk_widget_show (KeyReadOut);
  gtk_fixed_put (GTK_FIXED (fixed1), KeyReadOut, 334, 257);
  gtk_widget_set_size_request (KeyReadOut, 75, 75);

  image54 = create_pixmap (MainWindow, "ReadOutUp.xpm");
  gtk_widget_show (image54);
  gtk_container_add (GTK_CONTAINER (KeyReadOut), image54);

  Key0 = gtk_button_new ();
  gtk_widget_show (Key0);
  gtk_fixed_put (GTK_FIXED (fixed1), Key0, 14, 337);
  gtk_widget_set_size_request (Key0, 75, 75);

  image55 = create_pixmap (MainWindow, "0Up.xpm");
  gtk_widget_show (image55);
  gtk_container_add (GTK_CONTAINER (Key0), image55);

  Key1 = gtk_button_new ();
  gtk_widget_show (Key1);
  gtk_fixed_put (GTK_FIXED (fixed1), Key1, 94, 337);
  gtk_widget_set_size_request (Key1, 75, 75);

  image56 = create_pixmap (MainWindow, "1Up.xpm");
  gtk_widget_show (image56);
  gtk_container_add (GTK_CONTAINER (Key1), image56);

  Key2 = gtk_button_new ();
  gtk_widget_show (Key2);
  gtk_fixed_put (GTK_FIXED (fixed1), Key2, 174, 337);
  gtk_widget_set_size_request (Key2, 75, 75);

  image57 = create_pixmap (MainWindow, "2Up.xpm");
  gtk_widget_show (image57);
  gtk_container_add (GTK_CONTAINER (Key2), image57);

  KeyEntr = gtk_button_new ();
  gtk_widget_show (KeyEntr);
  gtk_fixed_put (GTK_FIXED (fixed1), KeyEntr, 334, 337);
  gtk_widget_set_size_request (KeyEntr, 75, 75);

  image59 = create_pixmap (MainWindow, "EntrUp.xpm");
  gtk_widget_show (image59);
  gtk_container_add (GTK_CONTAINER (KeyEntr), image59);

  KeyHold = gtk_button_new ();
  gtk_widget_show (KeyHold);
  gtk_fixed_put (GTK_FIXED (fixed1), KeyHold, 174, 417);
  gtk_widget_set_size_request (KeyHold, 75, 75);

  KeyHoldImage = create_pixmap (MainWindow, "HoldUp.xpm");
  gtk_widget_show (KeyHoldImage);
  gtk_container_add (GTK_CONTAINER (KeyHold), KeyHoldImage);

  Key3 = gtk_button_new ();
  gtk_widget_show (Key3);
  gtk_fixed_put (GTK_FIXED (fixed1), Key3, 254, 337);
  gtk_widget_set_size_request (Key3, 75, 75);

  image58 = create_pixmap (MainWindow, "3Up.xpm");
  gtk_widget_show (image58);
  gtk_container_add (GTK_CONTAINER (Key3), image58);

  image37 = create_pixmap (MainWindow, "BorderVertical48.xpm");
  gtk_widget_show (image37);
  gtk_fixed_put (GTK_FIXED (fixed1), image37, 8, 110);
  gtk_widget_set_size_request (image37, 4, 48);

  image39 = create_pixmap (MainWindow, "BorderVertical48.xpm");
  gtk_widget_show (image39);
  gtk_fixed_put (GTK_FIXED (fixed1), image39, 412, 110);
  gtk_widget_set_size_request (image39, 4, 48);

  g_signal_connect ((gpointer) MainWindow, "delete_event",
                    G_CALLBACK (on_MainWindow_delete_event),
                    NULL);
  g_signal_connect ((gpointer) KeyPlus, "pressed",
                    G_CALLBACK (on_KeyPlus_pressed),
                    NULL);
  g_signal_connect ((gpointer) KeyPlus, "released",
                    G_CALLBACK (on_KeyPlus_released),
                    NULL);
  g_signal_connect ((gpointer) Key7, "pressed",
                    G_CALLBACK (on_Key7_pressed),
                    NULL);
  g_signal_connect ((gpointer) Key7, "released",
                    G_CALLBACK (on_Key7_released),
                    NULL);
  g_signal_connect ((gpointer) Key8, "pressed",
                    G_CALLBACK (on_Key8_pressed),
                    NULL);
  g_signal_connect ((gpointer) Key8, "released",
                    G_CALLBACK (on_Key8_released),
                    NULL);
  g_signal_connect ((gpointer) Key9, "pressed",
                    G_CALLBACK (on_Key9_pressed),
                    NULL);
  g_signal_connect ((gpointer) Key9, "released",
                    G_CALLBACK (on_Key9_released),
                    NULL);
  g_signal_connect ((gpointer) KeyClr, "pressed",
                    G_CALLBACK (on_KeyClr_pressed),
                    NULL);
  g_signal_connect ((gpointer) KeyClr, "released",
                    G_CALLBACK (on_KeyClr_released),
                    NULL);
  g_signal_connect ((gpointer) KeyMinus, "pressed",
                    G_CALLBACK (on_KeyMinus_pressed),
                    NULL);
  g_signal_connect ((gpointer) KeyMinus, "released",
                    G_CALLBACK (on_KeyMinus_released),
                    NULL);
  g_signal_connect ((gpointer) Key4, "pressed",
                    G_CALLBACK (on_Key4_pressed),
                    NULL);
  g_signal_connect ((gpointer) Key4, "released",
                    G_CALLBACK (on_Key4_released),
                    NULL);
  g_signal_connect ((gpointer) Key5, "pressed",
                    G_CALLBACK (on_Key5_pressed),
                    NULL);
  g_signal_connect ((gpointer) Key5, "released",
                    G_CALLBACK (on_Key5_released),
                    NULL);
  g_signal_connect ((gpointer) Key6, "pressed",
                    G_CALLBACK (on_Key6_pressed),
                    NULL);
  g_signal_connect ((gpointer) Key6, "released",
                    G_CALLBACK (on_Key6_released),
                    NULL);
  g_signal_connect ((gpointer) KeyReadOut, "pressed",
                    G_CALLBACK (on_KeyReadOut_pressed),
                    NULL);
  g_signal_connect ((gpointer) KeyReadOut, "released",
                    G_CALLBACK (on_KeyReadOut_released),
                    NULL);
  g_signal_connect ((gpointer) Key0, "pressed",
                    G_CALLBACK (on_Key0_pressed),
                    NULL);
  g_signal_connect ((gpointer) Key0, "released",
                    G_CALLBACK (on_Key0_released),
                    NULL);
  g_signal_connect ((gpointer) Key1, "pressed",
                    G_CALLBACK (on_Key1_pressed),
                    NULL);
  g_signal_connect ((gpointer) Key1, "released",
                    G_CALLBACK (on_Key1_released),
                    NULL);
  g_signal_connect ((gpointer) Key2, "pressed",
                    G_CALLBACK (on_Key2_pressed),
                    NULL);
  g_signal_connect ((gpointer) Key2, "released",
                    G_CALLBACK (on_Key2_released),
                    NULL);
  g_signal_connect ((gpointer) KeyEntr, "pressed",
                    G_CALLBACK (on_KeyEntr_pressed),
                    NULL);
  g_signal_connect ((gpointer) KeyEntr, "released",
                    G_CALLBACK (on_KeyEntr_released),
                    NULL);
  g_signal_connect ((gpointer) KeyHold, "pressed",
                    G_CALLBACK (on_KeyHold_pressed),
                    NULL);
  g_signal_connect ((gpointer) KeyHold, "released",
                    G_CALLBACK (on_KeyHold_released),
                    NULL);
  g_signal_connect ((gpointer) Key3, "pressed",
                    G_CALLBACK (on_Key3_pressed),
                    NULL);
  g_signal_connect ((gpointer) Key3, "released",
                    G_CALLBACK (on_Key3_released),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (MainWindow, MainWindow, "MainWindow");
  GLADE_HOOKUP_OBJECT (MainWindow, fixed1, "fixed1");
  GLADE_HOOKUP_OBJECT (MainWindow, image42, "image42");
  GLADE_HOOKUP_OBJECT (MainWindow, image40, "image40");
  GLADE_HOOKUP_OBJECT (MainWindow, DigitTop1, "DigitTop1");
  GLADE_HOOKUP_OBJECT (MainWindow, DigitTop2, "DigitTop2");
  GLADE_HOOKUP_OBJECT (MainWindow, DigitTop3, "DigitTop3");
  GLADE_HOOKUP_OBJECT (MainWindow, image38, "image38");
  GLADE_HOOKUP_OBJECT (MainWindow, image41, "image41");
  GLADE_HOOKUP_OBJECT (MainWindow, IndicatorOprErr, "IndicatorOprErr");
  GLADE_HOOKUP_OBJECT (MainWindow, image31, "image31");
  GLADE_HOOKUP_OBJECT (MainWindow, image35, "image35");
  GLADE_HOOKUP_OBJECT (MainWindow, image32, "image32");
  GLADE_HOOKUP_OBJECT (MainWindow, Sign, "Sign");
  GLADE_HOOKUP_OBJECT (MainWindow, image36, "image36");
  GLADE_HOOKUP_OBJECT (MainWindow, image44, "image44");
  GLADE_HOOKUP_OBJECT (MainWindow, image43, "image43");
  GLADE_HOOKUP_OBJECT (MainWindow, DigitBottom1, "DigitBottom1");
  GLADE_HOOKUP_OBJECT (MainWindow, DigitBottom2, "DigitBottom2");
  GLADE_HOOKUP_OBJECT (MainWindow, DigitBottom3, "DigitBottom3");
  GLADE_HOOKUP_OBJECT (MainWindow, DigitBottom4, "DigitBottom4");
  GLADE_HOOKUP_OBJECT (MainWindow, DigitBottom5, "DigitBottom5");
  GLADE_HOOKUP_OBJECT (MainWindow, KeyPlus, "KeyPlus");
  GLADE_HOOKUP_OBJECT (MainWindow, image45, "image45");
  GLADE_HOOKUP_OBJECT (MainWindow, Key7, "Key7");
  GLADE_HOOKUP_OBJECT (MainWindow, image46, "image46");
  GLADE_HOOKUP_OBJECT (MainWindow, Key8, "Key8");
  GLADE_HOOKUP_OBJECT (MainWindow, image47, "image47");
  GLADE_HOOKUP_OBJECT (MainWindow, Key9, "Key9");
  GLADE_HOOKUP_OBJECT (MainWindow, image48, "image48");
  GLADE_HOOKUP_OBJECT (MainWindow, KeyClr, "KeyClr");
  GLADE_HOOKUP_OBJECT (MainWindow, image49, "image49");
  GLADE_HOOKUP_OBJECT (MainWindow, KeyMinus, "KeyMinus");
  GLADE_HOOKUP_OBJECT (MainWindow, image50, "image50");
  GLADE_HOOKUP_OBJECT (MainWindow, Key4, "Key4");
  GLADE_HOOKUP_OBJECT (MainWindow, image51, "image51");
  GLADE_HOOKUP_OBJECT (MainWindow, Key5, "Key5");
  GLADE_HOOKUP_OBJECT (MainWindow, image52, "image52");
  GLADE_HOOKUP_OBJECT (MainWindow, Key6, "Key6");
  GLADE_HOOKUP_OBJECT (MainWindow, image53, "image53");
  GLADE_HOOKUP_OBJECT (MainWindow, KeyReadOut, "KeyReadOut");
  GLADE_HOOKUP_OBJECT (MainWindow, image54, "image54");
  GLADE_HOOKUP_OBJECT (MainWindow, Key0, "Key0");
  GLADE_HOOKUP_OBJECT (MainWindow, image55, "image55");
  GLADE_HOOKUP_OBJECT (MainWindow, Key1, "Key1");
  GLADE_HOOKUP_OBJECT (MainWindow, image56, "image56");
  GLADE_HOOKUP_OBJECT (MainWindow, Key2, "Key2");
  GLADE_HOOKUP_OBJECT (MainWindow, image57, "image57");
  GLADE_HOOKUP_OBJECT (MainWindow, KeyEntr, "KeyEntr");
  GLADE_HOOKUP_OBJECT (MainWindow, image59, "image59");
  GLADE_HOOKUP_OBJECT (MainWindow, KeyHold, "KeyHold");
  GLADE_HOOKUP_OBJECT (MainWindow, KeyHoldImage, "KeyHoldImage");
  GLADE_HOOKUP_OBJECT (MainWindow, Key3, "Key3");
  GLADE_HOOKUP_OBJECT (MainWindow, image58, "image58");
  GLADE_HOOKUP_OBJECT (MainWindow, image37, "image37");
  GLADE_HOOKUP_OBJECT (MainWindow, image39, "image39");

  return MainWindow;
}
GtkWidget*
create_dialog1 (void)
{
  GtkWidget *dialog1;
  GtkWidget *dialog_vbox1;
  GtkWidget *vbox3b;
  GtkWidget *toolbar1;
  GtkIconSize tmp_toolbar_icon_size;
  GtkWidget *toolbuttonOpen;
  GtkWidget *toolbuttonSave;
  GtkWidget *tmp_image;
  GtkWidget *toolbuttonScript;
  GtkWidget *toolbuttonDVD;
  GtkWidget *toolbuttonHalfD1;
  GtkWidget *toolbuttonSVCD;
  GtkWidget *toolbuttonVCD;
  GtkWidget *hbox11;
  GtkWidget *frame1;
  GtkWidget *alignment1;
  GtkWidget *vbox2;
  GtkWidget *notebook1;
  GtkWidget *scrolledwindow1;
  GtkWidget *treeview1;
  GtkWidget *hbox5;
  GtkWidget *image1;
  GtkWidget *label11;
  GtkWidget *scrolledwindow2;
  GtkWidget *treeview2;
  GtkWidget *hbox6;
  GtkWidget *image2;
  GtkWidget *label17;
  GtkWidget *scrolledwindow3;
  GtkWidget *treeview3;
  GtkWidget *hbox7;
  GtkWidget *image3;
  GtkWidget *label18;
  GtkWidget *scrolledwindow4;
  GtkWidget *treeview4;
  GtkWidget *hbox8;
  GtkWidget *image4;
  GtkWidget *label19;
  GtkWidget *scrolledwindow5;
  GtkWidget *treeview5;
  GtkWidget *hbox9;
  GtkWidget *image5;
  GtkWidget *label20;
  GtkWidget *scrolledwindow6;
  GtkWidget *treeview6;
  GtkWidget *hbox10;
  GtkWidget *image6;
  GtkWidget *label21;
  GtkWidget *scrolledwindow7;
  GtkWidget *treeview7;
  GtkWidget *hbox4;
  GtkWidget *image7;
  GtkWidget *label22;
  GtkWidget *treeview8;
  GtkWidget *label28;
  GtkWidget *hbox13;
  GtkWidget *buttonAdd;
  GtkWidget *image11;
  GtkWidget *label23;
  GtkWidget *frame2;
  GtkWidget *alignment2;
  GtkWidget *hbox1;
  GtkWidget *vbox3;
  GtkWidget *scrolledwindow9;
  GtkWidget *treeview0;
  GtkWidget *hbox14;
  GtkWidget *buttonRemove;
  GtkWidget *image15;
  GtkWidget *buttonDown;
  GtkWidget *image14;
  GtkWidget *buttonUp;
  GtkWidget *image13;
  GtkWidget *buttonPartial;
  GtkWidget *buttonProperties;
  GtkWidget *alignment4;
  GtkWidget *hbox16;
  GtkWidget *label25;
  GtkWidget *label2;
  GtkWidget *dialog_action_area1;
  GtkWidget *buttonPreview;
  GtkWidget *alignment5;
  GtkWidget *hbox17;
  GtkWidget *image17;
  GtkWidget *label26;
  GtkWidget *buttonClose;
  GtkAccelGroup *accel_group;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  accel_group = gtk_accel_group_new ();

  dialog1 = gtk_dialog_new ();
  gtk_container_set_border_width (GTK_CONTAINER (dialog1), 6);
  gtk_window_set_title (GTK_WINDOW (dialog1), QT_TR_NOOP("Video Filter Manager"));
  gtk_window_set_type_hint (GTK_WINDOW (dialog1), GDK_WINDOW_TYPE_HINT_DIALOG);
  gtk_dialog_set_has_separator (GTK_DIALOG (dialog1), FALSE);

  dialog_vbox1 = GTK_DIALOG (dialog1)->vbox;
  gtk_box_set_spacing (GTK_BOX(dialog_vbox1), 12);
  gtk_widget_show (dialog_vbox1);

  vbox3b = gtk_vbox_new (FALSE, 12);
  gtk_widget_show (vbox3b);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox3b, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (vbox3b), 6);

  toolbar1 = gtk_toolbar_new ();
  gtk_widget_show (toolbar1);
  gtk_box_pack_start (GTK_BOX (vbox3b), toolbar1, FALSE, FALSE, 0);
  gtk_toolbar_set_style (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_BOTH);
  tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1));

  toolbuttonOpen = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-open");
  gtk_widget_show (toolbuttonOpen);
  gtk_container_add (GTK_CONTAINER (toolbar1), toolbuttonOpen);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbuttonOpen), tooltips, QT_TR_NOOP("Open filter list [Ctrl-O]"), NULL);
  gtk_widget_add_accelerator (toolbuttonOpen, "clicked", accel_group,
                              GDK_O, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);
  gtk_tool_item_set_is_important (GTK_TOOL_ITEM (toolbuttonOpen), TRUE);

  toolbuttonSave = (GtkWidget*) gtk_tool_button_new_from_stock ("gtk-save");
  gtk_widget_show (toolbuttonSave);
  gtk_container_add (GTK_CONTAINER (toolbar1), toolbuttonSave);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbuttonSave), tooltips, QT_TR_NOOP("Save filter list [Ctrl-S]"), NULL);
  gtk_widget_add_accelerator (toolbuttonSave, "clicked", accel_group,
                              GDK_S, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);
  gtk_tool_item_set_is_important (GTK_TOOL_ITEM (toolbuttonSave), TRUE);

  tmp_image = gtk_image_new_from_stock ("gtk-save-as", tmp_toolbar_icon_size);
  gtk_widget_show (tmp_image);
  toolbuttonScript = (GtkWidget*) gtk_tool_button_new (tmp_image, QT_TR_NOOP("Save Script"));
  gtk_widget_show (toolbuttonScript);
  gtk_container_add (GTK_CONTAINER (toolbar1), toolbuttonScript);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbuttonScript), tooltips, QT_TR_NOOP("Save as script [Ctrl-J]"), NULL);
  gtk_widget_add_accelerator (toolbuttonScript, "clicked", accel_group,
                              GDK_J, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);
  gtk_tool_item_set_is_important (GTK_TOOL_ITEM (toolbuttonScript), TRUE);

  tmp_image = gtk_image_new_from_stock ("gtk-cdrom", tmp_toolbar_icon_size);
  gtk_widget_show (tmp_image);
  toolbuttonDVD = (GtkWidget*) gtk_tool_button_new (tmp_image, QT_TR_NOOP("DVD Res"));
  gtk_widget_show (toolbuttonDVD);
  gtk_container_add (GTK_CONTAINER (toolbar1), toolbuttonDVD);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbuttonDVD), tooltips, QT_TR_NOOP("DVD resolution [Ctrl-1]"), NULL);
  gtk_widget_add_accelerator (toolbuttonDVD, "clicked", accel_group,
                              GDK_1, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);
  gtk_tool_item_set_is_important (GTK_TOOL_ITEM (toolbuttonDVD), TRUE);

  tmp_image = gtk_image_new_from_stock ("gtk-cdrom", tmp_toolbar_icon_size);
  gtk_widget_show (tmp_image);
  toolbuttonHalfD1 = (GtkWidget*) gtk_tool_button_new (tmp_image, QT_TR_NOOP("Half D1 Res"));
  gtk_widget_show (toolbuttonHalfD1);
  gtk_container_add (GTK_CONTAINER (toolbar1), toolbuttonHalfD1);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbuttonHalfD1), tooltips, QT_TR_NOOP("Half D1 resolution [Ctrl-2]"), NULL);
  gtk_widget_add_accelerator (toolbuttonHalfD1, "clicked", accel_group,
                              GDK_2, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);
  gtk_tool_item_set_is_important (GTK_TOOL_ITEM (toolbuttonHalfD1), TRUE);

  tmp_image = gtk_image_new_from_stock ("gtk-cdrom", tmp_toolbar_icon_size);
  gtk_widget_show (tmp_image);
  toolbuttonSVCD = (GtkWidget*) gtk_tool_button_new (tmp_image, QT_TR_NOOP("SVCD Res"));
  gtk_widget_show (toolbuttonSVCD);
  gtk_container_add (GTK_CONTAINER (toolbar1), toolbuttonSVCD);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbuttonSVCD), tooltips, QT_TR_NOOP("SVCD resolution [Ctrl-3]"), NULL);
  gtk_widget_add_accelerator (toolbuttonSVCD, "clicked", accel_group,
                              GDK_3, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);
  gtk_tool_item_set_is_important (GTK_TOOL_ITEM (toolbuttonSVCD), TRUE);

  tmp_image = gtk_image_new_from_stock ("gtk-cdrom", tmp_toolbar_icon_size);
  gtk_widget_show (tmp_image);
  toolbuttonVCD = (GtkWidget*) gtk_tool_button_new (tmp_image, QT_TR_NOOP("VCD Res"));
  gtk_widget_show (toolbuttonVCD);
  gtk_container_add (GTK_CONTAINER (toolbar1), toolbuttonVCD);
  gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (toolbuttonVCD), tooltips, QT_TR_NOOP("VCD resolution [Ctrl-4]"), NULL);
  gtk_widget_add_accelerator (toolbuttonVCD, "clicked", accel_group,
                              GDK_4, (GdkModifierType) GDK_CONTROL_MASK,
                              GTK_ACCEL_VISIBLE);
  gtk_tool_item_set_is_important (GTK_TOOL_ITEM (toolbuttonVCD), TRUE);

  hbox11 = gtk_hbox_new (FALSE, 12);
  gtk_widget_show (hbox11);
  gtk_box_pack_start (GTK_BOX (vbox3b), hbox11, TRUE, TRUE, 0);

  frame1 = gtk_frame_new (NULL);
  gtk_widget_show (frame1);
  gtk_box_pack_start (GTK_BOX (hbox11), frame1, TRUE, TRUE, 0);
  gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_NONE);

  alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment1);
  gtk_container_add (GTK_CONTAINER (frame1), alignment1);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 6, 0, 18, 0);

  vbox2 = gtk_vbox_new (FALSE, 6);
  gtk_widget_show (vbox2);
  gtk_container_add (GTK_CONTAINER (alignment1), vbox2);

  notebook1 = gtk_notebook_new ();
  gtk_widget_show (notebook1);
  gtk_box_pack_start (GTK_BOX (vbox2), notebook1, TRUE, TRUE, 0);
  gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook1), FALSE);
  gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook1), GTK_POS_LEFT);

  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow1);
  gtk_container_add (GTK_CONTAINER (notebook1), scrolledwindow1);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);

  treeview1 = gtk_tree_view_new ();
  gtk_widget_show (treeview1);
  gtk_container_add (GTK_CONTAINER (scrolledwindow1), treeview1);
  gtk_widget_set_size_request (treeview1, 288, 336);
  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview1), FALSE);
  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview1), TRUE);
  gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview1), FALSE);

  hbox5 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox5);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), hbox5);

  image1 = create_pixmap (dialog1, "1.png");
  gtk_widget_show (image1);
  gtk_box_pack_start (GTK_BOX (hbox5), image1, FALSE, FALSE, 0);

  label11 = gtk_label_new_with_mnemonic (QT_TR_NOOP("Transform"));
  gtk_widget_show (label11);
  gtk_box_pack_start (GTK_BOX (hbox5), label11, FALSE, FALSE, 4);
  gtk_label_set_use_markup (GTK_LABEL (label11), TRUE);

  scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow2);
  gtk_container_add (GTK_CONTAINER (notebook1), scrolledwindow2);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

  treeview2 = gtk_tree_view_new ();
  gtk_widget_show (treeview2);
  gtk_container_add (GTK_CONTAINER (scrolledwindow2), treeview2);
  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview2), FALSE);
  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview2), TRUE);
  gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview2), FALSE);

  hbox6 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox6);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), hbox6);

  image2 = create_pixmap (dialog1, "2.png");
  gtk_widget_show (image2);
  gtk_box_pack_start (GTK_BOX (hbox6), image2, FALSE, FALSE, 0);

  label17 = gtk_label_new_with_mnemonic (QT_TR_NOOP("Interlacing"));
  gtk_widget_show (label17);
  gtk_box_pack_start (GTK_BOX (hbox6), label17, FALSE, FALSE, 4);

  scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow3);
  gtk_container_add (GTK_CONTAINER (notebook1), scrolledwindow3);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

  treeview3 = gtk_tree_view_new ();
  gtk_widget_show (treeview3);
  gtk_container_add (GTK_CONTAINER (scrolledwindow3), treeview3);
  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview3), FALSE);
  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview3), TRUE);
  gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview3), FALSE);

  hbox7 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox7);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), hbox7);

  image3 = create_pixmap (dialog1, "4.png");
  gtk_widget_show (image3);
  gtk_box_pack_start (GTK_BOX (hbox7), image3, FALSE, FALSE, 0);

  label18 = gtk_label_new_with_mnemonic (QT_TR_NOOP("Colors"));
  gtk_widget_show (label18);
  gtk_box_pack_start (GTK_BOX (hbox7), label18, FALSE, FALSE, 4);

  scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow4);
  gtk_container_add (GTK_CONTAINER (notebook1), scrolledwindow4);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

  treeview4 = gtk_tree_view_new ();
  gtk_widget_show (treeview4);
  gtk_container_add (GTK_CONTAINER (scrolledwindow4), treeview4);
  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview4), FALSE);
  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview4), TRUE);
  gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview4), FALSE);

  hbox8 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox8);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 3), hbox8);

  image4 = create_pixmap (dialog1, "5.png");
  gtk_widget_show (image4);
  gtk_box_pack_start (GTK_BOX (hbox8), image4, FALSE, FALSE, 0);

  label19 = gtk_label_new_with_mnemonic (QT_TR_NOOP("Noise"));
  gtk_widget_show (label19);
  gtk_box_pack_start (GTK_BOX (hbox8), label19, FALSE, FALSE, 4);

  scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow5);
  gtk_container_add (GTK_CONTAINER (notebook1), scrolledwindow5);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

  treeview5 = gtk_tree_view_new ();
  gtk_widget_show (treeview5);
  gtk_container_add (GTK_CONTAINER (scrolledwindow5), treeview5);
  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview5), FALSE);
  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview5), TRUE);
  gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview5), FALSE);

  hbox9 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox9);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 4), hbox9);

  image5 = create_pixmap (dialog1, "3.png");
  gtk_widget_show (image5);
  gtk_box_pack_start (GTK_BOX (hbox9), image5, FALSE, FALSE, 0);

  label20 = gtk_label_new_with_mnemonic (QT_TR_NOOP("Sharpness"));
  gtk_widget_show (label20);
  gtk_box_pack_start (GTK_BOX (hbox9), label20, FALSE, FALSE, 4);

  scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow6);
  gtk_container_add (GTK_CONTAINER (notebook1), scrolledwindow6);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

  treeview6 = gtk_tree_view_new ();
  gtk_widget_show (treeview6);
  gtk_container_add (GTK_CONTAINER (scrolledwindow6), treeview6);
  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview6), FALSE);
  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview6), TRUE);
  gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview6), FALSE);

  hbox10 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox10);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 5), hbox10);

  image6 = create_pixmap (dialog1, "7.png");
  gtk_widget_show (image6);
  gtk_box_pack_start (GTK_BOX (hbox10), image6, FALSE, FALSE, 0);

  label21 = gtk_label_new_with_mnemonic (QT_TR_NOOP("Subtitles"));
  gtk_widget_show (label21);
  gtk_box_pack_start (GTK_BOX (hbox10), label21, FALSE, FALSE, 4);

  scrolledwindow7 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow7);
  gtk_container_add (GTK_CONTAINER (notebook1), scrolledwindow7);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

  treeview7 = gtk_tree_view_new ();
  gtk_widget_show (treeview7);
  gtk_container_add (GTK_CONTAINER (scrolledwindow7), treeview7);
  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview7), FALSE);
  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview7), TRUE);
  gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview7), FALSE);

  hbox4 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox4);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 6), hbox4);

  image7 = create_pixmap (dialog1, "6.png");
  gtk_widget_show (image7);
  gtk_box_pack_start (GTK_BOX (hbox4), image7, FALSE, FALSE, 0);

  label22 = gtk_label_new_with_mnemonic (QT_TR_NOOP("Misc"));
  gtk_widget_show (label22);
  gtk_box_pack_start (GTK_BOX (hbox4), label22, FALSE, FALSE, 4);

  treeview8 = gtk_tree_view_new ();
  gtk_widget_show (treeview8);
  gtk_container_add (GTK_CONTAINER (notebook1), treeview8);
  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview8), FALSE);
  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview8), TRUE);
  gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview8), FALSE);

  label28 = gtk_label_new (QT_TR_NOOP("External"));
  gtk_widget_show (label28);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 7), label28);

  hbox13 = gtk_hbox_new (FALSE, 6);
  gtk_widget_show (hbox13);
  gtk_box_pack_start (GTK_BOX (vbox2), hbox13, FALSE, FALSE, 0);

  buttonAdd = gtk_button_new ();
  gtk_widget_show (buttonAdd);
  gtk_box_pack_end (GTK_BOX (hbox13), buttonAdd, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, buttonAdd, QT_TR_NOOP("Add selected filter to the Active Filters list"), NULL);

  image11 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image11);
  gtk_container_add (GTK_CONTAINER (buttonAdd), image11);

  label23 = gtk_label_new (QT_TR_NOOP("<b>Available Filters</b>"));
  gtk_widget_show (label23);
  gtk_frame_set_label_widget (GTK_FRAME (frame1), label23);
  gtk_label_set_use_markup (GTK_LABEL (label23), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label23), 1, 1);

  frame2 = gtk_frame_new (NULL);
  gtk_widget_show (frame2);
  gtk_box_pack_start (GTK_BOX (hbox11), frame2, TRUE, TRUE, 0);
  gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_NONE);

  alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment2);
  gtk_container_add (GTK_CONTAINER (frame2), alignment2);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment2), 6, 0, 18, 0);

  hbox1 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox1);
  gtk_container_add (GTK_CONTAINER (alignment2), hbox1);

  vbox3 = gtk_vbox_new (FALSE, 6);
  gtk_widget_show (vbox3);
  gtk_box_pack_start (GTK_BOX (hbox1), vbox3, TRUE, TRUE, 0);

  scrolledwindow9 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow9);
  gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow9, TRUE, TRUE, 0);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_SHADOW_OUT);

  treeview0 = gtk_tree_view_new ();
  gtk_widget_show (treeview0);
  gtk_container_add (GTK_CONTAINER (scrolledwindow9), treeview0);
  gtk_widget_set_size_request (treeview0, 288, 336);
  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview0), FALSE);
  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview0), TRUE);
  gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview0), FALSE);

  hbox14 = gtk_hbox_new (FALSE, 6);
  gtk_widget_show (hbox14);
  gtk_box_pack_start (GTK_BOX (vbox3), hbox14, FALSE, FALSE, 0);

  buttonRemove = gtk_button_new ();
  gtk_widget_show (buttonRemove);
  gtk_box_pack_end (GTK_BOX (hbox14), buttonRemove, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, buttonRemove, QT_TR_NOOP("Remove filter"), NULL);

  image15 = gtk_image_new_from_stock ("gtk-remove", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image15);
  gtk_container_add (GTK_CONTAINER (buttonRemove), image15);

  buttonDown = gtk_button_new ();
  gtk_widget_show (buttonDown);
  gtk_box_pack_end (GTK_BOX (hbox14), buttonDown, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, buttonDown, QT_TR_NOOP("Move filter down"), NULL);

  image14 = gtk_image_new_from_icon_name ("gtk-go-down", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image14);
  gtk_container_add (GTK_CONTAINER (buttonDown), image14);

  buttonUp = gtk_button_new ();
  gtk_widget_show (buttonUp);
  gtk_box_pack_end (GTK_BOX (hbox14), buttonUp, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, buttonUp, QT_TR_NOOP("Move filter up"), NULL);

  image13 = gtk_image_new_from_icon_name ("gtk-go-up", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image13);
  gtk_container_add (GTK_CONTAINER (buttonUp), image13);

  buttonPartial = gtk_button_new_with_mnemonic (QT_TR_NOOP("P_artial"));
  gtk_widget_show (buttonPartial);
  gtk_box_pack_end (GTK_BOX (hbox14), buttonPartial, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, buttonPartial, QT_TR_NOOP("Apply the current filter only to a part of the file"), NULL);

  buttonProperties = gtk_button_new ();
  gtk_widget_show (buttonProperties);
  gtk_box_pack_end (GTK_BOX (hbox14), buttonProperties, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, buttonProperties, QT_TR_NOOP("Configure filter"), NULL);

  alignment4 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment4);
  gtk_container_add (GTK_CONTAINER (buttonProperties), alignment4);

  hbox16 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox16);
  gtk_container_add (GTK_CONTAINER (alignment4), hbox16);

  label25 = gtk_label_new_with_mnemonic (QT_TR_NOOP("C_onfigure"));
  gtk_widget_show (label25);
  gtk_box_pack_start (GTK_BOX (hbox16), label25, FALSE, FALSE, 0);

  label2 = gtk_label_new (QT_TR_NOOP("<b >Active Filters</b>"));
  gtk_widget_show (label2);
  gtk_frame_set_label_widget (GTK_FRAME (frame2), label2);
  gtk_label_set_use_markup (GTK_LABEL (label2), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label2), 1, 1);

  dialog_action_area1 = GTK_DIALOG (dialog1)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  buttonPreview = gtk_button_new ();
  gtk_widget_show (buttonPreview);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), buttonPreview, GTK_RESPONSE_APPLY);
  GTK_WIDGET_SET_FLAGS (buttonPreview, GTK_CAN_DEFAULT);

  alignment5 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment5);
  gtk_container_add (GTK_CONTAINER (buttonPreview), alignment5);

  hbox17 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox17);
  gtk_container_add (GTK_CONTAINER (alignment5), hbox17);

  image17 = create_pixmap (dialog1, "preview-button.png");
  gtk_widget_show (image17);
  gtk_box_pack_start (GTK_BOX (hbox17), image17, FALSE, FALSE, 0);

  label26 = gtk_label_new_with_mnemonic (QT_TR_NOOP("_Preview"));
  gtk_widget_show (label26);
  gtk_box_pack_start (GTK_BOX (hbox17), label26, FALSE, FALSE, 0);

  buttonClose = gtk_button_new_from_stock ("gtk-close");
  gtk_widget_show (buttonClose);
  gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), buttonClose, GTK_RESPONSE_CLOSE);
  GTK_WIDGET_SET_FLAGS (buttonClose, GTK_CAN_DEFAULT);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog1, "dialog1");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT (dialog1, vbox3b, "vbox3b");
  GLADE_HOOKUP_OBJECT (dialog1, toolbar1, "toolbar1");
  GLADE_HOOKUP_OBJECT (dialog1, toolbuttonOpen, "toolbuttonOpen");
  GLADE_HOOKUP_OBJECT (dialog1, toolbuttonSave, "toolbuttonSave");
  GLADE_HOOKUP_OBJECT (dialog1, toolbuttonScript, "toolbuttonScript");
  GLADE_HOOKUP_OBJECT (dialog1, toolbuttonDVD, "toolbuttonDVD");
  GLADE_HOOKUP_OBJECT (dialog1, toolbuttonHalfD1, "toolbuttonHalfD1");
  GLADE_HOOKUP_OBJECT (dialog1, toolbuttonSVCD, "toolbuttonSVCD");
  GLADE_HOOKUP_OBJECT (dialog1, toolbuttonVCD, "toolbuttonVCD");
  GLADE_HOOKUP_OBJECT (dialog1, hbox11, "hbox11");
  GLADE_HOOKUP_OBJECT (dialog1, frame1, "frame1");
  GLADE_HOOKUP_OBJECT (dialog1, alignment1, "alignment1");
  GLADE_HOOKUP_OBJECT (dialog1, vbox2, "vbox2");
  GLADE_HOOKUP_OBJECT (dialog1, notebook1, "notebook1");
  GLADE_HOOKUP_OBJECT (dialog1, scrolledwindow1, "scrolledwindow1");
  GLADE_HOOKUP_OBJECT (dialog1, treeview1, "treeview1");
  GLADE_HOOKUP_OBJECT (dialog1, hbox5, "hbox5");
  GLADE_HOOKUP_OBJECT (dialog1, image1, "image1");
  GLADE_HOOKUP_OBJECT (dialog1, label11, "label11");
  GLADE_HOOKUP_OBJECT (dialog1, scrolledwindow2, "scrolledwindow2");
  GLADE_HOOKUP_OBJECT (dialog1, treeview2, "treeview2");
  GLADE_HOOKUP_OBJECT (dialog1, hbox6, "hbox6");
  GLADE_HOOKUP_OBJECT (dialog1, image2, "image2");
  GLADE_HOOKUP_OBJECT (dialog1, label17, "label17");
  GLADE_HOOKUP_OBJECT (dialog1, scrolledwindow3, "scrolledwindow3");
  GLADE_HOOKUP_OBJECT (dialog1, treeview3, "treeview3");
  GLADE_HOOKUP_OBJECT (dialog1, hbox7, "hbox7");
  GLADE_HOOKUP_OBJECT (dialog1, image3, "image3");
  GLADE_HOOKUP_OBJECT (dialog1, label18, "label18");
  GLADE_HOOKUP_OBJECT (dialog1, scrolledwindow4, "scrolledwindow4");
  GLADE_HOOKUP_OBJECT (dialog1, treeview4, "treeview4");
  GLADE_HOOKUP_OBJECT (dialog1, hbox8, "hbox8");
  GLADE_HOOKUP_OBJECT (dialog1, image4, "image4");
  GLADE_HOOKUP_OBJECT (dialog1, label19, "label19");
  GLADE_HOOKUP_OBJECT (dialog1, scrolledwindow5, "scrolledwindow5");
  GLADE_HOOKUP_OBJECT (dialog1, treeview5, "treeview5");
  GLADE_HOOKUP_OBJECT (dialog1, hbox9, "hbox9");
  GLADE_HOOKUP_OBJECT (dialog1, image5, "image5");
  GLADE_HOOKUP_OBJECT (dialog1, label20, "label20");
  GLADE_HOOKUP_OBJECT (dialog1, scrolledwindow6, "scrolledwindow6");
  GLADE_HOOKUP_OBJECT (dialog1, treeview6, "treeview6");
  GLADE_HOOKUP_OBJECT (dialog1, hbox10, "hbox10");
  GLADE_HOOKUP_OBJECT (dialog1, image6, "image6");
  GLADE_HOOKUP_OBJECT (dialog1, label21, "label21");
  GLADE_HOOKUP_OBJECT (dialog1, scrolledwindow7, "scrolledwindow7");
  GLADE_HOOKUP_OBJECT (dialog1, treeview7, "treeview7");
  GLADE_HOOKUP_OBJECT (dialog1, hbox4, "hbox4");
  GLADE_HOOKUP_OBJECT (dialog1, image7, "image7");
  GLADE_HOOKUP_OBJECT (dialog1, label22, "label22");
  GLADE_HOOKUP_OBJECT (dialog1, treeview8, "treeview8");
  GLADE_HOOKUP_OBJECT (dialog1, label28, "label28");
  GLADE_HOOKUP_OBJECT (dialog1, hbox13, "hbox13");
  GLADE_HOOKUP_OBJECT (dialog1, buttonAdd, "buttonAdd");
  GLADE_HOOKUP_OBJECT (dialog1, image11, "image11");
  GLADE_HOOKUP_OBJECT (dialog1, label23, "label23");
  GLADE_HOOKUP_OBJECT (dialog1, frame2, "frame2");
  GLADE_HOOKUP_OBJECT (dialog1, alignment2, "alignment2");
  GLADE_HOOKUP_OBJECT (dialog1, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (dialog1, vbox3, "vbox3");
  GLADE_HOOKUP_OBJECT (dialog1, scrolledwindow9, "scrolledwindow9");
  GLADE_HOOKUP_OBJECT (dialog1, treeview0, "treeview0");
  GLADE_HOOKUP_OBJECT (dialog1, hbox14, "hbox14");
  GLADE_HOOKUP_OBJECT (dialog1, buttonRemove, "buttonRemove");
  GLADE_HOOKUP_OBJECT (dialog1, image15, "image15");
  GLADE_HOOKUP_OBJECT (dialog1, buttonDown, "buttonDown");
  GLADE_HOOKUP_OBJECT (dialog1, image14, "image14");
  GLADE_HOOKUP_OBJECT (dialog1, buttonUp, "buttonUp");
  GLADE_HOOKUP_OBJECT (dialog1, image13, "image13");
  GLADE_HOOKUP_OBJECT (dialog1, buttonPartial, "buttonPartial");
  GLADE_HOOKUP_OBJECT (dialog1, buttonProperties, "buttonProperties");
  GLADE_HOOKUP_OBJECT (dialog1, alignment4, "alignment4");
  GLADE_HOOKUP_OBJECT (dialog1, hbox16, "hbox16");
  GLADE_HOOKUP_OBJECT (dialog1, label25, "label25");
  GLADE_HOOKUP_OBJECT (dialog1, label2, "label2");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (dialog1, buttonPreview, "buttonPreview");
  GLADE_HOOKUP_OBJECT (dialog1, alignment5, "alignment5");
  GLADE_HOOKUP_OBJECT (dialog1, hbox17, "hbox17");
  GLADE_HOOKUP_OBJECT (dialog1, image17, "image17");
  GLADE_HOOKUP_OBJECT (dialog1, label26, "label26");
  GLADE_HOOKUP_OBJECT (dialog1, buttonClose, "buttonClose");
  GLADE_HOOKUP_OBJECT_NO_REF (dialog1, tooltips, "tooltips");

  gtk_window_add_accel_group (GTK_WINDOW (dialog1), accel_group);

  return dialog1;
}
示例#18
0
GtkWidget*
create_msg1_dbox (void)
{
  GtkWidget *msg1_dbox;
  GtkWidget *dialog_vbox1;
  GtkWidget *label2;
  GtkWidget *dialog_action_area1;
  GtkWidget *hbuttonbox1;
  GtkWidget *button1;
  GtkWidget *hbox1;
  GtkWidget *pixmap1;
  guint label1_key;
  GtkWidget *label1;
  GtkAccelGroup *accel_group;

  accel_group = gtk_accel_group_new ();

  msg1_dbox = gtk_dialog_new ();
  gtk_widget_set_name (msg1_dbox, "msg1_dbox");
  gtk_object_set_data (GTK_OBJECT (msg1_dbox), "msg1_dbox", msg1_dbox);
  gtk_window_set_title (GTK_WINDOW (msg1_dbox), _("Information"));
  gtk_window_set_modal (GTK_WINDOW (msg1_dbox), TRUE);
  gtk_window_set_policy (GTK_WINDOW (msg1_dbox), TRUE, TRUE, FALSE);

  dialog_vbox1 = GTK_DIALOG (msg1_dbox)->vbox;
  gtk_widget_set_name (dialog_vbox1, "dialog_vbox1");
  gtk_object_set_data (GTK_OBJECT (msg1_dbox), "dialog_vbox1", dialog_vbox1);
  gtk_widget_show (dialog_vbox1);

  label2 = gtk_label_new ("");
  gtk_label_parse_uline (GTK_LABEL (label2),
                         _("If you want get a ROM image with\nTiLP, you have to launch it, (eventually) \nconfigure it, and next, go to the 'Functions2'\nmenu for using the ROM dumper.\nTiLP can be downloaded at:\n<http://lpg.ticalc.org/prj_tilp>"));
  gtk_widget_set_name (label2, "label2");
  gtk_widget_ref (label2);
  gtk_object_set_data_full (GTK_OBJECT (msg1_dbox), "label2", label2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label2);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), label2, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label2), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label2), 5, 5);

  dialog_action_area1 = GTK_DIALOG (msg1_dbox)->action_area;
  gtk_widget_set_name (dialog_action_area1, "dialog_action_area1");
  gtk_object_set_data (GTK_OBJECT (msg1_dbox), "dialog_action_area1", dialog_action_area1);
  gtk_widget_show (dialog_action_area1);
  gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area1), 10);

  hbuttonbox1 = gtk_hbutton_box_new ();
  gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
  gtk_widget_ref (hbuttonbox1);
  gtk_object_set_data_full (GTK_OBJECT (msg1_dbox), "hbuttonbox1", hbuttonbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbuttonbox1);
  gtk_box_pack_start (GTK_BOX (dialog_action_area1), hbuttonbox1, TRUE, TRUE, 0);

  button1 = gtk_button_new ();
  gtk_widget_set_name (button1, "button1");
  gtk_widget_ref (button1);
  gtk_object_set_data_full (GTK_OBJECT (msg1_dbox), "button1", button1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button1);
  gtk_container_add (GTK_CONTAINER (hbuttonbox1), button1);
  GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (button1, "clicked", accel_group,
                              GDK_Return, 0,
                              GTK_ACCEL_VISIBLE);
  gtk_widget_add_accelerator (button1, "clicked", accel_group,
                              GDK_Escape, 0,
                              GTK_ACCEL_VISIBLE);

  hbox1 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox1, "hbox1");
  gtk_widget_ref (hbox1);
  gtk_object_set_data_full (GTK_OBJECT (msg1_dbox), "hbox1", hbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox1);
  gtk_container_add (GTK_CONTAINER (button1), hbox1);

  pixmap1 = create_pixmap (msg1_dbox, "yes.xpm");
  gtk_widget_set_name (pixmap1, "pixmap1");
  gtk_widget_ref (pixmap1);
  gtk_object_set_data_full (GTK_OBJECT (msg1_dbox), "pixmap1", pixmap1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pixmap1);
  gtk_box_pack_start (GTK_BOX (hbox1), pixmap1, TRUE, FALSE, 0);

  label1 = gtk_label_new ("");
  label1_key = gtk_label_parse_uline (GTK_LABEL (label1),
                                   _("_OK"));
  gtk_widget_set_name (label1, "label1");
  gtk_widget_ref (label1);
  gtk_object_set_data_full (GTK_OBJECT (msg1_dbox), "label1", label1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label1);
  gtk_box_pack_start (GTK_BOX (hbox1), label1, FALSE, TRUE, 0);
  gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label1), 5, 0);

  gtk_signal_connect (GTK_OBJECT (button1), "clicked",
                      GTK_SIGNAL_FUNC (msg1_ok_button_clicked),
                      msg1_dbox);

  gtk_widget_add_accelerator (button1, "clicked", accel_group,
                              label1_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);

  gtk_window_add_accel_group (GTK_WINDOW (msg1_dbox), accel_group);

  return msg1_dbox;
}
示例#19
0
GtkWidget*
create_main_window (void)
{
  GtkWidget *main_window;
  GdkPixbuf *main_window_icon_pixbuf;
  GtkWidget *hbox12;
  GtkWidget *vbox30;
  GtkWidget *expander1;
  GtkWidget *hbox6;
  GtkWidget *label11;
  GtkWidget *vbox5;
  GtkWidget *hbox7;
  GtkWidget *label12;
  GtkWidget *hbox9;
  GtkWidget *server;
  GtkWidget *connect;
  GtkWidget *alignment7;
  GtkWidget *hbox11;
  GtkWidget *image7;
  GtkWidget *label18;
  GtkWidget *login_at_connect;
  GtkWidget *hbox8;
  GtkWidget *label14;
  GtkWidget *table1;
  GtkWidget *label13;
  GtkWidget *label15;
  GtkWidget *login;
  GtkWidget *password;
  GtkWidget *label17;
  GtkWidget *label10;
  GtkWidget *hbox1;
  GtkWidget *frame1;
  GtkWidget *alignment3;
  GtkWidget *console_tabs;
  GtkWidget *alignment4;
  GtkWidget *vbox1;
  GtkWidget *console_scroll;
  GtkWidget *console_view;
  GtkWidget *label4;
  GtkWidget *hbox2;
  GtkWidget *image1;
  GtkWidget *cmd_entry;
  GtkWidget *btn_cmdSend;
  GtkWidget *label6;
  GtkWidget *alignment5;
  GtkWidget *pipe_scroll;
  GtkWidget *pipe_view;
  GtkWidget *label7;
  GtkWidget *label2;
  GtkWidget *vbox2;
  GtkWidget *frame2;
  GtkWidget *alignment2;
  GtkWidget *vbox3;
  GtkWidget *ctrlButton_0;
  GtkWidget *ctrlButton_1;
  GtkWidget *ctrlButton_2;
  GtkWidget *ctrlButton_3;
  GtkWidget *alignment6;
  GtkWidget *hbox3;
  GtkWidget *image2;
  GtkWidget *hbox4;
  GtkWidget *queue_progress;
  GtkWidget *queue_usage;
  GtkWidget *label9;
  GtkWidget *image3;
  GtkWidget *hbox5;
  GtkWidget *belts_progress;
  GtkWidget *belts_usage;
  GtkWidget *ctrlButton_4;
  GtkWidget *ctrlButton_5;
  GtkWidget *ctrlButton_6;
  GtkWidget *label5;
  GtkWidget *label3;
  GtkWidget *label8;
  GtkWidget *image6;

  main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (main_window), _("WebTester Server Console"));
  gtk_window_set_resizable (GTK_WINDOW (main_window), FALSE);
  main_window_icon_pixbuf = create_pixbuf ("wt32.png");
  if (main_window_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (main_window), main_window_icon_pixbuf);
      gdk_pixbuf_unref (main_window_icon_pixbuf);
    }

  hbox12 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox12);
  gtk_container_add (GTK_CONTAINER (main_window), hbox12);

  vbox30 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox30);
  gtk_box_pack_start (GTK_BOX (hbox12), vbox30, TRUE, TRUE, 0);

  expander1 = gtk_expander_new (NULL);
  gtk_widget_show (expander1);
  gtk_box_pack_start (GTK_BOX (vbox30), expander1, FALSE, TRUE, 0);
  gtk_widget_set_size_request (expander1, 640, -1);
  gtk_expander_set_expanded (GTK_EXPANDER (expander1), TRUE);

  hbox6 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox6);
  gtk_container_add (GTK_CONTAINER (expander1), hbox6);

  label11 = gtk_label_new ("");
  gtk_widget_show (label11);
  gtk_box_pack_start (GTK_BOX (hbox6), label11, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label11, 16, -1);

  vbox5 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox5);
  gtk_box_pack_start (GTK_BOX (hbox6), vbox5, FALSE, TRUE, 0);

  hbox7 = gtk_hbox_new (FALSE, 6);
  gtk_widget_show (hbox7);
  gtk_box_pack_start (GTK_BOX (vbox5), hbox7, TRUE, TRUE, 0);

  label12 = gtk_label_new (_("Server:Port"));
  gtk_widget_show (label12);
  gtk_box_pack_start (GTK_BOX (hbox7), label12, FALSE, FALSE, 0);

  hbox9 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox9);
  gtk_box_pack_start (GTK_BOX (hbox7), hbox9, TRUE, TRUE, 0);

  server = gtk_entry_new ();
  gtk_widget_show (server);
  gtk_box_pack_start (GTK_BOX (hbox9), server, TRUE, TRUE, 0);

  connect = gtk_toggle_button_new ();
  gtk_widget_show (connect);
  gtk_box_pack_start (GTK_BOX (hbox9), connect, FALSE, FALSE, 0);

  alignment7 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment7);
  gtk_container_add (GTK_CONTAINER (connect), alignment7);

  hbox11 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox11);
  gtk_container_add (GTK_CONTAINER (alignment7), hbox11);

  image7 = create_pixmap (main_window, "connect.png");
  gtk_widget_show (image7);
  gtk_box_pack_start (GTK_BOX (hbox11), image7, FALSE, FALSE, 0);

  label18 = gtk_label_new (_("Connect"));
  gtk_widget_show (label18);
  gtk_box_pack_start (GTK_BOX (hbox11), label18, FALSE, FALSE, 0);

  login_at_connect = gtk_check_button_new_with_mnemonic (_("Login at connect"));
  gtk_widget_show (login_at_connect);
  gtk_box_pack_start (GTK_BOX (vbox5), login_at_connect, FALSE, FALSE, 0);

  hbox8 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox8);
  gtk_box_pack_start (GTK_BOX (hbox6), hbox8, TRUE, TRUE, 0);

  label14 = gtk_label_new ("");
  gtk_widget_show (label14);
  gtk_box_pack_start (GTK_BOX (hbox8), label14, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label14, 8, -1);

  table1 = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (table1);
  gtk_box_pack_start (GTK_BOX (hbox8), table1, TRUE, TRUE, 0);
  gtk_table_set_col_spacings (GTK_TABLE (table1), 4);

  label13 = gtk_label_new (_("Login"));
  gtk_widget_show (label13);
  gtk_table_attach (GTK_TABLE (table1), label13, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label13), 0, 0.5);

  label15 = gtk_label_new (_("Password"));
  gtk_widget_show (label15);
  gtk_table_attach (GTK_TABLE (table1), label15, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label15), 0, 0.5);

  login = gtk_entry_new ();
  gtk_widget_show (login);
  gtk_table_attach (GTK_TABLE (table1), login, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_widget_set_sensitive (login, FALSE);

  password = gtk_entry_new ();
  gtk_widget_show (password);
  gtk_table_attach (GTK_TABLE (table1), password, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_widget_set_sensitive (password, FALSE);
  gtk_entry_set_visibility (GTK_ENTRY (password), FALSE);

  label17 = gtk_label_new ("");
  gtk_widget_show (label17);
  gtk_box_pack_start (GTK_BOX (hbox8), label17, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label17, 8, -1);

  label10 = gtk_label_new (_("Connection"));
  gtk_widget_show (label10);
  gtk_expander_set_label_widget (GTK_EXPANDER (expander1), label10);

  hbox1 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox1);
  gtk_box_pack_start (GTK_BOX (vbox30), hbox1, TRUE, TRUE, 0);

  frame1 = gtk_frame_new (NULL);
  gtk_widget_show (frame1);
  gtk_box_pack_start (GTK_BOX (hbox1), frame1, TRUE, TRUE, 0);
  gtk_frame_set_label_align (GTK_FRAME (frame1), 0.5, 0.5);

  alignment3 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment3);
  gtk_container_add (GTK_CONTAINER (frame1), alignment3);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment3), 2, 4, 4, 4);

  console_tabs = gtk_notebook_new ();
  gtk_widget_show (console_tabs);
  gtk_container_add (GTK_CONTAINER (alignment3), console_tabs);

  alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment4);
  gtk_container_add (GTK_CONTAINER (console_tabs), alignment4);
  gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (console_tabs), alignment4,
                                      TRUE, TRUE, GTK_PACK_START);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 2, 2, 2, 2);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (alignment4), vbox1);

  console_scroll = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (console_scroll);
  gtk_box_pack_start (GTK_BOX (vbox1), console_scroll, TRUE, TRUE, 0);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (console_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (console_scroll), GTK_SHADOW_IN);

  console_view = gtk_text_view_new ();
  gtk_widget_show (console_view);
  gtk_container_add (GTK_CONTAINER (console_scroll), console_view);
  gtk_text_view_set_editable (GTK_TEXT_VIEW (console_view), FALSE);
  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (console_view), GTK_WRAP_CHAR);
  gtk_text_view_set_pixels_above_lines (GTK_TEXT_VIEW (console_view), 4);
  gtk_text_view_set_pixels_below_lines (GTK_TEXT_VIEW (console_view), 4);
  gtk_text_view_set_left_margin (GTK_TEXT_VIEW (console_view), 4);
  gtk_text_view_set_right_margin (GTK_TEXT_VIEW (console_view), 4);

  label4 = gtk_label_new ("");
  gtk_widget_show (label4);
  gtk_box_pack_start (GTK_BOX (vbox1), label4, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label4, 360, 3);

  hbox2 = gtk_hbox_new (FALSE, 4);
  gtk_widget_show (hbox2);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox2, FALSE, TRUE, 0);

  image1 = create_pixmap (main_window, "go.png");
  gtk_widget_show (image1);
  gtk_box_pack_start (GTK_BOX (hbox2), image1, FALSE, TRUE, 0);

  cmd_entry = gtk_entry_new ();
  gtk_widget_show (cmd_entry);
  gtk_box_pack_start (GTK_BOX (hbox2), cmd_entry, TRUE, TRUE, 0);

  btn_cmdSend = gtk_button_new_with_mnemonic (_("Send"));
  gtk_widget_show (btn_cmdSend);
  gtk_box_pack_start (GTK_BOX (hbox2), btn_cmdSend, FALSE, FALSE, 0);

  label6 = gtk_label_new (_("User's console"));
  gtk_widget_show (label6);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (console_tabs), gtk_notebook_get_nth_page (GTK_NOTEBOOK (console_tabs), 0), label6);

  alignment5 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment5);
  gtk_container_add (GTK_CONTAINER (console_tabs), alignment5);
  gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (console_tabs), alignment5,
                                      TRUE, TRUE, GTK_PACK_START);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment5), 2, 2, 2, 2);

  pipe_scroll = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (pipe_scroll);
  gtk_container_add (GTK_CONTAINER (alignment5), pipe_scroll);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (pipe_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (pipe_scroll), GTK_SHADOW_IN);

  pipe_view = gtk_text_view_new ();
  gtk_widget_show (pipe_view);
  gtk_container_add (GTK_CONTAINER (pipe_scroll), pipe_view);
  gtk_text_view_set_editable (GTK_TEXT_VIEW (pipe_view), FALSE);
  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (pipe_view), GTK_WRAP_CHAR);
  gtk_text_view_set_pixels_above_lines (GTK_TEXT_VIEW (pipe_view), 4);
  gtk_text_view_set_pixels_below_lines (GTK_TEXT_VIEW (pipe_view), 4);
  gtk_text_view_set_left_margin (GTK_TEXT_VIEW (pipe_view), 4);
  gtk_text_view_set_right_margin (GTK_TEXT_VIEW (pipe_view), 4);

  label7 = gtk_label_new (_("Pipe"));
  gtk_widget_show (label7);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (console_tabs), gtk_notebook_get_nth_page (GTK_NOTEBOOK (console_tabs), 1), label7);
  gtk_label_set_line_wrap (GTK_LABEL (label7), TRUE);

  label2 = gtk_label_new (_("<b>WebTester</b> Console"));
  gtk_widget_show (label2);
  gtk_frame_set_label_widget (GTK_FRAME (frame1), label2);
  gtk_label_set_use_markup (GTK_LABEL (label2), TRUE);

  vbox2 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox2);
  gtk_box_pack_start (GTK_BOX (hbox1), vbox2, FALSE, TRUE, 0);

  frame2 = gtk_frame_new (NULL);
  gtk_widget_show (frame2);
  gtk_box_pack_start (GTK_BOX (vbox2), frame2, TRUE, TRUE, 0);
  gtk_frame_set_label_align (GTK_FRAME (frame2), 0.5, 0.5);

  alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment2);
  gtk_container_add (GTK_CONTAINER (frame2), alignment2);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment2), 2, 4, 4, 4);

  vbox3 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox3);
  gtk_container_add (GTK_CONTAINER (alignment2), vbox3);

  ctrlButton_0 = gtk_button_new_with_mnemonic (_("(Unassigned)"));
  gtk_widget_show (ctrlButton_0);
  gtk_box_pack_start (GTK_BOX (vbox3), ctrlButton_0, FALSE, FALSE, 0);

  ctrlButton_1 = gtk_button_new_with_mnemonic (_("(Unassigned)"));
  gtk_widget_show (ctrlButton_1);
  gtk_box_pack_start (GTK_BOX (vbox3), ctrlButton_1, FALSE, FALSE, 0);

  ctrlButton_2 = gtk_button_new_with_mnemonic (_("(Unassigned)"));
  gtk_widget_show (ctrlButton_2);
  gtk_box_pack_start (GTK_BOX (vbox3), ctrlButton_2, FALSE, FALSE, 0);

  ctrlButton_3 = gtk_button_new_with_mnemonic (_("(Unassigned)"));
  gtk_widget_show (ctrlButton_3);
  gtk_box_pack_start (GTK_BOX (vbox3), ctrlButton_3, FALSE, FALSE, 0);

  alignment6 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment6);
  gtk_box_pack_start (GTK_BOX (vbox3), alignment6, FALSE, FALSE, 0);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment6), 2, 2, 0, 0);

  hbox3 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox3);
  gtk_container_add (GTK_CONTAINER (alignment6), hbox3);

  image2 = create_pixmap (main_window, "queue.png");
  gtk_widget_show (image2);
  gtk_box_pack_start (GTK_BOX (hbox3), image2, FALSE, TRUE, 0);

  hbox4 = gtk_hbox_new (FALSE, 1);
  gtk_widget_show (hbox4);
  gtk_box_pack_start (GTK_BOX (hbox3), hbox4, FALSE, TRUE, 0);

  queue_progress = gtk_progress_bar_new ();
  gtk_widget_show (queue_progress);
  gtk_box_pack_start (GTK_BOX (hbox4), queue_progress, FALSE, FALSE, 0);
  gtk_widget_set_size_request (queue_progress, 10, 48);
  gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (queue_progress), GTK_PROGRESS_BOTTOM_TO_TOP);

  queue_usage = gtk_progress_bar_new ();
  gtk_widget_show (queue_usage);
  gtk_box_pack_start (GTK_BOX (hbox4), queue_usage, FALSE, FALSE, 0);
  gtk_widget_set_size_request (queue_usage, 10, 48);
  gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (queue_usage), GTK_PROGRESS_BOTTOM_TO_TOP);

  label9 = gtk_label_new ("");
  gtk_widget_show (label9);
  gtk_box_pack_start (GTK_BOX (hbox3), label9, FALSE, FALSE, 0);
  gtk_widget_set_size_request (label9, 6, -1);

  image3 = create_pixmap (main_window, "belts.png");
  gtk_widget_show (image3);
  gtk_box_pack_start (GTK_BOX (hbox3), image3, FALSE, FALSE, 0);

  hbox5 = gtk_hbox_new (FALSE, 1);
  gtk_widget_show (hbox5);
  gtk_box_pack_start (GTK_BOX (hbox3), hbox5, FALSE, FALSE, 0);

  belts_progress = gtk_progress_bar_new ();
  gtk_widget_show (belts_progress);
  gtk_box_pack_start (GTK_BOX (hbox5), belts_progress, FALSE, FALSE, 0);
  gtk_widget_set_size_request (belts_progress, 10, 48);
  gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (belts_progress), GTK_PROGRESS_BOTTOM_TO_TOP);

  belts_usage = gtk_progress_bar_new ();
  gtk_widget_show (belts_usage);
  gtk_box_pack_start (GTK_BOX (hbox5), belts_usage, FALSE, FALSE, 0);
  gtk_widget_set_size_request (belts_usage, 10, 48);
  gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (belts_usage), GTK_PROGRESS_BOTTOM_TO_TOP);

  ctrlButton_4 = gtk_button_new_with_mnemonic (_("(Unassigned)"));
  gtk_widget_show (ctrlButton_4);
  gtk_box_pack_start (GTK_BOX (vbox3), ctrlButton_4, FALSE, FALSE, 0);

  ctrlButton_5 = gtk_button_new_with_mnemonic (_("(Unassigned)"));
  gtk_widget_show (ctrlButton_5);
  gtk_box_pack_start (GTK_BOX (vbox3), ctrlButton_5, FALSE, FALSE, 0);

  ctrlButton_6 = gtk_button_new_with_mnemonic (_("(Unassigned)"));
  gtk_widget_show (ctrlButton_6);
  gtk_box_pack_start (GTK_BOX (vbox3), ctrlButton_6, FALSE, FALSE, 0);

  label5 = gtk_label_new ("");
  gtk_widget_show (label5);
  gtk_box_pack_start (GTK_BOX (vbox3), label5, TRUE, FALSE, 0);

  label3 = gtk_label_new (_("Control"));
  gtk_widget_show (label3);
  gtk_frame_set_label_widget (GTK_FRAME (frame2), label3);
  gtk_label_set_use_markup (GTK_LABEL (label3), TRUE);

  label8 = gtk_label_new (_("2007 (c) nazgul"));
  gtk_widget_show (label8);
  gtk_box_pack_start (GTK_BOX (vbox2), label8, FALSE, FALSE, 0);

  image6 = create_pixmap (main_window, "wt.png");
  gtk_widget_show (image6);
  gtk_box_pack_start (GTK_BOX (hbox12), image6, TRUE, TRUE, 0);

  g_signal_connect ((gpointer) main_window, "remove",
                    G_CALLBACK (on_main_window_remove),
                    NULL);
  g_signal_connect ((gpointer) connect, "toggled",
                    G_CALLBACK (on_connect_toggled),
                    NULL);
  g_signal_connect ((gpointer) login_at_connect, "toggled",
                    G_CALLBACK (on_login_at_connect_toggled),
                    NULL);
  g_signal_connect ((gpointer) cmd_entry, "key_press_event",
                    G_CALLBACK (on_cmd_entry_key_press_event),
                    NULL);
  g_signal_connect ((gpointer) btn_cmdSend, "clicked",
                    G_CALLBACK (on_btn_cmdSend_clicked),
                    NULL);
  g_signal_connect ((gpointer) ctrlButton_0, "clicked",
                    G_CALLBACK (on_ctrlButton_clicked),
                    NULL);
  g_signal_connect ((gpointer) ctrlButton_1, "clicked",
                    G_CALLBACK (on_ctrlButton_clicked),
                    NULL);
  g_signal_connect ((gpointer) ctrlButton_2, "clicked",
                    G_CALLBACK (on_ctrlButton_clicked),
                    NULL);
  g_signal_connect ((gpointer) ctrlButton_3, "clicked",
                    G_CALLBACK (on_ctrlButton_clicked),
                    NULL);
  g_signal_connect ((gpointer) ctrlButton_4, "clicked",
                    G_CALLBACK (on_ctrlButton_clicked),
                    NULL);
  g_signal_connect ((gpointer) ctrlButton_5, "clicked",
                    G_CALLBACK (on_ctrlButton_clicked),
                    NULL);
  g_signal_connect ((gpointer) ctrlButton_6, "clicked",
                    G_CALLBACK (on_ctrlButton_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (main_window, main_window, "main_window");
  GLADE_HOOKUP_OBJECT (main_window, hbox12, "hbox12");
  GLADE_HOOKUP_OBJECT (main_window, vbox30, "vbox30");
  GLADE_HOOKUP_OBJECT (main_window, expander1, "expander1");
  GLADE_HOOKUP_OBJECT (main_window, hbox6, "hbox6");
  GLADE_HOOKUP_OBJECT (main_window, label11, "label11");
  GLADE_HOOKUP_OBJECT (main_window, vbox5, "vbox5");
  GLADE_HOOKUP_OBJECT (main_window, hbox7, "hbox7");
  GLADE_HOOKUP_OBJECT (main_window, label12, "label12");
  GLADE_HOOKUP_OBJECT (main_window, hbox9, "hbox9");
  GLADE_HOOKUP_OBJECT (main_window, server, "server");
  GLADE_HOOKUP_OBJECT (main_window, connect, "connect");
  GLADE_HOOKUP_OBJECT (main_window, alignment7, "alignment7");
  GLADE_HOOKUP_OBJECT (main_window, hbox11, "hbox11");
  GLADE_HOOKUP_OBJECT (main_window, image7, "image7");
  GLADE_HOOKUP_OBJECT (main_window, label18, "label18");
  GLADE_HOOKUP_OBJECT (main_window, login_at_connect, "login_at_connect");
  GLADE_HOOKUP_OBJECT (main_window, hbox8, "hbox8");
  GLADE_HOOKUP_OBJECT (main_window, label14, "label14");
  GLADE_HOOKUP_OBJECT (main_window, table1, "table1");
  GLADE_HOOKUP_OBJECT (main_window, label13, "label13");
  GLADE_HOOKUP_OBJECT (main_window, label15, "label15");
  GLADE_HOOKUP_OBJECT (main_window, login, "login");
  GLADE_HOOKUP_OBJECT (main_window, password, "password");
  GLADE_HOOKUP_OBJECT (main_window, label17, "label17");
  GLADE_HOOKUP_OBJECT (main_window, label10, "label10");
  GLADE_HOOKUP_OBJECT (main_window, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (main_window, frame1, "frame1");
  GLADE_HOOKUP_OBJECT (main_window, alignment3, "alignment3");
  GLADE_HOOKUP_OBJECT (main_window, console_tabs, "console_tabs");
  GLADE_HOOKUP_OBJECT (main_window, alignment4, "alignment4");
  GLADE_HOOKUP_OBJECT (main_window, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (main_window, console_scroll, "console_scroll");
  GLADE_HOOKUP_OBJECT (main_window, console_view, "console_view");
  GLADE_HOOKUP_OBJECT (main_window, label4, "label4");
  GLADE_HOOKUP_OBJECT (main_window, hbox2, "hbox2");
  GLADE_HOOKUP_OBJECT (main_window, image1, "image1");
  GLADE_HOOKUP_OBJECT (main_window, cmd_entry, "cmd_entry");
  GLADE_HOOKUP_OBJECT (main_window, btn_cmdSend, "btn_cmdSend");
  GLADE_HOOKUP_OBJECT (main_window, label6, "label6");
  GLADE_HOOKUP_OBJECT (main_window, alignment5, "alignment5");
  GLADE_HOOKUP_OBJECT (main_window, pipe_scroll, "pipe_scroll");
  GLADE_HOOKUP_OBJECT (main_window, pipe_view, "pipe_view");
  GLADE_HOOKUP_OBJECT (main_window, label7, "label7");
  GLADE_HOOKUP_OBJECT (main_window, label2, "label2");
  GLADE_HOOKUP_OBJECT (main_window, vbox2, "vbox2");
  GLADE_HOOKUP_OBJECT (main_window, frame2, "frame2");
  GLADE_HOOKUP_OBJECT (main_window, alignment2, "alignment2");
  GLADE_HOOKUP_OBJECT (main_window, vbox3, "vbox3");
  GLADE_HOOKUP_OBJECT (main_window, ctrlButton_0, "ctrlButton_0");
  GLADE_HOOKUP_OBJECT (main_window, ctrlButton_1, "ctrlButton_1");
  GLADE_HOOKUP_OBJECT (main_window, ctrlButton_2, "ctrlButton_2");
  GLADE_HOOKUP_OBJECT (main_window, ctrlButton_3, "ctrlButton_3");
  GLADE_HOOKUP_OBJECT (main_window, alignment6, "alignment6");
  GLADE_HOOKUP_OBJECT (main_window, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (main_window, image2, "image2");
  GLADE_HOOKUP_OBJECT (main_window, hbox4, "hbox4");
  GLADE_HOOKUP_OBJECT (main_window, queue_progress, "queue_progress");
  GLADE_HOOKUP_OBJECT (main_window, queue_usage, "queue_usage");
  GLADE_HOOKUP_OBJECT (main_window, label9, "label9");
  GLADE_HOOKUP_OBJECT (main_window, image3, "image3");
  GLADE_HOOKUP_OBJECT (main_window, hbox5, "hbox5");
  GLADE_HOOKUP_OBJECT (main_window, belts_progress, "belts_progress");
  GLADE_HOOKUP_OBJECT (main_window, belts_usage, "belts_usage");
  GLADE_HOOKUP_OBJECT (main_window, ctrlButton_4, "ctrlButton_4");
  GLADE_HOOKUP_OBJECT (main_window, ctrlButton_5, "ctrlButton_5");
  GLADE_HOOKUP_OBJECT (main_window, ctrlButton_6, "ctrlButton_6");
  GLADE_HOOKUP_OBJECT (main_window, label5, "label5");
  GLADE_HOOKUP_OBJECT (main_window, label3, "label3");
  GLADE_HOOKUP_OBJECT (main_window, label8, "label8");
  GLADE_HOOKUP_OBJECT (main_window, image6, "image6");

  return main_window;
}
示例#20
0
GtkWidget*
create_win_main (void)
{
  GtkWidget *win_main;
  GtkWidget *vbox1;
  GtkWidget *table1;
  GtkWidget *vbox2;
  GtkWidget *label_lang;
  GtkWidget *combo1;
  GtkWidget *combo_lang;
  GtkWidget *vbox3;
  GtkWidget *label_keyb;
  GtkWidget *combo2;
  GtkWidget *combo_keyb;
  GtkWidget *pixmap1;
  GtkWidget *pixmap2;
  GtkWidget *hbuttonbox1;
  guint button_ok_key;
  GtkWidget *button_ok;
  GtkAccelGroup *accel_group;

  accel_group = gtk_accel_group_new ();

  win_main = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (win_main, "win_main");
  gtk_object_set_data (GTK_OBJECT (win_main), "win_main", win_main);
  gtk_window_set_title (GTK_WINDOW (win_main), _("dyne:bolic :: lost in babylon"));
  gtk_window_set_position (GTK_WINDOW (win_main), GTK_WIN_POS_CENTER);
  gtk_window_set_policy (GTK_WINDOW (win_main), FALSE, FALSE, FALSE);
  gtk_window_set_wmclass (GTK_WINDOW (win_main), "babylon", "dynebolic");

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox1, "vbox1");
  gtk_widget_ref (vbox1);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "vbox1", vbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (win_main), vbox1);

  table1 = gtk_table_new (2, 2, FALSE);
  gtk_widget_set_name (table1, "table1");
  gtk_widget_ref (table1);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "table1", table1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (table1);
  gtk_box_pack_start (GTK_BOX (vbox1), table1, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (table1), 5);

  vbox2 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox2, "vbox2");
  gtk_widget_ref (vbox2);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "vbox2", vbox2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox2);
  gtk_table_attach (GTK_TABLE (table1), vbox2, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (vbox2), 10);

  label_lang = gtk_label_new (_("Choose your language:"));
  gtk_widget_set_name (label_lang, "label_lang");
  gtk_widget_ref (label_lang);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "label_lang", label_lang,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label_lang);
  gtk_box_pack_start (GTK_BOX (vbox2), label_lang, FALSE, FALSE, 0);

  combo1 = gtk_combo_new ();
  gtk_widget_set_name (combo1, "combo1");
  gtk_widget_ref (combo1);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "combo1", combo1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo1);
  gtk_box_pack_start (GTK_BOX (vbox2), combo1, FALSE, FALSE, 0);

  combo_lang = GTK_COMBO (combo1)->entry;
  gtk_widget_set_name (combo_lang, "combo_lang");
  gtk_widget_ref (combo_lang);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "combo_lang", combo_lang,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo_lang);
  gtk_entry_set_editable (GTK_ENTRY (combo_lang), FALSE);

  vbox3 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox3, "vbox3");
  gtk_widget_ref (vbox3);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "vbox3", vbox3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox3);
  gtk_table_attach (GTK_TABLE (table1), vbox3, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (vbox3), 10);

  label_keyb = gtk_label_new (_("Choose your keyboard layout:"));
  gtk_widget_set_name (label_keyb, "label_keyb");
  gtk_widget_ref (label_keyb);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "label_keyb", label_keyb,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label_keyb);
  gtk_box_pack_start (GTK_BOX (vbox3), label_keyb, FALSE, FALSE, 0);

  combo2 = gtk_combo_new ();
  gtk_widget_set_name (combo2, "combo2");
  gtk_widget_ref (combo2);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "combo2", combo2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo2);
  gtk_box_pack_start (GTK_BOX (vbox3), combo2, FALSE, FALSE, 0);

  combo_keyb = GTK_COMBO (combo2)->entry;
  gtk_widget_set_name (combo_keyb, "combo_keyb");
  gtk_widget_ref (combo_keyb);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "combo_keyb", combo_keyb,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo_keyb);
  gtk_entry_set_editable (GTK_ENTRY (combo_keyb), FALSE);

  pixmap1 = create_pixmap (win_main, "locale.xpm");
  gtk_widget_set_name (pixmap1, "pixmap1");
  gtk_widget_ref (pixmap1);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "pixmap1", pixmap1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pixmap1);
  gtk_table_attach (GTK_TABLE (table1), pixmap1, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  pixmap2 = create_pixmap (win_main, "charselect.xpm");
  gtk_widget_set_name (pixmap2, "pixmap2");
  gtk_widget_ref (pixmap2);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "pixmap2", pixmap2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pixmap2);
  gtk_table_attach (GTK_TABLE (table1), pixmap2, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  hbuttonbox1 = gtk_hbutton_box_new ();
  gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
  gtk_widget_ref (hbuttonbox1);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "hbuttonbox1", hbuttonbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbuttonbox1);
  gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, FALSE, 0);

  button_ok = gtk_button_new_with_label ("");
  button_ok_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (button_ok)->child),
                                   _("_Ok"));
  gtk_widget_add_accelerator (button_ok, "clicked", accel_group,
                              button_ok_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
  gtk_widget_set_name (button_ok, "button_ok");
  gtk_widget_ref (button_ok);
  gtk_object_set_data_full (GTK_OBJECT (win_main), "button_ok", button_ok,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button_ok);
  gtk_container_add (GTK_CONTAINER (hbuttonbox1), button_ok);
  gtk_container_set_border_width (GTK_CONTAINER (button_ok), 3);
  GTK_WIDGET_SET_FLAGS (button_ok, GTK_CAN_DEFAULT);

  gtk_signal_connect (GTK_OBJECT (win_main), "destroy",
                      GTK_SIGNAL_FUNC (gtk_main_quit),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (combo1), "realize",
                      GTK_SIGNAL_FUNC (on_combo1_realize),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (combo_lang), "changed",
                      GTK_SIGNAL_FUNC (on_combo_lang_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (combo2), "realize",
                      GTK_SIGNAL_FUNC (on_combo2_realize),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (combo_keyb), "changed",
                      GTK_SIGNAL_FUNC (on_combo_keyb_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (button_ok), "released",
                      GTK_SIGNAL_FUNC (on_button_ok_released),
                      NULL);

  gtk_window_add_accel_group (GTK_WINDOW (win_main), accel_group);

  return win_main;
}
示例#21
0
GtkWidget*
create_MainWindow (void)
{
  GtkWidget *MainWindow;
  GtkWidget *ObjectGrid;
  GtkWidget *R3PlusMinus;
  GtkWidget *R3D4Digit;
  GtkWidget *R3D5Digit;
  GtkWidget *R2D5Digit;
  GtkWidget *R2D4Digit;
  GtkWidget *R2D3Digit;
  GtkWidget *R2D2Digit;
  GtkWidget *R2D1Digit;
  GtkWidget *R2PlusMinus;
  GtkWidget *R1D5Digit;
  GtkWidget *R1D4Digit;
  GtkWidget *R1D3Digit;
  GtkWidget *R1D2Digit;
  GtkWidget *R1D1Digit;
  GtkWidget *R1PlusMinus;
  GtkWidget *ND2Digit;
  GtkWidget *ND1Digit;
  GtkWidget *VD2Digit;
  GtkWidget *VD1Digit;
  GtkWidget *image57;
  GtkWidget *NounAnnunciator;
  GtkWidget *MD2Digit;
  GtkWidget *MD1Digit;
  GtkWidget *image58;
  GtkWidget *image55;
  GtkWidget *image56;
  GtkWidget *image54;
  GtkWidget *R3D1Digit;
  GtkWidget *R3D2Digit;
  GtkWidget *R3D3Digit;
  GtkWidget *CompActyAnnunciator;
  GtkWidget *image59;
  GtkWidget *ModeAnnunciator;
  GtkWidget *image60;
  GtkWidget *image64;
  GtkWidget *image66;
  GtkWidget *image65;
  GtkWidget *image63;
  GtkWidget *Annunciator12;
  GtkWidget *Annunciator13;
  GtkWidget *Annunciator14;
  GtkWidget *Annunciator15;
  GtkWidget *Annunciator16;
  GtkWidget *Annunciator17;
  GtkWidget *image67;
  GtkWidget *image62;
  GtkWidget *image61;
  GtkWidget *Annunciator27;
  GtkWidget *Annunciator26;
  GtkWidget *Annunciator25;
  GtkWidget *Annunciator24;
  GtkWidget *Annunciator23;
  GtkWidget *Annunciator22;
  GtkWidget *PlusButton;
  GtkWidget *iPlusButton;
  GtkWidget *SevenButton;
  GtkWidget *iSevenButton;
  GtkWidget *EightButton;
  GtkWidget *iEightButton;
  GtkWidget *NineButton;
  GtkWidget *iNineButton;
  GtkWidget *ClrButton;
  GtkWidget *iClrButton;
  GtkWidget *MinusButton;
  GtkWidget *iMinusButton;
  GtkWidget *FourButton;
  GtkWidget *iFourButton;
  GtkWidget *FiveButton;
  GtkWidget *iFiveButton;
  GtkWidget *SixButton;
  GtkWidget *iSixButton;
  GtkWidget *ProButton;
  GtkWidget *iLastButton;
  GtkWidget *ZeroButton;
  GtkWidget *iZeroButton;
  GtkWidget *OneButton;
  GtkWidget *iOneButton;
  GtkWidget *TwoButton;
  GtkWidget *iTwoButton;
  GtkWidget *ThreeButton;
  GtkWidget *iThreeButton;
  GtkWidget *KeyRelButton;
  GtkWidget *iKeyRelButton;
  GtkWidget *EntrButton;
  GtkWidget *iEntrButton;
  GtkWidget *RsetButton;
  GtkWidget *iRsetButton;
  GtkWidget *VerbButton;
  GtkWidget *iVerbButton;
  GtkWidget *NounButton;
  GtkWidget *iNounButton;
  GtkWidget *VerbAnnunciator;
  GtkWidget *Annunciator11;
  GtkWidget *Annunciator21;
  GtkAccelGroup *AccelGroup;

  MainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_usize (MainWindow, 572, 640);
  gtk_window_set_title (GTK_WINDOW (MainWindow), _("yaDSKY by Ron Burkey"));
  gtk_window_set_position (GTK_WINDOW (MainWindow), GTK_WIN_POS_CENTER);
  gtk_window_set_resizable (GTK_WINDOW (MainWindow), FALSE);
  gtk_window_set_destroy_with_parent (GTK_WINDOW (MainWindow), TRUE);

  AccelGroup = gtk_accel_group_new( );
  gtk_window_add_accel_group( GTK_WINDOW( MainWindow), AccelGroup);

  ObjectGrid = gtk_fixed_new ();
  gtk_widget_show (ObjectGrid);
  gtk_container_add (GTK_CONTAINER (MainWindow), ObjectGrid);

  R3PlusMinus = create_pixmap (MainWindow, "PlusMinusOff.jpg");
  gtk_widget_show (R3PlusMinus);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R3PlusMinus, 328, 320);
  gtk_widget_set_usize (R3PlusMinus, 32, 45);

  R3D4Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R3D4Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R3D4Digit, 456, 320);
  gtk_widget_set_usize (R3D4Digit, 32, 45);

  R3D5Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R3D5Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R3D5Digit, 488, 320);
  gtk_widget_set_usize (R3D5Digit, 32, 45);

  R2D5Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R2D5Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R2D5Digit, 488, 256);
  gtk_widget_set_usize (R2D5Digit, 32, 45);

  R2D4Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R2D4Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R2D4Digit, 456, 256);
  gtk_widget_set_usize (R2D4Digit, 32, 45);

  R2D3Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R2D3Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R2D3Digit, 424, 256);
  gtk_widget_set_usize (R2D3Digit, 32, 45);

  R2D2Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R2D2Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R2D2Digit, 392, 256);
  gtk_widget_set_usize (R2D2Digit, 32, 45);

  R2D1Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R2D1Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R2D1Digit, 360, 256);
  gtk_widget_set_usize (R2D1Digit, 32, 45);

  R2PlusMinus = create_pixmap (MainWindow, "PlusMinusOff.jpg");
  gtk_widget_show (R2PlusMinus);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R2PlusMinus, 328, 256);
  gtk_widget_set_usize (R2PlusMinus, 32, 45);

  R1D5Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R1D5Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R1D5Digit, 488, 192);
  gtk_widget_set_usize (R1D5Digit, 32, 45);

  R1D4Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R1D4Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R1D4Digit, 456, 192);
  gtk_widget_set_usize (R1D4Digit, 32, 45);

  R1D3Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R1D3Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R1D3Digit, 424, 192);
  gtk_widget_set_usize (R1D3Digit, 32, 45);

  R1D2Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R1D2Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R1D2Digit, 392, 192);
  gtk_widget_set_usize (R1D2Digit, 32, 45);

  R1D1Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R1D1Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R1D1Digit, 360, 192);
  gtk_widget_set_usize (R1D1Digit, 32, 45);

  R1PlusMinus = create_pixmap (MainWindow, "PlusMinusOff.jpg");
  gtk_widget_show (R1PlusMinus);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R1PlusMinus, 328, 192);
  gtk_widget_set_usize (R1PlusMinus, 32, 45);

  ND2Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (ND2Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), ND2Digit, 488, 128);
  gtk_widget_set_usize (ND2Digit, 32, 45);

  ND1Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (ND1Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), ND1Digit, 456, 128);
  gtk_widget_set_usize (ND1Digit, 32, 45);

  VD2Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (VD2Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), VD2Digit, 360, 128);
  gtk_widget_set_usize (VD2Digit, 32, 45);

  VD1Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (VD1Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), VD1Digit, 328, 128);
  gtk_widget_set_usize (VD1Digit, 32, 45);

  image57 = create_pixmap (MainWindow, "ShortHorizontal.jpg");
  gtk_widget_show (image57);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image57, 328, 88);
  gtk_widget_set_usize (image57, 64, 19);

  NounAnnunciator = create_pixmap (MainWindow, "NounOn.jpg");
  gtk_widget_show (NounAnnunciator);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), NounAnnunciator, 456, 104);
  gtk_widget_set_usize (NounAnnunciator, 64, 24);

  MD2Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (MD2Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), MD2Digit, 488, 48);
  gtk_widget_set_usize (MD2Digit, 32, 45);

  MD1Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (MD1Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), MD1Digit, 456, 48);
  gtk_widget_set_usize (MD1Digit, 32, 45);

  image58 = create_pixmap (MainWindow, "ShortHorizontal.jpg");
  gtk_widget_show (image58);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image58, 456, 93);
  gtk_widget_set_usize (image58, 64, 13);

  image55 = create_pixmap (MainWindow, "SeparatorOn.jpg");
  gtk_widget_show (image55);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image55, 328, 237);
  gtk_widget_set_usize (image55, 192, 19);

  image56 = create_pixmap (MainWindow, "SeparatorOn.jpg");
  gtk_widget_show (image56);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image56, 328, 173);
  gtk_widget_set_usize (image56, 192, 19);

  image54 = create_pixmap (MainWindow, "SeparatorOn.jpg");
  gtk_widget_show (image54);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image54, 328, 301);
  gtk_widget_set_usize (image54, 192, 19);

  R3D1Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R3D1Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R3D1Digit, 360, 320);
  gtk_widget_set_usize (R3D1Digit, 32, 45);

  R3D2Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R3D2Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R3D2Digit, 392, 320);
  gtk_widget_set_usize (R3D2Digit, 32, 45);

  R3D3Digit = create_pixmap (MainWindow, "7SegOff.jpg");
  gtk_widget_show (R3D3Digit);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), R3D3Digit, 424, 320);
  gtk_widget_set_usize (R3D3Digit, 32, 45);

  CompActyAnnunciator = create_pixmap (MainWindow, "CompActyOff.jpg");
  gtk_widget_show (CompActyAnnunciator);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), CompActyAnnunciator, 328, 24);
  gtk_widget_set_usize (CompActyAnnunciator, 64, 64);

  image59 = create_pixmap (MainWindow, "CenterBlock.jpg");
  gtk_widget_show (image59);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image59, 392, 24);
  gtk_widget_set_usize (image59, 64, 151);

  ModeAnnunciator = create_pixmap (MainWindow, "rProgOn.jpg");
  gtk_widget_show (ModeAnnunciator);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), ModeAnnunciator, 456, 24);
  gtk_widget_set_usize (ModeAnnunciator, 64, 24);

  image60 = create_pixmap (MainWindow, "FrameVertical.jpg");
  gtk_widget_show (image60);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image60, 520, 16);
  gtk_widget_set_usize (image60, 8, 357);

  image64 = create_pixmap (MainWindow, "FrameHorizontal.jpg");
  gtk_widget_show (image64);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image64, 328, 16);
  gtk_widget_set_usize (image64, 192, 8);

  image66 = create_pixmap (MainWindow, "FrameHorizontal.jpg");
  gtk_widget_show (image66);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image66, 56, 16);
  gtk_widget_set_usize (image66, 192, 8);

  image65 = create_pixmap (MainWindow, "FrameHorizontal.jpg");
  gtk_widget_show (image65);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image65, 328, 365);
  gtk_widget_set_usize (image65, 192, 8);

  image63 = create_pixmap (MainWindow, "FrameVertical.jpg");
  gtk_widget_show (image63);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image63, 320, 16);
  gtk_widget_set_usize (image63, 8, 357);

  Annunciator12 = create_pixmap (MainWindow, "NoAttOff.jpg");
  gtk_widget_show (Annunciator12);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator12, 64, 80);
  gtk_widget_set_usize (Annunciator12, 84, 40);

  Annunciator13 = create_pixmap (MainWindow, "StbyOff.jpg");
  gtk_widget_show (Annunciator13);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator13, 64, 128);
  gtk_widget_set_usize (Annunciator13, 84, 40);

  Annunciator14 = create_pixmap (MainWindow, "KeyRelOff.jpg");
  gtk_widget_show (Annunciator14);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator14, 64, 176);
  gtk_widget_set_usize (Annunciator14, 84, 40);

  Annunciator15 = create_pixmap (MainWindow, "OprErrOff.jpg");
  gtk_widget_show (Annunciator15);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator15, 64, 224);
  gtk_widget_set_usize (Annunciator15, 84, 40);

  Annunciator16 = create_pixmap (MainWindow, "BlankOff.jpg");
  gtk_widget_show (Annunciator16);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator16, 64, 272);
  gtk_widget_set_usize (Annunciator16, 84, 40);

  Annunciator17 = create_pixmap (MainWindow, "BlankOff.jpg");
  gtk_widget_show (Annunciator17);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator17, 64, 320);
  gtk_widget_set_usize (Annunciator17, 84, 40);

  image67 = create_pixmap (MainWindow, "FrameHorizontal.jpg");
  gtk_widget_show (image67);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image67, 56, 368);
  gtk_widget_set_usize (image67, 192, 8);

  image62 = create_pixmap (MainWindow, "FrameVertical.jpg");
  gtk_widget_show (image62);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image62, 48, 16);
  gtk_widget_set_usize (image62, 8, 360);

  image61 = create_pixmap (MainWindow, "FrameVertical.jpg");
  gtk_widget_show (image61);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), image61, 248, 16);
  gtk_widget_set_usize (image61, 8, 360);

  Annunciator27 = create_pixmap (MainWindow, "BlankOff.jpg");
  gtk_widget_show (Annunciator27);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator27, 156, 320);
  gtk_widget_set_usize (Annunciator27, 84, 40);

  Annunciator26 = create_pixmap (MainWindow, "BlankOff.jpg");
  gtk_widget_show (Annunciator26);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator26, 156, 272);
  gtk_widget_set_usize (Annunciator26, 84, 40);

  Annunciator25 = create_pixmap (MainWindow, "TrackerOff.jpg");
  gtk_widget_show (Annunciator25);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator25, 156, 224);
  gtk_widget_set_usize (Annunciator25, 84, 40);

  Annunciator24 = create_pixmap (MainWindow, "RestartOff.jpg");
  gtk_widget_show (Annunciator24);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator24, 156, 176);
  gtk_widget_set_usize (Annunciator24, 84, 40);

  Annunciator23 = create_pixmap (MainWindow, "ProgOff.jpg");
  gtk_widget_show (Annunciator23);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator23, 156, 128);
  gtk_widget_set_usize (Annunciator23, 84, 40);

  Annunciator22 = create_pixmap (MainWindow, "GimbalLockOff.jpg");
  gtk_widget_show (Annunciator22);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator22, 156, 80);
  gtk_widget_set_usize (Annunciator22, 84, 40);

  PlusButton = gtk_button_new ();
  gtk_widget_show (PlusButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), PlusButton, 88, 392);
  gtk_widget_set_usize (PlusButton, 75, 75);
  gtk_widget_add_accelerator( PlusButton, "activate", AccelGroup, '+', 0, GTK_ACCEL_VISIBLE);

  iPlusButton = create_pixmap (MainWindow, "PlusUp.jpg");
  gtk_widget_show (iPlusButton);
  gtk_container_add (GTK_CONTAINER (PlusButton), iPlusButton);

  SevenButton = gtk_button_new ();
  gtk_widget_show (SevenButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), SevenButton, 168, 392);
  gtk_widget_set_usize (SevenButton, 75, 75);
  gtk_widget_add_accelerator( SevenButton, "activate", AccelGroup, GDK_7, 0, GTK_ACCEL_VISIBLE);

  iSevenButton = create_pixmap (MainWindow, "7Up.jpg");
  gtk_widget_show (iSevenButton);
  gtk_container_add (GTK_CONTAINER (SevenButton), iSevenButton);

  EightButton = gtk_button_new ();
  gtk_widget_show (EightButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), EightButton, 248, 392);
  gtk_widget_set_usize (EightButton, 75, 75);
  gtk_widget_add_accelerator( EightButton, "activate", AccelGroup, GDK_8, 0, GTK_ACCEL_VISIBLE);

  iEightButton = create_pixmap (MainWindow, "8Up.jpg");
  gtk_widget_show (iEightButton);
  gtk_container_add (GTK_CONTAINER (EightButton), iEightButton);

  NineButton = gtk_button_new ();
  gtk_widget_show (NineButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), NineButton, 328, 392);
  gtk_widget_set_usize (NineButton, 75, 75);
  gtk_widget_add_accelerator( NineButton, "activate", AccelGroup, GDK_9, 0, GTK_ACCEL_VISIBLE);

  iNineButton = create_pixmap (MainWindow, "9Up.jpg");
  gtk_widget_show (iNineButton);
  gtk_container_add (GTK_CONTAINER (NineButton), iNineButton);

  ClrButton = gtk_button_new ();
  gtk_widget_show (ClrButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), ClrButton, 408, 392);
  gtk_widget_set_usize (ClrButton, 75, 75);

  iClrButton = create_pixmap (MainWindow, "ClrUp.jpg");
  gtk_widget_show (iClrButton);
  gtk_container_add (GTK_CONTAINER (ClrButton), iClrButton);

  MinusButton = gtk_button_new ();
  gtk_widget_show (MinusButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), MinusButton, 88, 472);
  gtk_widget_set_usize (MinusButton, 75, 75);
  gtk_widget_add_accelerator( MinusButton, "activate", AccelGroup, '-', 0, GTK_ACCEL_VISIBLE);

  iMinusButton = create_pixmap (MainWindow, "MinusUp.jpg");
  gtk_widget_show (iMinusButton);
  gtk_container_add (GTK_CONTAINER (MinusButton), iMinusButton);

  FourButton = gtk_button_new ();
  gtk_widget_show (FourButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), FourButton, 168, 472);
  gtk_widget_set_usize (FourButton, 75, 75);
  gtk_widget_add_accelerator( FourButton, "activate", AccelGroup, GDK_4, 0, GTK_ACCEL_VISIBLE);

  iFourButton = create_pixmap (MainWindow, "4Up.jpg");
  gtk_widget_show (iFourButton);
  gtk_container_add (GTK_CONTAINER (FourButton), iFourButton);

  FiveButton = gtk_button_new ();
  gtk_widget_show (FiveButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), FiveButton, 248, 472);
  gtk_widget_set_usize (FiveButton, 75, 75);
  gtk_widget_add_accelerator( FiveButton, "activate", AccelGroup, GDK_5, 0, GTK_ACCEL_VISIBLE);

  iFiveButton = create_pixmap (MainWindow, "5Up.jpg");
  gtk_widget_show (iFiveButton);
  gtk_container_add (GTK_CONTAINER (FiveButton), iFiveButton);

  SixButton = gtk_button_new ();
  gtk_widget_show (SixButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), SixButton, 328, 472);
  gtk_widget_set_usize (SixButton, 75, 75);
  gtk_widget_add_accelerator( SixButton, "activate", AccelGroup, GDK_6, 0, GTK_ACCEL_VISIBLE);

  iSixButton = create_pixmap (MainWindow, "6Up.jpg");
  gtk_widget_show (iSixButton);
  gtk_container_add (GTK_CONTAINER (SixButton), iSixButton);

  ProButton = gtk_button_new ();
  gtk_widget_show (ProButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), ProButton, 408, 472);
  gtk_widget_set_usize (ProButton, 75, 75);

  iLastButton = create_pixmap (MainWindow, "ProUp.jpg");
  gtk_widget_show (iLastButton);
  gtk_container_add (GTK_CONTAINER (ProButton), iLastButton);

  ZeroButton = gtk_button_new ();
  gtk_widget_show (ZeroButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), ZeroButton, 88, 552);
  gtk_widget_set_usize (ZeroButton, 75, 75);
  gtk_widget_add_accelerator( ZeroButton, "activate", AccelGroup, GDK_0, 0, GTK_ACCEL_VISIBLE);

  iZeroButton = create_pixmap (MainWindow, "0Up.jpg");
  gtk_widget_show (iZeroButton);
  gtk_container_add (GTK_CONTAINER (ZeroButton), iZeroButton);

  OneButton = gtk_button_new ();
  gtk_widget_show (OneButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), OneButton, 168, 552);
  gtk_widget_set_usize (OneButton, 75, 75);
  gtk_widget_add_accelerator( OneButton, "activate", AccelGroup, GDK_1, 0, GTK_ACCEL_VISIBLE);

  iOneButton = create_pixmap (MainWindow, "1Up.jpg");
  gtk_widget_show (iOneButton);
  gtk_container_add (GTK_CONTAINER (OneButton), iOneButton);

  TwoButton = gtk_button_new ();
  gtk_widget_show (TwoButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), TwoButton, 248, 552);
  gtk_widget_set_usize (TwoButton, 75, 75);
  gtk_widget_add_accelerator( TwoButton, "activate", AccelGroup, GDK_2, 0, GTK_ACCEL_VISIBLE);

  iTwoButton = create_pixmap (MainWindow, "2Up.jpg");
  gtk_widget_show (iTwoButton);
  gtk_container_add (GTK_CONTAINER (TwoButton), iTwoButton);

  ThreeButton = gtk_button_new ();
  gtk_widget_show (ThreeButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), ThreeButton, 328, 552);
  gtk_widget_set_usize (ThreeButton, 75, 75);
  gtk_widget_add_accelerator( ThreeButton, "activate", AccelGroup, GDK_3, 0, GTK_ACCEL_VISIBLE);

  iThreeButton = create_pixmap (MainWindow, "3Up.jpg");
  gtk_widget_show (iThreeButton);
  gtk_container_add (GTK_CONTAINER (ThreeButton), iThreeButton);

  KeyRelButton = gtk_button_new ();
  gtk_widget_show (KeyRelButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), KeyRelButton, 408, 552);
  gtk_widget_set_usize (KeyRelButton, 75, 75);

  iKeyRelButton = create_pixmap (MainWindow, "KeyRelUp.jpg");
  gtk_widget_show (iKeyRelButton);
  gtk_container_add (GTK_CONTAINER (KeyRelButton), iKeyRelButton);

  EntrButton = gtk_button_new ();
  gtk_widget_show (EntrButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), EntrButton, 488, 432);
  gtk_widget_set_usize (EntrButton, 75, 75);
  gtk_widget_add_accelerator( EntrButton, "activate", AccelGroup, GDK_E, 0, GTK_ACCEL_VISIBLE);

  iEntrButton = create_pixmap (MainWindow, "EntrUp.jpg");
  gtk_widget_show (iEntrButton);
  gtk_container_add (GTK_CONTAINER (EntrButton), iEntrButton);

  RsetButton = gtk_button_new ();
  gtk_widget_show (RsetButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), RsetButton, 488, 512);
  gtk_widget_set_usize (RsetButton, 75, 75);

  iRsetButton = create_pixmap (MainWindow, "RsetUp.jpg");
  gtk_widget_show (iRsetButton);
  gtk_container_add (GTK_CONTAINER (RsetButton), iRsetButton);

  VerbButton = gtk_button_new ();
  gtk_widget_show (VerbButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), VerbButton, 8, 432);
  gtk_widget_set_usize (VerbButton, 75, 75);
  gtk_widget_add_accelerator( VerbButton, "activate", AccelGroup, GDK_V, 0, GTK_ACCEL_VISIBLE);

  iVerbButton = create_pixmap (MainWindow, "VerbUp.jpg");
  gtk_widget_show (iVerbButton);
  gtk_container_add (GTK_CONTAINER (VerbButton), iVerbButton);

  NounButton = gtk_button_new ();
  gtk_widget_show (NounButton);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), NounButton, 8, 512);
  gtk_widget_set_usize (NounButton, 75, 75);
  gtk_widget_add_accelerator( NounButton, "activate", AccelGroup, GDK_N, 0, GTK_ACCEL_VISIBLE);

  iNounButton = create_pixmap (MainWindow, "NounUp.jpg");
  gtk_widget_show (iNounButton);
  gtk_container_add (GTK_CONTAINER (NounButton), iNounButton);

  VerbAnnunciator = create_pixmap (MainWindow, "VerbOn.jpg");
  gtk_widget_show (VerbAnnunciator);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), VerbAnnunciator, 328, 104);
  gtk_widget_set_usize (VerbAnnunciator, 64, 24);

  Annunciator11 = create_pixmap (MainWindow, "UplinkActyOff.jpg");
  gtk_widget_show (Annunciator11);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator11, 64, 32);
  gtk_widget_set_usize (Annunciator11, 84, 40);

  Annunciator21 = create_pixmap (MainWindow, "TempOff.jpg");
  gtk_widget_show (Annunciator21);
  gtk_fixed_put (GTK_FIXED (ObjectGrid), Annunciator21, 156, 32);
  gtk_widget_set_usize (Annunciator21, 84, 40);

  gtk_signal_connect (GTK_OBJECT (MainWindow), "destroy_event",
                      GTK_SIGNAL_FUNC (on_MainWindow_destroy_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (MainWindow), "delete_event",
                      GTK_SIGNAL_FUNC (on_MainWindow_delete_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (PlusButton), "clicked",
                      GTK_SIGNAL_FUNC (on_PlusButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (SevenButton), "clicked",
                      GTK_SIGNAL_FUNC (on_SevenButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (EightButton), "clicked",
                      GTK_SIGNAL_FUNC (on_EightButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (NineButton), "clicked",
                      GTK_SIGNAL_FUNC (on_NineButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (ClrButton), "clicked",
                      GTK_SIGNAL_FUNC (on_ClrButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (MinusButton), "clicked",
                      GTK_SIGNAL_FUNC (on_MinusButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (FourButton), "clicked",
                      GTK_SIGNAL_FUNC (on_FourButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (FiveButton), "clicked",
                      GTK_SIGNAL_FUNC (on_FiveButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (SixButton), "clicked",
                      GTK_SIGNAL_FUNC (on_SixButton_pressed),
                      NULL);



  gtk_signal_connect (GTK_OBJECT (ProButton), "pressed",
                      GTK_SIGNAL_FUNC (on_ProButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (ProButton), "released",
                      GTK_SIGNAL_FUNC (on_ProButton_released),
                      NULL);



  gtk_signal_connect (GTK_OBJECT (ZeroButton), "clicked",
                      GTK_SIGNAL_FUNC (on_ZeroButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (OneButton), "clicked",
                      GTK_SIGNAL_FUNC (on_OneButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (TwoButton), "clicked",
                      GTK_SIGNAL_FUNC (on_TwoButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (ThreeButton), "clicked",
                      GTK_SIGNAL_FUNC (on_ThreeButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (KeyRelButton), "clicked",
                      GTK_SIGNAL_FUNC (on_KeyRelButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (EntrButton), "clicked",
                      GTK_SIGNAL_FUNC (on_EntrButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (RsetButton), "clicked",
                      GTK_SIGNAL_FUNC (on_RsetButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (VerbButton), "clicked",
                      GTK_SIGNAL_FUNC (on_VerbButton_pressed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (NounButton), "clicked",
                      GTK_SIGNAL_FUNC (on_NounButton_pressed),
                      NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (MainWindow, MainWindow, "MainWindow");
  GLADE_HOOKUP_OBJECT (MainWindow, ObjectGrid, "ObjectGrid");
  GLADE_HOOKUP_OBJECT (MainWindow, R3PlusMinus, "R3PlusMinus");
  GLADE_HOOKUP_OBJECT (MainWindow, R3D4Digit, "R3D4Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R3D5Digit, "R3D5Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R2D5Digit, "R2D5Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R2D4Digit, "R2D4Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R2D3Digit, "R2D3Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R2D2Digit, "R2D2Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R2D1Digit, "R2D1Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R2PlusMinus, "R2PlusMinus");
  GLADE_HOOKUP_OBJECT (MainWindow, R1D5Digit, "R1D5Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R1D4Digit, "R1D4Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R1D3Digit, "R1D3Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R1D2Digit, "R1D2Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R1D1Digit, "R1D1Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R1PlusMinus, "R1PlusMinus");
  GLADE_HOOKUP_OBJECT (MainWindow, ND2Digit, "ND2Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, ND1Digit, "ND1Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, VD2Digit, "VD2Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, VD1Digit, "VD1Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, image57, "image57");
  GLADE_HOOKUP_OBJECT (MainWindow, NounAnnunciator, "NounAnnunciator");
  GLADE_HOOKUP_OBJECT (MainWindow, MD2Digit, "MD2Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, MD1Digit, "MD1Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, image58, "image58");
  GLADE_HOOKUP_OBJECT (MainWindow, image55, "image55");
  GLADE_HOOKUP_OBJECT (MainWindow, image56, "image56");
  GLADE_HOOKUP_OBJECT (MainWindow, image54, "image54");
  GLADE_HOOKUP_OBJECT (MainWindow, R3D1Digit, "R3D1Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R3D2Digit, "R3D2Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, R3D3Digit, "R3D3Digit");
  GLADE_HOOKUP_OBJECT (MainWindow, CompActyAnnunciator, "CompActyAnnunciator");
  GLADE_HOOKUP_OBJECT (MainWindow, image59, "image59");
  GLADE_HOOKUP_OBJECT (MainWindow, ModeAnnunciator, "ModeAnnunciator");
  GLADE_HOOKUP_OBJECT (MainWindow, image60, "image60");
  GLADE_HOOKUP_OBJECT (MainWindow, image64, "image64");
  GLADE_HOOKUP_OBJECT (MainWindow, image66, "image66");
  GLADE_HOOKUP_OBJECT (MainWindow, image65, "image65");
  GLADE_HOOKUP_OBJECT (MainWindow, image63, "image63");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator12, "Annunciator12");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator13, "Annunciator13");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator14, "Annunciator14");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator15, "Annunciator15");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator16, "Annunciator16");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator17, "Annunciator17");
  GLADE_HOOKUP_OBJECT (MainWindow, image67, "image67");
  GLADE_HOOKUP_OBJECT (MainWindow, image62, "image62");
  GLADE_HOOKUP_OBJECT (MainWindow, image61, "image61");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator27, "Annunciator27");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator26, "Annunciator26");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator25, "Annunciator25");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator24, "Annunciator24");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator23, "Annunciator23");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator22, "Annunciator22");
  GLADE_HOOKUP_OBJECT (MainWindow, PlusButton, "PlusButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iPlusButton, "iPlusButton");
  GLADE_HOOKUP_OBJECT (MainWindow, SevenButton, "SevenButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iSevenButton, "iSevenButton");
  GLADE_HOOKUP_OBJECT (MainWindow, EightButton, "EightButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iEightButton, "iEightButton");
  GLADE_HOOKUP_OBJECT (MainWindow, NineButton, "NineButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iNineButton, "iNineButton");
  GLADE_HOOKUP_OBJECT (MainWindow, ClrButton, "ClrButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iClrButton, "iClrButton");
  GLADE_HOOKUP_OBJECT (MainWindow, MinusButton, "MinusButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iMinusButton, "iMinusButton");
  GLADE_HOOKUP_OBJECT (MainWindow, FourButton, "FourButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iFourButton, "iFourButton");
  GLADE_HOOKUP_OBJECT (MainWindow, FiveButton, "FiveButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iFiveButton, "iFiveButton");
  GLADE_HOOKUP_OBJECT (MainWindow, SixButton, "SixButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iSixButton, "iSixButton");
  GLADE_HOOKUP_OBJECT (MainWindow, ProButton, "ProButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iLastButton, "iLastButton");
  GLADE_HOOKUP_OBJECT (MainWindow, ZeroButton, "ZeroButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iZeroButton, "iZeroButton");
  GLADE_HOOKUP_OBJECT (MainWindow, OneButton, "OneButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iOneButton, "iOneButton");
  GLADE_HOOKUP_OBJECT (MainWindow, TwoButton, "TwoButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iTwoButton, "iTwoButton");
  GLADE_HOOKUP_OBJECT (MainWindow, ThreeButton, "ThreeButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iThreeButton, "iThreeButton");
  GLADE_HOOKUP_OBJECT (MainWindow, KeyRelButton, "KeyRelButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iKeyRelButton, "iKeyRelButton");
  GLADE_HOOKUP_OBJECT (MainWindow, EntrButton, "EntrButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iEntrButton, "iEntrButton");
  GLADE_HOOKUP_OBJECT (MainWindow, RsetButton, "RsetButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iRsetButton, "iRsetButton");
  GLADE_HOOKUP_OBJECT (MainWindow, VerbButton, "VerbButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iVerbButton, "iVerbButton");
  GLADE_HOOKUP_OBJECT (MainWindow, NounButton, "NounButton");
  GLADE_HOOKUP_OBJECT (MainWindow, iNounButton, "iNounButton");
  GLADE_HOOKUP_OBJECT (MainWindow, VerbAnnunciator, "VerbAnnunciator");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator11, "Annunciator11");
  GLADE_HOOKUP_OBJECT (MainWindow, Annunciator21, "Annunciator21");

  return MainWindow;
}
示例#22
0
static int create_window(void *win_display, int x, int y, int width, int height)
{
    Display *x11_display = (Display *)win_display;
    int screen = DefaultScreen(x11_display);
    Window root, win;

    root = RootWindow(x11_display, screen);

    printf("Create window0 for thread0\n");
    drawable_thread0 = (void *)XCreateSimpleWindow(x11_display, root, x, y, width, height,
                                           0, 0, WhitePixel(x11_display, 0));

    win = (Window)drawable_thread0;
    if (drawable_thread0) {
        XSizeHints sizehints;
        sizehints.width  = width;
        sizehints.height = height;
        sizehints.flags = USSize;
        XSetNormalHints(x11_display, win, &sizehints);
        XSetStandardProperties(x11_display, win, "Thread 0", "Thread 0",
                               None, (char **)NULL, 0, &sizehints);

        XMapWindow(x11_display, win);
    }
    context_thread0 = XCreateGC(x11_display, win, 0, 0);
    XSelectInput(x11_display, win, KeyPressMask | StructureNotifyMask);
    XSync(x11_display, False);

    if (put_pixmap) {
        window_thread0 = (Window)drawable_thread0;
        drawable_thread0 = (void *)create_pixmap(x11_display, width, height);
    }
    
    if (multi_thread == 0)
        return 0;

    printf("Create window1 for thread1\n");
    
    drawable_thread1 = (void *)XCreateSimpleWindow(x11_display, root, width, 0, width, height,
                                            0, 0, WhitePixel(x11_display, 0));
    win = (Window)drawable_thread1;
    if (drawable_thread1) {
        XSizeHints sizehints;
        sizehints.width  = width;
        sizehints.height = height;
        sizehints.flags = USSize;
        XSetNormalHints(x11_display, win, &sizehints);
        XSetStandardProperties(x11_display, win, "Thread 1", "Thread 1",
                               None, (char **)NULL, 0, &sizehints);

        XMapWindow(x11_display, win);
    }
    if (put_pixmap) {
        window_thread1 = (Window)drawable_thread1;
        drawable_thread1 = (void *)create_pixmap(x11_display, width, height);
    }

    context_thread1 = XCreateGC(x11_display, win, 0, 0);
    XSelectInput(x11_display, win, KeyPressMask | StructureNotifyMask);
    XSync(x11_display, False);
    
    return 0;
}
示例#23
0
void test_composite(uint32_t blend_mode,
		uint32_t dst_format, uint32_t dst_width, uint32_t dst_height,
		uint32_t src_format, uint32_t src_width, uint32_t src_height,
		uint32_t mask_format, uint32_t mask_width, uint32_t mask_height,
		uint32_t src_x, uint32_t src_y, uint32_t mask_x, uint32_t mask_y,
		uint32_t dst_x, uint32_t dst_y, uint32_t w, uint32_t h)
{
	PixmapPtr src, dest, mask = NULL;
	C2D_OBJECT blit = {};
	c2d_ts_handle curTimestamp;

	DEBUG_MSG("composite2: blend_mode:%08x, dst_format:%08x, dst_width:%x, dst_height=%x, "
			"src_format:%08x, src_width:%x, src_height:%x, "
			"mask_format:%08x, mask_width:%x, mask_height:%x, "
			"src_x:%x, src_y:%x, mask_x:%x, mask_y:%x, dst_x:%x, dst_y:%x, w:%x, h:%x",
			blend_mode, dst_format, dst_width, dst_height,
			src_format, src_width, src_height,
			mask_format, mask_width, mask_height,
			src_x, src_y, mask_x, mask_y, dst_x, dst_y, w, h);
	RD_START("composite2","blend_mode:%08x, dst_format:%08x, dst_width:%x, dst_height=%x, "
			"src_format:%08x, src_width:%x, src_height:%x, "
			"mask_format:%08x, mask_width:%x, mask_height:%x, "
			"src_x:%x, src_y:%x, mask_x:%x, mask_y:%x, dst_x:%x, dst_y:%x, w:%x, h:%x",
			blend_mode, dst_format, dst_width, dst_height,
			src_format, src_width, src_height,
			mask_format, mask_width, mask_height,
			src_x, src_y, mask_x, mask_y, dst_x, dst_y, w, h);

	blit.config_mask = DEFAULT_BLEND_MASK | blend_mode;

	dest = create_pixmap(dst_width, dst_height, dst_format);
	src  = create_pixmap(src_width, src_height, src_format);

	blit.config_mask |= C2D_SOURCE_RECT_BIT;
	blit.surface_id = src->id;

	if (mask_format) {
		/* TODO not clear if mask repeat is really supported.. msm-exa-c2d2.c
		 * seems to reject it but C2D_MASK_TILE_BIT??
		 *
		 * Also, for src format, msm-exa-c2d2.c seems to encode fgcolor (like
		 * a solid fill) for repeats.. not really clear if TILE_BIT does what
		 * we expect or not??
		 *
		 * Seems like libC2D2 doesn't actually give any way to specify the
		 * maskX/maskY!!!  The previous c2d API does, so I'd have to assume
		 * this is actually supported by the hardware and this is just C2D2
		 * retardation
		 */
		mask = create_pixmap(mask_width, mask_height, mask_format);

		blit.config_mask |= C2D_MASK_SURFACE_BIT;
		blit.mask_surface_id = mask->id;
	}

	blit.next = NULL;

	blit.source_rect.x = FIXED(src_x);
	blit.source_rect.y = FIXED(src_y);
	blit.source_rect.width = FIXED(w);
	blit.source_rect.height = FIXED(h);

	blit.target_rect.x = FIXED(dst_x);
	blit.target_rect.y = FIXED(dst_y);
	blit.target_rect.width = FIXED(w);
	blit.target_rect.height = FIXED(h);
	CHK(c2dDraw(dest->id, 0, NULL, 0, 0, &blit, 1));
	CHK(c2dFlush(dest->id, &curTimestamp));
	CHK(c2dWaitTimestamp(curTimestamp));

	free_pixmap(src);
	free_pixmap(dest);
	if (mask)
		free_pixmap(mask);

	RD_END();

//	dump_pixmap(dest, "copy-%04dx%04d-%08x.bmp", w, h, format);
}
示例#24
0
文件: pixmaps.c 项目: svn2github/xqf
void init_pixmaps (GtkWidget *window)
{
  unsigned i = 0;

  free_pixmaps ();

  if (!GTK_WIDGET_REALIZED (window))
    gtk_widget_realize (window);

  create_pixmap (window, "update.xpm", &update_pix);
  create_pixmap (window, "refresh.xpm", &refresh_pix);
  create_pixmap (window, "refrsel.xpm", &refrsel_pix);
  create_pixmap (window, "stop.xpm", &stop_pix);

  create_pixmap (window, "connect.xpm", &connect_pix);
  create_pixmap (window, "observe.xpm", &observe_pix);
  create_pixmap (window, "record.xpm", &record_pix);

  create_pixmap (window, "sfilter.xpm", &sfilter_pix);
  create_pixmap (window, "sfilter_cfg.xpm", &sfilter_cfg_pix);

  create_pixmap (window, "pfilter.xpm", &pfilter_pix);
  create_pixmap (window, "pfilter_cfg.xpm", &pfilter_cfg_pix);

  create_pixmap (window, "green_plus.xpm", &gplus_pix);
  create_pixmap (window, "red_minus.xpm", &rminus_pix);

  create_pixmap (window, "man_black.xpm", &man_black_pix);
  create_pixmap (window, "man_red.xpm", &man_red_pix);
  create_pixmap (window, "man_yellow.xpm", &man_yellow_pix);

  create_pixmap (window, "group_red.xpm", &group_pix[0]);
  create_pixmap (window, "group_green.xpm", &group_pix[1]);
  create_pixmap (window, "group_blue.xpm", &group_pix[2]);

  create_pixmap (window, "buddy_red.xpm", &buddy_pix[1]);
  create_pixmap (window, "buddy_green.xpm", &buddy_pix[2]);
  create_pixmap (window, "buddy_blue.xpm", &buddy_pix[4]);

  create_pixmap (window, "server_na.xpm", &server_status[0]);
  create_pixmap (window, "server_up.xpm", &server_status[1]);
  create_pixmap (window, "server_down.xpm", &server_status[2]);
  create_pixmap (window, "server_to.xpm", &server_status[3]);
  create_pixmap (window, "server_error.xpm", &server_status[4]);

  create_pixmap (window, "error.xpm", &error_pix);
  create_pixmap (window, "delete.xpm", &delete_pix);
  create_pixmap (window, "locked.xpm", &locked_pix);
  create_pixmap (window, "punkbuster.xpm", &punkbuster_pix);
  cat_pixmaps(window, &locked_punkbuster_pix, &punkbuster_pix, &locked_pix);

  for (i = 0; i < GAMES_TOTAL; i++)
  {
    struct pixmap* pix = NULL;

    pix = g_malloc0(sizeof(struct pixmap));

    if(games[i].icon)
    {
      create_pixmap(window, games[i].icon, pix);
    }

    games[i].pix = pix;
  }
}
示例#25
0
文件: readwnd.c 项目: sba1/simplemail
/******************************************************************
 Opens a read window
*******************************************************************/
int read_window_open(char *folder, struct mail *mail, int window)
{
	int num;
	struct Read_Data *data;

	for (num=0; num < MAX_READ_OPEN; num++)
		if (!read_open[num]) break;

	if (num == MAX_READ_OPEN) return -1;

	if ((data = (struct Read_Data*)malloc(sizeof(struct Read_Data))))
	{
		GtkWidget *vbox;

		memset(data,0,sizeof(struct Read_Data));
		data->folder_path = mystrdup(folder);

		data->num = num;
		read_open[num] = data;

		data->wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
		gtk_window_set_title(GTK_WINDOW(data->wnd), "SimpleMail - Read mail");
		gtk_window_set_default_size(GTK_WINDOW(data->wnd),640,400);
		gtk_window_set_position(GTK_WINDOW(data->wnd),GTK_WIN_POS_CENTER);
		gtk_signal_connect(GTK_OBJECT(data->wnd), "destroy",GTK_SIGNAL_FUNC (read_window_dispose), data);

		vbox = gtk_vbox_new(0,4);
		gtk_container_add(GTK_CONTAINER(data->wnd), vbox);

		data->toolbar = gtk_toolbar_new();
		gtk_box_pack_start(GTK_BOX(vbox), data->toolbar, FALSE, FALSE, 0 /* Padding */); /* only use minimal height */
		gtk_toolbar_append_item(GTK_TOOLBAR(data->toolbar), "Prev", "", NULL /* private TT */, create_pixmap(data->wnd,"MailPrev.xpm"), NULL /* CALLBACK */, NULL /* UDATA */);
		gtk_toolbar_append_item(GTK_TOOLBAR(data->toolbar), "Next", "", NULL /* private TT */, create_pixmap(data->wnd,"MailNext.xpm"), NULL/* CALLBACK */, NULL /* UDATA */);
		gtk_toolbar_append_space(GTK_TOOLBAR(data->toolbar));
        	gtk_toolbar_append_item(GTK_TOOLBAR(data->toolbar), "Save", "", NULL /* private TT */, create_pixmap(data->wnd,"MailSave.xpm"), NULL /* CALLBACK */, NULL /* UDATA */);
        	gtk_toolbar_append_item(GTK_TOOLBAR(data->toolbar), "Print", "", NULL /* private TT */, create_pixmap(data->wnd,"Print.xpm"), NULL /* CALLBACK */, NULL /* UDATA */);
		gtk_toolbar_append_space(GTK_TOOLBAR(data->toolbar));
        	gtk_toolbar_append_item(GTK_TOOLBAR(data->toolbar), "Delete", "", NULL /* private TT */, create_pixmap(data->wnd,"MailDelete.xpm"), NULL /* CALLBACK */, NULL /* UDATA */);
        	gtk_toolbar_append_item(GTK_TOOLBAR(data->toolbar), "Reply", "", NULL /* private TT */, create_pixmap(data->wnd,"MailReply.xpm"), NULL /* CALLBACK */, NULL /* UDATA */);
        	gtk_toolbar_append_item(GTK_TOOLBAR(data->toolbar), "Forward", "", NULL /* private TT */, create_pixmap(data->wnd,"MailForward.xpm"), NULL /* CALLBACK */, NULL /* UDATA */);

		data->text_scrolled_window = gtk_scrolled_window_new(NULL,NULL);
		gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(data->text_scrolled_window),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC);

		/* create the html document */
		data->html_document = html_document_new();
		data->html_view = html_view_new();
		gtk_container_add (GTK_CONTAINER (data->text_scrolled_window), data->html_view);
		gtk_box_pack_start(GTK_BOX(vbox), data->text_scrolled_window, TRUE, TRUE, 0 /* Padding */); /* only use minimal height */
		/* FIXME: ugly ugly! sba: ??? */
		html_view_set_document (HTML_VIEW (data->html_view), data->html_document);


#if 0
		data->text_view = gtk_text_view_new();
		g_object_set(data->text_view, "editable", FALSE, NULL);
		gtk_container_add(GTK_CONTAINER(data->text_scrolled_window), data->text_view);
		gtk_box_pack_start(GTK_BOX(vbox), data->text_scrolled_window, TRUE, TRUE, 0 /* Padding */); /* only use minimal height */
#endif

		read_window_display_mail(data,mail);

		gtk_widget_show_all(data->wnd);
	}
	return num;
}
示例#26
0
GtkWidget*
create_step3_dbox (void)
{
  GtkWidget *step3_dbox;
  GtkWidget *dialog_vbox3;
  GtkWidget *vbox1;
  GtkWidget *label10;
  GtkWidget *hseparator1;
  GtkWidget *vbox3;
  GtkWidget *label12;
  GtkWidget *label13;
  GtkWidget *label14;
  GtkWidget *label15;
  GtkWidget *label17;
  GtkWidget *hseparator2;
  GtkWidget *label11;
  GtkWidget *dialog_action_area3;
  GtkWidget *hbuttonbox3;
  GtkWidget *button4;
  GtkWidget *hbox4;
  GtkWidget *pixmap4;
  guint label7_key;
  GtkWidget *label7;
  GtkWidget *button5;
  GtkWidget *hbox5;
  GtkWidget *pixmap5;
  guint label8_key;
  GtkWidget *label8;
  GtkWidget *button6;
  GtkWidget *hbox6;
  GtkWidget *pixmap6;
  guint label9_key;
  GtkWidget *label9;
  GtkAccelGroup *accel_group;

  accel_group = gtk_accel_group_new ();

  step3_dbox = gtk_dialog_new ();
  gtk_widget_set_name (step3_dbox, "step3_dbox");
  gtk_object_set_data (GTK_OBJECT (step3_dbox), "step3_dbox", step3_dbox);
  gtk_window_set_title (GTK_WINDOW (step3_dbox), _("GtkTiEmu startup"));
  gtk_window_set_modal (GTK_WINDOW (step3_dbox), TRUE);
  gtk_window_set_policy (GTK_WINDOW (step3_dbox), TRUE, TRUE, TRUE);

  dialog_vbox3 = GTK_DIALOG (step3_dbox)->vbox;
  gtk_widget_set_name (dialog_vbox3, "dialog_vbox3");
  gtk_object_set_data (GTK_OBJECT (step3_dbox), "dialog_vbox3", dialog_vbox3);
  gtk_widget_show (dialog_vbox3);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox1, "vbox1");
  gtk_widget_ref (vbox1);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "vbox1", vbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox3), vbox1, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (vbox1), 5);

  label10 = gtk_label_new (_("GtkTiEmu is now set  up and ready for use. Some tips on how to use the emulator:"));
  gtk_widget_set_name (label10, "label10");
  gtk_widget_ref (label10);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "label10", label10,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label10);
  gtk_box_pack_start (GTK_BOX (vbox1), label10, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label10), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label10), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label10), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label10), 15, 5);

  hseparator1 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator1, "hseparator1");
  gtk_widget_ref (hseparator1);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "hseparator1", hseparator1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator1);
  gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, TRUE, TRUE, 0);

  vbox3 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox3, "vbox3");
  gtk_widget_ref (vbox3);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "vbox3", vbox3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox3);
  gtk_box_pack_start (GTK_BOX (vbox1), vbox3, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (vbox3), 5);

  label12 = gtk_label_new (_("* You have access to a popup menu by right-clicking in the emulator's window."));
  gtk_widget_set_name (label12, "label12");
  gtk_widget_ref (label12);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "label12", label12,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label12);
  gtk_box_pack_start (GTK_BOX (vbox3), label12, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label12), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label12), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label12), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label12), 5, 0);

  label13 = gtk_label_new (_("* To use keys, use mouse or keyboard"));
  gtk_widget_set_name (label13, "label13");
  gtk_widget_ref (label13);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "label13", label13,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label13);
  gtk_box_pack_start (GTK_BOX (vbox3), label13, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label13), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label13), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label13), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label13), 5, 0);

  label14 = gtk_label_new (_("* To change to a different calculator or ROM version, use an item of the ROM menu."));
  gtk_widget_set_name (label14, "label14");
  gtk_widget_ref (label14);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "label14", label14,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label14);
  gtk_box_pack_start (GTK_BOX (vbox3), label14, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label14), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label14), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label14), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label14), 5, 0);

  label15 = gtk_label_new (_("* You can save the emulator state and config."));
  gtk_widget_set_name (label15, "label15");
  gtk_widget_ref (label15);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "label15", label15,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label15);
  gtk_box_pack_start (GTK_BOX (vbox3), label15, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label15), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label15), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label15), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label15), 5, 0);

  label17 = gtk_label_new (_("* If your calculator screen is blank, use 'Ctrl' with '+/-' for adjusting contrast."));
  gtk_widget_set_name (label17, "label17");
  gtk_widget_ref (label17);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "label17", label17,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label17);
  gtk_box_pack_start (GTK_BOX (vbox3), label17, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label17), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label17), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label17), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label17), 5, 0);

  hseparator2 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator2, "hseparator2");
  gtk_widget_ref (hseparator2);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "hseparator2", hseparator2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator2);
  gtk_box_pack_start (GTK_BOX (vbox1), hseparator2, TRUE, TRUE, 0);

  label11 = gtk_label_new (_("Click the 'Finish' button to start GtkTiEmu."));
  gtk_widget_set_name (label11, "label11");
  gtk_widget_ref (label11);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "label11", label11,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label11);
  gtk_box_pack_start (GTK_BOX (vbox1), label11, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label11), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label11), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label11), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label11), 15, 5);

  dialog_action_area3 = GTK_DIALOG (step3_dbox)->action_area;
  gtk_widget_set_name (dialog_action_area3, "dialog_action_area3");
  gtk_object_set_data (GTK_OBJECT (step3_dbox), "dialog_action_area3", dialog_action_area3);
  gtk_widget_show (dialog_action_area3);
  gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area3), 10);

  hbuttonbox3 = gtk_hbutton_box_new ();
  gtk_widget_set_name (hbuttonbox3, "hbuttonbox3");
  gtk_widget_ref (hbuttonbox3);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "hbuttonbox3", hbuttonbox3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbuttonbox3);
  gtk_box_pack_start (GTK_BOX (dialog_action_area3), hbuttonbox3, TRUE, TRUE, 0);

  button4 = gtk_button_new ();
  gtk_widget_set_name (button4, "button4");
  gtk_widget_ref (button4);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "button4", button4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button4);
  gtk_container_add (GTK_CONTAINER (hbuttonbox3), button4);
  GTK_WIDGET_SET_FLAGS (button4, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (button4, "clicked", accel_group,
                              GDK_Return, 0,
                              GTK_ACCEL_VISIBLE);

  hbox4 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox4, "hbox4");
  gtk_widget_ref (hbox4);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "hbox4", hbox4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox4);
  gtk_container_add (GTK_CONTAINER (button4), hbox4);

  pixmap4 = create_pixmap (step3_dbox, "yes.xpm");
  gtk_widget_set_name (pixmap4, "pixmap4");
  gtk_widget_ref (pixmap4);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "pixmap4", pixmap4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pixmap4);
  gtk_box_pack_start (GTK_BOX (hbox4), pixmap4, TRUE, FALSE, 0);

  label7 = gtk_label_new ("");
  label7_key = gtk_label_parse_uline (GTK_LABEL (label7),
                                   _("< _Back"));
  gtk_widget_set_name (label7, "label7");
  gtk_widget_ref (label7);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "label7", label7,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label7);
  gtk_box_pack_start (GTK_BOX (hbox4), label7, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label7), 5, 0);

  button5 = gtk_button_new ();
  gtk_widget_set_name (button5, "button5");
  gtk_widget_ref (button5);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "button5", button5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button5);
  gtk_container_add (GTK_CONTAINER (hbuttonbox3), button5);
  GTK_WIDGET_SET_FLAGS (button5, GTK_CAN_DEFAULT);

  hbox5 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox5, "hbox5");
  gtk_widget_ref (hbox5);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "hbox5", hbox5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox5);
  gtk_container_add (GTK_CONTAINER (button5), hbox5);

  pixmap5 = create_pixmap (step3_dbox, "yes.xpm");
  gtk_widget_set_name (pixmap5, "pixmap5");
  gtk_widget_ref (pixmap5);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "pixmap5", pixmap5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pixmap5);
  gtk_box_pack_start (GTK_BOX (hbox5), pixmap5, TRUE, FALSE, 0);

  label8 = gtk_label_new ("");
  label8_key = gtk_label_parse_uline (GTK_LABEL (label8),
                                   _("_Finish"));
  gtk_widget_set_name (label8, "label8");
  gtk_widget_ref (label8);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "label8", label8,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label8);
  gtk_box_pack_start (GTK_BOX (hbox5), label8, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (label8), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label8), 5, 0);

  button6 = gtk_button_new ();
  gtk_widget_set_name (button6, "button6");
  gtk_widget_ref (button6);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "button6", button6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button6);
  gtk_container_add (GTK_CONTAINER (hbuttonbox3), button6);
  GTK_WIDGET_SET_FLAGS (button6, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (button6, "clicked", accel_group,
                              GDK_Escape, 0,
                              GTK_ACCEL_VISIBLE);

  hbox6 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox6, "hbox6");
  gtk_widget_ref (hbox6);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "hbox6", hbox6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox6);
  gtk_container_add (GTK_CONTAINER (button6), hbox6);

  pixmap6 = create_pixmap (step3_dbox, "no.xpm");
  gtk_widget_set_name (pixmap6, "pixmap6");
  gtk_widget_ref (pixmap6);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "pixmap6", pixmap6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pixmap6);
  gtk_box_pack_start (GTK_BOX (hbox6), pixmap6, TRUE, FALSE, 0);

  label9 = gtk_label_new ("");
  label9_key = gtk_label_parse_uline (GTK_LABEL (label9),
                                   _("_Cancel"));
  gtk_widget_set_name (label9, "label9");
  gtk_widget_ref (label9);
  gtk_object_set_data_full (GTK_OBJECT (step3_dbox), "label9", label9,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label9);
  gtk_box_pack_start (GTK_BOX (hbox6), label9, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (label9), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label9), 5, 0);

  gtk_signal_connect (GTK_OBJECT (button4), "clicked",
                      GTK_SIGNAL_FUNC (step3_b1_button_clicked),
                      step3_dbox);
  gtk_signal_connect (GTK_OBJECT (button5), "clicked",
                      GTK_SIGNAL_FUNC (step3_b2_button_clicked),
                      step3_dbox);
  gtk_signal_connect (GTK_OBJECT (button6), "clicked",
                      GTK_SIGNAL_FUNC (step3_b3_button_clicked),
                      step3_dbox);

  gtk_widget_add_accelerator (button4, "clicked", accel_group,
                              label7_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
  gtk_widget_add_accelerator (button5, "clicked", accel_group,
                              label8_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
  gtk_widget_add_accelerator (button6, "clicked", accel_group,
                              label9_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);

  gtk_window_add_accel_group (GTK_WINDOW (step3_dbox), accel_group);

  return step3_dbox;
}
示例#27
0
GtkWidget*
create_wait_dbox (void)
{
  GtkWidget *wait_dbox;
  GtkWidget *dialog_vbox1;
  GtkWidget *vbox2;
  GtkWidget *label2;
  GtkWidget *hseparator3;
  GtkWidget *label16;
  GtkWidget *dialog_action_area1;
  GtkWidget *hbuttonbox1;
  GtkWidget *button1;
  GtkWidget *hbox1;
  GtkWidget *pixmap1;
  guint label1_key;
  GtkWidget *label1;
  GtkAccelGroup *accel_group;

  accel_group = gtk_accel_group_new ();

  wait_dbox = gtk_dialog_new ();
  gtk_widget_set_name (wait_dbox, "wait_dbox");
  gtk_object_set_data (GTK_OBJECT (wait_dbox), "wait_dbox", wait_dbox);
  gtk_window_set_title (GTK_WINDOW (wait_dbox), _("Information"));
  gtk_window_set_modal (GTK_WINDOW (wait_dbox), TRUE);
  gtk_window_set_policy (GTK_WINDOW (wait_dbox), TRUE, TRUE, FALSE);

  dialog_vbox1 = GTK_DIALOG (wait_dbox)->vbox;
  gtk_widget_set_name (dialog_vbox1, "dialog_vbox1");
  gtk_object_set_data (GTK_OBJECT (wait_dbox), "dialog_vbox1", dialog_vbox1);
  gtk_widget_show (dialog_vbox1);

  vbox2 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox2, "vbox2");
  gtk_widget_ref (vbox2);
  gtk_object_set_data_full (GTK_OBJECT (wait_dbox), "vbox2", vbox2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox2);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox2, FALSE, FALSE, 0);

  label2 = gtk_label_new (_("The FLASH upgrade you have\nselected is being to be converted\ninto a 2MB ROM image.\nPlease wait..."));
  gtk_widget_set_name (label2, "label2");
  gtk_widget_ref (label2);
  gtk_object_set_data_full (GTK_OBJECT (wait_dbox), "label2", label2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label2);
  gtk_box_pack_start (GTK_BOX (vbox2), label2, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label2), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label2), 5, 5);

  hseparator3 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator3, "hseparator3");
  gtk_widget_ref (hseparator3);
  gtk_object_set_data_full (GTK_OBJECT (wait_dbox), "hseparator3", hseparator3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator3);
  gtk_box_pack_start (GTK_BOX (vbox2), hseparator3, TRUE, TRUE, 0);

  label16 = gtk_label_new (_("Note also that the converted ROM\nimage will not have a boot block."));
  gtk_widget_set_name (label16, "label16");
  gtk_widget_ref (label16);
  gtk_object_set_data_full (GTK_OBJECT (wait_dbox), "label16", label16,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label16);
  gtk_box_pack_start (GTK_BOX (vbox2), label16, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label16), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label16), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label16), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label16), 5, 5);

  dialog_action_area1 = GTK_DIALOG (wait_dbox)->action_area;
  gtk_widget_set_name (dialog_action_area1, "dialog_action_area1");
  gtk_object_set_data (GTK_OBJECT (wait_dbox), "dialog_action_area1", dialog_action_area1);
  gtk_widget_show (dialog_action_area1);
  gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area1), 10);

  hbuttonbox1 = gtk_hbutton_box_new ();
  gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
  gtk_widget_ref (hbuttonbox1);
  gtk_object_set_data_full (GTK_OBJECT (wait_dbox), "hbuttonbox1", hbuttonbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbuttonbox1);
  gtk_box_pack_start (GTK_BOX (dialog_action_area1), hbuttonbox1, TRUE, TRUE, 0);

  button1 = gtk_button_new ();
  gtk_widget_set_name (button1, "button1");
  gtk_widget_ref (button1);
  gtk_object_set_data_full (GTK_OBJECT (wait_dbox), "button1", button1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button1);
  gtk_container_add (GTK_CONTAINER (hbuttonbox1), button1);
  GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (button1, "clicked", accel_group,
                              GDK_Return, 0,
                              GTK_ACCEL_VISIBLE);
  gtk_widget_add_accelerator (button1, "clicked", accel_group,
                              GDK_Escape, 0,
                              GTK_ACCEL_VISIBLE);

  hbox1 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox1, "hbox1");
  gtk_widget_ref (hbox1);
  gtk_object_set_data_full (GTK_OBJECT (wait_dbox), "hbox1", hbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox1);
  gtk_container_add (GTK_CONTAINER (button1), hbox1);

  pixmap1 = create_pixmap (wait_dbox, "yes.xpm");
  gtk_widget_set_name (pixmap1, "pixmap1");
  gtk_widget_ref (pixmap1);
  gtk_object_set_data_full (GTK_OBJECT (wait_dbox), "pixmap1", pixmap1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pixmap1);
  gtk_box_pack_start (GTK_BOX (hbox1), pixmap1, TRUE, FALSE, 0);

  label1 = gtk_label_new ("");
  label1_key = gtk_label_parse_uline (GTK_LABEL (label1),
                                   _("_OK"));
  gtk_widget_set_name (label1, "label1");
  gtk_widget_ref (label1);
  gtk_object_set_data_full (GTK_OBJECT (wait_dbox), "label1", label1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label1);
  gtk_box_pack_start (GTK_BOX (hbox1), label1, FALSE, TRUE, 0);
  gtk_misc_set_alignment (GTK_MISC (label1), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label1), 5, 0);

  gtk_signal_connect (GTK_OBJECT (button1), "clicked",
                      GTK_SIGNAL_FUNC (wait_ok_button_clicked),
                      wait_dbox);

  gtk_widget_add_accelerator (button1, "clicked", accel_group,
                              label1_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);

  gtk_window_add_accel_group (GTK_WINDOW (wait_dbox), accel_group);

  return wait_dbox;
}
示例#28
0
/*
 * Create a toolbar with buttons, return toolbar widget.
 */
Widget
create_toolbar(Widget parent, Widget menu_bar)
{
#if HAVE_XPM
    size_t alloc_len = 0, n;
    size_t alloc_step = 16;
    const char *c_ptr, *e_ptr;
#endif /* HAVE_XPM */
    Widget tool_bar;
    resource.toolbar_unusable = False;
    
    tool_bar_frame = XtVaCreateWidget("toolBarFrame",
				      xmFrameWidgetClass, parent,
				      XmNshadowType, XmSHADOW_OUT,
				      XmNleftAttachment, XmATTACH_FORM,
				      XmNrightAttachment, XmATTACH_FORM,
				      XmNtopAttachment, XmATTACH_WIDGET,
				      XmNtopWidget, menu_bar,
				      NULL);

    tool_bar = XtVaCreateManagedWidget("toolBar",
				       xmRowColumnWidgetClass, tool_bar_frame,
				       XmNchildType, XmFRAME_WORKAREA_CHILD,
				       XmNrowColumnType, XmWORK_AREA,
				       XmNorientation, XmHORIZONTAL,
				       XmNtraversalOn, False,
				       XmNisHomogeneous, False,
				       XmNpacking, XmPACK_TIGHT,
				       XmNspacing, 0, /* override to use SEPARATOR(n) instead */
				       XmNadjustLast, True,
				       NULL);

#if HAVE_XPM
    /* parse toolbar_translations, create the widgets and assign the actions */
    for (n = 0, c_ptr = resource.toolbar_translations;
	 c_ptr != NULL && *c_ptr != '\0';
	 c_ptr = e_ptr, n++) {
	char **line_items = NULL;
	int extra_space;
	size_t len, curr, item_count = 0;
	
	if ((e_ptr = strchr(c_ptr, '\n')) == NULL
	    /* ... and in case last line doesn't end with \n ... */
	    && (e_ptr = strchr(c_ptr, '\0')) == NULL) {
	    break;
	}

	if (e_ptr == c_ptr) {
	    XDVI_WARNING((stderr, "Skipping empty line in toolbarTranslations resource."));
	    e_ptr++;
	    continue;
	}
	len = e_ptr - c_ptr;
	TRACE_GUI((stderr, "LEN %lu: |%.*s|", (unsigned long)len, (int)len, c_ptr));

	line_items = split_line(c_ptr, SEP_CHAR, 0, len, &item_count);

	if (globals.debug & DBG_GUI) {
	    int k;
	    for (k = 0; line_items[k] != NULL; k++) {
		fprintf(stderr, "ITEM %d of %lu: |%s|\n", k, (unsigned long)item_count, line_items[k]);
	    }
	}
	while (alloc_len <= n + 1) {
	    alloc_len += alloc_step;
	    toolbar_buttons = xrealloc(toolbar_buttons, alloc_len * sizeof *toolbar_buttons);
	}
	    
	if (item_count == 1 && sscanf(line_items[0], "SPACER(%d)", &extra_space) == 1) {
	    TRACE_GUI((stderr, "creating spacer of witdh %d at %lu", extra_space, (unsigned long)n));
 	    create_toolbar_separator(tool_bar, &(toolbar_buttons[n].button), extra_space);
	    toolbar_buttons[n].type = TB_SEPARATOR;
	}
	else if (item_count == 4) {
	    Pixmap sens, insens;
	    int idx = strtoul(line_items[0], (char **)NULL, 10);
	    struct xdvi_action *action;

	    sens = insens = 0; /* make compiler happy ... */

	    TRACE_GUI((stderr, "creating pixmap at %d", idx));
	    if (!create_pixmap(tool_bar, idx, &sens, &insens)) {
		free(toolbar_buttons);
		toolbar_buttons = NULL;
		break;
	    }
	    TRACE_GUI((stderr, "creating button %ld", (unsigned long)n));
	    if (!create_toolbar_button(tool_bar, &(toolbar_buttons[n].button), &sens, &insens)) {
		free(toolbar_buttons);
		toolbar_buttons = NULL;
		break;
	    }
	    toolbar_buttons[n].type = TB_BUTTON;

	    if (compile_action(line_items[3], &action)) {
		char *long_tooltip = xstrdup(line_items[1]);
		toolbar_buttons[n].tip = xstrdup(line_items[2]);
		/* char *short_tooltip = xstrdup(line_items[2]); */
		command_call[0].closure = (XtPointer) action;

		/*
		  eventually save this widget in list of `special' buttons
		  that need to toggle between sensitive/insensitive
		*/
		button_info_save(action, toolbar_buttons[n].button);

		XtVaSetValues(toolbar_buttons[n].button, XmNactivateCallback, (XtArgVal)command_call, NULL);
		XtAddEventHandler(toolbar_buttons[n].button,
				  EnterWindowMask | LeaveWindowMask,
				  False,
				  enter_leave,
				  long_tooltip);
	    }
	    else {
		XDVI_WARNING((stderr, "Invalid action \"%s\" in toolbarTranslations resource:\n\"%.*s\"",
			      line_items[3], (int)len, c_ptr));
	    }
	}
	else {
	    XDVI_WARNING((stderr, "Skipping malformed line \"%.*s\" in toolbarTranslations resource "
			  "(%lu instead of 4 items).",
			  (int)len, c_ptr, (unsigned long)item_count));
	    toolbar_buttons[n].button = 0;
	}

	for (curr = 0; curr < item_count; curr++) {
	    free(line_items[curr]);
	}
	free(line_items);
	line_items = NULL;
	
	if (*e_ptr != '\0')
	    e_ptr++;
    }
#else
    if ((resource.expert_mode & XPRT_SHOW_SCROLLBARS) != 0) {
	XDVI_WARNING((stderr, "This version has been compiled without XPM support. "
		      "Disabling the toolbar, which needs XPM."));
    }
#endif /* HAVE_XPM */

    if (toolbar_buttons == NULL) {
	resource.toolbar_unusable = True;
	resource.expert_mode ^= XPRT_SHOW_TOOLBAR;
    }
    else {
#if HAVE_XPM	
	toolbar_buttons[n].button = 0; /* terminate info */
#endif
    }
    return tool_bar;
}
示例#29
0
G_MODULE_EXPORT int
test_pixmap_main (int argc, char **argv)
{
  GOptionContext      *context;
  Display	      *xdpy;
  int		       screen;
  ClutterActor        *group = NULL, *label, *stage, *tex;
  Pixmap               pixmap;
  const ClutterColor   gry = { 0x99, 0x99, 0x99, 0xFF };
  Window               win_remote;
  guint		       w, h, d;
  GC		       gc;
  ClutterTimeline     *timeline;
  ClutterAlpha	      *alpha;
  ClutterBehaviour    *depth_behavior;
  int		       i;
  int                  row_height;

#ifdef CLUTTER_WINDOWING_X11
  clutter_set_windowing_backend (CLUTTER_WINDOWING_X11);
#endif

  if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
    return 1;

#ifdef CLUTTER_WINDOWING_X11
  if (!clutter_check_windowing_backend (CLUTTER_WINDOWING_X11))
    g_error ("test-pixmap requires the X11 Clutter backend.");
#endif

  xdpy = clutter_x11_get_default_display ();
  XSynchronize (xdpy, True);

  context = g_option_context_new (" - test-pixmap options");
  g_option_context_add_main_entries (context, g_options, NULL);
  g_option_context_parse (context, &argc, &argv, NULL);

  pixmap = create_pixmap (&w, &h, &d);

  screen = DefaultScreen(xdpy);
  win_remote = XCreateSimpleWindow (xdpy, DefaultRootWindow(xdpy),
				    0, 0, 200, 200,
				    0,
				    WhitePixel(xdpy, screen),
				    WhitePixel(xdpy, screen));

  XMapWindow (xdpy, win_remote);

  stage = clutter_stage_new ();
  clutter_actor_set_position (stage, 0, 150);
  clutter_actor_set_background_color (stage, &gry);
  clutter_stage_set_title (CLUTTER_STAGE (stage), "X11 Texture from Pixmap");
  g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);

  timeline = clutter_timeline_new (5000);
  g_signal_connect (timeline,
                    "completed", G_CALLBACK (timeline_completed),
                    NULL);

  alpha = clutter_alpha_new_full (timeline, CLUTTER_LINEAR);
  depth_behavior = clutter_behaviour_depth_new (alpha, -2500, 400);

  if (!disable_x11)
    {
      group = clutter_group_new ();
      clutter_container_add_actor (CLUTTER_CONTAINER (stage), group);
      label = clutter_text_new_with_text ("fixed",
                                          "ClutterX11Texture (Window)");
      clutter_container_add_actor (CLUTTER_CONTAINER (group), label);
      tex = clutter_x11_texture_pixmap_new_with_window (win_remote);
      clutter_container_add_actor (CLUTTER_CONTAINER (group), tex);
      clutter_actor_set_position (tex, 0, 20);
      clutter_x11_texture_pixmap_set_automatic (CLUTTER_X11_TEXTURE_PIXMAP (tex),
                                                TRUE);
      clutter_texture_set_filter_quality (CLUTTER_TEXTURE (tex),
                                          CLUTTER_TEXTURE_QUALITY_HIGH);
      clutter_actor_set_position (group, 0, 0);
      if (!disable_animation)
        clutter_behaviour_apply (depth_behavior, group);
    }

  if (group)
    row_height = clutter_actor_get_height (group);
  else
    row_height = 0;

  /* NB: We only draw on the window after being redirected, so we dont
   * have to worry about handling expose events... */
  gc = XCreateGC (xdpy, win_remote, 0, NULL);
  XSetForeground (xdpy, gc, BlackPixel (xdpy, screen));
  XSetLineAttributes(xdpy, gc, 5, LineSolid, CapButt, JoinMiter);

  for (i = 0; i < 10; i++)
    XDrawLine (xdpy, win_remote, gc, 0+i*20, 0, 10+i*20+i, 200);


  group = clutter_group_new ();
  clutter_container_add_actor (CLUTTER_CONTAINER (stage), group);
  label = clutter_text_new_with_text ("fixed", "ClutterX11Texture (Pixmap)");
  clutter_container_add_actor (CLUTTER_CONTAINER (group), label);
  tex = clutter_x11_texture_pixmap_new_with_pixmap (pixmap);
  clutter_x11_texture_pixmap_set_automatic (CLUTTER_X11_TEXTURE_PIXMAP (tex),
                                            TRUE);
  clutter_container_add_actor (CLUTTER_CONTAINER (group), tex);
  clutter_actor_set_position (tex, 0, 20);
  clutter_texture_set_filter_quality (CLUTTER_TEXTURE (tex),
				      CLUTTER_TEXTURE_QUALITY_HIGH);
  /* oddly, the actor's size is 0 until it is realized, even though
     pixmap-height is set */
  clutter_actor_set_position (group, 0, row_height);
  if (!disable_animation)
    clutter_behaviour_apply (depth_behavior, group);


  g_signal_connect (stage, "key-release-event",
                    G_CALLBACK (stage_key_release_cb), (gpointer)pixmap);
  g_signal_connect (stage, "button-press-event",
                    G_CALLBACK (stage_button_press_cb), (gpointer)pixmap);

  clutter_actor_show (stage);

  if (!disable_animation)
    clutter_timeline_start (timeline);

  clutter_threads_add_timeout (1000, draw_arc, GUINT_TO_POINTER (pixmap));

  clutter_main ();

  return EXIT_SUCCESS;
}
示例#30
0
GtkWidget*
create_step1_dbox (void)
{
  GtkWidget *step1_dbox;
  GtkWidget *dialog_vbox3;
  GtkWidget *vbox1;
  GtkWidget *label10;
  GtkWidget *hseparator1;
  GSList *vbox1_group = NULL;
  GtkWidget *radiobutton1;
  GtkWidget *label14;
  GtkWidget *radiobutton2;
  GtkWidget *label13;
  GtkWidget *radiobutton3;
  GtkWidget *label12;
  GtkWidget *hseparator2;
  GtkWidget *label11;
  GtkWidget *dialog_action_area3;
  GtkWidget *hbuttonbox3;
  GtkWidget *button4;
  GtkWidget *hbox4;
  GtkWidget *pixmap4;
  guint label7_key;
  GtkWidget *label7;
  GtkWidget *button5;
  GtkWidget *hbox5;
  GtkWidget *pixmap5;
  guint label8_key;
  GtkWidget *label8;
  GtkWidget *button6;
  GtkWidget *hbox6;
  GtkWidget *pixmap6;
  guint label9_key;
  GtkWidget *label9;
  GtkAccelGroup *accel_group;

  accel_group = gtk_accel_group_new ();

  step1_dbox = gtk_dialog_new ();
  gtk_widget_set_name (step1_dbox, "step1_dbox");
  gtk_object_set_data (GTK_OBJECT (step1_dbox), "step1_dbox", step1_dbox);
  gtk_window_set_title (GTK_WINDOW (step1_dbox), _("GtkTiEmu startup"));
  gtk_window_set_modal (GTK_WINDOW (step1_dbox), TRUE);
  gtk_window_set_policy (GTK_WINDOW (step1_dbox), TRUE, TRUE, TRUE);

  dialog_vbox3 = GTK_DIALOG (step1_dbox)->vbox;
  gtk_widget_set_name (dialog_vbox3, "dialog_vbox3");
  gtk_object_set_data (GTK_OBJECT (step1_dbox), "dialog_vbox3", dialog_vbox3);
  gtk_widget_show (dialog_vbox3);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox1, "vbox1");
  gtk_widget_ref (vbox1);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "vbox1", vbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox3), vbox1, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (vbox1), 5);

  label10 = gtk_label_new (_("Welcome to GtkTiEmu. To use it, you must have a ROM image..."));
  gtk_widget_set_name (label10, "label10");
  gtk_widget_ref (label10);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "label10", label10,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label10);
  gtk_box_pack_start (GTK_BOX (vbox1), label10, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label10), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label10), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label10), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label10), 15, 5);

  hseparator1 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator1, "hseparator1");
  gtk_widget_ref (hseparator1);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "hseparator1", hseparator1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator1);
  gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, TRUE, TRUE, 0);

  radiobutton1 = gtk_radio_button_new (vbox1_group);
  vbox1_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton1));
  gtk_widget_set_name (radiobutton1, "radiobutton1");
  gtk_widget_ref (radiobutton1);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "radiobutton1", radiobutton1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (radiobutton1);
  gtk_box_pack_start (GTK_BOX (vbox1), radiobutton1, FALSE, FALSE, 0);

  label14 = gtk_label_new (_("You can use TiLP or another dumping program for getting a ROM image of your calculator."));
  gtk_widget_set_name (label14, "label14");
  gtk_widget_ref (label14);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "label14", label14,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label14);
  gtk_container_add (GTK_CONTAINER (radiobutton1), label14);
  gtk_label_set_justify (GTK_LABEL (label14), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label14), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label14), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label14), 5, 0);

  radiobutton2 = gtk_radio_button_new (vbox1_group);
  vbox1_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton2));
  gtk_widget_set_name (radiobutton2, "radiobutton2");
  gtk_widget_ref (radiobutton2);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "radiobutton2", radiobutton2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (radiobutton2);
  gtk_box_pack_start (GTK_BOX (vbox1), radiobutton2, FALSE, FALSE, 0);

  label13 = gtk_label_new (_("You have downloaded a FLASH upgrade on the TI website and you would like to convert it."));
  gtk_widget_set_name (label13, "label13");
  gtk_widget_ref (label13);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "label13", label13,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label13);
  gtk_container_add (GTK_CONTAINER (radiobutton2), label13);
  gtk_label_set_justify (GTK_LABEL (label13), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label13), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label13), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label13), 5, 0);

  radiobutton3 = gtk_radio_button_new (vbox1_group);
  vbox1_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton3));
  gtk_widget_set_name (radiobutton3, "radiobutton3");
  gtk_widget_ref (radiobutton3);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "radiobutton3", radiobutton3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (radiobutton3);
  gtk_box_pack_start (GTK_BOX (vbox1), radiobutton3, FALSE, FALSE, 0);

  label12 = gtk_label_new (_("You have already a ROM image and you would like to use it."));
  gtk_widget_set_name (label12, "label12");
  gtk_widget_ref (label12);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "label12", label12,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label12);
  gtk_container_add (GTK_CONTAINER (radiobutton3), label12);
  gtk_label_set_justify (GTK_LABEL (label12), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label12), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label12), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label12), 5, 0);

  hseparator2 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator2, "hseparator2");
  gtk_widget_ref (hseparator2);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "hseparator2", hseparator2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator2);
  gtk_box_pack_start (GTK_BOX (vbox1), hseparator2, TRUE, TRUE, 0);

  label11 = gtk_label_new (_("Remind you that you should not distribute your ROM images. They are copyrighted by Texas Instruments."));
  gtk_widget_set_name (label11, "label11");
  gtk_widget_ref (label11);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "label11", label11,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label11);
  gtk_box_pack_start (GTK_BOX (vbox1), label11, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (label11), GTK_JUSTIFY_FILL);
  gtk_label_set_line_wrap (GTK_LABEL (label11), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label11), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label11), 15, 5);

  dialog_action_area3 = GTK_DIALOG (step1_dbox)->action_area;
  gtk_widget_set_name (dialog_action_area3, "dialog_action_area3");
  gtk_object_set_data (GTK_OBJECT (step1_dbox), "dialog_action_area3", dialog_action_area3);
  gtk_widget_show (dialog_action_area3);
  gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area3), 10);

  hbuttonbox3 = gtk_hbutton_box_new ();
  gtk_widget_set_name (hbuttonbox3, "hbuttonbox3");
  gtk_widget_ref (hbuttonbox3);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "hbuttonbox3", hbuttonbox3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbuttonbox3);
  gtk_box_pack_start (GTK_BOX (dialog_action_area3), hbuttonbox3, TRUE, TRUE, 0);

  button4 = gtk_button_new ();
  gtk_widget_set_name (button4, "button4");
  gtk_widget_ref (button4);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "button4", button4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button4);
  gtk_container_add (GTK_CONTAINER (hbuttonbox3), button4);
  GTK_WIDGET_SET_FLAGS (button4, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (button4, "clicked", accel_group,
                              GDK_Return, 0,
                              GTK_ACCEL_VISIBLE);

  hbox4 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox4, "hbox4");
  gtk_widget_ref (hbox4);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "hbox4", hbox4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox4);
  gtk_container_add (GTK_CONTAINER (button4), hbox4);

  pixmap4 = create_pixmap (step1_dbox, "yes.xpm");
  gtk_widget_set_name (pixmap4, "pixmap4");
  gtk_widget_ref (pixmap4);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "pixmap4", pixmap4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pixmap4);
  gtk_box_pack_start (GTK_BOX (hbox4), pixmap4, TRUE, FALSE, 0);

  label7 = gtk_label_new ("");
  label7_key = gtk_label_parse_uline (GTK_LABEL (label7),
                                   _("< _Back"));
  gtk_widget_set_name (label7, "label7");
  gtk_widget_ref (label7);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "label7", label7,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label7);
  gtk_box_pack_start (GTK_BOX (hbox4), label7, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label7), 5, 0);

  button5 = gtk_button_new ();
  gtk_widget_set_name (button5, "button5");
  gtk_widget_ref (button5);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "button5", button5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button5);
  gtk_container_add (GTK_CONTAINER (hbuttonbox3), button5);
  GTK_WIDGET_SET_FLAGS (button5, GTK_CAN_DEFAULT);

  hbox5 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox5, "hbox5");
  gtk_widget_ref (hbox5);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "hbox5", hbox5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox5);
  gtk_container_add (GTK_CONTAINER (button5), hbox5);

  pixmap5 = create_pixmap (step1_dbox, "yes.xpm");
  gtk_widget_set_name (pixmap5, "pixmap5");
  gtk_widget_ref (pixmap5);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "pixmap5", pixmap5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pixmap5);
  gtk_box_pack_start (GTK_BOX (hbox5), pixmap5, TRUE, FALSE, 0);

  label8 = gtk_label_new ("");
  label8_key = gtk_label_parse_uline (GTK_LABEL (label8),
                                   _("_Next >"));
  gtk_widget_set_name (label8, "label8");
  gtk_widget_ref (label8);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "label8", label8,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label8);
  gtk_box_pack_start (GTK_BOX (hbox5), label8, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (label8), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label8), 5, 0);

  button6 = gtk_button_new ();
  gtk_widget_set_name (button6, "button6");
  gtk_widget_ref (button6);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "button6", button6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button6);
  gtk_container_add (GTK_CONTAINER (hbuttonbox3), button6);
  GTK_WIDGET_SET_FLAGS (button6, GTK_CAN_DEFAULT);
  gtk_widget_add_accelerator (button6, "clicked", accel_group,
                              GDK_Escape, 0,
                              GTK_ACCEL_VISIBLE);

  hbox6 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (hbox6, "hbox6");
  gtk_widget_ref (hbox6);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "hbox6", hbox6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox6);
  gtk_container_add (GTK_CONTAINER (button6), hbox6);

  pixmap6 = create_pixmap (step1_dbox, "no.xpm");
  gtk_widget_set_name (pixmap6, "pixmap6");
  gtk_widget_ref (pixmap6);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "pixmap6", pixmap6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pixmap6);
  gtk_box_pack_start (GTK_BOX (hbox6), pixmap6, TRUE, FALSE, 0);

  label9 = gtk_label_new ("");
  label9_key = gtk_label_parse_uline (GTK_LABEL (label9),
                                   _("_Cancel"));
  gtk_widget_set_name (label9, "label9");
  gtk_widget_ref (label9);
  gtk_object_set_data_full (GTK_OBJECT (step1_dbox), "label9", label9,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label9);
  gtk_box_pack_start (GTK_BOX (hbox6), label9, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (label9), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label9), 5, 0);

  gtk_signal_connect (GTK_OBJECT (radiobutton1), "toggled",
                      GTK_SIGNAL_FUNC (step1_on_radiobutton1_toggled),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (radiobutton2), "toggled",
                      GTK_SIGNAL_FUNC (step2_on_radiobutton2_toggled),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (radiobutton3), "toggled",
                      GTK_SIGNAL_FUNC (step3_on_radiobutton3_toggled),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (button4), "clicked",
                      GTK_SIGNAL_FUNC (step1_b1_button_clicked),
                      step1_dbox);
  gtk_signal_connect (GTK_OBJECT (button5), "clicked",
                      GTK_SIGNAL_FUNC (step1_b2_button_clicked),
                      step1_dbox);
  gtk_signal_connect (GTK_OBJECT (button6), "clicked",
                      GTK_SIGNAL_FUNC (step1_b3_button_clicked),
                      step1_dbox);

  gtk_widget_add_accelerator (button4, "clicked", accel_group,
                              label7_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
  gtk_widget_add_accelerator (button5, "clicked", accel_group,
                              label8_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
  gtk_widget_add_accelerator (button6, "clicked", accel_group,
                              label9_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);

  gtk_window_add_accel_group (GTK_WINDOW (step1_dbox), accel_group);

  return step1_dbox;
}