Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove usage of custom attribute in GObject class in the sample

This feature was removed recently.
  • Loading branch information...
commit ea6587cd8d8fd9d4755e0f93e4c1b3aa1b39d164 1 parent ef95645
@pavouk authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 samples/gtkpad.lua
View
8 samples/gtkpad.lua
@@ -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], ...}
Please sign in to comment.
Something went wrong with that request. Please try again.