-
-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
208 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[D-BUS Service] | ||
Name=@app_id@ | ||
Exec=@bindir@/@app_id@ --gapplication-service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,4 +62,14 @@ install_data('markdownpp.lang', | |
install_dir: get_option('datadir') / 'gtksourceview-5' / 'language-specs' | ||
) | ||
|
||
# service_conf = configuration_data() | ||
# service_conf.set('appid', application_id) | ||
# service_conf.set('bindir', bindir) | ||
# configure_file( | ||
# input: 'io.github.alainm23.planify.service.in', | ||
# output: '@[email protected]'.format(application_id), | ||
# configuration: service_conf, | ||
# install_dir: datadir / 'dbus-1' / 'services' | ||
# ) | ||
|
||
subdir('icons') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
search-provider/io.github.alainm23.planify.SearchProvider.ini.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[Shell Search Provider] | ||
DesktopId=@[email protected] | ||
BusName=@[email protected] | ||
ObjectPath=@path@/SearchProvider | ||
Version=2 |
3 changes: 3 additions & 0 deletions
3
search-provider/io.github.alainm23.planify.SearchProvider.service.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[D-BUS Service] | ||
Name=@[email protected] | ||
Exec=@libexecdir@/@appid@-search-provider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// This file is part of Highscore. License: GPL-3.0-or-later | ||
|
||
int main (string[] args) { | ||
Intl.bindtextdomain (Build.GETTEXT_PACKAGE, Build.GNOMELOCALEDIR); | ||
Intl.bind_textdomain_codeset (Build.GETTEXT_PACKAGE, "UTF-8"); | ||
Intl.textdomain (Build.GETTEXT_PACKAGE); | ||
|
||
var app = new Planify.SearchProvider (); | ||
|
||
return app.run (args); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
search_provider_c_args = [ | ||
'-DGETTEXT_PACKAGE="' + meson.project_name () + '"', | ||
'-DG_LOG_DOMAIN="PlanifySearchProvider"', | ||
] | ||
|
||
search_provider_sources = [ | ||
'main.vala', | ||
'search-provider.vala' | ||
] | ||
|
||
search_provider_deps = [ | ||
gio_dep, | ||
gtk_dep, | ||
sqlite3_dep, | ||
] | ||
|
||
executable ( | ||
'io.github.alainmh23.planify-search-provider', | ||
search_provider_sources, | ||
config_file, | ||
dependencies: search_provider_deps, | ||
c_args: search_provider_c_args, | ||
install: true, | ||
install_dir: libexecdir | ||
) | ||
|
||
search_provider_conf = configuration_data() | ||
search_provider_conf.set('appid', application_id) | ||
search_provider_conf.set('path', application_path) | ||
configure_file( | ||
configuration: search_provider_conf, | ||
input: 'io.github.alainm23.planify.SearchProvider.ini.in', | ||
install_dir: datadir / 'gnome-shell' / 'search-providers', | ||
install: true, | ||
output: '@[email protected]'.format(application_id) | ||
) | ||
|
||
search_provider_dbus_conf = configuration_data() | ||
search_provider_dbus_conf.set('appid', application_id) | ||
search_provider_dbus_conf.set('libexecdir', libexecdir) | ||
configure_file ( | ||
input: 'io.github.alainm23.planify.SearchProvider.service.in', | ||
output: '@[email protected]'.format(application_id), | ||
configuration: search_provider_dbus_conf, | ||
install: true, | ||
install_dir: datadir / 'dbus-1' / 'services' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// This file is part of Highscore. License: GPL-3.0+. | ||
|
||
[DBus (name = "org.gnome.Shell.SearchProvider2")] | ||
public class Planify.SearchProvider : Gtk.Application { | ||
internal SearchProvider () { | ||
Object ( | ||
application_id: Build.APPLICATION_ID + ".SearchProvider", | ||
flags: ApplicationFlags.IS_SERVICE, | ||
inactivity_timeout: 10000 | ||
); | ||
} | ||
|
||
construct { | ||
|
||
} | ||
|
||
protected override bool dbus_register (DBusConnection connection, string object_path) { | ||
try { | ||
connection.register_object (object_path, this); | ||
} catch (IOError e) { | ||
warning ("Could not register search provider: %s", e.message); | ||
quit (); | ||
} | ||
|
||
return true; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.