Ejemplo n.º 1
0
 def set_present(self):
     self.cbx_loc = sh.CheckBox (parent = self.frm_prs
                                ,side = 'left'
                                )
     self.lbl_loc = sh.Label (parent = self.frm_prs
                             ,text = _('local collection')
                             ,side = 'left'
                             )
     self.cbx_ext = sh.CheckBox (parent = self.frm_prs
                                ,side = 'left'
                                )
     self.lbl_ext = sh.Label (parent = self.frm_prs
                             ,text = _('external collection')
                             ,side = 'left'
                             )
     self.cbx_mob = sh.CheckBox (parent = self.frm_prs
                                ,side = 'left'
                                )
     self.lbl_mob = sh.Label (parent = self.frm_prs
                             ,text = _('mobile collection')
                             ,side = 'left'
                             )
     ''' We can call 'cbx_loc.widget.config(state="disabled")'
         but this makes the checkbox indistinguishable.
     '''
     self.cbx_loc.reset(action=self.cbx_loc.toggle)
     self.cbx_ext.reset(action=self.cbx_ext.toggle)
     self.cbx_mob.reset(action=self.cbx_mob.toggle)
Ejemplo n.º 2
0
 def set_labels(self):
     self.lbl_lgn = sh.Label (parent = self.frm_lft
                             ,text = _('Login:'******'top'
                             ,fill = 'both'
                             ,expand = True
                             )
     self.lbl_pwd = sh.Label (parent = self.frm_lft
                             ,text = _('Password:'******'bottom'
                             ,fill = 'both'
                             ,expand = True
                             )
Ejemplo n.º 3
0
 def set_labels(self):
     if self.Extended:
         sh.Label (parent = self.frm_lft
                  ,text = _('Album ID:')
                  ,ipady = 2
                  )
     sh.Label (parent = self.frm_lft
              ,text = _('Track #:')
              ,ipady = 2
              )
     sh.Label (parent = self.frm_lft
              ,text = _('Title:')
              ,ipady = 2
              )
     sh.Label (parent = self.frm_lft
              ,text = _('Lyrics:')
              ,ipady = 2
              )
     sh.Label (parent = self.frm_lft
              ,text = _('Comment:')
              ,ipady = 2
              )
     sh.Label (parent = self.frm_lft
              ,text = _('Bitrate:')
              ,ipady = 2
              )
     sh.Label (parent = self.frm_lft
              ,text = _('Length:')
              ,ipady = 2
              )
     sh.Label (parent = self.frm_lft
              ,text = _('Rating:')
              ,ipady = 2
              )
Ejemplo n.º 4
0
 def set_meter(self):
     self.btn_prv = sh.Button (parent = self.frm
                              ,hint = _('Go to the preceding record')
                              ,inactive = self.prev_inactive
                              ,active = self.prev_active
                              ,text = '←'
                              ,hdir = 'bottom'
                              ,side = 'left'
                              ,bindings = '<Alt-Left>'
                              )
     # Show the current record #/total records ratio
     self.lbl_mtr = sh.Label (parent = self.frm
                             ,text = '0 / 0'
                             ,expand = False
                             ,side = 'left'
                             )
     sh.ToolTip (obj = self.lbl_mtr
                ,text = _('Album ID')
                ,hdir = 'bottom'
                )
     self.btn_nxt = sh.Button (parent = self.frm
                              ,hint = _('Go to the following record')
                              ,inactive = self.next_inactive
                              ,active = self.next_active
                              ,text = '→'
                              ,hdir = 'bottom'
                              ,side = 'left'
                              ,bindings = '<Alt-Right>'
                              )
Ejemplo n.º 5
0
 def set_image(self):
     self.lbl_img = sh.Label (parent = self.frm_img
                             ,text = _('Image:')
                             ,side = 'right'
                             ,anchor = 'w'
                             ,expand = True
                             ,fill = 'both'
                             )
Ejemplo n.º 6
0
 def set_gui(self):
     self.parent = sh.Top (icon = ICON
                          ,title = _('Image:')
                          )
     self.lbl = sh.Label (parent = self.parent
                         ,text = _('Image:')
                         ,expand = True
                         ,fill = 'both'
                         )
     self.set_bindings()
Ejemplo n.º 7
0
 def set_limit(self):
     self.lbl_lim = sh.Label (parent = self.frm_lim
                             ,text = _('Limit:')
                             ,side = 'left'
                             ,width = self.width
                             )
     self.ent_lim = sh.Entry (parent = self.frm_lim
                             ,side = 'left'
                             ,width = 5
                             )
     self.ent_lim.insert(100)
Ejemplo n.º 8
0
 def set_widgets(self):
     message = _(
         'Enter a word to guess. Use a question mark, a dot or an underscore to set a missing character.'
     )
     message = list(message)
     for i in range(len(message)):
         if i % 50 == 0:
             message.insert(i, '\n')
     message = ''.join(message)
     self.lbl1 = sh.Label(parent=self.frm1, text=message, expand=True)
     self.ent1 = sh.Entry(parent=self.frm1, expand=True, fill='x')
     self.lbl2 = sh.Label(parent=self.frm1,
                          text=_('Guessed words:'),
                          expand=True)
     self.cvs = sh.Canvas(parent=self.frm2, expand=False)
     self.frme = sh.Frame(parent=self.frm2, expand=False)
     self.cvs.embed(self.frme)
     self.lbl3 = sh.Label(parent=self.frme,
                          text=_('No match'),
                          expand=False)
     self.ent1.focus()
Ejemplo n.º 9
0
 def set_target(self):
     self.lbl_trg = sh.Label (parent = self.frm_trg
                             ,text = _('Write:')
                             ,side = 'left'
                             ,fill = None
                             ,expand = False
                             ,width = self.width
                             )
     self.opt_trg = sh.OptionMenu (parent = self.frm_trg
                                  ,items = (_('mobile collection')
                                             ,_('local collection')
                                             )
                                  ,side = 'left'
                                  ,default = _('mobile collection')
                                  )
Ejemplo n.º 10
0
 def set_genre(self):
     self.lbl_gnr = sh.Label (parent = self.frm_gnr
                             ,text = _('Genres:')
                             ,side = 'left'
                             ,fill = None
                             ,expand = False
                             ,width = self.width
                             )
     self.opt_gnr = sh.OptionMenu (parent = self.frm_gnr
                                  ,items = (_('All'),_('Heavy')
                                             ,_('Light')
                                             )
                                  ,side = 'left'
                                  ,default = _('All')
                                  )
Ejemplo n.º 11
0
 def set_source(self):
     self.lbl_src = sh.Label (parent = self.frm_src
                             ,text = _('Read:')
                             ,side = 'left'
                             ,fill = None
                             ,expand = False
                             ,width = self.width
                             )
     self.opt_src = sh.OptionMenu (parent = self.frm_src
                                  ,items = (_('external collection')
                                             ,_('local collection')
                                             )
                                  ,side = 'left'
                                  ,default = _('external collection')
                                  )
Ejemplo n.º 12
0
 def set_labels(self):
     sh.Label (parent = self.frm_lft
              ,text = _('Artist:')
              ,ipady = 2
              )
     sh.Label (parent = self.frm_lft
              ,text = _('Album:')
              ,ipady = 2
              )
     sh.Label (parent = self.frm_lft
              ,text = _('Year:')
              ,ipady = 2
              )
     sh.Label (parent = self.frm_lft
              ,text = _('Country (2 letters):')
              ,ipady = 2
              )
     sh.Label (parent = self.frm_lft
              ,text = _('Comment:')
              ,ipady = 2
              )
     sh.Label (parent = self.frm_lft
              ,text = _('Mean bitrate:')
              ,ipady = 2
              )
     sh.Label (parent = self.frm_lft
              ,text = _('Total length:')
              ,ipady = 2
              )
     sh.Label (parent = self.frm_lft
              ,text = _('Genre:')
              ,ipady = 2
              )
     # Bind to 'self.frmb' to avoid bulking and free space
     self.lbl = sh.Label (parent = self.frmb
                         ,text = ''
                         ,font = 'Sans 9'
                         )
Ejemplo n.º 13
0
 def set_year(self):
     self.lbl_yer = sh.Label (parent = self.frm_yer
                             ,text = _('Year:')
                             ,side = 'left'
                             ,fill = None
                             ,expand = False
                             ,width = self.width
                             )
     self.opt_yer = sh.OptionMenu (parent = self.frm_yer
                                  ,items = ITEMS_YEAR
                                  ,side = 'left'
                                  ,default = _('Not set')
                                  )
     self.ent_yer = sh.Entry (parent = self.frm_yer
                             ,side = 'left'
                             ,fill = None
                             ,expand = None
                             ,width = 4
                             )
Ejemplo n.º 14
0
 def set_cboxes(self):
     self.cbx_no1 = sh.CheckBox(parent=self.frm_cb1, side='left')
     self.cbx_no2 = sh.CheckBox(parent=self.frm_cb2, side='left')
     self.cbx_no3 = sh.CheckBox(parent=self.frm_cb3, side='left')
     self.cbx_no4 = sh.CheckBox(parent=self.frm_cb4, side='left')
     self.cbx_no5 = sh.CheckBox(parent=self.frm_cb5, side='left')
     self.cbx_no6 = sh.CheckBox(parent=self.frm_cb6, side='left')
     self.cbx_no7 = sh.CheckBox(parent=self.frm_cb7, side='left')
     self.cbx_no8 = sh.CheckBox(parent=self.frm_cb8, side='left')
     self.cbx_no9 = sh.CheckBox(parent=self.frm_cb9, side='left')
     self.cbx_no10 = sh.CheckBox(parent=self.frm_cb10, side='left')
     self.cbx_no11 = sh.CheckBox(parent=self.frm_cb11, side='left')
     self.cbx_no12 = sh.CheckBox(parent=self.frm_cb12, side='left')
     self.cbx_no13 = sh.CheckBox(parent=self.frm_cb13, side='left')
     self.cbx_no14 = sh.CheckBox(parent=self.frm_cb14,
                                 side='left',
                                 action=self.set_dep)
     self.lbl_spc = sh.Label(parent=self.frm_cb15,
                             side='left',
                             text='',
                             width=2)
     self.cbx_no15 = sh.CheckBox(parent=self.frm_cb15, side='left')
Ejemplo n.º 15
0
 def set_gui(self):
     self.parent = sh.Top(icon=ICON, title=_('Word Scrambler'))
     sh.Label(parent=self.parent, text=_('Not implemented yet!'))
     self.set_bindings()
     self.parent.center()
     self.close()
Ejemplo n.º 16
0
 def _set_info(self):
     self.lbl = sh.Label (parent = self.frm_btn
                         ,text = ''
                         ,font = 'Sans 9'
                         )
Ejemplo n.º 17
0
 def set_labels(self):
     text = _(
         'Programming: Peter Sklyar, 2015-{}.\nVersion: {}\n\nThis program is free and opensource. You can use and modify it freely\nwithin the scope of the provisions set forth in GPL v.3 and the active legislation.\n\nIf you have any questions, requests, etc., please do not hesitate to contact me.\n'
     )
     text = text.format(CURYEAR, VERSION)
     self.lbl_abt = sh.Label(parent=self.frm_prm, text=text, font='Sans 14')
Ejemplo n.º 18
0
 def set_prioritize(self):
     self.cbx_pri = sh.CheckBox(parent=self.frm_bm2, side='left')
     self.lbl_pri = sh.Label(parent=self.frm_bm2,
                             text=_('Prioritize subjects'),
                             side='left')
Ejemplo n.º 19
0
 def set_block(self):
     self.cbx_blk = sh.CheckBox(parent=self.frm_bm2, side='left')
     self.lbl_blk = sh.Label(parent=self.frm_bm2,
                             text=_('Block subjects'),
                             side='left')
Ejemplo n.º 20
0
 def set_labels(self):
     ''' Other possible color schemes:
         font = 'Sans 9 italic', fg = 'khaki4'
     '''
     sh.Label(parent=self.frm_scm,
              text=_('Style:'),
              font='Sans 9',
              side='top',
              fill='both',
              expand=True,
              fg='PaleTurquoise1',
              bg='RoyalBlue3')
     sh.Label(parent=self.frm_cl1,
              text=_('Column') + ' 1:',
              font='Sans 9',
              side='top',
              fill='both',
              expand=True,
              fg='PaleTurquoise1',
              bg='RoyalBlue3')
     sh.Label(parent=self.frm_cl2,
              text=_('Column') + ' 2:',
              font='Sans 9',
              side='top',
              fill='both',
              expand=True,
              fg='PaleTurquoise1',
              bg='RoyalBlue3')
     sh.Label(parent=self.frm_cl3,
              text=_('Column') + ' 3:',
              font='Sans 9',
              side='top',
              fill='both',
              expand=True,
              fg='PaleTurquoise1',
              bg='RoyalBlue3')
     sh.Label(parent=self.frm_cl4,
              text=_('Column') + ' 4:',
              font='Sans 9',
              side='top',
              fill='both',
              expand=True,
              fg='PaleTurquoise1',
              bg='RoyalBlue3')
     self.lbl_no1 = sh.Label(
         parent=self.frm_cb1,
         text=
         _('Sort by each column (if it is set, except for transcription) and order parts of speech'
           ),
         side='left')
     self.lbl_no2 = sh.Label(parent=self.frm_cb2,
                             text=_('Alphabetize terms'),
                             side='left')
     self.lbl_no3 = sh.Label(parent=self.frm_cb3,
                             text=_('Block subjects from blacklist'),
                             side='left')
     self.lbl_no4 = sh.Label(parent=self.frm_cb4,
                             text=_('Prioritize subjects'),
                             side='left')
     self.lbl_no5 = sh.Label(parent=self.frm_cb5,
                             text=_('Vertical view'),
                             side='left')
     self.lbl_no6 = sh.Label(parent=self.frm_cb6,
                             text=_('Shorten subject titles'),
                             side='left')
     self.lbl_no7 = sh.Label(parent=self.frm_cb7,
                             text=_('Shorten parts of speech'),
                             side='left')
     self.lbl_no8 = sh.Label(parent=self.frm_cb8,
                             text=_('Show user names'),
                             side='left')
     self.lbl_no9 = sh.Label(parent=self.frm_cb9,
                             text=_('Select terms only'),
                             side='left')
     self.lbl_no10 = sh.Label(
         parent=self.frm_cb10,
         text=_('Iconify the program window after copying'),
         side='left')
     self.lbl_no11 = sh.Label(parent=self.frm_cb11,
                              text=_('Show suggestions on input'),
                              side='left')
     self.lbl_no12 = sh.Label(
         parent=self.frm_cb12,
         text=_('Autoswap Russian and the other language if appropriate'),
         side='left')
     self.lbl_no13 = sh.Label(parent=self.frm_cb13,
                              text=_('Show a phrase count'),
                              side='left')
     self.lbl_no14 = sh.Label(parent=self.frm_cb14,
                              text=_('Adjust columns by width'),
                              side='left')
     self.lbl_no15 = sh.Label(parent=self.frm_cb15,
                              text=_('Use a custom table width:'),
                              side='left')
     self.ent_tab = sh.Entry(parent=self.frm_cb15, side='left', width=3)
     self.lbl_prc = sh.Label(parent=self.frm_cb15, text='%', side='left')
     sh.Label(parent=self.frm_sp1,
              text=_('Part of speech') + ' 1:',
              font='Sans 8',
              side='top',
              fill='both',
              expand=True,
              fg='PaleTurquoise1',
              bg='RoyalBlue3')
     sh.Label(parent=self.frm_sp2,
              text=_('Part of speech') + ' 2:',
              font='Sans 8',
              side='top',
              fill='both',
              expand=True,
              fg='PaleTurquoise1',
              bg='RoyalBlue3')
     sh.Label(parent=self.frm_sp3,
              text=_('Part of speech') + ' 3:',
              font='Sans 8',
              side='top',
              fill='both',
              expand=True,
              fg='PaleTurquoise1',
              bg='RoyalBlue3')
     sh.Label(parent=self.frm_sp4,
              text=_('Part of speech') + ' 4:',
              font='Sans 8',
              side='top',
              fill='both',
              expand=True,
              fg='PaleTurquoise1',
              bg='RoyalBlue3')
     sh.Label(parent=self.frm_sp5,
              text=_('Part of speech') + ' 5:',
              font='Sans 8',
              side='top',
              fill='both',
              expand=True,
              fg='PaleTurquoise1',
              bg='RoyalBlue3')
     sh.Label(parent=self.frm_sp6,
              text=_('Part of speech') + ' 6:',
              font='Sans 8',
              side='top',
              fill='both',
              expand=True,
              fg='PaleTurquoise1',
              bg='RoyalBlue3')
     sh.Label(parent=self.frm_sp7,
              text=_('Part of speech') + ' 7:',
              font='Sans 8',
              side='top',
              fill='both',
              expand=True,
              fg='PaleTurquoise1',
              bg='RoyalBlue3')