removed unused packages
This commit is contained in:
parent
713146cb1e
commit
c6c23a6850
8 changed files with 34 additions and 39 deletions
|
@ -1,7 +1,7 @@
|
|||
cmake_minimum_required (VERSION 2.8)
|
||||
cmake_policy (VERSION 2.8)
|
||||
|
||||
project(com.github.artemanufrij.webpin)
|
||||
project (com.github.artemanufrij.webpin)
|
||||
include (GNUInstallDirs)
|
||||
set (DATADIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}")
|
||||
set (PKGDATADIR "${DATADIR}/${CMAKE_PROJECT_NAME}")
|
||||
|
@ -12,20 +12,13 @@ list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
|||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(DEPS REQUIRED
|
||||
gobject-2.0
|
||||
glib-2.0
|
||||
gio-2.0
|
||||
gtk+-3.0>=3.12
|
||||
gthread-2.0
|
||||
granite
|
||||
gee-0.8
|
||||
webkit2gtk-4.0
|
||||
libsoup-2.4
|
||||
gdk-pixbuf-2.0
|
||||
)
|
||||
|
||||
#
|
||||
add_subdirectory(po)
|
||||
add_definitions (-w)
|
||||
|
||||
|
||||
add_definitions(${DEPS_CFLAGS})
|
||||
link_libraries(${DEPS_LIBRARIES})
|
||||
|
@ -37,5 +30,6 @@ include(ValaVersion)
|
|||
ensure_vala_version("0.26.0" MINIMUM)
|
||||
|
||||
add_subdirectory (src)
|
||||
add_subdirectory (po)
|
||||
add_subdirectory (data)
|
||||
add_subdirectory (schemas)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
vala_precompile(VALA_C ${CMAKE_PROJECT_NAME}
|
||||
Widgets/ApplicationIcon.vala
|
||||
Widgets/ApplicationsView.vala
|
||||
Widgets/Assistant.vala
|
||||
Application.vala
|
||||
MainWindow.vala
|
||||
Assistant.vala
|
||||
DesktopFile.vala
|
||||
InfoDialog.vala
|
||||
Settings.vala
|
||||
|
@ -14,12 +14,7 @@ vala_precompile(VALA_C ${CMAKE_PROJECT_NAME}
|
|||
PACKAGES
|
||||
gtk+-3.0
|
||||
granite
|
||||
gio-2.0
|
||||
gee-0.8
|
||||
posix
|
||||
webkit2gtk-4.0
|
||||
libsoup-2.4
|
||||
gdk-pixbuf-2.0
|
||||
|
||||
OPTIONS
|
||||
--vapidir=${CMAKE_SOURCE_DIR}/vapi
|
||||
|
|
|
@ -43,7 +43,6 @@ namespace Webpin {
|
|||
X-GNOME-FullName=webpin
|
||||
WebpinThemeColor=none""";
|
||||
|
||||
|
||||
private GLib.KeyFile file;
|
||||
|
||||
public string name { get; private set; }
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace Webpin {
|
|||
private Gtk.Button back_button;
|
||||
private Gtk.Button add_button;
|
||||
|
||||
private WebbyAssistant assistant;
|
||||
private Assistant assistant;
|
||||
private ApplicationsView apps_view;
|
||||
|
||||
public MainWindow () {
|
||||
|
@ -73,7 +73,7 @@ namespace Webpin {
|
|||
});
|
||||
|
||||
apps_view = new ApplicationsView();
|
||||
assistant = new WebbyAssistant();
|
||||
assistant = new Assistant();
|
||||
stack = new Gtk.Stack ();
|
||||
stack.set_transition_duration (500);
|
||||
|
||||
|
|
|
@ -149,17 +149,24 @@ namespace Webpin {
|
|||
|
||||
});*/
|
||||
|
||||
var snap = (Cairo.ImageSurface) yield app_view.get_snapshot (WebKit.SnapshotRegion.VISIBLE,
|
||||
WebKit.SnapshotOptions.NONE, null);
|
||||
uint8[] data = {0, 0, 0};
|
||||
int snap_width = 0;
|
||||
try {
|
||||
var snap = (Cairo.ImageSurface) yield app_view.get_snapshot (WebKit.SnapshotRegion.VISIBLE, WebKit.SnapshotOptions.NONE, null);
|
||||
|
||||
// data ist in BGRA apparently (according to testing). Docs said ARGB, but that
|
||||
// appears not to be the case
|
||||
data = snap.get_data ();
|
||||
snap_width = snap.get_width ();
|
||||
} catch (Error e) {
|
||||
warning (e.message);
|
||||
}
|
||||
|
||||
// data ist in BGRA apparently (according to testing). Docs said ARGB, but that
|
||||
// appears not to be the case
|
||||
unowned uint8[] data = snap.get_data ();
|
||||
uint8 r = data[2];
|
||||
uint8 g = data[1];
|
||||
uint8 b = data[0];
|
||||
|
||||
for (var i = 4; i < snap.get_width () * 3 * 4; i += 4) {
|
||||
for (var i = 4; i < snap_width * 3 * 4; i += 4) {
|
||||
r = (r + data[i + 2]) / 2;
|
||||
g = (g + data[i + 1]) / 2;
|
||||
b = (b + data[i + 0]) / 2;
|
||||
|
|
|
@ -77,8 +77,8 @@ namespace Webpin {
|
|||
this.set_titlebar (headerbar);
|
||||
|
||||
var info = DesktopFile.get_app_by_url(webapp_uri);
|
||||
var width = info.get_string("WebbyWindowWidth");
|
||||
var height = info.get_string("WebbyWindowHeight");
|
||||
var width = info.get_string("WebpinWindowWidth");
|
||||
var height = info.get_string("WebpinWindowHeight");
|
||||
|
||||
if(width !=null && height != null)
|
||||
set_default_size (int.parse(width), int.parse(height));
|
||||
|
@ -134,8 +134,8 @@ namespace Webpin {
|
|||
|
||||
public void update_window_state (int width, int height) {
|
||||
var file = web_app.get_desktop_file();
|
||||
file.edit_propertie ("WebbyWindowWidth", width.to_string());
|
||||
file.edit_propertie ("WebbyWindowHeight", height.to_string());
|
||||
file.edit_propertie ("WebpinWindowWidth", width.to_string());
|
||||
file.edit_propertie ("WebpinWindowHeight", height.to_string());
|
||||
}
|
||||
|
||||
public override bool key_press_event (Gdk.EventKey event) {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
namespace Webpin {
|
||||
public class WebbyAssistant : Gtk.Box {
|
||||
public class Assistant : Gtk.Box {
|
||||
|
||||
public enum assistant_mode { new_app, edit_app }
|
||||
|
||||
|
@ -55,7 +55,7 @@ namespace Webpin {
|
|||
|
||||
private assistant_mode mode { get; set; default = assistant_mode.new_app; }
|
||||
|
||||
public WebbyAssistant () {
|
||||
public Assistant () {
|
||||
|
||||
GLib.Object (orientation: Gtk.Orientation.VERTICAL);
|
||||
apps = DesktopFile.get_applications ();
|
Loading…
Reference in a new issue