Diff
Modified: desktop/trunk/lib/actions.class.php (58 => 59)
--- desktop/trunk/lib/actions.class.php 2006-12-03 19:09:01 UTC (rev 58)
+++ desktop/trunk/lib/actions.class.php 2006-12-04 15:35:36 UTC (rev 59)
@@ -94,7 +94,6 @@
$action = $this->get_action($group, $action);
$widget = $action->create_menu_item();
$tips->set_tip($widget, $action->get_property('tooltip'));
- unset($action, $group, $tips);
return $widget;
}
@@ -115,7 +114,6 @@
$action = $this->get_action($group, $action);
$widget = $action->create_tool_item();
$tips->set_tip($widget, $action->get_property('tooltip'));
- unset($action, $group, $tips);
return $widget;
}
@@ -147,7 +145,6 @@
}
$tips->set_tip($button, $action->get_property('tooltip'));
$action->connect_proxy($button);
- unset($action, $group, $tips);
return $button;
}
@@ -189,7 +186,6 @@
public function add_group($group)
{
$this->groups[$group] = new GtkActionGroup($group);
- unset($group);
return;
}
@@ -261,7 +257,6 @@
$action->set_group($group->get_action($def['radio']));
}
}
- unset($def, $definitions, $group, $action, $this, $signal);
return;
}
Modified: desktop/trunk/lib/cc.class.php (58 => 59)
--- desktop/trunk/lib/cc.class.php 2006-12-03 19:09:01 UTC (rev 58)
+++ desktop/trunk/lib/cc.class.php 2006-12-04 15:35:36 UTC (rev 59)
@@ -98,7 +98,6 @@
{
trigger_error(self::i18n('%s : %s', 'The following extensions must be loaded in your php.ini for Callicore to function', implode(', ', $diff)), E_USER_ERROR);
}
- unset($have, $needed, $diff);
self::$LARGE = Gtk::icon_size_register('gtk-large',64, 64);
self::$IMAGE = Gtk::icon_size_register('gtk-image',128, 128);
@@ -121,8 +120,6 @@
$class = 'CC_' . ucfirst(strtolower($program));
new $class();
-
- unset($class, $program);
return;
}
@@ -192,7 +189,6 @@
$window->render_icon($icon, self::$IMAGE));
GtkWindow::set_default_icon_name($icon);
- unset($window, $theme, $icon);
return;
}
@@ -210,7 +206,6 @@
{
preg_match_all('/[A-Z][a-z0-9_]*/', str_replace('CC_', '', $class), $matches);
$array = array_map('strtolower', $matches[0]);
- unset($matches, $class);
$file = array_pop($array) . '.class.php';
if(!empty($array))
{
@@ -234,8 +229,6 @@
{
$return = FALSE;
}
-
- unset($lib, $file, $array, $class, $matches, $program);
return $return;
}
}
Modified: desktop/trunk/lib/config.class.php (58 => 59)
--- desktop/trunk/lib/config.class.php 2006-12-03 19:09:01 UTC (rev 58)
+++ desktop/trunk/lib/config.class.php 2006-12-04 15:35:36 UTC (rev 59)
@@ -80,7 +80,6 @@
$this->data = array();
$this->writeFile();
}
- unset($folders, $program, $this);
return;
}
@@ -127,7 +126,6 @@
{
$this->data[$name] = $value;
$this->writeFile();
- unset($name, $value);
return;
}
@@ -143,7 +141,6 @@
{
unset($this->data[$name]);
$this->writeFile();
- unset($name);
return;
}
@@ -173,7 +170,6 @@
}
}
file_put_contents($this->file, $string);
- unset($string, $subvalue, $key, $value);
return;
}
Modified: desktop/trunk/lib/folders.class.php (58 => 59)
--- desktop/trunk/lib/folders.class.php 2006-12-03 19:09:01 UTC (rev 58)
+++ desktop/trunk/lib/folders.class.php 2006-12-04 15:35:36 UTC (rev 59)
@@ -204,7 +204,6 @@
mkdir($path);
}
$this->appdata = $path . 'Callicore' . DS;
- unset($path);
}
// darwin puts things in $HOME/Library/Application Support/Callicore/
elseif($this->os == self::MAC)
@@ -254,7 +253,6 @@
{
$this->profile = DIR;
}
- unset($env);
}
else
{
@@ -310,7 +308,6 @@
{
$this->documents = $home;
}
- unset($home);
}
}
return $this->documents;
@@ -344,7 +341,6 @@
{
$this->temp = $this->getProfile();
}
- unset($env);
}
return $this->temp;
}
@@ -381,14 +377,14 @@
{
$shell = new COM('WScript.Shell');
$return = $shell->Run('cmd /c start "" "' . $file . '"', 0, FALSE);
- unset($shell, $file);
+ unset($shell);
return (bool) $return;
}
elseif($this->os == self::WIN32)
{
$shell = new COM('WScript.Shell');
$return = $shell->Run('command /c start "" "' . $file . '"', 0, FALSE);
- unset($shell, $file);
+ unset($shell);
return (bool) $return;
}
elseif($this->os == self::MAC)
Modified: desktop/trunk/lib/message.class.php (58 => 59)
--- desktop/trunk/lib/message.class.php 2006-12-03 19:09:01 UTC (rev 58)
+++ desktop/trunk/lib/message.class.php 2006-12-04 15:35:36 UTC (rev 59)
@@ -86,7 +86,6 @@
$this->set_markup(CC::i18n($message));
}
- unset($message, $title, $type, $program);
return;
}
@@ -103,7 +102,6 @@
{
$this->set_transient_for($parent);
$this->set_destroy_with_parent(TRUE);
- unset($parent);
return;
}
@@ -160,7 +158,6 @@
{
exit;
}
- unset($code, $message, $file, $line, $level, $title, $win, $text);
return;
}
@@ -176,7 +173,6 @@
static public function exception($e)
{
self::error(Gtk::MESSAGE_ERROR, $e->getMessage(), $e->getFile(), $e->getLine());
- unset($e);
return;
}
@@ -199,7 +195,6 @@
}
file_put_contents($log, self::$messages[$level] . ' ' . date('Y-m-d H:i:s')
. ' --> ' . $message . EOL, FILE_APPEND);
- unset($log, $level, $message, $folders);
return;
}
}
Modified: desktop/trunk/lib/splash.class.php (58 => 59)
--- desktop/trunk/lib/splash.class.php 2006-12-03 19:09:01 UTC (rev 58)
+++ desktop/trunk/lib/splash.class.php 2006-12-04 15:35:36 UTC (rev 59)
@@ -88,8 +88,6 @@
$this->progressbar->set_text(CC::i18n('Loading...'));
$this->progressbar->set_fraction(0);
$vbox->pack_end($this->progressbar, FALSE, FALSE);
-
- unset($vbox, $hbox);
return;
}
@@ -107,7 +105,6 @@
{
$this->set_transient_for($parent);
$this->set_destroy_with_parent(TRUE);
- unset($parent);
return;
}
@@ -132,7 +129,6 @@
$this->shape_combine_mask($mask, 0, 0);
}
$this->window->set_back_pixmap($pixmap, FALSE);
- unset($pixbuf, $pixmap, $mask, $width, $height, $image);
return;
}
@@ -150,7 +146,6 @@
$hbox = new GtkHBox();
$hbox->pack_start(new GtkLabel(CC::i18n($license)), FALSE, FALSE);
$this->vbox->pack_end($hbox, FALSE, FALSE);
- unset($hbox, $license, $this);
return;
}
@@ -169,7 +164,6 @@
$verion = 'version ' . CC::VERSION;
}
$this->hbox->pack_end(new GtkLabel(CC::i18n($version)), FALSE, FALSE);
- unset($version ,$this);
return;
}
@@ -184,7 +178,6 @@
public function setCopyright($copyright = 'Copyright (c) 2006')
{
$this->hbox->pack_start(new GtkLabel(CC::i18n($copyright)), FALSE, FALSE);
- unset($copyright, $this);
return;
}
@@ -200,7 +193,6 @@
{
$this->progressbar->set_text(CC::i18n($text));
$this->progressbar->set_fraction($this->progressbar->get_fraction() + (1 / $this->steps));
- unset($text);
while (Gtk::events_pending())
Gtk::main_iteration();
return;
Modified: desktop/trunk/lib/toolbar.class.php (58 => 59)
--- desktop/trunk/lib/toolbar.class.php 2006-12-03 19:09:01 UTC (rev 58)
+++ desktop/trunk/lib/toolbar.class.php 2006-12-04 15:35:36 UTC (rev 59)
@@ -63,7 +63,6 @@
{
parent::__construct();
$this->set_name($name);
- unset($name);
return;
}
@@ -149,43 +148,38 @@
$menu->show_all();
- $this->set_events($this->get_events() | Gdk::BUTTON_PRESS_MASK);
- $this->connect('button-press-event', array($this, 'popup'));
+ $this->connect('popup-context-menu', array($this, 'popup'));
// populate toolbar
foreach($toolitems as $item)
{
if($item === 'separator')
{
- $this->insert(new GtkSeparatorToolItem(), -1);
+ $this->insert($item = new GtkSeparatorToolItem(), -1);
+ //$item->set_events($item->get_events() | Gdk::BUTTON_PRESS_MASK);
+ //$item->connect('popup-menu', array($this, 'popup'));
}
else
{
list($group, $name) = explode(':', $item);
- $this->insert($actions->create_tool_item($group, $name), -1);
+ $this->insert($item = $actions->create_tool_item($group, $name), -1);
+ //$item->set_events($item->get_events() | Gdk::BUTTON_PRESS_MASK);
+ $item->connect('popup-menu', array($this, 'popup'));
}
}
- unset($group, $name, $item, $actions, $this, $toolitems, $menu, $submenu,
- $name, $config, $size, $style, $active);
return;
}
/**
* public function popup
*
- * pops up a popup menu on right click
+ * pops up a context menu on right click
*
- * @param object $window GtkWindow
- * @param object $event GdkEvent
* @return void
*/
- public function popup($window, $event)
+ public function popup()
{
- if($event->button == 3)
- {
- $this->menu->popup();
- }
- unset($window, $event);
+ $this->menu->popup();
return;
}
@@ -207,7 +201,6 @@
{
$statusbar->label->set_label(CC::i18n('Toolbar visibility changed'));
}
- unset($state, $action, $statusbar);
return;
}
@@ -246,7 +239,6 @@
{
$statusbar->label->set_label(CC::i18n('Toolbar style changed'));
}
- unset($config, $action, $statusbar);
return;
}
@@ -285,7 +277,6 @@
{
$statusbar->label->set_label(CC::i18n('Toolbar icon size changed'));
}
- unset($config, $action, $statusbar);
return;
}
@@ -298,7 +289,7 @@
*/
public function onCustomize()
{
- $window = new CC_Tooldialog($this->parent->parent);
+ $window = new CC_Customize($this->parent->parent, $this->parent->parent->customize);
$response = $window->run();
return;
}
Modified: desktop/trunk/lib/tooltips.class.php (58 => 59)
--- desktop/trunk/lib/tooltips.class.php 2006-12-03 19:09:01 UTC (rev 58)
+++ desktop/trunk/lib/tooltips.class.php 2006-12-04 15:35:36 UTC (rev 59)
@@ -72,7 +72,6 @@
{
parent::set_tip($widget, $tooltip);
}
- unset($widget, $tooltip);
return;
}
Modified: desktop/trunk/lib/window.class.php (58 => 59)
--- desktop/trunk/lib/window.class.php 2006-12-03 19:09:01 UTC (rev 58)
+++ desktop/trunk/lib/window.class.php 2006-12-04 15:35:36 UTC (rev 59)
@@ -53,6 +53,12 @@
public $statusbar;
/**
+ * customize style for window
+ * @var $customize int
+ */
+ public $customize = CC_Customize::ICONVIEW;
+
+ /**
* windows can be minimized, maximized and fullscreened
* @var $minimized bool
*/
@@ -107,7 +113,6 @@
$this->connect('window-state-event', array($this, 'windowState'));
$this->connect_simple('delete-event', array($this, 'saveWindowState'));
- unset($config, $height, $width, $x, $y, $name, $vbox, $this);
$this->restoreWindowState();
return;
}
@@ -123,7 +128,6 @@
public function set_title($title, $program = 'Callicore')
{
parent::set_title(CC::i18n('%s :: %s', $program, $title));
- unset($title, $program);
return;
}
@@ -192,8 +196,8 @@
array(
'type' => 'toggle',
'name' => 'toggle',
- 'label' => '_Show Toolbar',
- 'short-label' => '_Show',
+ 'label' => '_Show/Hide Toolbar',
+ 'short-label' => '_Toolbar',
'tooltip' => 'Show and hide the toolbar',
'callback' => array($this->toolbar, 'onToggleToolbar'),
),
@@ -268,7 +272,6 @@
),
));
- unset($actions);
return;
}
@@ -317,8 +320,6 @@
$submenu->append(new GtkSeparatorMenuItem());
$submenu->append($actions->create_menu_item('help', 'about'));
-
- unset($this, $menu, $actions, $item, $submenu);
return;
}
@@ -361,7 +362,6 @@
$status->label->set_padding(3, 0);
$status->label->set_label(CC::i18n('Ready'));
$status->label->set_use_markup(TRUE);
- unset($status, $children);
return;
}
@@ -409,7 +409,6 @@
$config->{$name . '_x'} = $x;
$config->{$name . '_y'} = $y;
- unset($config, $height, $width, $x, $y, $name);
$this->destroy();
return;
}
@@ -454,7 +453,6 @@
{
$this->iconify();
}
- unset($name, $config, $width, $height, $x, $y, $state);
return;
}
Modified: desktop/trunk/programs/writer/lib/character/window.class.php (58 => 59)
--- desktop/trunk/programs/writer/lib/character/window.class.php 2006-12-03 19:09:01 UTC (rev 58)
+++ desktop/trunk/programs/writer/lib/character/window.class.php 2006-12-04 15:35:36 UTC (rev 59)
@@ -97,7 +97,6 @@
$config = Config::instance();
$this->date = isset($config->date) ? (string) $config->date : 'Y-m-d H:i:s';
$this->timeout = isset($config->timeout) ? (int) $config->timeout : 60000;
- unset($this, $config);
$this->editwindow = new CharacterEdit();
file_put_contents('C:\work\writer\\' .__CLASS__ . '.' . __FUNCTION__ . '.txt', print_r(get_defined_vars(), TRUE));
@@ -174,8 +173,6 @@
// double click on open
$treeview->connect('row-activated', array($this, 'onOpen'));
- unset($cols, $name, $id, $render, $col, $selection, $this, $treeview, $first,
- $menu, $item, $action, $group);
return;
}
@@ -205,7 +202,6 @@
{
$model->append($object->storeArray());
}
- unset($list, $count, $types, $object);
return $model;
}
@@ -230,7 +226,6 @@
$this->actions['file']->get_action('print')->set_property('tooltip', Writer::i18n('Print character list'));
$this->actions['file']->get_action('save')->set_property('tooltip', Writer::i18n('Save all character changes'));
$this->isChanged(FALSE);
- unset($action, $this);
return;
}
@@ -345,8 +340,6 @@
parent::buildMenu();
- unset($this, $menu, $action, $item, $tooltips, $config, $name, $group,
- $submenu, $subitem, $child, $id, $file, $list);
return;
}
@@ -367,7 +360,6 @@
$this->set_transient_for(Writer::$window);
$this->connect_simple('delete-event', array($this, 'onClose'));
Writer::$window->connect_simple('destroy', array($this, 'onDeleteEvent'));
- unset($this);
return;
}
@@ -381,7 +373,6 @@
public function dateFormat($render, $cell)
{
$cell->set_property('text', date($this->date, strtotime($cell->get_property('text'))));
- unset($render, $cell, $this);
return;
}
@@ -430,7 +421,6 @@
elseif($check == Gtk::RESPONSE_DELETE_EVENT)
{
$dialog->destroy();
- unset($dialog, $name, $entry, $error, $check);
return;
}
}
@@ -448,7 +438,6 @@
{
$this->statusbar->label->set_label(Writer::i18n('<b>New character added</b>'));
}
- unset($model, $this, $date, $iter, $name, $error, $entry, $dialog, $check);
return;
}
@@ -464,7 +453,6 @@
list($model, $iter) = $selection->get_selected();
if(is_null($iter))
{
- unset($model, $iter, $selection);
return;
}
// manipulate delete/undelete
@@ -481,7 +469,6 @@
$this->actions['file']->get_action('delete')->set_sensitive(TRUE);
$this->actions['file']->get_action('undelete')->set_sensitive(FALSE);
}
- unset($model, $iter, $selection, $this, $deleted);
return;
}
@@ -496,7 +483,6 @@
{
$this->actions['file']->get_action('save')->set_sensitive($toggle);
$this->actions['file']->get_action('revert')->set_sensitive($toggle);
- unset($this, $toggle);
return;
}
@@ -512,7 +498,6 @@
public function onStale($iter)
{
$this->treeview->get_model()->set($iter, 5, '#000099');
- unset($iter, $this);
return;
}
@@ -543,7 +528,6 @@
$this->statusbar->label->set_label(Writer::i18n('<b>Character changes reverted</b>'));
}
$this->isChanged(FALSE);
- unset($list, $object);
return;
}
@@ -572,7 +556,6 @@
Gtk::timeout_remove($this->timeouts[$id]);
}
$this->isChanged();
- unset($this->timeouts[$id], $selection, $model, $iter, $id);
return;
}
@@ -604,7 +587,6 @@
$this->timeouts[$model->get_string_from_iter($iter)] = Gtk::timeout_add($this->timeout, array($this, 'onStale'), $iter);
}
$this->isChanged();
- unset($selection, $model, $iter);
return;
}
@@ -623,7 +605,6 @@
{
Gtk::timeout_remove($id);
}
- unset($this, $id);
$this->hide_all();
return TRUE;
}
@@ -658,7 +639,6 @@
{
$this->treeview->get_selection()->select_iter($first);
}
- unset($first);
foreach($this->timeouts as $id)
{
Gtk::timeout_remove($id);
@@ -711,7 +691,6 @@
}
$obj->save();
}
- unset($next, $model, $path, $iter, $list, $row, $obj, $name, $value, $id, $i);
return;
}
@@ -752,13 +731,10 @@
list($model, $iter) = $selection->get_selected();
if(is_null($iter))
{
- unset($model, $iter, $selection);
return;
}
$this->editwindow->getData($model->get_value($iter, 0));
- unset($row, $model, $iter, $selection);
$this->editwindow->show_all();
- unset($this);
return;
}
@@ -774,7 +750,6 @@
{
$iter1 = $model->get_value($iter1, 3);
$iter2 = $model->get_value($iter2, 3);
- unset($model);
if($iter1 > $iter2)
{
return 1;