當前位置: 首頁>>代碼示例>>Golang>>正文


Golang dbus.NotifyChange函數代碼示例

本文整理匯總了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")
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:7,代碼來源:connection_session_stub.go

示例2: setPropString

func (t *Theme) setPropString(handle *string, name, value string) {
	if *handle == value {
		return
	}
	*handle = value
	dbus.NotifyChange(t, name)
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:7,代碼來源:theme_stub.go

示例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")
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:26,代碼來源:audio_stub.go

示例4: setPropAllowGuest

func (m *Manager) setPropAllowGuest(allow bool) {
	if m.AllowGuest == allow {
		return
	}

	m.AllowGuest = allow
	dbus.NotifyChange(m, "AllowGuest")
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:8,代碼來源:manager_stub.go

示例5: setPropGuestIcon

func (m *Manager) setPropGuestIcon(icon string) {
	if icon == m.GuestIcon {
		return
	}

	m.GuestIcon = icon
	dbus.NotifyChange(m, "GuestIcon")
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:8,代碼來源:manager_stub.go

示例6: setPropString

func (m *Manager) setPropString(handler *string, prop, value string) {
	if *handler == value {
		return
	}

	*handler = value
	dbus.NotifyChange(m, prop)
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:8,代碼來源:manager_stub.go

示例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")
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:8,代碼來源:connection_session_stub.go

示例8: setPropString

func (u *User) setPropString(handler *string, prop string, value string) {
	if *handler == value {
		return
	}

	*handler = value
	dbus.NotifyChange(u, prop)
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:8,代碼來源:user_stub.go

示例9: setPropInt32

func (u *User) setPropInt32(handler *int32, prop string, value int32) {
	if *handler == value {
		return
	}

	*handler = value
	dbus.NotifyChange(u, prop)
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:8,代碼來源:user_stub.go

示例10: setPropBool

func (m *Manager) setPropBool(handler *bool, prop string, value bool) {
	if *handler == value {
		return
	}

	*handler = value
	dbus.NotifyChange(m, prop)
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:8,代碼來源:manager_stub.go

示例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")
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:10,代碼來源:theme_stub.go

示例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")
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:10,代碼來源:audio_stub.go

示例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")
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:10,代碼來源:theme_stub.go

示例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")
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:10,代碼來源:grub2_stub.go

示例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")
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:10,代碼來源:audio_stub.go


注:本文中的pkg/linuxdeepin/com/lib/dbus.NotifyChange函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。