Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=gfwsyscfg.git;a=commitdiff;h=e620c4f839999d3237b507cd282395503ef06823

commit e620c4f839999d3237b507cd282395503ef06823
Author: James Buren <r...@frugalware.org>
Date:   Fri Dec 12 13:32:01 2008 -0600

gfwsyscfg.lua,gfwsyscfg.glade
* modify interface to use GLADE, import a glade file

diff --git a/src/gfwsyscfg.glade b/src/gfwsyscfg.glade
new file mode 100644
index 0000000..91e16ab
--- /dev/null
+++ b/src/gfwsyscfg.glade
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Fri Dec 12 13:27:39 2008 -->
+<glade-interface>
+  <widget class="GtkWindow" id="mainwindow">
+    <child>
+      <widget class="GtkVBox" id="vbox">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkNotebook" id="notebook">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+          </widget>
+        </child>
+        <child>
+          <widget class="GtkHButtonBox" id="hbuttonbox">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="closebutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-close</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">0</property>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/src/gfwsyscfg.lua b/src/gfwsyscfg.lua
index 209fd24..9cb5379 100755
--- a/src/gfwsyscfg.lua
+++ b/src/gfwsyscfg.lua
@@ -10,10 +10,14 @@ function quit()
end

function init()
-       local win = lgui.Window.new()
-       win:set("title","gfwsyscfg")
-       win:connect("delete-event",quit)
-       win:showAll()
+       local app = {}
+       app.glade = lgui.Glade.new("gfwsyscfg.glade")
+       app.win = app.glade:getWidget("mainwindow")
+       app.closebutton = app.glade:getWidget("closebutton")
+       app.closebutton:connect("clicked",quit)
+       
app.win:set("title","gfwsyscfg","width-request",300,"height-request",300)
+       app.win:connect("delete-event",quit)
+       app.win:showAll()
lgui.main()
end
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to