All pastes #331138 Raw Edit

Someone

public text v1 · immutable
#331138 ·published 2007-01-28 16:19 UTC
rendered paste body
<?php

class CC_Phototagedit extends GtkDialog{

	protected $cat_combo;
	protected $tag_input;

	public function __construct(){
		$hbox = new gtkhbox();
		$vbox1 = new gtkvbox();
		$label1 = new Gtklabel('Catagorys :');
		$model = new GtkListStore(Gtk::TYPE_STRING);
		$this->cat_combo->set_model($model); // note 1
		$this->cat_combo = new GtkCellRendererText(); // note 2
		$this->cat_combo->pack_start($cellRenderer);
		$this->cat_combo->set_attributes($cellRenderer, 'text', 0); // note 3
		// $cats = db func
		foreach($cats as $cat) {
			$model->append(array($cat));
		}
		$vbox1->pack_start($label1);
		$vbox1->pack_start($this->cat_combo);
		$vbox2 = new gtkvbox();
		$label2 = new gtklabel("Tag :");
		$this->tag_input = new gtkentry();
		$vbox2->pack_start($label2);
		$vbox2->pack_start($this->tag_input);
		$vbox3 = new gtkvbox();
		$but_add = new GtkButton('Add tag');
		$but_cancel = new GtkButton('Add tag');
		$vbox3->pack_start($but_add);
		$vbox3->pack_start($but_cancel);
		$hbox->pack_start($vbox1);
		$hbox->pack_start($vbox2);
		$hbox->pack_start($vbox3);
		$this->add($hbox);
	}

	public function on_add(){

	}

}

?>