Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings #19

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
20 changes: 2 additions & 18 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,13 @@
* Authored by: Felipe Escoto <[email protected]>
*/

public class Wallpaperize.Application : Granite.Application {
public const string PROGRAM_ID = "com.github.philip-scott.wallpaperize";
public class Wallpaperize.Application : Gtk.Application {
public const string PROGRAM_NAME = "Wallpaperize";
NathanBnm marked this conversation as resolved.
Show resolved Hide resolved

construct {
flags |= ApplicationFlags.HANDLES_OPEN;

NathanBnm marked this conversation as resolved.
Show resolved Hide resolved
application_id = PROGRAM_ID;
program_name = PROGRAM_NAME;
app_years = "2016-2017";
exec_name = PROGRAM_ID;
app_launcher = PROGRAM_ID;

build_version = "1.0";
app_icon = PROGRAM_ID;
main_url = "https://github.com/Philip-Scott/%s/".printf (PROGRAM_NAME);
bug_url = "https://github.com/Philip-Scott/%s/issues".printf (PROGRAM_NAME);
help_url = "https://github.com/Philip-Scott/%s/issues".printf (PROGRAM_NAME);
translate_url = "https://github.com/Philip-Scott/%s/tree/master/po".printf (PROGRAM_NAME);
about_authors = {"Felipe Escoto <[email protected]>", null};
about_translators = _("translator-credits");

about_license_type = Gtk.License.GPL_3_0;
application_id = "com.github.philip-scott.wallpaperize";
}

public override void open (File[] files, string hint) {
Expand Down
16 changes: 8 additions & 8 deletions src/Wallpaperize.vala
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ public class Wallpaperize.Wallpaperiser : Object {
}

public static void get_monitor_geometry() {
var screen = Gdk.Screen.get_default ();
int primary_monitor = screen.get_primary_monitor ();
Gdk.Rectangle geometry;
screen.get_monitor_geometry (primary_monitor, out geometry);

int monitor_scale = screen.get_monitor_scale_factor (primary_monitor);
Wallpaperize.Wallpaperiser.H = geometry.height * monitor_scale;
Wallpaperize.Wallpaperiser.W = geometry.width * monitor_scale;
var display = Gdk.Display.get_default ();
Gdk.Monitor monitor = display.get_primary_monitor ();
Gdk.Rectangle geometry = monitor.get_geometry ();

int scale_factor = monitor.get_scale_factor ();

Wallpaperize.Wallpaperiser.H = geometry.height * scale_factor;
Wallpaperize.Wallpaperiser.W = geometry.width * scale_factor;
}

public static void make_image (string input, string output) {
Expand Down