Changeset 6742 for taskscheduler/trunk/fuentes/scheduler-gui.install/usr/share/taskscheduler/bin/DetailBox.py
- Timestamp:
- Jan 30, 2018, 2:00:03 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
taskscheduler/trunk/fuentes/scheduler-gui.install/usr/share/taskscheduler/bin/DetailBox.py
r6718 r6742 111 111 jump=0 112 112 time_units=0 113 months={} 113 114 if date_type=='hour': 114 115 time_units=24 … … 123 124 inc=1 124 125 time_units=12 126 months={1:'January',2:'February',3:'March',4:'April',5:'May',6:'June',7:'July',8:'August',9:'September',10:'October',11:'November',12:'December'} 125 127 elif date_type=='day': 126 128 widget=self.cmb_days … … 134 136 widget.append_text(str(i+inc)) 135 137 else: 136 widget.append_text(str(i+inc)) 138 if months: 139 widget.append_text(months[(i+inc)]) 140 else: 141 widget.append_text(str(i+inc)) 137 142 widget.set_active(0) 138 143 #def _load_date_time_data … … 166 171 self.hour_box.set_homogeneous(True) 167 172 self.cmb_hours=Gtk.ComboBoxText() 168 self.hour_box.add(Gtk.Label(_("Hour"))) 169 self.hour_box.add(self.cmb_hours) 173 # self.hour_box.add(Gtk.Label(_("Hour"))) 174 # self.hour_box.add(self.cmb_hours) 175 ####REM 176 spin_hour=Gtk.SpinButton() 177 spin_hour.set_range(0,23) 178 spin_hour.set_increments(1,1) 179 spin_hour.set_wrap(True) 180 spin_hour.set_orientation(Gtk.Orientation.VERTICAL) 181 spin_hour.set_valign(Gtk.Align.START) 182 spin_hour.set_halign(Gtk.Align.START) 183 spin_hour.set_vexpand(False) 184 spin_min=Gtk.SpinButton() 185 spin_min.set_range(0,59) 186 spin_min.set_increments(1,1) 187 spin_min.set_wrap(True) 188 spin_min.set_orientation(Gtk.Orientation.VERTICAL) 189 spin_min.set_valign(Gtk.Align.START) 190 spin_min.set_halign(Gtk.Align.START) 191 spin_min.set_vexpand(False) 192 self.hour_box.add(spin_hour) 193 self.hour_box.add(Gtk.Label(":")) 194 self.hour_box.add(spin_min) 195 ####REM 170 196 self.minute_box=Gtk.Box() 171 self.minute_box.set_homogeneous(True)197 # self.minute_box.set_homogeneous(True) 172 198 self.cmb_minutes=Gtk.ComboBoxText() 173 self.minute_box.add(Gtk.Label(_("Minutes")))174 self.minute_box.add(self.cmb_minutes)199 # self.minute_box.add(Gtk.Label(_("Minutes"))) 200 # self.minute_box.add(self.cmb_minutes) 175 201 176 202 self._load_interval_data() … … 221 247 gtkGrid.attach(label,1,1,1,1) 222 248 gtkGrid.attach_next_to(self.hour_box,label,Gtk.PositionType.BOTTOM,1,1) 223 gtkGrid.attach_next_to(self.minute_box,self.hour_box,Gtk.PositionType.BOTTOM,1,1)249 # gtkGrid.attach_next_to(self.minute_box,self.hour_box,Gtk.PositionType.BOTTOM,1,1) 224 250 gtkGrid.attach_next_to(self.month_box,self.minute_box,Gtk.PositionType.BOTTOM,1,1) 225 251 gtkGrid.attach_next_to(self.day_box,self.month_box,Gtk.PositionType.BOTTOM,1,1) … … 237 263 gtkGrid.attach(dow_frame,1,1,1,6) 238 264 gtkGrid.attach(label,2,1,1,1) 239 gtkGrid.attach_next_to(self.hour_box,label,Gtk.PositionType.BOTTOM,1,1) 240 gtkGrid.attach_next_to(self.minute_box,self.hour_box,Gtk.PositionType.RIGHT,1,1) 265 gtkGrid.attach_next_to(self.hour_box,label,Gtk.PositionType.BOTTOM,1,3) 266 # gtkGrid.attach_next_to(self.minute_box,self.hour_box,Gtk.PositionType.RIGHT,1,1) 267 gtkGrid.set_row_homogeneous(True) 241 268 242 269 if btn_apply: … … 244 271 self.btn_apply.set_valign(Gtk.Align.END) 245 272 gtkGrid.attach(self.btn_apply,4,7,2,1) 246 self. btn_mode=Gtk.CheckButton()247 self. btn_mode.set_margin_top(12)248 self. btn_mode.set_halign(Gtk.Align.START)249 self. btn_mode.set_valign(Gtk.Align.START)250 gtkGrid.attach(self. btn_mode,0,7,1,1)251 self. btn_mode.set_label("Advanced")252 self. btn_mode.set_active(self.expert_mode)273 self.chk_node=Gtk.CheckButton() 274 self.chk_node.set_margin_top(12) 275 self.chk_node.set_halign(Gtk.Align.START) 276 self.chk_node.set_valign(Gtk.Align.START) 277 gtkGrid.attach(self.chk_node,0,7,1,1) 278 self.chk_node.set_label("Advanced") 279 self.chk_node.set_active(self.expert_mode) 253 280 254 281 #Tab order chain … … 283 310 self.cmb_handler[self.cmb_minutes]=self.cmb_minutes.connect("changed",self._parse_scheduled) 284 311 gtkGrid.connect("event",self._parse_scheduled) 285 self. btn_mode.connect("toggled",self._enable_expert_mode,gtkGrid,btn_apply)312 self.chk_node.connect("toggled",self._enable_expert_mode,gtkGrid,btn_apply) 286 313 287 314 #Initial control status … … 292 319 293 320 def _enable_expert_mode(self,widget,gtkgrid,btn_apply): 294 self.expert_mode=self. btn_mode.get_active()321 self.expert_mode=self.chk_node.get_active() 295 322 for grid_widget in gtkgrid.get_children(): 296 323 gtkgrid.remove(grid_widget) … … 495 522 details["m"]=self.cmb_minutes.get_active_text() 496 523 if self.cmb_months.is_sensitive(): 497 if self.cmb_months.get_active _text().isdigit():498 details["mon"]=s elf.cmb_months.get_active_text()524 if self.cmb_months.get_active()>0: 525 details["mon"]=str(self.cmb_months.get_active()) 499 526 if self.cmb_days.is_sensitive(): 500 527 if self.cmb_days.get_active_text().isdigit():
Note: See TracChangeset
for help on using the changeset viewer.