Changeset 3938
- Timestamp:
- Mar 14, 2017, 1:58:33 PM (4 years ago)
- Location:
- lliurex-remote-installer/trunk/fuentes/lliurex-remote-installer-gui.install/usr/share/lliurex-remote-installer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-remote-installer/trunk/fuentes/lliurex-remote-installer-gui.install/usr/share/lliurex-remote-installer/AptBox.py
r3853 r3938 55 55 self.package_list_entry=builder.get_object("package_list_entry") 56 56 57 57 58 self.stack=Gtk.Stack() 58 59 self.stack.set_transition_type(Gtk.StackTransitionType.CROSSFADE) … … 76 77 self.thread_ret=None 77 78 79 80 78 81 #def __init__ 79 82 80 83 81 84 def set_css_info(self): 82 85 -
lliurex-remote-installer/trunk/fuentes/lliurex-remote-installer-gui.install/usr/share/lliurex-remote-installer/LliurexRemoteInstaller.py
r3918 r3938 47 47 self.exes_button=builder.get_object("exes_button") 48 48 49 50 #PANTALLA LOGIN 51 self.login_da_box=builder.get_object("login_da_box") 52 self.login_da=builder.get_object("login_drawingarea") 53 #self.login_da.connect("draw",self.draw_login) 54 55 self.login_overlay=Gtk.Overlay() 56 self.login_overlay.add(self.login_da_box) 57 58 self.login_box=builder.get_object("login_box") 59 self.login_button=builder.get_object("login_button") 60 self.user_entry=builder.get_object("user_entry") 61 self.password_entry=builder.get_object("password_entry") 62 self.login_eb_box=builder.get_object("login_eb_box") 63 self.login_msg_label=builder.get_object("login_msg_label") 64 self.server_ip_entry=builder.get_object("server_ip_entry") 65 66 67 self.login_overlay.add_overlay(self.login_box) 68 self.login_overlay.show_all() 69 70 #FIN LOGIN 71 72 73 self.separator1=builder.get_object("separator1") 74 self.separator3=builder.get_object("separator3") 75 self.main_button_box=builder.get_object("box1") 76 77 78 79 49 80 self.stack=Gtk.Stack() 50 81 self.stack.set_transition_type(Gtk.StackTransitionType.SLIDE_DOWN) 51 82 self.stack.set_transition_duration(500) 52 83 self.main_box.pack_start(self.stack,True,True,5) 53 54 84 55 85 # Add components … … 62 92 self.stack.add_titled(self.exec_box,"exes","Executables") 63 93 64 65 94 self.stack.add_titled(self.login_overlay,"login","Login") 95 66 96 self.set_css_info() 67 97 self.connect_signals() … … 69 99 70 100 self.main_window.show_all() 101 self.show_main_controls(False) 102 71 103 72 104 #def load_gui 105 106 107 def show_main_controls(self,status): 108 109 if status: 110 self.separator1.show() 111 self.separator3.show() 112 self.main_button_box.show() 113 else: 114 self.separator1.hide() 115 self.separator3.hide() 116 self.main_button_box.hide() 117 118 #def show_main_controls 119 120 73 121 74 122 def load_values(self): … … 105 153 self.debs_button.set_name("OPTION_BUTTON") 106 154 self.exes_button.set_name("OPTION_BUTTON") 155 self.login_msg_label.set_name("ERROR_LABEL") 107 156 108 157 #def set-css_info … … 116 165 self.main_window.connect("delete_event",self.check_changes) 117 166 167 self.user_entry.connect("activate",self.entries_press_event) 168 self.password_entry.connect("activate",self.entries_press_event) 169 self.server_ip_entry.connect("activate",self.entries_press_event) 170 self.login_button.connect("clicked",self.validate_user) 171 118 172 #def connect_signals 173 174 def entries_press_event(self,widget): 175 176 self.validate_user(None) 177 178 #def entries_press_event 179 180 def validate_user(self,widget): 181 182 ret=self.core.n4d.validate_user(self.user_entry.get_text(),self.password_entry.get_text()) 183 184 if not ret[0]: 185 self.login_msg_label.set_text("%s"%ret[1]) 186 return False 187 188 self.stack.set_visible_child_name("apt") 189 self.show_main_controls(True) 190 191 192 193 #def validate_user 119 194 120 195 def check_changes(self,widget,event): … … 153 228 COMMENT='\n'.join(COMMENT) 154 229 dialog=Dialog.InfoDialog(self.main_window,"LliureX Remote Installer Summary","You are published this list to install:\n\n%s"%(COMMENT)) 155 response=dialog.run()156 dialog.destroy()230 #response=dialog.run() 231 #dialog.destroy() 157 232 158 233 -
lliurex-remote-installer/trunk/fuentes/lliurex-remote-installer-gui.install/usr/share/lliurex-remote-installer/N4dManager.py
r3851 r3938 160 160 161 161 162 def mi_funcion(self,param): 162 def validate_user(self,username,password): 163 164 try: 165 ret=self.client.validate_user(username,password) 166 if ret[0]: 167 if "adm" in ret[1] or "admins" in ret[1]: 168 return [True,""] 169 else: 170 return [False,"User is not allowed to use this application"] 171 172 return ret 173 174 except Exception as e: 175 print e 176 return [False,str(e)] 163 177 164 178 165 166 self.client(user,"ASdasdas",param) 167 168 169 170 171 172 #def mi_funcion 173 179 #def validate_user 180 174 181 175 182 #class n4dmanager -
lliurex-remote-installer/trunk/fuentes/lliurex-remote-installer-gui.install/usr/share/lliurex-remote-installer/lliurex-remote-installer.css
r3705 r3938 7 7 font: Roboto Light; 8 8 9 } 10 11 #ERROR_LABEL { 12 font: Roboto Light; 13 color: rgba(250,10,10,0.8); 9 14 } 10 15 -
lliurex-remote-installer/trunk/fuentes/lliurex-remote-installer-gui.install/usr/share/lliurex-remote-installer/lliurex-remote-installer.ui
r3930 r3938 405 405 <property name="column_homogeneous">True</property> 406 406 <child> 407 <object class="GtkImage" id="image4">408 <property name="visible">True</property>409 <property name="can_focus">False</property>410 <property name="margin_bottom">20</property>411 <property name="pixbuf">mirror-logo.svg</property>412 </object>413 <packing>414 <property name="left_attach">0</property>415 <property name="top_attach">0</property>416 </packing>417 </child>418 <child>419 407 <object class="GtkEntry" id="user_entry"> 408 <property name="width_request">400</property> 420 409 <property name="visible">True</property> 421 410 <property name="can_focus">True</property> … … 429 418 <packing> 430 419 <property name="left_attach">0</property> 431 <property name="top_attach"> 1</property>420 <property name="top_attach">0</property> 432 421 </packing> 433 422 </child> 434 423 <child> 435 424 <object class="GtkEntry" id="password_entry"> 425 <property name="width_request">400</property> 436 426 <property name="visible">True</property> 437 427 <property name="can_focus">True</property> … … 447 437 <packing> 448 438 <property name="left_attach">0</property> 449 <property name="top_attach">2</property> 450 </packing> 451 </child> 452 <child> 453 <object class="GtkBox" id="login_eb_box"> 454 <property name="height_request">50</property> 455 <property name="visible">True</property> 456 <property name="can_focus">False</property> 457 <property name="orientation">vertical</property> 458 <child> 459 <object class="GtkEventBox" id="login_eventbox"> 460 <property name="visible">True</property> 461 <property name="can_focus">False</property> 462 <child> 463 <object class="GtkLabel" id="login_label"> 464 <property name="visible">True</property> 465 <property name="can_focus">False</property> 466 <property name="margin_top">10</property> 467 <property name="margin_bottom">10</property> 468 <property name="label" translatable="yes">Login</property> 469 </object> 470 </child> 471 </object> 472 <packing> 473 <property name="expand">False</property> 474 <property name="fill">True</property> 475 <property name="position">0</property> 476 </packing> 477 </child> 478 <child> 479 <placeholder/> 480 </child> 481 </object> 482 <packing> 483 <property name="left_attach">0</property> 484 <property name="top_attach">4</property> 439 <property name="top_attach">1</property> 485 440 </packing> 486 441 </child> 487 442 <child> 488 443 <object class="GtkEntry" id="server_ip_entry"> 444 <property name="width_request">400</property> 489 445 <property name="visible">True</property> 490 446 <property name="can_focus">True</property> … … 498 454 <packing> 499 455 <property name="left_attach">0</property> 456 <property name="top_attach">2</property> 457 </packing> 458 </child> 459 <child> 460 <object class="GtkButton" id="login_button"> 461 <property name="label" translatable="yes">Login</property> 462 <property name="width_request">400</property> 463 <property name="visible">True</property> 464 <property name="can_focus">True</property> 465 <property name="receives_default">True</property> 466 <property name="halign">center</property> 467 </object> 468 <packing> 469 <property name="left_attach">0</property> 500 470 <property name="top_attach">3</property> 501 471 </packing> … … 508 478 <packing> 509 479 <property name="left_attach">0</property> 510 <property name="top_attach"> 5</property>480 <property name="top_attach">4</property> 511 481 </packing> 512 482 </child> … … 516 486 <property name="fill">False</property> 517 487 <property name="position">0</property> 518 </packing>519 </child>520 <child>521 <object class="GtkBox" id="box19">522 <property name="visible">True</property>523 <property name="can_focus">False</property>524 <child>525 <object class="GtkButton" id="button1">526 <property name="label">gtk-ok</property>527 <property name="visible">True</property>528 <property name="can_focus">True</property>529 <property name="receives_default">True</property>530 <property name="use_stock">True</property>531 </object>532 <packing>533 <property name="expand">False</property>534 <property name="fill">True</property>535 <property name="pack_type">end</property>536 <property name="position">0</property>537 </packing>538 </child>539 </object>540 <packing>541 <property name="expand">False</property>542 <property name="fill">True</property>543 <property name="position">1</property>544 488 </packing> 545 489 </child>
Note: See TracChangeset
for help on using the changeset viewer.