def update_cache(self): update_cache() self.my_cache = get_cache()
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import gobject from mmclient import MMObject from nmlib.nm_utils import TypeConvert from nmlib.nmcache import get_cache import threading import time cache = get_cache() nmclient = cache.getobject("/org/freedesktop/NetworkManager") nm_remote_settings = cache.getobject( "/org/freedesktop/NetworkManager/Settings") class ThreadWiredAuto(threading.Thread): def __init__(self, device_path, connections): threading.Thread.__init__(self) self.device = cache.get_spec_object(device_path) self.conns = connections self.run_flag = True def run(self): for conn in self.conns:
def __init__(self): self.hslider = MySlider() self.my_cache = get_cache() self.init_objects()
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import gobject from mmclient import MMObject from nmlib.nm_utils import TypeConvert from nmlib.nmcache import get_cache import threading import time cache = get_cache() nmclient = cache.getobject("/org/freedesktop/NetworkManager") nm_remote_settings = cache.getobject("/org/freedesktop/NetworkManager/Settings") class ThreadWiredAuto(threading.Thread): def __init__(self, device_path, connections): threading.Thread.__init__(self) self.device = cache.get_spec_object(device_path) self.conns = connections self.run_flag = True def run(self): for conn in self.conns: if self.run_flag: