Skip to content

Commit 6243199

Browse files
committed
Consistent naming of constants
1 parent 05557c7 commit 6243199

File tree

17 files changed

+26
-27
lines changed

17 files changed

+26
-27
lines changed

account/account.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
)
1010

1111
const (
12-
accountBaseName = apis.CallBaseName + ".Account"
13-
getUserInfoCallName = accountBaseName + ".GetUserInformation"
12+
interfaceName = apis.CallBaseName + ".Account"
13+
getUserInfoCallName = interfaceName + ".GetUserInformation"
1414
)
1515

1616
// UserInfoOptions holds optional settings for getting user information.

background/background.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ package background
33

44
import "github.com/rymdport/portal/internal/apis"
55

6-
const backgroundBaseName = apis.CallBaseName + ".Background"
6+
const interfaceName = apis.CallBaseName + ".Background"

background/request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/rymdport/portal/internal/convert"
88
)
99

10-
const requestCallName = backgroundBaseName + ".RequestBackground"
10+
const requestCallName = interfaceName + ".RequestBackground"
1111

1212
// RequestOptions holds the options used for RequestBackground.
1313
type RequestOptions struct {

filechooser/filechooser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/rymdport/portal/internal/apis"
99
)
1010

11-
const fileChooserCallName = apis.CallBaseName + ".FileChooser"
11+
const interfaceName = apis.CallBaseName + ".FileChooser"
1212

1313
func readURIFromResponse(conn *dbus.Conn, call *dbus.Call) ([]string, error) {
1414
result, err := apis.ReadResponse(conn, call)

filechooser/open.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/rymdport/portal/internal/convert"
77
)
88

9-
const openFileCallName = fileChooserCallName + ".OpenFile"
9+
const openFileCallName = interfaceName + ".OpenFile"
1010

1111
// OpenFileOptions contains the options for how files are to be selected.
1212
type OpenFileOptions struct {

filechooser/save.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
)
88

99
const (
10-
saveFileCallName = fileChooserCallName + ".SaveFile"
11-
saveFilesCallName = fileChooserCallName + ".SaveFiles"
10+
saveFileCallName = interfaceName + ".SaveFile"
11+
saveFilesCallName = interfaceName + ".SaveFiles"
1212
)
1313

1414
// SaveFileOptions contains the options for how a file is saved.

memorymonitor/memorymonitor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ package memorymonitor
33

44
import "github.com/rymdport/portal/internal/apis"
55

6-
const memorymonitorBaseName = apis.CallBaseName + ".MemoryMonitor"
6+
const interfaceName = apis.CallBaseName + ".MemoryMonitor"

memorymonitor/warning.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func OnSignalLowMemoryWarning(callback func(warning LowMemoryWarning)) error {
2222

2323
if err := conn.AddMatchSignal(
2424
dbus.WithMatchObjectPath(apis.ObjectPath),
25-
dbus.WithMatchInterface(memorymonitorBaseName),
25+
dbus.WithMatchInterface(interfaceName),
2626
dbus.WithMatchMember("LowMemoryWarning"),
2727
); err != nil {
2828
return err

notification/notification.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111
)
1212

1313
const (
14-
notificationBaseName = apis.CallBaseName + ".Notification"
15-
addNotificationCallName = notificationBaseName + ".AddNotification"
16-
removeNotificationCallName = notificationBaseName + ".RemoveNotification"
14+
interfaceName = apis.CallBaseName + ".Notification"
15+
addNotificationCallName = interfaceName + ".AddNotification"
16+
removeNotificationCallName = interfaceName + ".RemoveNotification"
1717
)
1818

1919
// Priority is the priroity of a notification.

openuri/opendir.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/rymdport/portal/internal/convert"
77
)
88

9-
const openDirCallName = openURIBaseName + ".OpenDirectory"
9+
const openDirCallName = interfaceName + ".OpenDirectory"
1010

1111
// OpenDirOptions holds optional settings that can be passed to the OpenDir call.
1212
type OpenDirOptions struct {

0 commit comments

Comments
 (0)