diff --git a/README.md b/README.md index c48875f..293dff8 100644 --- a/README.md +++ b/README.md @@ -24,21 +24,30 @@ The plan was to make a CrossPlatform app for (Windows/MacOS/Linux), and it can a ## Linux - download the .tar.gz file, extract, make and make install: + download the .tar.gz file, extract, make and make install. + should be able to work on most distro, let me know if any problem. ### Ubuntu - ```bash +```bash sudo apt install libwxgtk3.0-dev libcurl4-openssl-dev ibssh2-1-dev libboost1.61-dev libappindicator3-dev +tar zxvf fu-vxxx.tar.gz +./configure make - ``` +sudo make install +``` # Build Dependencies - * wxWidgets 3.0 + * wxWidgets 3.0.2 * libcurl * libssh2 * boost +# FAQ + + Q: How to add imgur.com? + A: go to http://api.imgur.com/ register an application, you will receive a Client-ID, put it to Client + # Like it ? * Star this respository right away! diff --git a/fu/resources/Makefile.am b/fu/resources/Makefile.am index 9072317..d50f443 100644 --- a/fu/resources/Makefile.am +++ b/fu/resources/Makefile.am @@ -7,7 +7,7 @@ autostartdir = $(sysconfdir)/xdg/autostart autostart_DATA = fu_startup.desktop pixmapsdir = $(datarootdir)/icons/hicolor/48x48/apps -pixmaps_DATA = fu.png +pixmaps_DATA = fu.png fu_uploading.png EXTRA_DIST = \ $(desktop_DATA) \ diff --git a/fu/resources/fu_uploading.png b/fu/resources/fu_uploading.png new file mode 100644 index 0000000..7776add Binary files /dev/null and b/fu/resources/fu_uploading.png differ diff --git a/fu/src/core/config.cpp b/fu/src/core/config.cpp index f7e8dde..c2d6610 100644 --- a/fu/src/core/config.cpp +++ b/fu/src/core/config.cpp @@ -159,7 +159,7 @@ class Config child = child->GetNext(); } - _appIcon.LoadFile(GetIconPath("128x128", "icon.png"), wxBITMAP_TYPE_PNG); + //_appIcon.LoadFile(GetIconPath("128x128", "icon.png"), wxBITMAP_TYPE_PNG); } ~Config() @@ -202,18 +202,18 @@ class Config _listeners.push_back(listener); } - wxString GetIconPath(const wxString &subfolder, const wxString &iconName) - { - wxFileName tmp(_executeDir, iconName); - tmp.AppendDir("resources"); - tmp.AppendDir(subfolder); - return tmp.GetFullPath(); - } - - wxIcon &GetAppIcon() - { - return _appIcon; - } + //wxString GetIconPath(const wxString &subfolder, const wxString &iconName) + //{ + //wxFileName tmp(_executeDir, iconName); + //tmp.AppendDir("resources"); + //tmp.AppendDir(subfolder); + //return tmp.GetFullPath(); + //} + + //wxIcon &GetAppIcon() + //{ + //return _appIcon; + //} void AddSite(Site *site) { diff --git a/fu/src/fu b/fu/src/fu new file mode 100755 index 0000000..c84e410 Binary files /dev/null and b/fu/src/fu differ diff --git a/fu/src/ui/browseform.cpp b/fu/src/ui/browseform.cpp index ac3acd5..c79f2e2 100644 --- a/fu/src/ui/browseform.cpp +++ b/fu/src/ui/browseform.cpp @@ -241,7 +241,7 @@ class BrowseForm : public wxDialog public: BrowseForm(wxPoint &pos, wxSize &size) : wxDialog(NULL, wxID_ANY, "History", pos, size, wxCAPTION | wxMAXIMIZE_BOX | wxRESIZE_BORDER | wxCLOSE_BOX) { - SetIcon(TheConfig.GetAppIcon()); + //SetIcon(TheConfig.GetAppIcon()); _chcSite = new wxChoice(this, ctlID_SITE); _txtKeyword = new wxTextCtrl(this, wxID_ANY); _txtKeyword->SetHint("Keyword"); diff --git a/fu/src/ui/prefform.cpp b/fu/src/ui/prefform.cpp index 0c06e9d..7fbcc1b 100644 --- a/fu/src/ui/prefform.cpp +++ b/fu/src/ui/prefform.cpp @@ -26,7 +26,7 @@ class PrefForm : public wxDialog public: PrefForm(wxPoint &pos, wxSize &size) : wxDialog(NULL, wxID_ANY, "Preferences", pos, size, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { - SetIcon(TheConfig.GetAppIcon()); + //SetIcon(TheConfig.GetAppIcon()); _tabs = new wxNotebook(this, wxID_ANY); _pnlSites = new SitesPanel(_tabs); _pnlPreproc = new PreProcPanel(_tabs); diff --git a/fu/src/ui/tray.cpp b/fu/src/ui/tray.cpp index b3b9bd5..ef74af5 100644 --- a/fu/src/ui/tray.cpp +++ b/fu/src/ui/tray.cpp @@ -14,7 +14,6 @@ #include "../core/site.cpp" #include "../core/uploader.cpp" #include "../core/format.cpp" -#include "../core/converter.cpp" #include "../core/history.cpp" #include "../os/os.h" #include "prefform.cpp" @@ -52,8 +51,6 @@ class Tray : public wxTaskBarIcon vector _pending, _uploading, _uploaded; int uploadingCount = 0; - wxString _iconPath; - wxString _iconUploadingPath; #ifdef HAVE_APPINDICATOR AppIndicator* _indicator; @@ -72,6 +69,8 @@ class Tray : public wxTaskBarIcon g_signal_connect((GObject*)item->GetMenuItem(), "activate", G_CALLBACK(gtk_menu_item_selected), GINT_TO_POINTER(item->GetId())); } #else + wxString _iconPath; + wxString _iconUploadingPath; wxIcon _icon; wxIcon _iconUploading; #endif @@ -80,8 +79,6 @@ class Tray : public wxTaskBarIcon { wxLogDebug("tray icon ready"); - _iconPath = TheConfig.GetIconPath("16x16", "icon.png"); - _iconUploadingPath = TheConfig.GetIconPath("16x16", "icon_uploading.png"); _pref = new PrefForm(TheConfig.Position, TheConfig.Size); @@ -98,6 +95,8 @@ class Tray : public wxTaskBarIcon CreateIndicatorMenu(); Bind(wxEVT_UPDATE_UI, &Tray::OnUpdateMenu, this); #else + _iconPath = TheConfig.GetIconPath("16x16", "icon.png"); + _iconUploadingPath = TheConfig.GetIconPath("16x16", "icon_uploading.png"); _icon.LoadFile(_iconPath, wxBITMAP_TYPE_PNG); _iconUploading.LoadFile(_iconUploadingPath, wxBITMAP_TYPE_PNG); #endif @@ -124,13 +123,12 @@ class Tray : public wxTaskBarIcon void NormalIcon() { - wxLogDebug("_iconPath: %s", _iconPath); - app_indicator_set_icon(_indicator, _iconPath.c_str()); + app_indicator_set_icon(_indicator, "fu"); } void UploadingIcon() { - app_indicator_set_icon(_indicator, _iconUploadingPath.c_str()); + app_indicator_set_icon(_indicator, "fu_uploading"); } #else