Revision
123
Author
leonpegg
Date
2007-01-12 10:42:21 -0800 (Fri, 12 Jan 2007)

Log Message

No E_STRICT errors now

Modified Paths

Diff

Modified: trunk/programs/ide/lib/ide_editor.class.php (122 => 123)


--- trunk/programs/ide/lib/ide_editor.class.php	2007-01-12 18:33:20 UTC (rev 122)
+++ trunk/programs/ide/lib/ide_editor.class.php	2007-01-12 18:42:21 UTC (rev 123)
@@ -19,7 +19,7 @@
 		$sourceView->set_data('filename',null);
 		$scroll = new GtkScrolledWindow();
 		$scroll->add($sourceView);
-		$id = $this->append_page($scroll, new GtkLabel('Untitled-'.$count));
+		$id = $this->append_new_page($scroll, new GtkLabel('Untitled-'.$count));
 		$this->show_all();
 		$this->set_current_page($id);
 	}
@@ -37,7 +37,7 @@
 			$sourceView->set_data('filename',$filename);
 			$scroll = new GtkScrolledWindow();
 			$scroll->add($sourceView);
-			$id = $this->append_page($scroll,new GtkLabel(basename($filename)));
+			$id = $this->append_new_page($scroll,new GtkLabel(basename($filename)));
 			$this->show_all();
 			$this->set_current_page($id);
 		}

Modified: trunk/programs/ide/lib/ide_notebook.class.php (122 => 123)


--- trunk/programs/ide/lib/ide_notebook.class.php	2007-01-12 18:33:20 UTC (rev 122)
+++ trunk/programs/ide/lib/ide_notebook.class.php	2007-01-12 18:42:21 UTC (rev 123)
@@ -7,23 +7,19 @@
 		$this->set_scrollable(true);
 	}
 	
-	public function append_page($child, $label, $has_close = true){
+	public function append_new_page($child, $label){
 		$tab = new GtkHBox();
-		if ($has_close) {
-			$event_box = new GtkEventBox();
-			$event_box->add(
-			$button = GtkImage::new_from_stock(
-				Gtk::STOCK_CLOSE,
-				Gtk::ICON_SIZE_MENU)
-			);
-			$event_box->show();
-			$button->show();
-			$event_box->connect('button_press_event', array($this, 'close_page'), $child);
-			$tab->pack_start($label);
-			$tab->pack_start($event_box);
-		}else{
-			$tab->pack_start($label);
-		}
+		$event_box = new GtkEventBox();
+		$event_box->add(
+		$button = GtkImage::new_from_stock(
+			Gtk::STOCK_CLOSE,
+			Gtk::ICON_SIZE_MENU)
+		);
+		$event_box->show();
+		$button->show();
+		$event_box->connect('button_press_event', array($this, 'close_page'), $child);
+		$tab->pack_start($label);
+		$tab->pack_start($event_box);
 		$tab->show_all();
 		return parent::append_page($child,$tab);
 	}
@@ -41,14 +37,14 @@
 		return parent::get_current_page();
 	}
 	
-	public function get_tab_label($child){
-		$tab = $this->get_tab_label($child);
+	public function get_tab_label_new($child){
+		$tab = parent::get_tab_label($child);
 		$tab_label = $tab->get_children();
 		return $tab_label[0];
 	}
 	
 	public function get_current_tab_label(){
-		return $this->get_tab_label($this->get_current_page());
+		return $this->get_tab_label_new($this->get_current_page());
 	}
 	
 }