Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def setUp(self):
support.root_deiconify()
xmldata = 'test_menu.ui'
self.builder = builder = pygubu.Builder()
filepath = os.path.dirname(os.path.realpath(__file__))
builder.add_resource_path(filepath)
builder.add_from_file(xmldata)
self.widget = builder.get_object('mainmenu')
ridge
-- A Label --
label_var
20
right
0
True
0
"""
self.builder = builder = pygubu.Builder()
builder.add_from_string(xmldata)
self.widget = builder.get_object('label')
def __init__(self):
self.builder = pygubu.Builder()
self.builder.add_from_file("editor.ui")
self.mainwindow = self.builder.get_object("mainwindow")
self.builder.connect_callbacks(self)
self.mainwindow.protocol("WM_DELETE_WINDOW", self.on_close_window)
def create_toplevel(self, widget_id, xmlnode):
# Create preview
builder = pygubu.Builder()
builder.add_from_xmlnode(xmlnode)
top = tk.Toplevel(self.canvas)
top.columnconfigure(0, weight=1)
top.rowconfigure(0, weight=1)
menu = builder.get_object(widget_id, top)
top['menu'] = menu
return top
def _create_ui(self):
#1: Create a builder
self.builder = builder = pygubu.Builder()
#2: Load an ui file
builder.add_from_file('menu.ui')
#3: Create the widget using self.master as parent
self.mainwindow = builder.get_object('mainwindow', self.master)
# Set main menu
self.mainmenu = menu = builder.get_object('mainmenu', self.master)
self.set_menu(menu)
# Configure callbacks
builder.connect_callbacks(self)
def _init_var(self):
self.builder = pygubu.Builder()
self.config = self.util.load_config(self.g.FILES['config'])
self.users_sat = {}
self.mail_servers = {}
self.users_xml = {}
self.users_pdf = {}
self.users_report = {}
#~ self.reports = {}
return
def __init__(self, master):
self.builder = builder = pygubu.Builder()
fpath = find_data_file("button_cb.ui")
builder.add_from_file(fpath)
mainwindow = builder.get_object('mainwindow', master)
builder.connect_callbacks(self)
callbacks = {
'on_button2_clicked': self.on_button2_clicked
}
builder.connect_callbacks(callbacks)
def __init__(self, master):
self.builder = builder = pygubu.Builder()
fpath = os.path.join(os.path.dirname(__file__),"button_cb.ui")
builder.add_from_file(fpath)
mainwindow = builder.get_object('mainwindow', master)
builder.connect_callbacks(self)
callbacks = {
'on_button2_clicked': self.on_button2_clicked
}
builder.connect_callbacks(callbacks)
def navigate(self, next_view_ui):
self.builder = Builder()
self.builder.add_from_string(next_view_ui)
self.mainwindow = self.builder.get_object('Frame_0', self.root)
self.builder.connect_callbacks(self)
def __init__(self, master):
self.builder = builder = pygubu.Builder()
fpath = os.path.join(CDIR,"button_cb.ui")
builder.add_from_file(fpath)
mainwindow = builder.get_object('mainwindow', master)
builder.connect_callbacks(self)
callbacks = {
'on_button2_clicked': self.on_button2_clicked
}
builder.connect_callbacks(callbacks)