def __init__(self, mount): self._mount = mount mount_point = mount.get_root().get_path() BaseButton.__init__(self, mount_point) self.props.icon_name = get_mount_icon_name(mount, Gtk.IconSize.LARGE_TOOLBAR) # TODO: retrieve the colors from the owner of the device self.props.xo_color = get_mount_color(self._mount)
def __init__(self, mount): self._mount = mount mount_point = mount.get_root().get_path() BaseButton.__init__(self, mount_point) self.props.icon_name = get_mount_icon_name(mount, Gtk.IconSize.LARGE_TOOLBAR) # TODO: retrieve the colors from the owner of the device client = GConf.Client.get_default() color = XoColor(client.get_string("/desktop/sugar/user/color")) self.props.xo_color = color
def __init__(self, mount): self._mount = mount mount_point = mount.get_root().get_path() BaseButton.__init__(self, mount_point) self.props.icon_name = get_mount_icon_name(mount, Gtk.IconSize.LARGE_TOOLBAR) # TODO: retrieve the colors from the owner of the device client = GConf.Client.get_default() color = XoColor(client.get_string('/desktop/sugar/user/color')) self.props.xo_color = color
def __init__(self, mount): self._mount = mount self._icon_name = get_mount_icon_name(mount, Gtk.IconSize.LARGE_TOOLBAR) # TODO: retrieve the colors from the owner of the device color = profile.get_color() TrayIcon.__init__(self, icon_name=self._icon_name, xo_color=color) self.set_palette_invoker(FrameWidgetInvoker(self)) self.palette_invoker.props.toggle_palette = True
def __init__(self, mount): self._mount = mount self._icon_name = get_mount_icon_name(mount, Gtk.IconSize.LARGE_TOOLBAR) # TODO: retrieve the colors from the owner of the device client = GConf.Client.get_default() color = XoColor(client.get_string('/desktop/sugar/user/color')) TrayIcon.__init__(self, icon_name=self._icon_name, xo_color=color) self.set_palette_invoker(FrameWidgetInvoker(self)) self.palette_invoker.props.toggle_palette = True
def _add_mount(self, mount): mount_path = mount.get_root().get_path() if mount_path in self._volumes: return if self._journalactivity.get_mount_point() == mount_path: return volume_menu = VolumeMenu( self._journalactivity, self._get_uid_list_cb, mount.get_name(), mount.get_root().get_path() ) icon_name = misc.get_mount_icon_name(mount, Gtk.IconSize.MENU) volume_menu.set_image(Icon(icon_size=Gtk.IconSize.MENU, icon_name=icon_name)) volume_menu.connect("volume-error", self.__volume_error_cb) self._menu.append(volume_menu) self._volumes[mount.get_root().get_path()] = volume_menu volume_menu.show()
def _add_mount(self, mount): mount_path = mount.get_root().get_path() if mount_path in self._volumes: return if self._journalactivity.get_mount_point() == mount_path: return volume_menu = VolumeMenu(self._journalactivity, self._get_uid_list_cb, mount.get_name(), mount.get_root().get_path()) icon_name = misc.get_mount_icon_name(mount, Gtk.IconSize.MENU) volume_menu.set_image( Icon(icon_size=Gtk.IconSize.MENU, icon_name=icon_name)) volume_menu.connect('volume-error', self.__volume_error_cb) self._menu.append(volume_menu) self._volumes[mount.get_root().get_path()] = volume_menu volume_menu.show()
def _add_mount(self, mount): mount_path = mount.get_root().get_path() if mount_path in self._volumes: return if self._journalactivity.get_mount_point() == mount_path: return volume_menu = VolumeMenu(self._journalactivity, self._get_uid_list_cb, mount.get_name(), mount.get_root().get_path()) icon_name = misc.get_mount_icon_name(mount, Gtk.IconSize.MENU) icon = Icon(pixel_size=style.SMALL_ICON_SIZE, icon_name=icon_name, xo_color=get_mount_color(mount)) volume_menu.set_image(icon) volume_menu.connect('volume-error', self.__volume_error_cb) self._menu.append(volume_menu) self._volumes[mount.get_root().get_path()] = volume_menu volume_menu.show()