~mrooney/ecryptfs/nautilus-integration

« back to all changes in this revision

Viewing changes to src/python/ecryptui.py

  • Committer: Michael Rooney
  • Date: 2009-05-28 10:40:56 UTC
  • Revision ID: mrooney@ubuntu.com-20090528104056-mqirt68bbs3quj5t
reflect api changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
        self.autoUnmountFrozen = True
143
143
 
144
144
        # The state variable, later wrapped in a property.
145
 
        self._MountedState = ecryptapi.getMounted()
 
145
        self._MountedState = ecryptapi.get_mounted()
146
146
 
147
147
        # The main, vertical sizer, for holding the controls.
148
148
        hbox = gtk.HBox(False, 5)
167
167
 
168
168
        # Create a checkbox for toggling automounting.
169
169
        self.autoCheck = gtk.CheckButton("Automatically unlock Private directory at login")
170
 
        self.autoCheck.set_active(ecryptapi.getAutoMount())
 
170
        self.autoCheck.set_active(ecryptapi.get_automount())
171
171
        self.autoMountFrozen = False # Now we set, unfreeze.
172
172
 
173
173
        # Create a checkbox for toggling autounmounting.
174
174
        self.autoCheck2 = gtk.CheckButton("Automatically lock Private directory at logoff")
175
 
        self.autoCheck2.set_active(ecryptapi.getAutoUnmount())
 
175
        self.autoCheck2.set_active(ecryptapi.get_autounmount())
176
176
        self.autoUnmountFrozen = False # Now we set, unfreeze.
177
177
 
178
178
        # Add everything to the main sizer.
218
218
        """The event handler for the automount checkbutton."""
219
219
        if not self.autoMountFrozen:
220
220
            desiredState = widget.get_active()
221
 
            status, output = ecryptapi.setAutoMount(desiredState)
 
221
            status, output = ecryptapi.set_automount(desiredState)
222
222
            if status != 0:
223
223
                # It failed, unset the checkbox and show the error.
224
224
                self.autoMountFrozen = True
230
230
        """The event handler for the automount checkbutton."""
231
231
        if not self.autoUnmountFrozen:
232
232
            desiredState = widget.get_active()
233
 
            status, output = ecryptapi.setAutoUnmount(desiredState)
 
233
            status, output = ecryptapi.set_autounmount(desiredState)
234
234
            if status != 0:
235
235
                # It failed, unset the checkbox and show the error.
236
236
                self.autoUnmountFrozen = True
241
241
    def onStateToggled(self, widget, data=None):
242
242
        """The event handler for the mount toggle button."""
243
243
        desiredState = not self.MountedState
244
 
        status, output = ecryptapi.setMounted(desiredState)
 
244
        status, output = ecryptapi.set_mounted(desiredState)
245
245
        if status == 0:
246
246
            # The action was successful, update our state.
247
247
            self.MountedState = desiredState