Skip to content

Commit 0802ca3

Browse files
authored
Merge pull request #22 from raj457036/v0.1.24
V0.1.24
2 parents d9499f0 + bd42e84 commit 0802ca3

File tree

8 files changed

+41
-30
lines changed

8 files changed

+41
-30
lines changed

lib/pages/settings/pages/custom_exclusion_rule/tabs/app_exclusion.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,20 @@ class AppExclusionTab extends StatelessWidget {
3333

3434
Future<Iterable<AppInfo>> selectApp() async {
3535
final List<String> ext;
36+
String? initialDirectory;
3637
if (Platform.isMacOS) {
3738
ext = ["app"];
3839
} else if (Platform.isWindows) {
3940
ext = ["exe"];
41+
initialDirectory = r"C:\Program Files";
4042
} else {
4143
ext = ["bin"];
4244
}
4345
final result = await FilePicker.platform.pickFiles(
4446
type: FileType.custom,
4547
allowedExtensions: ext,
4648
allowMultiple: true,
49+
initialDirectory: initialDirectory,
4750
);
4851

4952
windowManager.focus();

lib/pages/settings/pages/custom_exclusion_rule/tabs/url_text_exclusion.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import 'package:copycat_base/db/exclusion_rules/exclusion_rules.dart';
55
import 'package:copycat_base/l10n/l10n.dart';
66
import 'package:flutter/material.dart';
77
import 'package:flutter_bloc/flutter_bloc.dart';
8+
import 'package:universal_io/io.dart';
89

910
class UrlTextExclusionTab extends StatefulWidget {
1011
const UrlTextExclusionTab({super.key});
@@ -69,8 +70,11 @@ class _UrlTextExclusionTabState extends State<UrlTextExclusionTab> {
6970
controller: controller,
7071
decoration: InputDecoration(
7172
border: const UnderlineInputBorder(),
72-
hintText: context.locale.excludeUrlInputHint,
73+
hintText: !Platform.isMacOS
74+
? context.locale.featureNotSupported
75+
: context.locale.excludeUrlInputHint,
7376
),
77+
enabled: Platform.isMacOS,
7478
onSubmitted: (value) => addEntry(context, value),
7579
),
7680
),

lib/pages/settings/pages/exclusion_rules.dart

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import 'package:copycat_base/db/exclusion_rules/exclusion_rules.dart';
88
import 'package:copycat_base/l10n/l10n.dart';
99
import 'package:flutter/material.dart';
1010
import 'package:flutter_bloc/flutter_bloc.dart';
11+
import 'package:universal_io/io.dart';
1112

1213
class ExclusionRulesPage extends StatelessWidget {
1314
const ExclusionRulesPage({super.key});
@@ -151,18 +152,19 @@ class ExclusionRulesPage extends StatelessWidget {
151152
// }
152153
// : null,
153154
// ),
154-
SwitchListTile(
155-
title: Text(context.locale.sensitiveUrls),
156-
value: state.sensitiveUrls,
157-
onChanged: enable
158-
? (value) {
159-
updateExclusionRules(
160-
context,
161-
state.copyWith(sensitiveUrls: value),
162-
);
163-
}
164-
: null,
165-
),
155+
if (Platform.isMacOS)
156+
SwitchListTile(
157+
title: Text(context.locale.sensitiveUrls),
158+
value: state.sensitiveUrls,
159+
onChanged: enable
160+
? (value) {
161+
updateExclusionRules(
162+
context,
163+
state.copyWith(sensitiveUrls: value),
164+
);
165+
}
166+
: null,
167+
),
166168
],
167169
),
168170
),

packages/focus_window/lib/platform/windows.dart

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,17 @@ class WindowsActivityObserver implements PlatformActivityObserverInterface {
4343
);
4444
}
4545
if (!_cache.containsKey('GetUrl')) {
46-
futures.add(
47-
rootBundle
48-
.loadString('packages/focus_window/window_utils/GetUrl.ps1')
49-
.then((value) async {
50-
final tempDir = await getTemporaryDirectory();
51-
final file = File(p.join(tempDir.path, '._gu.ps1'));
52-
await file.writeAsString(value);
53-
_cache['GetUrl'] = file.path;
54-
}),
55-
);
46+
//! BUG: Causing keyboard keys to be pressed automatically
47+
// futures.add(
48+
// rootBundle
49+
// .loadString('packages/focus_window/window_utils/GetUrl.ps1')
50+
// .then((value) async {
51+
// final tempDir = await getTemporaryDirectory();
52+
// final file = File(p.join(tempDir.path, '._gu.ps1'));
53+
// await file.writeAsString(value);
54+
// _cache['GetUrl'] = file.path;
55+
// }),
56+
// );
5657
}
5758

5859
await Future.wait(futures);
@@ -92,10 +93,11 @@ class WindowsActivityObserver implements PlatformActivityObserverInterface {
9293

9394
var activity = ActivityInfo.fromJson(result);
9495

95-
if (activity.title != _lastActivity?.title) {
96-
final url = await getUrl(activity.appFileName, activity.title);
97-
activity = activity.copyWith(url: url);
98-
}
96+
// TODO: Work on getting the url in windows
97+
// if (activity.title != _lastActivity?.title) {
98+
// final url = await getUrl(activity.appFileName, activity.title);
99+
// activity = activity.copyWith(url: url);
100+
// }
99101

100102
_lastActivity = activity;
101103

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: clipboard
22
description: "CopyCat Clipboard: One Clipboard, Limitless Productivity"
33
publish_to: 'none'
4-
version: 0.1.26+57
4+
version: 0.1.27+58
55

66
environment:
77
sdk: '>=3.3.3 <4.0.0'

window_dist/CopyCat.0.1.24.exe

-17.4 MB
Binary file not shown.

window_dist/inno-setup-script.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "CopyCat Clipboard"
5-
#define MyAppVersion "0.1.26+57"
5+
#define MyAppVersion "0.1.27+58"
66
#define MyAppPublisher "Entility Studio"
77
#define MyAppExeName "Clipboard.exe"
88
#define MyAppAssocName MyAppName + ""

0 commit comments

Comments
 (0)