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