~parinporecha/gtg/add_shortcut

« back to all changes in this revision

Viewing changes to GTG/gtk/preferences.py

  • Committer: Parin Porecha
  • Date: 2013-01-22 13:19:24 UTC
  • Revision ID: parinporecha@gmail.com-20130122131924-mr5tcp3grqxou3or
Hid the column title and made other changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
        column_accel = gtk.TreeViewColumn()
113
113
#        treeview.append_column(column_text)
114
114
        treeview.append_column(column_accel)
 
115
        treeview.set_headers_visible(False)
115
116
        
116
117
#        cellrenderer_text = gtk.CellRendererText()
117
118
#        column_text.pack_start(cellrenderer_text, False)
317
318
                name_ans = subprocess.Popen(set_name, stdout=subprocess.PIPE)
318
319
                break
319
320
                
320
 
    def cellAccelEdit(self, cell, path, accel_key, accel_mods, key_code, model):    #saw this func on internet, doesn't work because the accelerator is not working
321
 
#        i = self.listmodel.get_iter(path)
322
 
        print accel_key, accel_mods, key_code
323
 
#        print type(accel_key), type(accel_mods), type(key_code)
324
 
#        name = gtk.gdk.keyval_name(accel_key)
325
 
#        self.listmodel.set_value(i, 3, name)
 
321
    def cellAccelEdit(self, cell, path, accel_key, accel_mods, key_code, model):
326
322
        global new_task_binding
327
323
        new_task_binding = gtk.accelerator_name(accel_key, accel_mods)
328
 
        print "accel = " + str(new_task_binding)
329
324
        iter = model.get_iter(path)
330
325
        model.set_value(iter, 1, new_task_binding)
331
326
        self.on_shortcut_change()