Commit 8f4b6b9
fix some compiler warnings
Changed files (8)
modifiedsrc/Font.valamodifiedsrc/GlyphTable.valamodifiedsrc/GtkInterface.valamodifiedsrc/Line.valamodifiedsrc/OverView.valamodifiedsrc/PenTool.valamodifiedsrc/TabBar.valamodifiedsrc/Toolbox.vala
Diff
@@ -91,14 +91,6 @@ class Font : GLib.Object { return svg_export; } - public void set_ttf_export (bool d) {- ttf_export = d;- }-- public void set_svg_export (bool d) {- svg_export = d;- }- public File get_backgrounds_folder () { string fn = @"$(get_name ()) backgrounds"; File f = Supplement.get_settings_directory ().get_child (fn);@@ -178,8 +178,6 @@ class GlyphTable : GLib.Object { return (ac < bc) ? 1 : -1; }- - return (ac < bc) ? 1 : -1; } public void build_index () {@@ -356,9 +354,7 @@ class GlyphTable : GLib.Object { } else { i = i.prev; }- }- - return null; + } } public bool validate_index () {@@ -24,13 +24,10 @@ using WebKit; namespace Supplement { public class GtkWindow : Gtk.Window, NativeWindow {- - MainWindow window; HBox list_box; HBox canvas_box; - TabbarCanvas tabbar; WebView html_canvas; ScrolledWindow html_box; @@ -198,9 +195,7 @@ public class GtkWindow : Gtk.Window, NativeWindow { int w = Preferences.get_window_width (); int h = Preferences.get_window_height (); - print ("window_width $w\n");- - set_default_size (1000, h);+ set_default_size (w, h); // move (10, 240); } @@ -136,7 +136,7 @@ class Line : GLib.Object { } public void event_move_to (double x, double y, double ax, double ay, Allocation allocation) {- double p, c, mx, my;+ double p, c; bool a = false; Glyph g = MainWindow.get_current_glyph (); double ivz = 1/g.view_zoom;@@ -386,15 +386,13 @@ class OverView : FontDisplay { double gx, gy; double x1, x2, y1, y2; double scale = nail_zoom_width / 150.0;- double w, h, m;+ double w, h; w = nail_width - 19; h = nail_height - 22; scale = nail_zoom_height / (210.0 - 15.0); - Font f = Supplement.get_current_font ();- if (gl == null) { return false; }@@ -26,8 +26,7 @@ class PenTool : Tool { public static bool move_point_on_path = false; public static bool edit_active_corner = false;- public static EditPoint active_corner = new EditPoint ();- public static Path active_path = new Path ();+ public static List<EditPoint> selected_points = new List<EditPoint> (); public static EditPointHandle active_handle = new EditPointHandle.empty ();@@ -127,7 +126,6 @@ class PenTool : Tool { public void move (double x, double y) { Glyph glyph = MainWindow.get_current_glyph ();- EditPoint ep; control_point_event (x, y); curve_active_corner_event (x, y);@@ -374,8 +372,7 @@ class PenTool : Tool { Path? p; EditPoint e; EditPoint? ep = get_closest_point (event_x, event_y, out p);- Glyph g = MainWindow.get_current_glyph ();- + double x = Glyph.path_coordinate_x (event_x); double y = Glyph.path_coordinate_y (event_y); @@ -531,7 +528,7 @@ class PenTool : Tool { Glyph g = MainWindow.get_current_glyph (); double d_point = g.view_zoom * get_distance_to_closest_edit_point (event_x, event_y); - double dp, dl, dr;+ double dl, dr; foreach (EditPoint selected_corner in selected_points) { dl = g.view_zoom * selected_corner.get_left_handle ().get_point ().get_distance (x, y);@@ -418,10 +418,6 @@ class TabBar : GLib.Object { } public void add_tab (FontDisplay display_item, double tab_width = -1, bool always_open = false) {- ImageSurface im = new ImageSurface (Format.RGB24, 0, 0);- Context cr = new Context (im);- TextExtents te;- int s = (tabs.length () == 0) ? 0 : selected + 1; if (tab_width < 0) {@@ -830,10 +830,6 @@ class Toolbox : GLib.Object { cr.restore (); }- - public bool is_expanded () {- return expanded;- } } class ToolboxExpander : Expander {