Permalink
Browse files

Remove usage of custom attribute in GObject class in the sample

This feature was removed recently.
  • Loading branch information...
pavouk committed Nov 24, 2011
1 parent ef95645 commit ea6587cd8d8fd9d4755e0f93e4c1b3aa1b39d164
Showing with 4 additions and 4 deletions.
  1. +4 −4 samples/gtkpad.lua
View
@@ -17,13 +17,13 @@ local Gio = lgi.Gio
local app = Gtk.Application.new('org.lgi.GtkPad',
Gio.ApplicationFlags.HANDLES_OPEN)
-function app:new_editor(file)
+local function new_editor(file)
local contents = file and file:load_contents()
local window = Gtk.Window {
type = Gtk.WindowType.TOPLEVEL,
default_width = 400,
default_height = 300,
- application = self,
+ application = app,
title = file and file:get_parse_name() or '<Untitled>',
child = Gtk.ScrolledWindow {
child = Gtk.TextView {
@@ -38,11 +38,11 @@ function app:new_editor(file)
end
function app:on_activate()
- self:new_editor()
+ new_editor()
end
function app:on_open(files)
- for i = 1, #files do self:new_editor(files[i]) end
+ for i = 1, #files do new_editor(files[i]) end
end
return app:run {arg[0], ...}

0 comments on commit ea6587c

Please sign in to comment.