Clean up
This commit is contained in:
parent
0c5c680f62
commit
ee7be81434
|
@ -1315,7 +1315,7 @@ point_to_line_segment_distance
|
||||||
/* The projection is beyond the line segment. */
|
/* The projection is beyond the line segment. */
|
||||||
if (u < 0.)
|
if (u < 0.)
|
||||||
return ld_point_distance (point, p1->x, p1->y);
|
return ld_point_distance (point, p1->x, p1->y);
|
||||||
else if (u > 1.)
|
if (u > 1.)
|
||||||
return ld_point_distance (point, p2->x, p2->y);
|
return ld_point_distance (point, p2->x, p2->y);
|
||||||
|
|
||||||
/* The projection is on the line segment. */
|
/* The projection is on the line segment. */
|
||||||
|
|
|
@ -250,7 +250,6 @@ ld_lua_alloc (void *ud, void *ptr, size_t osize, size_t nsize)
|
||||||
g_free (ptr);
|
g_free (ptr);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return g_try_realloc (ptr, nsize);
|
return g_try_realloc (ptr, nsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -618,7 +618,7 @@ diagram_get_name (LdWindowMain *self)
|
||||||
|
|
||||||
if (self->priv->filename)
|
if (self->priv->filename)
|
||||||
return g_filename_display_basename (self->priv->filename);
|
return g_filename_display_basename (self->priv->filename);
|
||||||
else
|
|
||||||
return g_strdup (_("Unsaved Diagram"));
|
return g_strdup (_("Unsaved Diagram"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -698,13 +698,11 @@ diagram_save (LdWindowMain *self, GtkWindow *dialog_parent,
|
||||||
gtk_widget_destroy (message_dialog);
|
gtk_widget_destroy (message_dialog);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
ld_diagram_set_modified (self->priv->diagram, FALSE);
|
ld_diagram_set_modified (self->priv->diagram, FALSE);
|
||||||
update_title (self);
|
update_title (self);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* diagram_open:
|
* diagram_open:
|
||||||
|
@ -1179,11 +1177,11 @@ static gboolean
|
||||||
on_action_about_activate_link (GtkAboutDialog *dialog, gchar *uri,
|
on_action_about_activate_link (GtkAboutDialog *dialog, gchar *uri,
|
||||||
LdWindowMain *self)
|
LdWindowMain *self)
|
||||||
{
|
{
|
||||||
|
#ifdef G_OS_WIN32
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
|
|
||||||
window = gtk_widget_get_window (GTK_WIDGET (self));
|
window = gtk_widget_get_window (GTK_WIDGET (self));
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
|
||||||
/* gtk_show_uri() on Windows XP fails, due to trying to establish
|
/* gtk_show_uri() on Windows XP fails, due to trying to establish
|
||||||
* an SSL connection, so let's first try to not do that on Windows.
|
* an SSL connection, so let's first try to not do that on Windows.
|
||||||
* `cmd.exe /c start "" ...` would pop up a command line window,
|
* `cmd.exe /c start "" ...` would pop up a command line window,
|
||||||
|
|
Loading…
Reference in New Issue