hannesschulze / conecto

Integrate your Android-phone with your PC - a GTK client for KDEConnect.
GNU General Public License v3.0
99 stars 11 forks source link

New design #3

Open hannesschulze opened 5 years ago

hannesschulze commented 5 years ago

Inspired by https://github.com/aprilis/messenger

Mockup:

frame 1

TODO:

aadilayub commented 5 years ago

Perhaps you could use GTK progress bar to indicate battery percentage?

Like this:

screenshot from 2019-03-03 22 37 19

hannesschulze commented 5 years ago

I don't actually think that's a good idea, because a progress bar in the dock is indicating progress, which isn't the case for this - at least imo it would be confusing to have that :)

hannesschulze commented 5 years ago

Some updates to the design:

Frame(12)

Basically just because I didn't have much time when making the first one

aimproxy commented 5 years ago

The design looks really great, I have looking for something like this, that design is really a god job, and please if you have this design ready publish on appcenter!

Fatih20 commented 4 years ago

Hey, maybe I can help with the design. What do you mean by "telephony view" ?

hannesschulze commented 4 years ago

Hey, thanks for your offer!

Just to give you a quick overview about what I'm currently doing with the design:

I think if you would like to help with the design you could put some thought into the last view. Also you're free to review my current design, just note that nothing's final yet 😄

Fatih20 commented 4 years ago
* I currently have no idea what's the best way to implement file sharing. One option for that would be to include it as a mountpoint into the file manager and also adding an entry to the context menus using Contractor (doesn't need a design). However, I think it might also be good to have a dedicated view for this in the app (maybe something like a "Drag files here" screen which then sends the files to the phone)

I assume file sharing would be two way?

hannesschulze commented 4 years ago

Well, that's an interesting question...

On the PC side, I thought of these ways to share files:

  1. PC -> Phone by selecting a menu item in the file manager (using Contractor)
  2. PC -> Phone by dragging and dropping the file into the app
  3. Phone -> PC by opening a mount point in the file manager

However I just noticed that there is also a Send files option in the Android app. I'm not really sure how this works and unfortunately I can't test this with KDE Connect right now because I don't have KDE installed. I guess, since everything in KDE Connect works using small, custom JSON packets, it would be possible to display a screen once Conecto has received a request from the phone.


I just looked through KDEConnect's source code ­­-- it seems like they just save the file to a fixed location specified before. I'm not really a fan of this, I'd prefer seeing a PHONE_NAME has shared the following file message, maybe showing an icon for the file type and filename (maybe you have a better idea) and a button opening a FileChooserDialog.

Fatih20 commented 4 years ago

Well, that's an interesting question...

On the PC side, I thought of these ways to share files:

1. **PC -> Phone** by selecting a menu item in the file manager (using Contractor)

2. **PC -> Phone** by dragging and dropping the file into the app

3. **Phone -> PC** by opening a mount point in the file manager

However I just noticed that there is also a Send files option in the Android app. I'm not really sure how this works and unfortunately I can't test this with KDE Connect right now because I don't have KDE installed. I guess, since everything in KDE Connect works using small, custom JSON packets, it would be possible to display a screen once Conecto has received a request from the phone.

I just looked through KDEConnect's source code ­­-- it seems like they just save the file to a fixed location specified before. I'm not really a fan of this, I'd prefer seeing a PHONE_NAME has shared the following file message, maybe showing an icon for the file type and filename (maybe you have a better idea) and a button opening a FileChooserDialog.

I think your idea works fine and you're better-suited to designing these. 👍️

hannesschulze commented 4 years ago

Alright, no problem :smile:

Once I'm done with a mock-up for this I might also post it here.

sidevesh commented 4 years ago

hey @hannesschulze , love what you are building here and would love to help, my thoughts on the Files tab: For the initial release maybe we can add a minimal interface, when a file is shared from the phont to the PC, we can show a notification, to send files from PC to phone we can offer two ways, first, as an option in the right click menu in the Files app, second, currently the left side pane in the mockup above seems a bit empty so maybe we can add some actions there, starting with a "Send files" option that opens a file chooser dialog.

This way, maybe we can forego the Files tab for now and revisit it later.

Just my thoughts, let me know if I can help out with the File transfer, UI or with #16 .

hannesschulze commented 4 years ago

Hey, thanks for your suggestion.

I think the notification and context-menu is pretty much what I was thinking about. I think the "Send files" button in the sidebar could work, I like that idea! It might also be possible to additionally support drag'n'drop by using a Gtk::Overlay or something similar on drag motion, so that this could fully replace the "Files" tab.

As for the implementation, any help would be appreciated! Since I'm already working on the SMS view, I think I should probably split this issue up a bit. If you want to, you can take a look at transferring files (which will also be useful for #23), MPRIS or porting over the code from #11 to C++.

If you have any questions about the API design, please feel free to ask. I am trying to document my code as much as possible, so building with -Ddocs=true for doxygen documentation might be a good starting point.

EDIT: Ok, thinking about this a bit more, I don't think it is even possible to have both a file manager in focus and the popover open at the same time. So maybe drag'n'drop support isn't really necessary right now.

sidevesh commented 4 years ago

Yeah, drag and drop is not necessary right now, I will take a look at the clipboard functionality to begin with, will be working on elementary os apps for first time so might need assist from you :)

sidevesh commented 4 years ago

Hey @hannesschulze , I tried to run the project but on running ninja I am getting following error:

[23/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_application.cpp.o'. In file included from ../src/views/main/../sms-view.h:24:0, from ../src/views/main/connected-device-view.h:28, from ../src/views/main/active-device-view.h:31, from ../src/window.h:29, from ../src/application.h:25, from ../src/application.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [24/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_device-popover.cpp.o'. In file included from ../src/widgets/popover-window.h:24:0, from ../src/device-popover.h:25, from ../src/device-popover.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [25/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_main.cpp.o'. In file included from ../src/views/main/../sms-view.h:24:0, from ../src/views/main/connected-device-view.h:28, from ../src/views/main/active-device-view.h:31, from ../src/window.h:29, from ../src/application.h:25, from ../src/main.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [26/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_window.cpp.o'. In file included from ../src/views/main/../sms-view.h:24:0, from ../src/views/main/connected-device-view.h:28, from ../src/views/main/active-device-view.h:31, from ../src/window.h:29, from ../src/window.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [33/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_models_sms-storage.cpp.o'. FAILED: com.github.hannesschulze.conecto@exe/src_models_sms-storage.cpp.o c++ -Icom.github.hannesschulze.conecto@exe -I. -I.. -Ilibconecto -I../libconecto -I../libconecto/./plugins -I/usr/include/jsoncpp -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/p11-kit-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gdkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gdkmm-3.0/include -I/usr/include/pangomm-1.4 -I/usr/lib/x86_64-linux-gnu/pangomm-1.4/include -I/usr/include/at-spi2-atk/2.0 -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairomm-1.0 -I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/gee-0.8 -I/usr/include/gtkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtkmm-3.0/include -I/usr/include/atkmm-1.6 -I/usr/include/gtk-3.0/unix-print -I/usr/include/granite -I/usr/include/plank -I/usr/include/libbamf3 -I/usr/lib/x86_64-linux-gnu/libbamf3/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -g -pthread -MD -MQ 'com.github.hannesschulze.conecto@exe/src_models_sms-storage.cpp.o' -MF 'com.github.hannesschulze.conecto@exe/src_models_sms-storage.cpp.o.d' -o 'com.github.hannesschulze.conecto@exe/src_models_sms-storage.cpp.o' -c ../src/models/sms-storage.cpp ../src/models/sms-storage.cpp: In lambda function: ../src/models/sms-storage.cpp:128:43: error: ‘create_from_iso8601’ is not a member of ‘Glib::DateTime’ Glib::DateTime::create_from_iso8601 (vals.at (MessageColumns::DATETIME))); ^~~~~~~~~~~~~~~~~~~ ../src/models/sms-storage.cpp: In lambda function: ../src/models/sms-storage.cpp:145:43: error: ‘create_from_iso8601’ is not a member of ‘Glib::DateTime’ Glib::DateTime::create_from_iso8601 (vals.at (MessageColumns::DATETIME))); ^~~~~~~~~~~~~~~~~~~ [36/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_views_main_active-device-view.cpp.o'. In file included from ../src/views/main/../sms-view.h:24:0, from ../src/views/main/connected-device-view.h:28, from ../src/views/main/active-device-view.h:31, from ../src/views/main/active-device-view.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [40/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_views_dock_active-device-view.cpp.o'. In file included from ../src/views/dock/../sms-view.h:24:0, from ../src/views/dock/connected-device-view.h:28, from ../src/views/dock/active-device-view.h:28, from ../src/views/dock/active-device-view.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [41/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_views_main_connected-device-view.cpp.o'. In file included from ../src/views/main/../sms-view.h:24:0, from ../src/views/main/connected-device-view.h:28, from ../src/views/main/connected-device-view.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ [42/52] Compiling C++ object 'com.github.hannesschulze.conecto@exe/src_views_dock_connected-device-view.cpp.o'. In file included from ../src/views/dock/../sms-view.h:24:0, from ../src/views/dock/connected-device-view.h:28, from ../src/views/dock/connected-device-view.cpp:21: /usr/include/granite/granite.h:2091:63: warning: ‘GraniteTextStyle’ is deprecated [-Wdeprecated-declarations] gchar* * style_class); ^ /usr/include/granite/granite.h:586:15: note: declared here typedef enum { ^ ninja: build stopped: subcommand failed.

Any ideas why this could be happening ?

hannesschulze commented 4 years ago

Ah, I know what's happening.

First of all, I don't know what's the best way to get rid of those deprecation warnings. I think they just occur because some function in the granite header uses a deprecated type from the same header, probably caused by the Vala compiler.

The main problem seems to be that I am not actually developing Conecto on elementary OS 5 (which is based on Ubuntu 18.04) and I am using some Gtkmm-features which are not available in the version bundled with Ubuntu 18.04. I didn't plan to release Conecto for elementary OS 5 (version 6 should be coming out later this year).

These are probably just minor problems. I am going to set up CI for Ubuntu 18.04 so I can fix them.

hannesschulze commented 4 years ago

Should be working now 🎉