Added edit connection menu item to connection sidebar

This commit is contained in:
Timothy Warren 2012-03-28 11:52:38 -04:00
parent bde8f0f179
commit 7acbe41e8f
2 changed files with 7 additions and 1 deletions

View File

@ -150,7 +150,7 @@ class Main extends GtkWindow {
$scrolled_win = new GtkScrolledWindow();
$scrolled_win->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
$scrolled_win->add(new DataGrid());
//$scrolled_win->add(new DataGrid());
// Add the connection sidebar
$this->connection_sidebar =& Connection_Sidebar::get_instance();

View File

@ -221,6 +221,12 @@ class Connection_Sidebar extends GtkVBox {
// Set up menu items
{
$edit = new GtkImageMenuItem('Edit Connection');
$edit->set_image(GtkImage::new_from_stock(GTK::STOCK_EDIT, GTK::ICON_SIZE_MENU));
$edit->connect_simple('activate', array($this, 'edit_connection'));
$this->menu->append($edit);
$remove = new GtkImageMenuItem('Delete Connection');
$remove->set_image(GtkImage::new_from_stock(GTK::STOCK_CANCEL, Gtk::ICON_SIZE_MENU));
$remove->connect_simple('activate', array($this, 'remove_connection'), $all);