summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand Jacquin (Beber) <beber.mailing@gmail.com>2006-05-30 01:18:04 +0200
committerbeber <beber@meathook.melee>2006-05-30 01:18:04 +0200
commit9021a6b785145db09f1309b70ef76d73e59591a2 (patch)
tree03a9b43c57d4e284f85264e70b2d6027f4bc15e8
parentFirst Ruby release of wmHuitreHuitre. (diff)
downloadwmhuitrehuitre-9021a6b785145db09f1309b70ef76d73e59591a2.tar.gz
rb: indent code
-rwxr-xr-xrb/wmHuitreHuitre.rb31
1 files changed, 14 insertions, 17 deletions
diff --git a/rb/wmHuitreHuitre.rb b/rb/wmHuitreHuitre.rb
index 1c2d51c..ce27086 100755
--- a/rb/wmHuitreHuitre.rb
+++ b/rb/wmHuitreHuitre.rb
@@ -10,8 +10,8 @@ require 'gtk2'
Gtk.init
-interface = Gtk::Window.new
-interface.title = "wmHuitreHuitre"
+interface = Gtk::Window.new
+interface.set_title("wmHuitreHuitre \_o< ~")
interface.set_default_size(600, 400)
interface.signal_connect("delete_event") do
@@ -20,34 +20,31 @@ interface.signal_connect("delete_event") do
end
container = Gtk::HBox.new(false, 0)
+table = Gtk::Table.new(3, 2, false)
interface.add(container)
-
-table = Gtk::Table.new(3, 2, false)
-
container.pack_start(table, true, true, 0)
-menu = Gtk::MenuBar.new()
-table.attach(menu, 0, 2, 0, 1, Gtk::FILL | Gtk::EXPAND, 0, 0, 0)
+menu = Gtk::MenuBar.new()
-mn_fichier = Gtk::MenuItem.new("Fichier", true)
-mn_edit = Gtk::MenuItem.new("Édition", true)
+mn_fichier = Gtk::MenuItem.new("Fichier", true)
+mn_edit = Gtk::MenuItem.new("Édition", true)
mn_aff = Gtk::MenuItem.new("Affichage", true)
-mn_aide = Gtk::MenuItem.new("Aide", true)
+mn_aide = Gtk::MenuItem.new("Aide", true)
menu.append(mn_fichier)
menu.append(mn_edit)
menu.append(mn_aff)
menu.append(mn_aide)
-entry_box = Gtk::Entry.new()
-table.attach(entry_box, 0, 1, 2, 3, Gtk::FILL | Gtk::EXPAND, 0, 0, 0)
-
-bouton = Gtk::Button.new("Send", false)
-table.attach(bouton, 1, 2, 2, 3, Gtk::FILL, 0, 0, 0)
-
+entry_box = Gtk::Entry.new()
+bouton = Gtk::Button.new("Send", false)
dialog_box = Gtk::ScrolledWindow.new()
-table.attach(dialog_box, 0, 2, 1 ,2, Gtk::FILL, Gtk::FILL | Gtk::EXPAND, 0, 0)
+
+table.attach(menu, 0, 2, 0, 1, Gtk::FILL | Gtk::EXPAND, 0, 0, 0)
+table.attach(entry_box, 0, 1, 2, 3, Gtk::FILL | Gtk::EXPAND, 0, 0, 0)
+table.attach(bouton, 1, 2, 2, 3, Gtk::FILL, 0, 0, 0)
+table.attach(dialog_box, 0, 2, 1, 2, Gtk::FILL, Gtk::FILL | Gtk::EXPAND, 0, 0)
interface.show_all
Gtk.main