31 lines
864 B
Plaintext
31 lines
864 B
Plaintext
$OpenBSD: patch-samples_gtkhello_lua,v 1.1 2012/08/21 09:36:19 jasper Exp $
|
|
|
|
Gtk: make Gtk-2.0.typelib usable again
|
|
https://github.com/pavouk/lgi/commit/90aa6c8491db0b2587ca094802a594bf5834fb7e
|
|
|
|
--- samples/gtkhello.lua.orig Tue Aug 21 11:31:55 2012
|
|
+++ samples/gtkhello.lua Tue Aug 21 11:32:44 2012
|
|
@@ -7,7 +7,7 @@
|
|
--
|
|
|
|
local lgi = require 'lgi'
|
|
-local Gtk = lgi.Gtk
|
|
+local Gtk = lgi.require('Gtk')
|
|
|
|
-- Create top level window with some properties and connect its 'destroy'
|
|
-- signal to the event loop termination.
|
|
@@ -15,9 +15,12 @@ local window = Gtk.Window {
|
|
title = 'window',
|
|
default_width = 400,
|
|
default_height = 300,
|
|
- has_resize_grip = true,
|
|
on_destroy = Gtk.main_quit
|
|
}
|
|
+
|
|
+if tonumber(Gtk._version) >= 3 then
|
|
+ window.has_resize_grip = true
|
|
+end
|
|
|
|
-- Create some more widgets for the window.
|
|
local status_bar = Gtk.Statusbar()
|