PERFORCE change 119808 for review

Ivan Voras ivoras at FreeBSD.org
Mon May 14 00:14:57 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=119808

Change 119808 by ivoras at ivoras_finstall on 2007/05/14 00:14:39

	A nicer skeleton, also including support for external text files.

Affected files ...

.. //depot/projects/soc2007/ivoras_finstall/installer/finstall.py#3 edit
.. //depot/projects/soc2007/ivoras_finstall/installer/glade/mainwin.glade#2 edit
.. //depot/projects/soc2007/ivoras_finstall/installer/text/intro.txt#1 add

Differences ...

==== //depot/projects/soc2007/ivoras_finstall/installer/finstall.py#3 (text+ko) ====

@@ -10,6 +10,8 @@
 		self["img_logo"].set_from_file("img/logo.jpg")
 		# img_logo stretches the window vertically, so calling window.set_position() has no affect
 		self._center_window(self.window) 
+		self["label2"].set_text(self._load_label("intro.txt"))
+		self["label2"].set_use_markup(True)
 
 
 	def __getitem__(self,key):
@@ -36,10 +38,16 @@
 				dict[name] = attr
 		return dict
 
+	def _load_label(self, file_name):
+		return file("text/%s" % file_name).read().replace("\n", " ").replace("<br>", "\n").replace("\n ", "\n")
+
 	def on_button_next_clicked(self, obj):
 		print "clicked!", obj
 		gtk.main_quit()
 
+	def on_mainwin_delete_event(self, obj, data):
+		gtk.main_quit()
+
 w = MainWin()
 gtk.main()
 

==== //depot/projects/soc2007/ivoras_finstall/installer/glade/mainwin.glade#2 (text+ko) ====

@@ -6,9 +6,11 @@
     <property name="visible">True</property>
     <property name="border_width">1</property>
     <property name="title" translatable="yes">FreeBSD Installer</property>
+    <property name="resizable">False</property>
     <property name="window_position">GTK_WIN_POS_CENTER</property>
     <property name="default_width">750</property>
     <property name="default_height">450</property>
+    <signal name="delete_event" handler="on_mainwin_delete_event"/>
     <child>
       <widget class="GtkHBox" id="hbox1">
         <property name="visible">True</property>
@@ -29,12 +31,118 @@
             <property name="visible">True</property>
             <child>
               <widget class="GtkVBox" id="vbox_container">
+                <property name="width_request">530</property>
                 <property name="visible">True</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="border_width">3</property>
                 <child>
-                  <placeholder/>
+                  <widget class="GtkVBox" id="vbox2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkLabel" id="label1">
+                        <property name="height_request">50</property>
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;span size="xx-large"&gt;&lt;b&gt;Welcome to the FreeBSD installer&lt;/b&gt;&lt;/span&gt;</property>
+                        <property name="use_markup">True</property>
+                        <property name="single_line_mode">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label2">
+                        <property name="width_request">520</property>
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0</property>
+                        <property name="label" translatable="yes">This installer application will guide you through FreeBSD's install  and setup process. FreeBSD is a popular open source operating system, the result of volundeer work of hundreds of individuals...
+</property>
+                        <property name="use_markup">True</property>
+                        <property name="wrap">True</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="padding">4</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Choose installation type:</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkVBox" id="vbox3">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <child>
+                          <widget class="GtkRadioButton" id="radiobutton1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="border_width">6</property>
+                            <property name="label" translatable="yes">Novice</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkRadioButton" id="radiobutton2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="border_width">6</property>
+                            <property name="label" translatable="yes">Standard</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radiobutton1</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkRadioButton" id="radiobutton3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="border_width">6</property>
+                            <property name="label" translatable="yes">Expert</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">radiobutton1</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                  </widget>
                 </child>
               </widget>
+              <packing>
+                <property name="padding">3</property>
+              </packing>
             </child>
             <child>
               <widget class="GtkHSeparator" id="hseparator1">


More information about the p4-projects mailing list