diff --git a/data/teleport.gresource.xml b/data/BeamMeUp.gresource.xml similarity index 87% rename from data/teleport.gresource.xml rename to data/BeamMeUp.gresource.xml index 4793853..e67fd0a 100644 --- a/data/teleport.gresource.xml +++ b/data/BeamMeUp.gresource.xml @@ -1,6 +1,6 @@ - + window.ui settings.ui device_settings.ui diff --git a/data/com.frac_tion.teleport.appdata.xml.in b/data/com.frac_tion.teleport.appdata.xml.in deleted file mode 100644 index a52d254..0000000 --- a/data/com.frac_tion.teleport.appdata.xml.in +++ /dev/null @@ -1,60 +0,0 @@ - - - - com.frac_tion.teleport.desktop - CC0 - AGPL-3.0+ - Teleport - Share files over the local network - - -

- Teleport is a fast way to share files over the local network. It's - designed to be a replacement for using USB keys or emailing stuff to - yourself just to move them on another device on your desk. -

-
- - - - Teleport window with multiple devices - https://gitlab.gnome.org/jsparber/teleport/raw/master/data/screenshots/window.png - - - Teleport notification - https://gitlab.gnome.org/jsparber/teleport/raw/master/data/screenshots/notification.png - - - - https://gitlab.gnome.org/jsparber/teleport - https://gitlab.gnome.org/jsparber/teleport/issues - GNOME - - - AppMenu - HiDpiIcon - ModernToolkit - Notifications - - - julian@sparber.net - teleport - - - - -

- Some small fixes. -

-
-
- - -

- This basic initial version sends files chose via the file chooser or - drag and drop. The Downloads directory can be set from the menu. -

-
-
-
-
diff --git a/data/icons/hicolor/128x128/apps/com.frac_tion.teleport.png b/data/icons/hicolor/128x128/apps/org.nekoweb.n0va.BeamMeUp.png similarity index 100% rename from data/icons/hicolor/128x128/apps/com.frac_tion.teleport.png rename to data/icons/hicolor/128x128/apps/org.nekoweb.n0va.BeamMeUp.png diff --git a/data/icons/hicolor/16x16/apps/com.frac_tion.teleport.png b/data/icons/hicolor/16x16/apps/org.nekoweb.n0va.BeamMeUp.png similarity index 100% rename from data/icons/hicolor/16x16/apps/com.frac_tion.teleport.png rename to data/icons/hicolor/16x16/apps/org.nekoweb.n0va.BeamMeUp.png diff --git a/data/icons/hicolor/24x24/apps/com.frac-tion.teleport.png b/data/icons/hicolor/24x24/apps/org.nekoweb.n0va.BeamMeUp.png similarity index 100% rename from data/icons/hicolor/24x24/apps/com.frac-tion.teleport.png rename to data/icons/hicolor/24x24/apps/org.nekoweb.n0va.BeamMeUp.png diff --git a/data/icons/hicolor/256x256/apps/com.frac_tion.teleport.png b/data/icons/hicolor/256x256/apps/org.nekoweb.n0va.BeamMeUp.png similarity index 100% rename from data/icons/hicolor/256x256/apps/com.frac_tion.teleport.png rename to data/icons/hicolor/256x256/apps/org.nekoweb.n0va.BeamMeUp.png diff --git a/data/icons/hicolor/32x32/apps/com.frac_tion.teleport.png b/data/icons/hicolor/32x32/apps/org.nekoweb.n0va.BeamMeUp.png similarity index 100% rename from data/icons/hicolor/32x32/apps/com.frac_tion.teleport.png rename to data/icons/hicolor/32x32/apps/org.nekoweb.n0va.BeamMeUp.png diff --git a/data/icons/hicolor/48x48/apps/com.frac_tion.teleport.png b/data/icons/hicolor/48x48/apps/org.nekoweb.n0va.BeamMeUp.png similarity index 100% rename from data/icons/hicolor/48x48/apps/com.frac_tion.teleport.png rename to data/icons/hicolor/48x48/apps/org.nekoweb.n0va.BeamMeUp.png diff --git a/data/icons/hicolor/512x512/apps/com.frac_tion.teleport.png b/data/icons/hicolor/512x512/apps/org.nekoweb.n0va.BeamMeUp.png similarity index 100% rename from data/icons/hicolor/512x512/apps/com.frac_tion.teleport.png rename to data/icons/hicolor/512x512/apps/org.nekoweb.n0va.BeamMeUp.png diff --git a/data/icons/hicolor/64x64/apps/com.frac_tion.teleport.png b/data/icons/hicolor/64x64/apps/org.nekoweb.n0va.BeamMeUp.png similarity index 100% rename from data/icons/hicolor/64x64/apps/com.frac_tion.teleport.png rename to data/icons/hicolor/64x64/apps/org.nekoweb.n0va.BeamMeUp.png diff --git a/data/icons/hicolor/com.frac_tion.teleport.svg b/data/icons/hicolor/org.nekoweb.n0va.BeamMeUp.svg similarity index 100% rename from data/icons/hicolor/com.frac_tion.teleport.svg rename to data/icons/hicolor/org.nekoweb.n0va.BeamMeUp.svg diff --git a/data/icons/hicolor/symbolic/apps/com.frac_tion.teleport-symbolic.svg b/data/icons/hicolor/symbolic/apps/org.nekoweb.n0va.BeamMeUp-symbolic.svg similarity index 100% rename from data/icons/hicolor/symbolic/apps/com.frac_tion.teleport-symbolic.svg rename to data/icons/hicolor/symbolic/apps/org.nekoweb.n0va.BeamMeUp-symbolic.svg diff --git a/data/meson.build b/data/meson.build index 63327d1..7c515ca 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,4 +1,4 @@ -desktop = 'com.frac_tion.teleport.desktop' +desktop = 'org.nekoweb.n0va.BeamMeUp.desktop' i18n.merge_file( input: desktop + '.in', @@ -11,8 +11,8 @@ i18n.merge_file( # Appdata file. appdata_file = i18n.merge_file( - input: 'com.frac_tion.teleport.appdata.xml.in', - output: 'com.frac_tion.teleport.appdata.xml', + input: 'org.nekoweb.n0va.BeamMeUp.appdata.xml.in', + output: 'org.nekoweb.n0va.BeamMeUp.appdata.xml', po_dir: po_dir, install: true, install_dir: join_paths(get_option('datadir'), 'appdata'), @@ -41,7 +41,7 @@ endif schema_dir = join_paths(get_option('prefix'), get_option('datadir'), 'glib-2.0', 'schemas') install_data( - 'com.frac_tion.teleport.gschema.xml', + 'org.nekoweb.n0va.BeamMeUp.gschema.xml', install_dir: schema_dir ) diff --git a/data/org.nekoweb.n0va.BeamMeUp.appdata.xml.in b/data/org.nekoweb.n0va.BeamMeUp.appdata.xml.in new file mode 100644 index 0000000..d0281b7 --- /dev/null +++ b/data/org.nekoweb.n0va.BeamMeUp.appdata.xml.in @@ -0,0 +1,41 @@ + + + + org.nekoweb.n0va.BeamMeUp.desktop + CC0 + AGPL-3.0+ + BeamMeUp + Share files over the local network + + +

+ BeamMeUp is a fast way to share files over the local network. It's + designed to be a replacement for using USB keys or emailing stuff to + yourself just to move them on another device on your desk. +

+
+ + https://git.krzak.org/N0VA/BeamMeUp + https://git.krzak.org/N0VA/BeamMeUp/issues + + n0va@krzak.org + BeamMeUp + + + + +

+ Some small fixes. +

+
+
+ + +

+ This basic initial version sends files chose via the file chooser or + drag and drop. The Downloads directory can be set from the menu. +

+
+
+
+
diff --git a/data/com.frac_tion.teleport.desktop.in b/data/org.nekoweb.n0va.BeamMeUp.desktop.in similarity index 63% rename from data/com.frac_tion.teleport.desktop.in rename to data/org.nekoweb.n0va.BeamMeUp.desktop.in index fb346eb..695eb16 100755 --- a/data/com.frac_tion.teleport.desktop.in +++ b/data/org.nekoweb.n0va.BeamMeUp.desktop.in @@ -1,7 +1,7 @@ [Desktop Entry] -Name=Teleport +Name=BeamMeUp Comment=Share files on the local network -Exec=teleport -Icon=com.frac_tion.teleport +Exec=BeamMeUp +Icon=org.nekoweb.n0va.BeamMeUp Type=Application Categories=GTK;GNOME;Utility; diff --git a/data/com.frac_tion.teleport.gschema.xml b/data/org.nekoweb.n0va.BeamMeUp.gschema.xml similarity index 86% rename from data/com.frac_tion.teleport.gschema.xml rename to data/org.nekoweb.n0va.BeamMeUp.gschema.xml index 5cba701..1b97cb3 100644 --- a/data/com.frac_tion.teleport.gschema.xml +++ b/data/org.nekoweb.n0va.BeamMeUp.gschema.xml @@ -1,6 +1,6 @@ - + '~/Downloads' Download directory diff --git a/meson.build b/meson.build index e956146..ea2b9a9 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project( - 'teleport', + 'BeamMeUp', 'c', version: '0.0.1', license: 'AGPL3+', diff --git a/com.frac_tion.teleport.json b/org.nekoweb.n0va.BeamMeUp.json similarity index 100% rename from com.frac_tion.teleport.json rename to org.nekoweb.n0va.BeamMeUp.json diff --git a/src/teleport-app.c b/src/beam-me-up-app.c similarity index 91% rename from src/teleport-app.c rename to src/beam-me-up-app.c index f7a0f3b..5b0fb11 100644 --- a/src/teleport-app.c +++ b/src/beam-me-up-app.c @@ -1,4 +1,4 @@ -/* teleport-app.c +/* beam-me-up-app.c * * Copyright 2017 Julian Sparber * @@ -22,13 +22,13 @@ #include "config.h" #endif -#include "teleport-app.h" -#include "teleport-peer.h" -#include "teleport-window.h" -#include "teleport-browser.h" -#include "teleport-publish.h" -#include "teleport-server.h" -#include "teleport-get.h" +#include "beam-me-up-app.h" +#include "beam-me-up-peer.h" +#include "beam-me-up-window.h" +#include "beam-me-up-browser.h" +#include "beam-me-up-publish.h" +#include "beam-me-up-server.h" +#include "beam-me-up-get.h" static void save_file_callback (GSimpleAction *simple, @@ -236,7 +236,7 @@ open_file_callback (GSimpleAction *simple, void create_user_notification (const char *file_name, const int file_size, const char *origin_device, GVariant *target) { - GNotification *notification = g_notification_new ("Teleport"); + GNotification *notification = g_notification_new ("BeamMeUp"); TeleportAppPrivate *priv = mainApplication->priv; g_notification_set_body (notification, @@ -255,7 +255,7 @@ create_user_notification (const char *file_name, const int file_size, const char void create_finished_notification (const char *origin, const int filesize, const char *filename, GVariant *target) { - GNotification *notification = g_notification_new ("Teleport"); + GNotification *notification = g_notification_new ("BeamMeUp"); TeleportAppPrivate *priv = mainApplication->priv; g_notification_set_body (notification, @@ -369,7 +369,7 @@ teleport_app_startup (GApplication *app) { /* CSS style */ provider = GTK_STYLE_PROVIDER (gtk_css_provider_new ()); gtk_css_provider_load_from_resource (GTK_CSS_PROVIDER (provider), - "/com/frac_tion/teleport/style.css"); + "/org/nekoweb/n0va/BeamMeUp/style.css"); gtk_style_context_add_provider_for_display (gdk_display_get_default(), provider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); @@ -431,13 +431,15 @@ teleport_app_show_about (GSimpleAction *simple, g_autofree char *copyright = NULL; g_autoptr(GDateTime) date = g_date_time_new_now_local (); int created_year = 2017; + AdwAboutDialog *dialog; static const char *developers[] = { - "Julian Sparber ", + "N0\\A ", NULL }; - static const char *artists[] = { + static const char *original_authors[] = { + "Julian Sparber ", "Tobias Bernard ", NULL }; @@ -451,16 +453,20 @@ teleport_app_show_about (GSimpleAction *simple, copyright = g_strdup_printf ("Copyright \xC2\xA9 %d\xE2\x80\x93%d The Teleport authors", created_year, g_date_time_get_year (date)); } - adw_show_about_dialog (priv->window, - "application-name", "Teleport", - "version", VERSION, - "copyright", copyright, - "license-type", GTK_LICENSE_AGPL_3_0, - "developers", developers, - "artists", artists, - "application-icon", "com.frac_tion.teleport", - "translator-credits", "translator-credits", - NULL); + dialog = ADW_ABOUT_DIALOG (adw_about_dialog_new ()); + + adw_about_dialog_set_application_name (dialog, "BeamMeUp"); + adw_about_dialog_set_version (dialog, VERSION); + adw_about_dialog_set_copyright (dialog, copyright); + adw_about_dialog_set_license_type (dialog, GTK_LICENSE_AGPL_3_0); + adw_about_dialog_set_developers (dialog, developers); + adw_about_dialog_set_application_icon (dialog, "org.nekoweb.n0va.BeamMeUp"); + adw_about_dialog_set_translator_credits (dialog, "translator-credits"); + adw_about_dialog_set_website (dialog, "https://git.krzak.org/N0VA/BeamMeUp"); + + adw_about_dialog_add_acknowledgement_section (dialog, "Original Authors", original_authors); + + adw_dialog_present (ADW_DIALOG (dialog), priv->window); } @@ -475,19 +481,35 @@ teleport_app_quit (GSimpleAction *simple, } TeleportApp * + teleport_app_new (void) + { + return g_object_new (TELEPORT_APP_TYPE, - "application-id", "com.frac_tion.teleport", + + "application-id", "org.nekoweb.n0va.BeamMeUp", + "flags", G_APPLICATION_HANDLES_OPEN, + NULL); + } + + static void + teleport_app_init (TeleportApp *app) { + TeleportAppPrivate *priv = teleport_app_get_instance_private (app); + app->priv = priv; - priv->settings = g_settings_new ("com.frac_tion.teleport"); + + + priv->settings = g_settings_new ("org.nekoweb.n0va.BeamMeUp"); + init_settings (priv->settings); -} \ No newline at end of file + +} diff --git a/src/teleport-app.h b/src/beam-me-up-app.h similarity index 97% rename from src/teleport-app.h rename to src/beam-me-up-app.h index b699288..d6e0a2c 100644 --- a/src/teleport-app.h +++ b/src/beam-me-up-app.h @@ -1,4 +1,4 @@ -/* teleport-app.h +/* beam-me-up-app.h * * Copyright 2017 Julian Sparber * @@ -20,7 +20,7 @@ #define __TELEPORT_APP_H #include -#include "teleport-peer.h" +#include "beam-me-up-peer.h" #define TELEPORT_APP_TYPE (teleport_app_get_type ()) diff --git a/src/teleport-browser.c b/src/beam-me-up-browser.c similarity index 97% rename from src/teleport-browser.c rename to src/beam-me-up-browser.c index fd43f15..2992cda 100644 --- a/src/teleport-browser.c +++ b/src/beam-me-up-browser.c @@ -1,4 +1,4 @@ -/* teleport-browser.c +/* beam-me-up-browser.c * * Copyright 2017 Julian Sparber * @@ -26,9 +26,9 @@ #include #include -#include "teleport-browser.h" -#include "teleport-app.h" -#include "teleport-peer.h" +#include "beam-me-up-browser.h" +#include "beam-me-up-app.h" +#include "beam-me-up-peer.h" static AvahiThreadedPoll *threaded_poll = NULL; static AvahiClient *client = NULL; @@ -187,7 +187,7 @@ teleport_browser_run_avahi_service (TeleportPeer *peers) if (!(avahi_service_browser_new(client, AVAHI_IF_UNSPEC, AVAHI_PROTO_INET, - "_teleport._tcp", + "_beammeup._tcp", NULL, 0, browse_callback, diff --git a/src/teleport-browser.h b/src/beam-me-up-browser.h similarity index 94% rename from src/teleport-browser.h rename to src/beam-me-up-browser.h index ade4182..92701f2 100644 --- a/src/teleport-browser.h +++ b/src/beam-me-up-browser.h @@ -1,4 +1,4 @@ -/* teleport-browser.h +/* beam-me-up-browser.h * * Copyright 2017 Julian Sparber * @@ -19,7 +19,7 @@ #ifndef __TELEPORT_BROWSER_H #define __TELEPORT_BROWSER_H -#include "teleport-peer.h" +#include "beam-me-up-peer.h" int teleport_browser_run_avahi_service(TeleportPeer *); void teleport_browser_avahi_shutdown(void); diff --git a/src/teleport-get.c b/src/beam-me-up-get.c similarity index 98% rename from src/teleport-get.c rename to src/beam-me-up-get.c index d8afdc8..eea66ef 100644 --- a/src/teleport-get.c +++ b/src/beam-me-up-get.c @@ -1,4 +1,4 @@ -/* teleport-get.c +/* beam-me-up-get.c * * Copyright 2017 Julian Sparber * @@ -21,9 +21,9 @@ #endif #include -#include "teleport-app.h" -#include "teleport-window.h" -#include "teleport-get.h" +#include "beam-me-up-app.h" +#include "beam-me-up-window.h" +#include "beam-me-up-get.h" static int saveFile (SoupMessage *, const gchar *, const gchar *); static gchar * getFilePath (const gchar *, const gchar *); diff --git a/src/teleport-get.h b/src/beam-me-up-get.h similarity index 98% rename from src/teleport-get.h rename to src/beam-me-up-get.h index 8e45a41..4c43d41 100644 --- a/src/teleport-get.h +++ b/src/beam-me-up-get.h @@ -1,4 +1,4 @@ -/* teleport-get.h +/* beam-me-up-get.h * * Copyright 2017 Julian Sparber * diff --git a/src/teleport-peer.c b/src/beam-me-up-peer.c similarity index 99% rename from src/teleport-peer.c rename to src/beam-me-up-peer.c index 5c1cefc..ee159d9 100644 --- a/src/teleport-peer.c +++ b/src/beam-me-up-peer.c @@ -1,4 +1,4 @@ -/* teleport-peer.c +/* beam-me-up-peer.c * * Copyright 2017 Julian Sparber * @@ -17,7 +17,7 @@ */ #include -#include "teleport-peer.h" +#include "beam-me-up-peer.h" enum { ADD, REMOVE, N_SIGNALS diff --git a/src/teleport-peer.h b/src/beam-me-up-peer.h similarity index 98% rename from src/teleport-peer.h rename to src/beam-me-up-peer.h index abb6ffd..2eda36f 100644 --- a/src/teleport-peer.h +++ b/src/beam-me-up-peer.h @@ -1,4 +1,4 @@ -/* teleport-peer.h +/* beam-me-up-peer.h * * Copyright 2017 Julian Sparber * diff --git a/src/teleport-publish.c b/src/beam-me-up-publish.c similarity index 97% rename from src/teleport-publish.c rename to src/beam-me-up-publish.c index cb82b1b..219a7ab 100644 --- a/src/teleport-publish.c +++ b/src/beam-me-up-publish.c @@ -35,9 +35,9 @@ #include #include -#include "teleport-app.h" -#include "teleport-peer.h" -#include "teleport-publish.h" +#include "beam-me-up-app.h" +#include "beam-me-up-peer.h" +#include "beam-me-up-publish.h" static AvahiThreadedPoll *threaded_poll = NULL; static AvahiEntryGroup *group = NULL; @@ -119,8 +119,8 @@ static void create_services(AvahiClient *c) { * the service type (IPP vs. BSD LPR). Only services with the * same name should be put in the same entry group. */ - /* Add the service for Teleport */ - if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_teleport._tcp", NULL, NULL, 3000, "test=blah", r, NULL)) < 0) { + /* Add the service for BeamMeUp */ + if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_beammeup._tcp", NULL, NULL, 3000, "test=blah", r, NULL)) < 0) { if (ret == AVAHI_ERR_COLLISION) goto collision; diff --git a/src/teleport-publish.h b/src/beam-me-up-publish.h similarity index 97% rename from src/teleport-publish.h rename to src/beam-me-up-publish.h index 819a068..4662a3b 100644 --- a/src/teleport-publish.h +++ b/src/beam-me-up-publish.h @@ -1,4 +1,4 @@ -/* teleport-publish.h +/* beam-me-up-publish.h * * Copyright 2017 Julian Sparber * diff --git a/src/teleport-remote-device.c b/src/beam-me-up-remote-device.c similarity index 96% rename from src/teleport-remote-device.c rename to src/beam-me-up-remote-device.c index c56b3d5..5b2838a 100644 --- a/src/teleport-remote-device.c +++ b/src/beam-me-up-remote-device.c @@ -1,4 +1,4 @@ -/* teleport-remote-device.c +/* beam-me-up-remote-device.c * * Copyright 2017 Julian Sparber * @@ -17,9 +17,9 @@ */ #include -#include "teleport-remote-device.h" -#include "teleport-peer.h" -#include "teleport-server.h" +#include "beam-me-up-remote-device.h" +#include "beam-me-up-peer.h" +#include "beam-me-up-server.h" enum { @@ -107,7 +107,7 @@ teleport_remote_device_class_init (TeleportRemoteDeviceClass *klass) "The peer that this row represents", G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); - gtk_widget_class_set_template_from_resource (widget_class, "/com/frac_tion/teleport/remote_list.ui"); + gtk_widget_class_set_template_from_resource (widget_class, "/org/nekoweb/n0va/BeamMeUp/remote_list.ui"); gtk_widget_class_bind_template_child (widget_class, TeleportRemoteDevice, send_btn); } diff --git a/src/teleport-remote-device.h b/src/beam-me-up-remote-device.h similarity index 95% rename from src/teleport-remote-device.h rename to src/beam-me-up-remote-device.h index d4441c7..f230854 100644 --- a/src/teleport-remote-device.h +++ b/src/beam-me-up-remote-device.h @@ -1,4 +1,4 @@ -/* teleport-remote-device.c +/* beam-me-up-remote-device.c * * Copyright 2017 Julian Sparber * @@ -20,7 +20,7 @@ #define TELEPORT_REMOTE_DEVICE_H #include -#include "teleport-peer.h" +#include "beam-me-up-peer.h" G_BEGIN_DECLS diff --git a/src/teleport-server.c b/src/beam-me-up-server.c similarity index 97% rename from src/teleport-server.c rename to src/beam-me-up-server.c index 7ce9519..8386c4a 100644 --- a/src/teleport-server.c +++ b/src/beam-me-up-server.c @@ -1,4 +1,4 @@ -/* teleport-server.c +/* beam-me-up-server.c * * Copyright 2017 Julian Sparber * @@ -22,9 +22,9 @@ #include #include -#include "teleport-server.h" -#include "teleport-get.h" -#include "teleport-app.h" +#include "beam-me-up-server.h" +#include "beam-me-up-get.h" +#include "beam-me-up-app.h" static int port; static SoupServer *glob_server; @@ -232,7 +232,7 @@ teleport_server_run (void) { GError *error = NULL; port = 3000; - glob_server = soup_server_new (SOUP_SERVER_SERVER_HEADER, "teleport-httpd ", + glob_server = soup_server_new (SOUP_SERVER_SERVER_HEADER, "beam-me-up-httpd ", NULL); soup_server_listen_all (glob_server, port, 0, &error); diff --git a/src/teleport-server.h b/src/beam-me-up-server.h similarity index 97% rename from src/teleport-server.h rename to src/beam-me-up-server.h index ba474d4..0218f89 100644 --- a/src/teleport-server.h +++ b/src/beam-me-up-server.h @@ -1,4 +1,4 @@ -/* teleport-server.h +/* beam-me-up-server.h * * Copyright 2017 Julian Sparber * diff --git a/src/teleport-window.c b/src/beam-me-up-window.c similarity index 76% rename from src/teleport-window.c rename to src/beam-me-up-window.c index 0652481..ef839a5 100644 --- a/src/teleport-window.c +++ b/src/beam-me-up-window.c @@ -1,4 +1,4 @@ -/* teleport-window.c +/* beam-me-up-window.c * * Copyright 2017 Julian Sparber * @@ -19,11 +19,11 @@ #include #include -#include "teleport-app.h" -#include "teleport-window.h" -#include "teleport-server.h" -#include "teleport-peer.h" -#include "teleport-remote-device.h" +#include "beam-me-up-app.h" +#include "beam-me-up-window.h" +#include "beam-me-up-server.h" +#include "beam-me-up-peer.h" +#include "beam-me-up-remote-device.h" struct _TeleportWindow { @@ -125,6 +125,45 @@ on_show_popover (GtkPopover *widget, "device-name")); } +static void +update_download_dir_display (GtkWidget *label, + GtkWidget *icon, + const char *path) +{ + g_autoptr(GFile) file = g_file_new_for_path (path); + g_autoptr(GFileInfo) info = g_file_query_info (file, + G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," + G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON, + G_FILE_QUERY_INFO_NONE, + NULL, NULL); + + if (info) + { + GIcon *gicon = g_file_info_get_symbolic_icon (info); + gtk_label_set_text (GTK_LABEL (label), g_file_info_get_display_name (info)); + if (gicon) + gtk_image_set_from_gicon (GTK_IMAGE (icon), gicon); + } + else + { + gtk_label_set_text (GTK_LABEL (label), path); + gtk_image_set_from_icon_name (GTK_IMAGE (icon), "folder-symbolic"); + } +} + +static void +on_download_dir_setting_changed (GSettings *settings, + const char *key, + gpointer user_data) +{ + GtkBuilder *builder = user_data; + GtkWidget *label = GTK_WIDGET (gtk_builder_get_object (builder, "settings_download_directory_label")); + GtkWidget *icon = GTK_WIDGET (gtk_builder_get_object (builder, "settings_download_directory_icon")); + g_autofree char *path = g_settings_get_string (settings, key); + + update_download_dir_display (label, icon, path); +} + static void teleport_window_init (TeleportWindow *win) { @@ -132,6 +171,8 @@ teleport_window_init (TeleportWindow *win) GtkBuilder *builder; GtkWidget *menu; GtkWidget *downloadDirBtn; + GtkWidget *downloadDirLabel; + GtkWidget *downloadDirIcon; GSettings *settings = teleport_app_get_settings (); priv = teleport_window_get_instance_private (win); @@ -141,9 +182,11 @@ teleport_window_init (TeleportWindow *win) g_type_ensure (ADW_TYPE_ACTION_ROW); gtk_widget_init_template (GTK_WIDGET (win)); - builder = gtk_builder_new_from_resource ("/com/frac_tion/teleport/settings.ui"); + builder = gtk_builder_new_from_resource ("/org/nekoweb/n0va/BeamMeUp/settings.ui"); menu = GTK_WIDGET (gtk_builder_get_object (builder, "settings")); downloadDirBtn = GTK_WIDGET (gtk_builder_get_object (builder, "settings_download_directory")); + downloadDirLabel = GTK_WIDGET (gtk_builder_get_object (builder, "settings_download_directory_label")); + downloadDirIcon = GTK_WIDGET (gtk_builder_get_object (builder, "settings_download_directory_icon")); gtk_menu_button_set_popover(GTK_MENU_BUTTON (priv->gears), menu); @@ -151,12 +194,22 @@ teleport_window_init (TeleportWindow *win) priv->this_device_row, "title", G_SETTINGS_BIND_GET); + /* Initial update */ + g_autofree char *path = g_settings_get_string (settings, "download-dir"); + update_download_dir_display (downloadDirLabel, downloadDirIcon, path); + + /* Update on change */ + g_signal_connect_data (settings, "changed::download-dir", + G_CALLBACK (on_download_dir_setting_changed), + g_object_ref (builder), + (GClosureNotify)g_object_unref, 0); + g_signal_connect (downloadDirBtn, "clicked", G_CALLBACK (on_choose_download_dir_clicked), settings); g_object_unref (builder); /* Add popover for device settings */ - builder = gtk_builder_new_from_resource ("/com/frac_tion/teleport/device_settings.ui"); + builder = gtk_builder_new_from_resource ("/org/nekoweb/n0va/BeamMeUp/device_settings.ui"); menu = GTK_WIDGET (gtk_builder_get_object (builder, "device-settings")); gtk_menu_button_set_popover(GTK_MENU_BUTTON (priv->this_device_settings_button), menu); @@ -232,7 +285,7 @@ teleport_window_class_init (TeleportWindowClass *class) G_OBJECT_CLASS (class)->dispose = teleport_window_dispose; gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class), - "/com/frac_tion/teleport/window.ui"); + "/org/nekoweb/n0va/BeamMeUp/window.ui"); gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), TeleportWindow, gears); gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), TeleportWindow, this_device_settings_button); diff --git a/src/teleport-window.h b/src/beam-me-up-window.h similarity index 95% rename from src/teleport-window.h rename to src/beam-me-up-window.h index fc2aab9..b4d25da 100644 --- a/src/teleport-window.h +++ b/src/beam-me-up-window.h @@ -1,4 +1,4 @@ -/* teleport-window.h +/* beam-me-up-window.h * * Copyright 2017 Julian Sparber * @@ -20,8 +20,8 @@ #define __TELEPORT_WINDOW_H #include -#include "teleport-app.h" -#include "teleport-peer.h" +#include "beam-me-up-app.h" +#include "beam-me-up-peer.h" #define TELEPORT_WINDOW_TYPE (teleport_window_get_type ()) G_DECLARE_FINAL_TYPE (TeleportWindow, diff --git a/src/main.c b/src/main.c index 404ea85..ec5b8fc 100644 --- a/src/main.c +++ b/src/main.c @@ -18,7 +18,7 @@ #include -#include "teleport-app.h" +#include "beam-me-up-app.h" int main (int argc, char *argv[]) diff --git a/src/meson.build b/src/meson.build index 8d182c3..9863652 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,13 +1,12 @@ - headers = files( - 'teleport-remote-device.h', - 'teleport-browser.h', - 'teleport-get.h', - 'teleport-publish.h', - 'teleport-server.h', - 'teleport-window.h', - 'teleport-peer.h', - 'teleport-app.h' + 'beam-me-up-remote-device.h', + 'beam-me-up-browser.h', + 'beam-me-up-get.h', + 'beam-me-up-publish.h', + 'beam-me-up-server.h', + 'beam-me-up-window.h', + 'beam-me-up-peer.h', + 'beam-me-up-app.h' ) install_headers(headers, subdir: meson.project_name()) @@ -18,22 +17,22 @@ install_headers(headers, subdir: meson.project_name()) ################ sources = files( - 'teleport-remote-device.c', - 'teleport-browser.c', - 'teleport-get.c', - 'teleport-publish.c', - 'teleport-server.c', - 'teleport-app.c', - 'teleport-window.c', - 'teleport-peer.c', + 'beam-me-up-remote-device.c', + 'beam-me-up-browser.c', + 'beam-me-up-get.c', + 'beam-me-up-publish.c', + 'beam-me-up-server.c', + 'beam-me-up-app.c', + 'beam-me-up-window.c', + 'beam-me-up-peer.c', 'main.c' ) sources += gnome.compile_resources( - 'teleport-resources', - join_paths(data_dir, 'teleport.gresource.xml'), + 'BeamMeUp-resources', + join_paths(data_dir, 'BeamMeUp.gresource.xml'), source_dir: [ data_dir, join_paths(meson.build_root(), 'plugins') ], - c_name: 'teleport', + c_name: 'BeamMeUp', # dependencies: plugins_confs, export: true ) @@ -78,10 +77,10 @@ ldflags = [ '-Wl,--export-dynamic' ] ############### -# teleport # +# BeamMeUp # ############### -teleport = executable( +BeamMeUp = executable( meson.project_name(), sources, include_directories: incs, @@ -98,8 +97,8 @@ teleport = executable( # Private library # ################### -libteleport = shared_library( - 'teleport', +libBeamMeUp = shared_library( + 'BeamMeUp', sources: sources, version: libversion, soversion: soversion, @@ -108,9 +107,8 @@ libteleport = shared_library( c_args: cflags ) -libteleport_dep = declare_dependency( - link_with: libteleport, +libBeamMeUp_dep = declare_dependency( + link_with: libBeamMeUp, include_directories: src_inc, dependencies: teleport_deps -) - +) \ No newline at end of file diff --git a/src/settings.ui b/src/settings.ui index 4731f66..a05823f 100644 --- a/src/settings.ui +++ b/src/settings.ui @@ -22,7 +22,23 @@ - Choose download dir + + + 6 + + + folder-symbolic + + + + + Choose download dir + end + 0 + + + + @@ -34,7 +50,7 @@ 6 - Automatically enable Teleport on these networks: + Automatically enable BeamMeUp on these networks: 0 @@ -114,7 +130,7 @@ app.about - About Teleport + About BeamMeUp diff --git a/src/window.ui b/src/window.ui index 17d71ea..c4609fa 100644 --- a/src/window.ui +++ b/src/window.ui @@ -3,7 +3,7 @@