本文整理汇总了Golang中pkg/linuxdeepin/com/lib/dbus.NotifyChange函数的典型用法代码示例。如果您正苦于以下问题:Golang NotifyChange函数的具体用法?Golang NotifyChange怎么用?Golang NotifyChange使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NotifyChange函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: setPropAvailableKeys
func (s *ConnectionSession) setPropAvailableKeys() {
s.AvailableKeys = make(map[string][]string) // clear structure
for _, section := range getAvailableSections(s.data) {
s.AvailableKeys[section] = generalGetSettingAvailableKeys(s.data, section)
}
dbus.NotifyChange(s, "AvailableKeys")
}
示例2: setPropString
func (t *Theme) setPropString(handle *string, name, value string) {
if *handle == value {
return
}
*handle = value
dbus.NotifyChange(t, name)
}
示例3: addSinkInput
func (a *Audio) addSinkInput(idx uint32) {
for _, si := range a.SinkInputs {
if si.index == idx {
return
}
}
core, err := a.core.GetSinkInput(idx)
if err != nil {
logger.Warning(err)
return
}
if filterSinkInput(core) {
return
}
si := NewSinkInput(core)
err = dbus.InstallOnSession(si)
if err != nil {
logger.Error(err)
return
}
a.SinkInputs = append(a.SinkInputs, si)
dbus.NotifyChange(a, "SinkInputs")
}
示例4: setPropAllowGuest
func (m *Manager) setPropAllowGuest(allow bool) {
if m.AllowGuest == allow {
return
}
m.AllowGuest = allow
dbus.NotifyChange(m, "AllowGuest")
}
示例5: setPropGuestIcon
func (m *Manager) setPropGuestIcon(icon string) {
if icon == m.GuestIcon {
return
}
m.GuestIcon = icon
dbus.NotifyChange(m, "GuestIcon")
}
示例6: setPropString
func (m *Manager) setPropString(handler *string, prop, value string) {
if *handler == value {
return
}
*handler = value
dbus.NotifyChange(m, prop)
}
示例7: setPropAllowDelete
func (s *ConnectionSession) setPropAllowDelete() {
if isNmObjectPathValid(s.devPath) && nmGeneralGetDeviceUniqueUuid(s.devPath) == s.Uuid {
s.AllowDelete = false
} else {
s.AllowDelete = true
}
dbus.NotifyChange(s, "AllowDelete")
}
示例8: setPropString
func (u *User) setPropString(handler *string, prop string, value string) {
if *handler == value {
return
}
*handler = value
dbus.NotifyChange(u, prop)
}
示例9: setPropInt32
func (u *User) setPropInt32(handler *int32, prop string, value int32) {
if *handler == value {
return
}
*handler = value
dbus.NotifyChange(u, prop)
}
示例10: setPropBool
func (m *Manager) setPropBool(handler *bool, prop string, value bool) {
if *handler == value {
return
}
*handler = value
dbus.NotifyChange(m, prop)
}
示例11: setPropSelectedItemColor
func (theme *Theme) setPropSelectedItemColor(value string) {
selectedItemColor := value
if len(selectedItemColor) == 0 {
// set a default value to avoid empty string
selectedItemColor = theme.tplJSONData.DarkScheme.SelectedItemColor
}
theme.SelectedItemColor = selectedItemColor
theme.tplJSONData.CurrentScheme.SelectedItemColor = selectedItemColor
dbus.NotifyChange(theme, "SelectedItemColor")
}
示例12: setPropSinkInputs
func (s *Audio) setPropSinkInputs(v []*SinkInput) {
for _, o := range s.SinkInputs {
dbus.UnInstallObject(o)
}
for _, o := range v {
dbus.InstallOnSession(o)
}
s.SinkInputs = v
dbus.NotifyChange(s, "SinkInputs")
}
示例13: setPropItemColor
func (theme *Theme) setPropItemColor(value string) {
itemColor := value
if len(itemColor) == 0 {
// set a default value to avoid empty string
itemColor = theme.tplJSONData.DarkScheme.ItemColor
}
theme.ItemColor = itemColor
theme.tplJSONData.CurrentScheme.ItemColor = itemColor
dbus.NotifyChange(theme, "ItemColor")
}
示例14: setPropEnableTheme
func (grub *Grub2) setPropEnableTheme(value bool) {
grub.EnableTheme = value
grub.config.setEnableTheme(value)
if value {
grub.setSettingTheme(themeMainFile)
} else {
grub.setSettingTheme("")
}
dbus.NotifyChange(grub, "EnableTheme")
}
示例15: setPropSources
func (s *Audio) setPropSources(v []*Source) {
for _, o := range s.Sources {
dbus.UnInstallObject(o)
}
for _, o := range v {
dbus.InstallOnSession(o)
}
s.Sources = v
dbus.NotifyChange(s, "Sources")
}