StokeBloke.com

Archive for May, 2011

Disable resize grip in Ubuntu 11.04

Tuesday, May 17th, 2011

If you don’t like the big resize grip on emacs, firefox and many other applications you can disable them in Ubuntu 11.04.

See
http://www.omgubuntu.co.uk/2011/05/disable-the-resize-grip-in-ubuntu-11-04/

You simply need to add

style "default-style"
{
  GtkWindow::resize-grip-height = 0
  GtkWindow::resize-grip-width = 0
}

class "GtkWidget" style "default-style"

to your ~/.gtkrc-2.0 file.

Netbeans log code template

Tuesday, May 3rd, 2011

For some years I have been adding this code template to Netbeans.

private static final Logger log = Logger.getLogger(${classVar editable="false" currClassName default="getClass()"}.class.getName());

You can add this by going to Netbeans->Tools Menu->Options->Editor->Code Templates dialog.

Netbeans Code Templates

Edit @ 29/08/2011
In newer Netbeans you must ensure that the “On Template Expansion:” is set to “Reformat text” else it gets extra new lines added in the code template.

${no-format}private static final Logger log = Logger.getLogger(${classVar editable="false" currClassName default="getClass()"}.class.getName());