示例#1
0
    def __init__(self, icon):

        Window.__init__(self, WINDOW_TOPLEVEL)
        self.set_property("skip-taskbar-hint", True)
        self.set_property("destroy-with-parent", True)
        self.set_modal(True)
        self.set_position(WIN_POS_CENTER)

        self.vbox = VBox(False, 0)
        
        self.terminal = terminal()
        self.terminal.connect("child-exited",
                              lambda _: self.close_button.show())
        self.terminal.show()
        
        self.close_button = Button(stock=STOCK_CLOSE)
        self.close_button.connect("clicked", lambda _: self.destroy())

        self.vbox.pack_start(self.terminal, False, False, 0)
        self.vbox.pack_start(self.close_button, False, False, 0)
        self.vbox.show()

        self.add(self.vbox)

        self.set_icon(pixbuf_new_from_file(icon))
示例#2
0
 def __init__(self, name='MenuVBoxWindow'):
     Window.__init__(self)
     self.set_name(name)
     self.vbox = VBox()
     self.add(self.vbox)
     self.menubar = SimpleMenuBar()
     self.vbox.pack_start(self.menubar, FALSE, FALSE, 0)
     self.vbox.show()
     self.show()
示例#3
0
 def __init__(self, name='MenuVBoxWindow'):
     Window.__init__(self)
     self.set_name(name)
     self.vbox = VBox()
     self.add(self.vbox)
     self.menubar = SimpleMenuBar()
     self.vbox.pack_start(self.menubar, False, False, 0)
     self.vbox.show()
     self.show()
示例#4
0
 def __init__(self, cbox=None, name='CommandWindow'):
     Window.__init__(self)
     self.set_name(name)
     self.vbox = cbox
     if cbox is None:
         self.vbox = CommandBox()
     self.add(self.vbox)
     self.tbar = self.vbox.tbar
     self.menubar = self.vbox.menubar
     self.show()
示例#5
0
 def __init__(self, cbox=None, name='CommandWindow'):
     Window.__init__(self)
     self.set_name(name)
     self.vbox = cbox
     if cbox is None:
         self.vbox = CommandBox()
     self.add(self.vbox)
     self.tbar = self.vbox.tbar
     self.menubar = self.vbox.menubar
     self.show()
示例#6
0
    def __init__(self, to_upgrade, icon):

        Window.__init__(self, WINDOW_TOPLEVEL)
        self.set_property("skip-taskbar-hint", True)
        self.set_property("modal", True)
        self.set_property("destroy-with-parent", True)
        self.set_position(WIN_POS_CENTER)
        self.set_default_size (300, 300)

        self.set_icon(pixbuf_new_from_file(icon))
        self._setup_tree(to_upgrade)
        self._setup_layout()
示例#7
0
    def __init__(self):
        Window.__init__(self)
        self.vbox = VBox()
        self.button_box = HBox()
        self.listbox = TwinCList()

        self.vbox.add(self.listbox)
        self.add(self.vbox)
        self.vbox.show()
        self.show()
        self.set_size_request(300, 200)
        self.listbox.set_position(140)
示例#8
0
    def __init__(self):
        Window.__init__(self)
        self.vbox = VBox()
        self.button_box = HBox()
        self.listbox = TwinCList()

        self.vbox.add(self.listbox)
        self.add(self.vbox)
        self.vbox.show()
        self.show()
        self.set_size_request(300, 200)
        self.listbox.set_position(140)
示例#9
0
    def __init__(self, queues, icon):

        Window.__init__(self, WINDOW_TOPLEVEL)
        self.set_property("skip-taskbar-hint", True)
        self.set_property("destroy-with-parent", True)
        self.set_modal(True)
        self.connect("delete-event", self._stop_closing)
        self.set_position(WIN_POS_CENTER)

        self.set_icon(pixbuf_new_from_file(icon))
        self._setup_trees(queues)
        self._setup_layout()

        self.queues = queues
示例#10
0
 def __init__(self, mensaje="Completado", titulo="Progreso", progreso=0):
     m = unicode(mensaje, 'latin-1')
     t = unicode(titulo, 'latin-1')
     Window.__init__(self)
     self.set_title(t.encode('utf-8'))
     self.vbox = gtk.VBox()
     self.add(self.vbox)
     hbox = gtk.HBox(False, 8)
     hbox.set_border_width(8)
     self.vbox.pack_start(hbox, False, False, 0)
     stock = gtk.image_new_from_stock(gtk.STOCK_DIALOG_QUESTION,
                                      gtk.ICON_SIZE_DIALOG)
     hbox.pack_start(stock, False, False, 0)
     self.barra = gtk.ProgressBar()
     self.barra.set_text(m.encode('utf-8'))
     self.barra.set_fraction(progreso)
     hbox.pack_start(self.barra, True, True, 0)
     self.show_all()
     self.show()
示例#11
0
 def __init__(self, mensaje = "Completado", titulo = "Progreso", progreso = 0):
     m = unicode(mensaje, 'latin-1')
     t = unicode(titulo, 'latin-1')
     Window.__init__(self)
     self.set_title(t.encode('utf-8'))
     self.vbox = gtk.VBox()
     self.add(self.vbox)
     hbox = gtk.HBox(False, 8)
     hbox.set_border_width(8)
     self.vbox.pack_start(hbox, False, False, 0)
     stock = gtk.image_new_from_stock(
                                     gtk.STOCK_DIALOG_QUESTION,
                                     gtk.ICON_SIZE_DIALOG)
     hbox.pack_start(stock, False, False, 0)
     self.barra = gtk.ProgressBar()
     self.barra.set_text(m.encode('utf-8'))
     self.barra.set_fraction(progreso)
     hbox.pack_start(self.barra, True, True, 0)
     self.show_all()
     self.show()
示例#12
0
	def __init__ (self, title):
		Window.__init__(self)
		self.set_title(title)
		self.set_border_width(5)
		self.set_app_paintable(True)

		calendar = Calendar()
		testItem1 = SimpleItem('Hello')
		testItem2 = SimpleItem('This is Cool', '#b81919', '8f1b1b')

		toolBox = VBox(False, 5)
		toolBox.pack_start(testItem1, False, False, 0)
		toolBox.pack_start(testItem2, False, False, 0)

		mainBox = HBox(False, 5)
		mainBox.pack_start(toolBox, False, False, 0)
		mainBox.pack_start(calendar, False, False, 0)

		self.add(mainBox)
		self.maximize()

		self.connect('expose-event', self.expose, None)
		self.connect('destroy', main_quit)
示例#13
0
    def __init__(self):
        Window.__init__(self)

        self.aboutDialog = None
        self.mainVBox = MainVBox()

        self.set_title('Grafer')
        self.set_border_width(2)
        self.add(self.mainVBox)

        self.connect('destroy', Callbacks.mainWindow_destroy, None)
        self.mainVBox.mainMenu.menuAbout.connect('activate',
                                                 Callbacks.menuAbout_activate,
                                                 self)
        self.mainVBox.mainMenu.menuNew.connect('activate',
                                               Callbacks.menuNew_activate,
                                               self)
        self.mainVBox.mainMenu.menuClose.connect('activate',
                                                 Callbacks.menuClose_activate,
                                                 self)

        self.maximize()
        self.show_all()
示例#14
0
    def __init__(self):
        Window.__init__(self)

        self.model = ListStore(str, str)

        self.aboutWindow = None
        self.helper = Helper(None)

        self.set_title('Gnome Custom Shortcuts')
        self.set_icon_from_file(join(data_path, 'icon.svg'))
        self.set_border_width(5)
        self.set_size_request(400, 400)

        list = TreeView()
        list.append_column(TreeViewColumn(''))
        list.append_column(TreeViewColumn('Command'))
        list.append_column(TreeViewColumn('Shortcut'))

        closeButton = Button(None, STOCK_CLOSE)
        aboutButton = Button(None, STOCK_ABOUT)

        buttonsBox = HButtonBox()
        buttonsBox.pack_start(aboutButton, False, False, 0)
        buttonsBox.pack_start(Label(''), True, True, 0)
        buttonsBox.pack_start(closeButton, False, False, 0)

        box = VBox(False, 5)
        box.pack_start(list, True, True, 0)
        box.pack_start(buttonsBox, False, False, 0)

        self.connect('destroy', main_quit, None)
        closeButton.connect('clicked', main_quit, None)
        aboutButton.connect('clicked', self.show_about, None)

        self.add(box)
        self.show_all()
示例#15
0
 def __init__(self,node=None,value=None):
     Window.__init__(self)
     MDSplusWidget.__init__(self)
     if node is not None:
         self.node=node
     else:
         self.value=value
     hbtop=HBox(homogeneous=False)
     self.on=CheckButton(label="On")
     self.parent_on=CheckButton(label="Parent")
     self.parent_on.set_sensitive(False)
     self.path=MDSplusPathWidget()
     if node is not None:
         self.path._node=self._node
     hbtags=HBox(homogeneous=False)
     self.tags=Entry()
     self.tags.set_width_chars(60)
     expression_menu=self.dtype_menu(tuple(),varname='dtype_expression',no_show=True)
     axis_menu=self.dtype_menu(('Range',),varname='dtype_axis',no_show=True)
     window_menu=self.dtype_menu(('Window',),varname='dtype_window',no_show=True)
     dispatch_menu=self.dtype_menu(('Dispatch',),varname='dtype_dispatch',no_show=True)
     action_menu=self.dtype_menu(('Action',),varname='dtype_action',no_show=True)
     task_menu=self.dtype_menu(('Method','Routine'),varname='dtype_task',no_show=True)
     any_menu=self.dtype_menu(('Range','Window','Dispatch','Action','Method','Routine'),varname='dtype_any',no_show=True)
     menus=(self.dtype_expression,self.dtype_axis,self.dtype_dispatch,self.dtype_action,self.dtype_task,self.dtype_window,self.dtype_any)
     hbtop.pack_start(self.on,False,False,10)
     hbtop.pack_start(self.parent_on,False,False,10)
     hbtop.pack_start(self.path,False,False,0)
     hbtags.pack_start(Label("Tags:"),False,False,10)
     hbtags.pack_start(self.tags,False,False,0)
     self.action=MDSplusActionWidget()
     self.windoww=MDSplusWindowWidget()
     self.sequential=MDSplusSequentialWidget()
     self.expression=MDSplusExpressionWidget()
     self.method=MDSplusMethodWidget()
     self.routine=MDSplusRoutineWidget()
     self.dispatch=MDSplusDispatchWidget()
     self.range=MDSplusRangeWidget()
     self.widgets=(self.action,self.sequential,self.expression,self.method,self.routine,self.dispatch,self.range,self.windoww)
     self.ok=Button(stock=STOCK_OK)
     self.cancel=Button(stock=STOCK_CANCEL)
     self.redo=Button(stock=STOCK_REDO)
     self.ok.connect("clicked",self.do_ok)
     self.cancel.connect("clicked",self.do_cancel)
     self.redo.connect("clicked",self.do_redo)
     hb2=HBox()
     hb2.add(self.ok)
     hb2.add(self.redo)
     hb2.add(self.cancel)
     vb=VBox(homogeneous=False)
     vb.set_border_width(10)
     vb.pack_start(hbtop,False,False,0)
     vb.pack_start(hbtags,False,False,0)
     vb.pack_start(expression_menu,False,False,0)
     vb.pack_start(axis_menu,False,False,0)
     vb.pack_start(window_menu,False,False,0)
     vb.pack_start(dispatch_menu,False,False,0)
     vb.pack_start(action_menu,False,False,0)
     vb.pack_start(task_menu,False,False,0)
     vb.pack_start(any_menu,False,False,0)
     for w in self.widgets:
         w.set_no_show_all(True)
         vb.pack_start(w,False,False,0)
     vb.pack_start(hb2,False,False,20)
     self.add(vb)
     self.do_redo(self.redo)
     self.putOnApply = True
     self.nidOffset = -1
示例#16
0
 def __init__(self):
     Window.__init__(self)
     self.pool = DownloadPoolBox(3)
     self.add(self.pool)
     self.show()
示例#17
0
 def __init__(self, node=None, value=None):
     Window.__init__(self)
     MDSplusWidget.__init__(self)
     if node is not None:
         self.node = node
     else:
         self.value = value
     hbtop = HBox(homogeneous=False)
     self.on = CheckButton(label="On")
     self.parent_on = CheckButton(label="Parent")
     self.parent_on.set_sensitive(False)
     self.path = MDSplusPathWidget()
     if node is not None:
         self.path._node = self._node
     hbtags = HBox(homogeneous=False)
     self.tags = Entry()
     self.tags.set_width_chars(60)
     expression_menu = self.dtype_menu(tuple(), varname="dtype_expression", no_show=True)
     axis_menu = self.dtype_menu(("Range",), varname="dtype_axis", no_show=True)
     window_menu = self.dtype_menu(("Window",), varname="dtype_window", no_show=True)
     dispatch_menu = self.dtype_menu(("Dispatch",), varname="dtype_dispatch", no_show=True)
     action_menu = self.dtype_menu(("Action",), varname="dtype_action", no_show=True)
     task_menu = self.dtype_menu(("Method", "Routine"), varname="dtype_task", no_show=True)
     any_menu = self.dtype_menu(
         ("Range", "Window", "Dispatch", "Action", "Method", "Routine"), varname="dtype_any", no_show=True
     )
     menus = (
         self.dtype_expression,
         self.dtype_axis,
         self.dtype_dispatch,
         self.dtype_action,
         self.dtype_task,
         self.dtype_window,
         self.dtype_any,
     )
     hbtop.pack_start(self.on, False, False, 10)
     hbtop.pack_start(self.parent_on, False, False, 10)
     hbtop.pack_start(self.path, False, False, 0)
     hbtags.pack_start(Label("Tags:"), False, False, 10)
     hbtags.pack_start(self.tags, False, False, 0)
     self.action = MDSplusActionWidget()
     self.windoww = MDSplusWindowWidget()
     self.sequential = MDSplusSequentialWidget()
     self.expression = MDSplusExpressionWidget()
     self.method = MDSplusMethodWidget()
     self.routine = MDSplusRoutineWidget()
     self.dispatch = MDSplusDispatchWidget()
     self.range = MDSplusRangeWidget()
     self.widgets = (
         self.action,
         self.sequential,
         self.expression,
         self.method,
         self.routine,
         self.dispatch,
         self.range,
         self.windoww,
     )
     self.ok = Button(stock=STOCK_OK)
     self.cancel = Button(stock=STOCK_CANCEL)
     self.redo = Button(stock=STOCK_REDO)
     self.ok.connect("clicked", self.do_ok)
     self.cancel.connect("clicked", self.do_cancel)
     self.redo.connect("clicked", self.do_redo)
     hb2 = HBox()
     hb2.add(self.ok)
     hb2.add(self.redo)
     hb2.add(self.cancel)
     vb = VBox(homogeneous=False)
     vb.set_border_width(10)
     vb.pack_start(hbtop, False, False, 0)
     vb.pack_start(hbtags, False, False, 0)
     vb.pack_start(expression_menu, False, False, 0)
     vb.pack_start(axis_menu, False, False, 0)
     vb.pack_start(window_menu, False, False, 0)
     vb.pack_start(dispatch_menu, False, False, 0)
     vb.pack_start(action_menu, False, False, 0)
     vb.pack_start(task_menu, False, False, 0)
     vb.pack_start(any_menu, False, False, 0)
     for w in self.widgets:
         w.set_no_show_all(True)
         vb.pack_start(w, False, False, 0)
     vb.pack_start(hb2, False, False, 20)
     self.add(vb)
     self.do_redo(self.redo)
     self.putOnApply = True
     self.nidOffset = -1
示例#18
0
 def __init__(self):
     Window.__init__(self)
     self.pool = DownloadPoolBox(3)
     self.add(self.pool)
     self.show()