Browse Source

vbRun,vbLog: VBox -> Grid (Gtk.VBox is deprecated)

Enrico Tassi 7 years ago
parent
commit
3173369d36
2 changed files with 43 additions and 21 deletions
  1. 39
    16
      smd-applet.ui
  2. 4
    5
      smd-applet.vala

+ 39
- 16
smd-applet.ui View File

@@ -1088,9 +1088,28 @@ Public License instead of this License.  But first, please read
1088 1088
                             <property name="can_focus">False</property>
1089 1089
                             <property name="left_padding">12</property>
1090 1090
                             <child>
1091
-                              <object class="GtkVBox" id="vbRun">
1091
+                              <object class="GtkGrid" id="vbRun">
1092 1092
                                 <property name="visible">True</property>
1093 1093
                                 <property name="can_focus">False</property>
1094
+                                <property name="orientation">vertical</property>
1095
+                                <child>
1096
+                                  <placeholder/>
1097
+                                </child>
1098
+                                <child>
1099
+                                  <placeholder/>
1100
+                                </child>
1101
+                                <child>
1102
+                                  <placeholder/>
1103
+                                </child>
1104
+                                <child>
1105
+                                  <placeholder/>
1106
+                                </child>
1107
+                                <child>
1108
+                                  <placeholder/>
1109
+                                </child>
1110
+                                <child>
1111
+                                  <placeholder/>
1112
+                                </child>
1094 1113
                                 <child>
1095 1114
                                   <placeholder/>
1096 1115
                                 </child>
@@ -1178,18 +1197,17 @@ Public License instead of this License.  But first, please read
1178 1197
     <property name="window_position">center</property>
1179 1198
     <property name="icon_name">emblem-documents</property>
1180 1199
     <child>
1181
-      <object class="GtkVBox" id="vbLog">
1200
+      <object class="GtkGrid" id="vbLog">
1182 1201
         <property name="visible">True</property>
1183 1202
         <property name="can_focus">False</property>
1184
-        <property name="border_width">4</property>
1185
-        <property name="spacing">12</property>
1186
-        <child>
1187
-          <placeholder/>
1188
-        </child>
1203
+        <property name="orientation">vertical</property>
1204
+        <property name="row_spacing">14</property>
1189 1205
         <child>
1190 1206
           <object class="GtkScrolledWindow" id="scrolledwindow2">
1191 1207
             <property name="visible">True</property>
1192 1208
             <property name="can_focus">True</property>
1209
+            <property name="hexpand">True</property>
1210
+            <property name="vexpand">True</property>
1193 1211
             <property name="shadow_type">etched-in</property>
1194 1212
             <child>
1195 1213
               <object class="GtkTextView" id="tvLog">
@@ -1202,14 +1220,12 @@ Public License instead of this License.  But first, please read
1202 1220
             </child>
1203 1221
           </object>
1204 1222
           <packing>
1205
-            <property name="expand">True</property>
1206
-            <property name="fill">True</property>
1207
-            <property name="position">1</property>
1223
+            <property name="left_attach">0</property>
1224
+            <property name="top_attach">1</property>
1225
+            <property name="width">1</property>
1226
+            <property name="height">1</property>
1208 1227
           </packing>
1209 1228
         </child>
1210
-        <child>
1211
-          <placeholder/>
1212
-        </child>
1213 1229
         <child>
1214 1230
           <object class="GtkHButtonBox" id="hbuttonbox5">
1215 1231
             <property name="visible">True</property>
@@ -1233,11 +1249,18 @@ Public License instead of this License.  But first, please read
1233 1249
             </child>
1234 1250
           </object>
1235 1251
           <packing>
1236
-            <property name="expand">False</property>
1237
-            <property name="fill">True</property>
1238
-            <property name="position">3</property>
1252
+            <property name="left_attach">0</property>
1253
+            <property name="top_attach">3</property>
1254
+            <property name="width">1</property>
1255
+            <property name="height">1</property>
1239 1256
           </packing>
1240 1257
         </child>
1258
+        <child>
1259
+          <placeholder/>
1260
+        </child>
1261
+        <child>
1262
+          <placeholder/>
1263
+        </child>
1241 1264
       </object>
1242 1265
     </child>
1243 1266
   </object>

+ 4
- 5
smd-applet.vala View File

@@ -211,11 +211,10 @@ class smdApplet {
211 211
 		about_win = builder.get_object("wAbout") as Gtk.AboutDialog;
212 212
 		about_win.set_copyright("Copyright " + SMDConf.COPYRIGHT);
213 213
 		log_win = builder.get_object("wLog") as Gtk.Window;
214
-		var logs_vb = builder.get_object("vbLog") as Gtk.VBox;
214
+		var logs_vb = builder.get_object("vbLog") as Gtk.Grid;
215 215
 		cblogs = new Gtk.ComboBoxText();
216 216
 		lognames = new Gee.ArrayList<string>();
217
-		logs_vb.pack_start(cblogs,false,true,0);
218
-		logs_vb.reorder_child(cblogs,0);
217
+		logs_vb.attach(cblogs,0,0,1,1);
219 218
 		cblogs.show();
220 219
 		cblogs.changed.connect((cb) => {
221 220
 			int selected = cblogs.get_active();
@@ -655,7 +654,7 @@ class smdApplet {
655 654
 			l_ctx.set_text(e.context);
656 655
 			l_cause.set_text(e.cause);
657 656
 			command_hash.remove_all();
658
-			var vb = builder.get_object("vbRun") as Gtk.VBox;
657
+			var vb = builder.get_object("vbRun") as Gtk.Grid;
659 658
 			foreach(Gtk.Widget w in vb.get_children()){ vb.remove(w); } 
660 659
 			
661 660
 			if (e.permissions != null) {
@@ -730,7 +729,7 @@ class smdApplet {
730 729
 					});
731 730
 					hb.attach(lbl,1,0,1,1);
732 731
 					hb.attach(but,0,0,1,1);
733
-					vb.pack_end(hb,true,true,0);
732
+					vb.add(hb);
734 733
 					hb.show_all();
735 734
 				}
736 735
 			}

Loading…
Cancel
Save