예제 #1
0
파일: tag.cpp 프로젝트: asimonov-im/wesnoth
void class_tag::append_super(const class_tag &tag,const std::string & path){
	add_keys(tag.keys_);
	add_links(tag.links_);
	for (tag_map::const_iterator i = tag.tags_.begin();i!=tag.tags_.end();++i){
		links_.erase(i->first);
		add_link(path + "/" + i->first);

	}
}
예제 #2
0
파일: ttx-window.c 프로젝트: djcb/ttx
static void
on_completed (TTXRetrievalStatus status,
	      unsigned page, unsigned subpage, const char *path,
	      GSList *links, TTXWindow *self)
{
	GdkPixbuf *pixbuf;
	int h, w;

	self->priv->retrieving = FALSE;
	
	if (status != TTX_RETRIEVAL_OK) {
		g_warning ("an error occured retrieving %u/%u",
			   page, subpage);
		update_entry (self);
		return;
	}

	gtk_image_set_from_file (GTK_IMAGE(self->priv->image), path);

	/* resize the window */
	pixbuf = gtk_image_get_pixbuf (GTK_IMAGE(self->priv->image));
	if (pixbuf) {
		h = gdk_pixbuf_get_height (pixbuf);
		w = gdk_pixbuf_get_width (pixbuf);
		gtk_widget_set_size_request (self->priv->image, w, h);
	}

	reset_img_file (self, path);

	add_links (self, links);

	self->priv->page = page;
	self->priv->subpage = subpage;

	update_entry (self);
}